diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 00000000..be8323fb --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,30 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven +# +# This file is auto-generated by OpenAPI Generator (https://openapi-generator.tech) + +name: Java CI with Maven + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + build: + name: Build Reseller API + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '8' ] + steps: + - uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v2 + with: + java-version: ${{ matrix.java }} + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -B package --no-transfer-progress --file pom.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..a530464a --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# exclude jar for gradle wrapper +!gradle/wrapper/*.jar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +# build files +**/target +target +.gradle +build diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# 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 diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES new file mode 100644 index 00000000..e272cd08 --- /dev/null +++ b/.openapi-generator/FILES @@ -0,0 +1,1053 @@ +.github/workflows/maven.yml +.gitignore +.openapi-generator-ignore +.travis.yml +README.md +api/openapi.yaml +build.gradle +build.sbt +docs/AddressType.md +docs/AvailabilityAsyncNotificationRequest.md +docs/AvailabilityAsyncNotificationRequestResourceInner.md +docs/AvailabilityAsyncNotificationRequestResourceInnerLinksInner.md +docs/DealsApi.md +docs/DealsDetailsResponse.md +docs/DealsDetailsResponseProductsInner.md +docs/DealsSearchResponse.md +docs/DealsSearchResponseDealsInner.md +docs/Error.md +docs/ErrorResponse.md +docs/ErrorResponseDTO.md +docs/ErrorResponseErrorsInner.md +docs/ErrorResponseErrorsInnerFieldsInner.md +docs/Fields.md +docs/FreightEstimateApi.md +docs/FreightRequest.md +docs/FreightRequestLinesInner.md +docs/FreightRequestShipToAddressInner.md +docs/FreightResponse.md +docs/FreightResponseFreightEstimateResponse.md +docs/FreightResponseFreightEstimateResponseDistributionInner.md +docs/FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner.md +docs/FreightResponseFreightEstimateResponseLinesInner.md +docs/GetResellerV6ValidateQuote400Response.md +docs/GetResellerV6ValidateQuote400ResponseFieldsInner.md +docs/GetResellerV6ValidateQuote500Response.md +docs/InvoiceDetailRequest.md +docs/InvoiceDetailRequestServicerequest.md +docs/InvoiceDetailRequestServicerequestInvoicedetailrequest.md +docs/InvoiceDetailRequestServicerequestRequestpreamble.md +docs/InvoiceDetailResponse.md +docs/InvoiceDetailResponseServiceresponse.md +docs/InvoiceDetailResponseServiceresponseInvoicedetailresponse.md +docs/InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner.md +docs/InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner.md +docs/InvoiceDetailResponseServiceresponseResponsepreamble.md +docs/InvoiceDetails.md +docs/InvoiceDetailsv61Response.md +docs/InvoiceDetailsv61ResponseBillToInfo.md +docs/InvoiceDetailsv61ResponseFxRateInfo.md +docs/InvoiceDetailsv61ResponseLinesInner.md +docs/InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner.md +docs/InvoiceDetailsv61ResponsePaymentTermsInfo.md +docs/InvoiceDetailsv61ResponseShipToInfo.md +docs/InvoiceDetailsv61ResponseSummary.md +docs/InvoiceDetailsv61ResponseSummaryForeignFxTotals.md +docs/InvoiceDetailsv61ResponseSummaryLines.md +docs/InvoiceDetailsv61ResponseSummaryMiscChargesInner.md +docs/InvoiceDetailsv61ResponseSummaryTotals.md +docs/InvoiceSearchResponse.md +docs/InvoiceSearchResponseInvoicesInner.md +docs/InvoicesApi.md +docs/InvoicesV4Api.md +docs/InvoicesV5Api.md +docs/InvoicesV6Api.md +docs/MultiSKUPriceAndStockRequest.md +docs/MultiSKUPriceAndStockRequestServicerequest.md +docs/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest.md +docs/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem.md +docs/MultiSKUPriceAndStockRequestServicerequestRequestpreamble.md +docs/MultiSKUPriceAndStockResponse.md +docs/MultiSKUPriceAndStockResponseServiceresponse.md +docs/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse.md +docs/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.md +docs/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner.md +docs/OrderCancelResponse.md +docs/OrderCancelResponseServiceresponse.md +docs/OrderCancelResponseServiceresponseResponsepreamble.md +docs/OrderCreateRequest.md +docs/OrderCreateRequestAdditionalAttributesInner.md +docs/OrderCreateRequestEndUserInfo.md +docs/OrderCreateRequestLinesInner.md +docs/OrderCreateRequestLinesInnerAdditionalAttributesInner.md +docs/OrderCreateRequestLinesInnerEndUserInfoInner.md +docs/OrderCreateRequestLinesInnerWarrantyInfoInner.md +docs/OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner.md +docs/OrderCreateRequestOrdercreaterequest.md +docs/OrderCreateRequestOrdercreaterequestOrdercreatedetails.md +docs/OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner.md +docs/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.md +docs/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.md +docs/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner.md +docs/OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.md +docs/OrderCreateRequestOrdercreaterequestRequestpreamble.md +docs/OrderCreateRequestResellerInfo.md +docs/OrderCreateRequestShipToInfo.md +docs/OrderCreateRequestShipmentDetails.md +docs/OrderCreateRequestVmf.md +docs/OrderCreateResponse.md +docs/OrderCreateResponseEndUserInfo.md +docs/OrderCreateResponseOrdersInner.md +docs/OrderCreateResponseOrdersInnerAdditionalAttributesInner.md +docs/OrderCreateResponseOrdersInnerLinesInner.md +docs/OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner.md +docs/OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner.md +docs/OrderCreateResponseOrdersInnerLinksInner.md +docs/OrderCreateResponseOrdersInnerMiscellaneousChargesInner.md +docs/OrderCreateResponseOrdersInnerRejectedLineItemsInner.md +docs/OrderCreateResponseServiceresponse.md +docs/OrderCreateResponseServiceresponseOrdercreateresponseInner.md +docs/OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.md +docs/OrderCreateResponseServiceresponseOrdersummary.md +docs/OrderCreateResponseServiceresponseOrdersummaryShiptoaddress.md +docs/OrderCreateResponseShipToInfo.md +docs/OrderDeleteRequest.md +docs/OrderDeleteRequestServicerequest.md +docs/OrderDeleteRequestServicerequestOrderDeleteRequestDetails.md +docs/OrderDeleteRequestServicerequestRequestpreamble.md +docs/OrderDeleteResponse.md +docs/OrderDetailB2B.md +docs/OrderDetailB2BAdditionalAttributesInner.md +docs/OrderDetailB2BBillToInfo.md +docs/OrderDetailB2BEndUserInfo.md +docs/OrderDetailB2BLinesInner.md +docs/OrderDetailB2BLinesInnerAdditionalAttributesInner.md +docs/OrderDetailB2BLinesInnerEstimatedDatesInner.md +docs/OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery.md +docs/OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange.md +docs/OrderDetailB2BLinesInnerEstimatedDatesInnerShip.md +docs/OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange.md +docs/OrderDetailB2BLinesInnerLinksInner.md +docs/OrderDetailB2BLinesInnerMultipleShipmentsInner.md +docs/OrderDetailB2BLinesInnerScheduleLinesInner.md +docs/OrderDetailB2BLinesInnerServiceContractInfo.md +docs/OrderDetailB2BLinesInnerServiceContractInfoContractInfo.md +docs/OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo.md +docs/OrderDetailB2BLinesInnerServiceContractInfoSubscriptions.md +docs/OrderDetailB2BLinesInnerShipmentDetailsInner.md +docs/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.md +docs/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner.md +docs/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner.md +docs/OrderDetailB2BMiscellaneousChargesInner.md +docs/OrderDetailB2BShipToInfo.md +docs/OrderDetailRequest.md +docs/OrderDetailRequestServicerequest.md +docs/OrderDetailRequestServicerequestOrderdetailrequest.md +docs/OrderDetailResponse.md +docs/OrderDetailResponseBillToInfo.md +docs/OrderDetailResponseEndUserInfo.md +docs/OrderDetailResponseLinesInner.md +docs/OrderDetailResponseLinesInnerAdditionalAttributesInner.md +docs/OrderDetailResponseLinesInnerLinksInner.md +docs/OrderDetailResponseLinesInnerShipmentDetailsInner.md +docs/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails.md +docs/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner.md +docs/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner.md +docs/OrderDetailResponseMiscellaneousChargesInner.md +docs/OrderDetailResponseServiceresponse.md +docs/OrderDetailResponseServiceresponseOrderdetailresponse.md +docs/OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.md +docs/OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner.md +docs/OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo.md +docs/OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner.md +docs/OrderDetailResponseServiceresponseOrderdetailresponseLinesInner.md +docs/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner.md +docs/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.md +docs/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails.md +docs/OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner.md +docs/OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.md +docs/OrderDetailResponseShipToInfo.md +docs/OrderModifyRequest.md +docs/OrderModifyRequestAdditionalAttributesInner.md +docs/OrderModifyRequestLinesInner.md +docs/OrderModifyRequestServicerequest.md +docs/OrderModifyRequestServicerequestOrdermodifyrequest.md +docs/OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata.md +docs/OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner.md +docs/OrderModifyRequestServicerequestOrdermodifyrequestShipto.md +docs/OrderModifyRequestServicerequestRequestpreamble.md +docs/OrderModifyRequestShipToInfo.md +docs/OrderModifyResponse.md +docs/OrderModifyResponseLinesInner.md +docs/OrderModifyResponseLinesInnerAdditionalAttributesInner.md +docs/OrderModifyResponseLinesInnerShipmentDetails.md +docs/OrderModifyResponseRejectedLineItemsInner.md +docs/OrderModifyResponseServiceresponse.md +docs/OrderModifyResponseServiceresponseOrdermodifyresponse.md +docs/OrderModifyResponseServiceresponseResponsepreamble.md +docs/OrderModifyResponseShipToInfo.md +docs/OrderSearchRequest.md +docs/OrderSearchRequestServicerequest.md +docs/OrderSearchRequestServicerequestOrderLookupRequest.md +docs/OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber.md +docs/OrderSearchRequestServicerequestOrderLookupRequestOrderNumber.md +docs/OrderSearchRequestServicerequestRequestpreamble.md +docs/OrderSearchResponse.md +docs/OrderSearchResponseOrdersInner.md +docs/OrderSearchResponseOrdersInnerLinks.md +docs/OrderSearchResponseOrdersInnerSubOrdersInner.md +docs/OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner.md +docs/OrderSearchResponseServiceResponse.md +docs/OrderSearchResponseServiceResponseOrdersearchresponse.md +docs/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner.md +docs/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks.md +docs/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner.md +docs/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner.md +docs/OrderSearchResponseServiceResponseResponsepreamble.md +docs/OrderStatusApi.md +docs/OrderStatusAsyncNotificationRequest.md +docs/OrderStatusAsyncNotificationRequestResourceInner.md +docs/OrderStatusAsyncNotificationRequestResourceInnerLinesInner.md +docs/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner.md +docs/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner.md +docs/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner.md +docs/OrderStatusAsyncNotificationRequestResourceInnerLinksInner.md +docs/OrdersApi.md +docs/OrdersV4Api.md +docs/OrdersV5Api.md +docs/OrdersV6Api.md +docs/PostQuoteToOrderV6400Response.md +docs/PostQuoteToOrderV6400ResponseFieldsInner.md +docs/PostRenewalssearch400Response.md +docs/PriceAndAvailabilityRequest.md +docs/PriceAndAvailabilityRequestAdditionalAttributesInner.md +docs/PriceAndAvailabilityRequestAvailabilityByWarehouseInner.md +docs/PriceAndAvailabilityRequestProductsInner.md +docs/PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner.md +docs/PriceAndAvailabilityRequestServicerequest.md +docs/PriceAndAvailabilityRequestServicerequestPriceandstockrequest.md +docs/PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.md +docs/PriceAndAvailabilityRequestServicerequestRequestpreamble.md +docs/PriceAndAvailabilityResponse.md +docs/PriceAndAvailabilityResponseInner.md +docs/PriceAndAvailabilityResponseInnerAvailability.md +docs/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner.md +docs/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner.md +docs/PriceAndAvailabilityResponseInnerDiscountsInner.md +docs/PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner.md +docs/PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.md +docs/PriceAndAvailabilityResponseInnerPricing.md +docs/PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner.md +docs/PriceAndAvailabilityResponseInnerServiceFeesInner.md +docs/PriceAndAvailabilityResponseServiceresponse.md +docs/PriceAndAvailabilityResponseServiceresponsePriceandstockresponse.md +docs/PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.md +docs/PriceAndAvailabilityResponseServiceresponseResponsepreamble.md +docs/ProductCatalogApi.md +docs/ProductCatalogV4Api.md +docs/ProductCatalogV5Api.md +docs/ProductDetailResponse.md +docs/ProductDetailResponseAdditionalInformation.md +docs/ProductDetailResponseAdditionalInformationProductWeightInner.md +docs/ProductDetailResponseCiscoFieldsInner.md +docs/ProductDetailResponseIndicatorsInner.md +docs/ProductDetailResponseTechnicalSpecificationsInner.md +docs/ProductLineType.md +docs/ProductLineTypeSerialnumberdetailsInner.md +docs/ProductLineTypeTrackingnumberdetailsInner.md +docs/ProductSearchRequest.md +docs/ProductSearchRequestServicerequest.md +docs/ProductSearchRequestServicerequestProductsearchrequest.md +docs/ProductSearchRequestServicerequestProductsearchrequestSearchcriteria.md +docs/ProductSearchRequestServicerequestRequestpreamble.md +docs/ProductSearchResponse.md +docs/ProductSearchResponseCatalogInner.md +docs/ProductSearchResponseCatalogInnerLinksInner.md +docs/ProductSearchResponseServiceresponse.md +docs/ProductSearchResponseServiceresponseProductsearchresponseInner.md +docs/ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner.md +docs/ProductSearchResponseServiceresponseResponsepreamble.md +docs/QuoteDetails.md +docs/QuoteDetailsQuoteDetailResponse.md +docs/QuoteDetailsQuoteDetailResponseResponsePreamble.md +docs/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse.md +docs/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo.md +docs/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo.md +docs/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.md +docs/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes.md +docs/QuoteDetailsRequest.md +docs/QuoteDetailsRequestQuoteProductsRequest.md +docs/QuoteDetailsRequestQuoteProductsRequestRequestpreamble.md +docs/QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest.md +docs/QuoteDetailsResponse.md +docs/QuoteDetailsResponseAdditionalAttributesInner.md +docs/QuoteDetailsResponseEndUserInfo.md +docs/QuoteDetailsResponseProductsInner.md +docs/QuoteDetailsResponseProductsInnerPrice.md +docs/QuoteDetailsResponseQuoteDetailResponse.md +docs/QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.md +docs/QuoteDetailsResponseResellerInfo.md +docs/QuoteListRequest.md +docs/QuoteListRequestQuoteSearchRequest.md +docs/QuoteListRequestQuoteSearchRequestRequestPreamble.md +docs/QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest.md +docs/QuoteListResponse.md +docs/QuoteListResponseQuoteSearchResponse.md +docs/QuoteListResponseQuoteSearchResponseQuoteListInner.md +docs/QuoteListResponseQuoteSearchResponseResponsePreamble.md +docs/QuoteProductList.md +docs/QuoteProductListPrice.md +docs/QuoteSearchResponse.md +docs/QuoteSearchResponseQuotesInner.md +docs/QuoteToOrderApi.md +docs/QuoteToOrderDetailsDTO.md +docs/QuoteToOrderDetailsDTOAdditionalAttributesInner.md +docs/QuoteToOrderDetailsDTOEndUserInfoInner.md +docs/QuoteToOrderDetailsDTOLinesInner.md +docs/QuoteToOrderDetailsDTOShipToInfoInner.md +docs/QuoteToOrderDetailsDTOVmfadditionalAttributesInner.md +docs/QuoteToOrderResponse.md +docs/QuotesApi.md +docs/QuotesV4Api.md +docs/QuotesV5Api.md +docs/RenewalsApi.md +docs/RenewalsDetailsResponse.md +docs/RenewalsDetailsResponseAdditionalAttributesInner.md +docs/RenewalsDetailsResponseEndUserInfoInner.md +docs/RenewalsDetailsResponseProductsInner.md +docs/RenewalsDetailsResponseReferenceNumberInner.md +docs/RenewalsSearchRequest.md +docs/RenewalsSearchRequestDataType.md +docs/RenewalsSearchRequestDataTypeEndDate.md +docs/RenewalsSearchRequestDataTypeExpirationDate.md +docs/RenewalsSearchRequestDataTypeInvoiceDate.md +docs/RenewalsSearchRequestDataTypeStartDate.md +docs/RenewalsSearchRequestStatus.md +docs/RenewalsSearchRequestStatusOpporutinyStatus.md +docs/RenewalsSearchResponse.md +docs/RenewalsSearchResponseRenewalsInner.md +docs/RenewalsSearchResponseRenewalsInnerLinksInner.md +docs/ReturnsApi.md +docs/ReturnsCreateRequest.md +docs/ReturnsCreateRequestListInner.md +docs/ReturnsCreateRequestListInnerShipFromInfoInner.md +docs/ReturnsCreateResponse.md +docs/ReturnsCreateResponseReturnsClaimsInner.md +docs/ReturnsDetailsResponse.md +docs/ReturnsDetailsResponseProductsInner.md +docs/ReturnsSearchResponse.md +docs/ReturnsSearchResponseReturnsClaimsInner.md +docs/ReturnsSearchResponseReturnsClaimsInnerLinksInner.md +docs/StockUpdateApi.md +docs/ValidateQuoteResponse.md +docs/ValidateQuoteResponseLinesInner.md +docs/ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner.md +docs/ValidateQuoteResponseVmfAdditionalAttributesInner.md +docs/WarehouseListType.md +git_push.sh +gradle.properties +gradle/wrapper/gradle-wrapper.jar +gradle/wrapper/gradle-wrapper.properties +gradlew +gradlew.bat +pom.xml +settings.gradle +src/main/AndroidManifest.xml +src/main/java/xiresellers/client/ApiCallback.java +src/main/java/xiresellers/client/ApiClient.java +src/main/java/xiresellers/client/ApiException.java +src/main/java/xiresellers/client/ApiResponse.java +src/main/java/xiresellers/client/Configuration.java +src/main/java/xiresellers/client/GzipRequestInterceptor.java +src/main/java/xiresellers/client/JSON.java +src/main/java/xiresellers/client/Pair.java +src/main/java/xiresellers/client/ProgressRequestBody.java +src/main/java/xiresellers/client/ProgressResponseBody.java +src/main/java/xiresellers/client/ServerConfiguration.java +src/main/java/xiresellers/client/ServerVariable.java +src/main/java/xiresellers/client/StringUtil.java +src/main/java/xiresellers/client/api/DealsApi.java +src/main/java/xiresellers/client/api/FreightEstimateApi.java +src/main/java/xiresellers/client/api/InvoicesApi.java +src/main/java/xiresellers/client/api/InvoicesV4Api.java +src/main/java/xiresellers/client/api/InvoicesV5Api.java +src/main/java/xiresellers/client/api/InvoicesV6Api.java +src/main/java/xiresellers/client/api/OrderStatusApi.java +src/main/java/xiresellers/client/api/OrdersApi.java +src/main/java/xiresellers/client/api/OrdersV4Api.java +src/main/java/xiresellers/client/api/OrdersV5Api.java +src/main/java/xiresellers/client/api/OrdersV6Api.java +src/main/java/xiresellers/client/api/ProductCatalogApi.java +src/main/java/xiresellers/client/api/ProductCatalogV4Api.java +src/main/java/xiresellers/client/api/ProductCatalogV5Api.java +src/main/java/xiresellers/client/api/QuoteToOrderApi.java +src/main/java/xiresellers/client/api/QuotesApi.java +src/main/java/xiresellers/client/api/QuotesV4Api.java +src/main/java/xiresellers/client/api/QuotesV5Api.java +src/main/java/xiresellers/client/api/RenewalsApi.java +src/main/java/xiresellers/client/api/ReturnsApi.java +src/main/java/xiresellers/client/api/StockUpdateApi.java +src/main/java/xiresellers/client/auth/ApiKeyAuth.java +src/main/java/xiresellers/client/auth/Authentication.java +src/main/java/xiresellers/client/auth/HttpBasicAuth.java +src/main/java/xiresellers/client/auth/HttpBearerAuth.java +src/main/java/xiresellers/client/auth/OAuth.java +src/main/java/xiresellers/client/auth/OAuthFlow.java +src/main/java/xiresellers/client/auth/OAuthOkHttpClient.java +src/main/java/xiresellers/client/auth/RetryingOAuth.java +src/main/java/xiresellers/client/model/AbstractOpenApiSchema.java +src/main/java/xiresellers/client/model/AddressType.java +src/main/java/xiresellers/client/model/AvailabilityAsyncNotificationRequest.java +src/main/java/xiresellers/client/model/AvailabilityAsyncNotificationRequestResourceInner.java +src/main/java/xiresellers/client/model/AvailabilityAsyncNotificationRequestResourceInnerLinksInner.java +src/main/java/xiresellers/client/model/DealsDetailsResponse.java +src/main/java/xiresellers/client/model/DealsDetailsResponseProductsInner.java +src/main/java/xiresellers/client/model/DealsSearchResponse.java +src/main/java/xiresellers/client/model/DealsSearchResponseDealsInner.java +src/main/java/xiresellers/client/model/Error.java +src/main/java/xiresellers/client/model/ErrorResponse.java +src/main/java/xiresellers/client/model/ErrorResponseDTO.java +src/main/java/xiresellers/client/model/ErrorResponseErrorsInner.java +src/main/java/xiresellers/client/model/ErrorResponseErrorsInnerFieldsInner.java +src/main/java/xiresellers/client/model/Fields.java +src/main/java/xiresellers/client/model/FreightRequest.java +src/main/java/xiresellers/client/model/FreightRequestLinesInner.java +src/main/java/xiresellers/client/model/FreightRequestShipToAddressInner.java +src/main/java/xiresellers/client/model/FreightResponse.java +src/main/java/xiresellers/client/model/FreightResponseFreightEstimateResponse.java +src/main/java/xiresellers/client/model/FreightResponseFreightEstimateResponseDistributionInner.java +src/main/java/xiresellers/client/model/FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner.java +src/main/java/xiresellers/client/model/FreightResponseFreightEstimateResponseLinesInner.java +src/main/java/xiresellers/client/model/GetResellerV6ValidateQuote400Response.java +src/main/java/xiresellers/client/model/GetResellerV6ValidateQuote400ResponseFieldsInner.java +src/main/java/xiresellers/client/model/GetResellerV6ValidateQuote500Response.java +src/main/java/xiresellers/client/model/InvoiceDetailRequest.java +src/main/java/xiresellers/client/model/InvoiceDetailRequestServicerequest.java +src/main/java/xiresellers/client/model/InvoiceDetailRequestServicerequestInvoicedetailrequest.java +src/main/java/xiresellers/client/model/InvoiceDetailRequestServicerequestRequestpreamble.java +src/main/java/xiresellers/client/model/InvoiceDetailResponse.java +src/main/java/xiresellers/client/model/InvoiceDetailResponseServiceresponse.java +src/main/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseInvoicedetailresponse.java +src/main/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner.java +src/main/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner.java +src/main/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseResponsepreamble.java +src/main/java/xiresellers/client/model/InvoiceDetails.java +src/main/java/xiresellers/client/model/InvoiceDetailsv61Response.java +src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseBillToInfo.java +src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseFxRateInfo.java +src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseLinesInner.java +src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner.java +src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponsePaymentTermsInfo.java +src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseShipToInfo.java +src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummary.java +src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryForeignFxTotals.java +src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryLines.java +src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryMiscChargesInner.java +src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryTotals.java +src/main/java/xiresellers/client/model/InvoiceSearchResponse.java +src/main/java/xiresellers/client/model/InvoiceSearchResponseInvoicesInner.java +src/main/java/xiresellers/client/model/MultiSKUPriceAndStockRequest.java +src/main/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequest.java +src/main/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest.java +src/main/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem.java +src/main/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestRequestpreamble.java +src/main/java/xiresellers/client/model/MultiSKUPriceAndStockResponse.java +src/main/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponse.java +src/main/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse.java +src/main/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.java +src/main/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner.java +src/main/java/xiresellers/client/model/OrderCancelResponse.java +src/main/java/xiresellers/client/model/OrderCancelResponseServiceresponse.java +src/main/java/xiresellers/client/model/OrderCancelResponseServiceresponseResponsepreamble.java +src/main/java/xiresellers/client/model/OrderCreateRequest.java +src/main/java/xiresellers/client/model/OrderCreateRequestAdditionalAttributesInner.java +src/main/java/xiresellers/client/model/OrderCreateRequestEndUserInfo.java +src/main/java/xiresellers/client/model/OrderCreateRequestLinesInner.java +src/main/java/xiresellers/client/model/OrderCreateRequestLinesInnerAdditionalAttributesInner.java +src/main/java/xiresellers/client/model/OrderCreateRequestLinesInnerEndUserInfoInner.java +src/main/java/xiresellers/client/model/OrderCreateRequestLinesInnerWarrantyInfoInner.java +src/main/java/xiresellers/client/model/OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner.java +src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequest.java +src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetails.java +src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner.java +src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.java +src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.java +src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner.java +src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.java +src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestRequestpreamble.java +src/main/java/xiresellers/client/model/OrderCreateRequestResellerInfo.java +src/main/java/xiresellers/client/model/OrderCreateRequestShipToInfo.java +src/main/java/xiresellers/client/model/OrderCreateRequestShipmentDetails.java +src/main/java/xiresellers/client/model/OrderCreateRequestVmf.java +src/main/java/xiresellers/client/model/OrderCreateResponse.java +src/main/java/xiresellers/client/model/OrderCreateResponseEndUserInfo.java +src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInner.java +src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerAdditionalAttributesInner.java +src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinesInner.java +src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner.java +src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner.java +src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinksInner.java +src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerMiscellaneousChargesInner.java +src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerRejectedLineItemsInner.java +src/main/java/xiresellers/client/model/OrderCreateResponseServiceresponse.java +src/main/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdercreateresponseInner.java +src/main/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.java +src/main/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdersummary.java +src/main/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdersummaryShiptoaddress.java +src/main/java/xiresellers/client/model/OrderCreateResponseShipToInfo.java +src/main/java/xiresellers/client/model/OrderDeleteRequest.java +src/main/java/xiresellers/client/model/OrderDeleteRequestServicerequest.java +src/main/java/xiresellers/client/model/OrderDeleteRequestServicerequestOrderDeleteRequestDetails.java +src/main/java/xiresellers/client/model/OrderDeleteRequestServicerequestRequestpreamble.java +src/main/java/xiresellers/client/model/OrderDeleteResponse.java +src/main/java/xiresellers/client/model/OrderDetailB2B.java +src/main/java/xiresellers/client/model/OrderDetailB2BAdditionalAttributesInner.java +src/main/java/xiresellers/client/model/OrderDetailB2BBillToInfo.java +src/main/java/xiresellers/client/model/OrderDetailB2BEndUserInfo.java +src/main/java/xiresellers/client/model/OrderDetailB2BLinesInner.java +src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerAdditionalAttributesInner.java +src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInner.java +src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery.java +src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange.java +src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerShip.java +src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange.java +src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerLinksInner.java +src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerMultipleShipmentsInner.java +src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerScheduleLinesInner.java +src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfo.java +src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoContractInfo.java +src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo.java +src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoSubscriptions.java +src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInner.java +src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.java +src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner.java +src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner.java +src/main/java/xiresellers/client/model/OrderDetailB2BMiscellaneousChargesInner.java +src/main/java/xiresellers/client/model/OrderDetailB2BShipToInfo.java +src/main/java/xiresellers/client/model/OrderDetailRequest.java +src/main/java/xiresellers/client/model/OrderDetailRequestServicerequest.java +src/main/java/xiresellers/client/model/OrderDetailRequestServicerequestOrderdetailrequest.java +src/main/java/xiresellers/client/model/OrderDetailResponse.java +src/main/java/xiresellers/client/model/OrderDetailResponseBillToInfo.java +src/main/java/xiresellers/client/model/OrderDetailResponseEndUserInfo.java +src/main/java/xiresellers/client/model/OrderDetailResponseLinesInner.java +src/main/java/xiresellers/client/model/OrderDetailResponseLinesInnerAdditionalAttributesInner.java +src/main/java/xiresellers/client/model/OrderDetailResponseLinesInnerLinksInner.java +src/main/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInner.java +src/main/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails.java +src/main/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner.java +src/main/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner.java +src/main/java/xiresellers/client/model/OrderDetailResponseMiscellaneousChargesInner.java +src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponse.java +src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponse.java +src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.java +src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner.java +src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo.java +src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner.java +src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInner.java +src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner.java +src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.java +src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails.java +src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner.java +src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.java +src/main/java/xiresellers/client/model/OrderDetailResponseShipToInfo.java +src/main/java/xiresellers/client/model/OrderModifyRequest.java +src/main/java/xiresellers/client/model/OrderModifyRequestAdditionalAttributesInner.java +src/main/java/xiresellers/client/model/OrderModifyRequestLinesInner.java +src/main/java/xiresellers/client/model/OrderModifyRequestServicerequest.java +src/main/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequest.java +src/main/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata.java +src/main/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner.java +src/main/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestShipto.java +src/main/java/xiresellers/client/model/OrderModifyRequestServicerequestRequestpreamble.java +src/main/java/xiresellers/client/model/OrderModifyRequestShipToInfo.java +src/main/java/xiresellers/client/model/OrderModifyResponse.java +src/main/java/xiresellers/client/model/OrderModifyResponseLinesInner.java +src/main/java/xiresellers/client/model/OrderModifyResponseLinesInnerAdditionalAttributesInner.java +src/main/java/xiresellers/client/model/OrderModifyResponseLinesInnerShipmentDetails.java +src/main/java/xiresellers/client/model/OrderModifyResponseRejectedLineItemsInner.java +src/main/java/xiresellers/client/model/OrderModifyResponseServiceresponse.java +src/main/java/xiresellers/client/model/OrderModifyResponseServiceresponseOrdermodifyresponse.java +src/main/java/xiresellers/client/model/OrderModifyResponseServiceresponseResponsepreamble.java +src/main/java/xiresellers/client/model/OrderModifyResponseShipToInfo.java +src/main/java/xiresellers/client/model/OrderSearchRequest.java +src/main/java/xiresellers/client/model/OrderSearchRequestServicerequest.java +src/main/java/xiresellers/client/model/OrderSearchRequestServicerequestOrderLookupRequest.java +src/main/java/xiresellers/client/model/OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber.java +src/main/java/xiresellers/client/model/OrderSearchRequestServicerequestOrderLookupRequestOrderNumber.java +src/main/java/xiresellers/client/model/OrderSearchRequestServicerequestRequestpreamble.java +src/main/java/xiresellers/client/model/OrderSearchResponse.java +src/main/java/xiresellers/client/model/OrderSearchResponseOrdersInner.java +src/main/java/xiresellers/client/model/OrderSearchResponseOrdersInnerLinks.java +src/main/java/xiresellers/client/model/OrderSearchResponseOrdersInnerSubOrdersInner.java +src/main/java/xiresellers/client/model/OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner.java +src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponse.java +src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponse.java +src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner.java +src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks.java +src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner.java +src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner.java +src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponseResponsepreamble.java +src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequest.java +src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInner.java +src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInner.java +src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner.java +src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner.java +src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner.java +src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinksInner.java +src/main/java/xiresellers/client/model/PostQuoteToOrderV6400Response.java +src/main/java/xiresellers/client/model/PostQuoteToOrderV6400ResponseFieldsInner.java +src/main/java/xiresellers/client/model/PostRenewalssearch400Response.java +src/main/java/xiresellers/client/model/PriceAndAvailabilityRequest.java +src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestAdditionalAttributesInner.java +src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestAvailabilityByWarehouseInner.java +src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestProductsInner.java +src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner.java +src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequest.java +src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestPriceandstockrequest.java +src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.java +src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestRequestpreamble.java +src/main/java/xiresellers/client/model/PriceAndAvailabilityResponse.java +src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInner.java +src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerAvailability.java +src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner.java +src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner.java +src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerDiscountsInner.java +src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner.java +src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.java +src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerPricing.java +src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner.java +src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerServiceFeesInner.java +src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponse.java +src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponsePriceandstockresponse.java +src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.java +src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponseResponsepreamble.java +src/main/java/xiresellers/client/model/ProductDetailResponse.java +src/main/java/xiresellers/client/model/ProductDetailResponseAdditionalInformation.java +src/main/java/xiresellers/client/model/ProductDetailResponseAdditionalInformationProductWeightInner.java +src/main/java/xiresellers/client/model/ProductDetailResponseCiscoFieldsInner.java +src/main/java/xiresellers/client/model/ProductDetailResponseIndicatorsInner.java +src/main/java/xiresellers/client/model/ProductDetailResponseTechnicalSpecificationsInner.java +src/main/java/xiresellers/client/model/ProductLineType.java +src/main/java/xiresellers/client/model/ProductLineTypeSerialnumberdetailsInner.java +src/main/java/xiresellers/client/model/ProductLineTypeTrackingnumberdetailsInner.java +src/main/java/xiresellers/client/model/ProductSearchRequest.java +src/main/java/xiresellers/client/model/ProductSearchRequestServicerequest.java +src/main/java/xiresellers/client/model/ProductSearchRequestServicerequestProductsearchrequest.java +src/main/java/xiresellers/client/model/ProductSearchRequestServicerequestProductsearchrequestSearchcriteria.java +src/main/java/xiresellers/client/model/ProductSearchRequestServicerequestRequestpreamble.java +src/main/java/xiresellers/client/model/ProductSearchResponse.java +src/main/java/xiresellers/client/model/ProductSearchResponseCatalogInner.java +src/main/java/xiresellers/client/model/ProductSearchResponseCatalogInnerLinksInner.java +src/main/java/xiresellers/client/model/ProductSearchResponseServiceresponse.java +src/main/java/xiresellers/client/model/ProductSearchResponseServiceresponseProductsearchresponseInner.java +src/main/java/xiresellers/client/model/ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner.java +src/main/java/xiresellers/client/model/ProductSearchResponseServiceresponseResponsepreamble.java +src/main/java/xiresellers/client/model/QuoteDetails.java +src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponse.java +src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseResponsePreamble.java +src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse.java +src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo.java +src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo.java +src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.java +src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes.java +src/main/java/xiresellers/client/model/QuoteDetailsRequest.java +src/main/java/xiresellers/client/model/QuoteDetailsRequestQuoteProductsRequest.java +src/main/java/xiresellers/client/model/QuoteDetailsRequestQuoteProductsRequestRequestpreamble.java +src/main/java/xiresellers/client/model/QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest.java +src/main/java/xiresellers/client/model/QuoteDetailsResponse.java +src/main/java/xiresellers/client/model/QuoteDetailsResponseAdditionalAttributesInner.java +src/main/java/xiresellers/client/model/QuoteDetailsResponseEndUserInfo.java +src/main/java/xiresellers/client/model/QuoteDetailsResponseProductsInner.java +src/main/java/xiresellers/client/model/QuoteDetailsResponseProductsInnerPrice.java +src/main/java/xiresellers/client/model/QuoteDetailsResponseQuoteDetailResponse.java +src/main/java/xiresellers/client/model/QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.java +src/main/java/xiresellers/client/model/QuoteDetailsResponseResellerInfo.java +src/main/java/xiresellers/client/model/QuoteListRequest.java +src/main/java/xiresellers/client/model/QuoteListRequestQuoteSearchRequest.java +src/main/java/xiresellers/client/model/QuoteListRequestQuoteSearchRequestRequestPreamble.java +src/main/java/xiresellers/client/model/QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest.java +src/main/java/xiresellers/client/model/QuoteListResponse.java +src/main/java/xiresellers/client/model/QuoteListResponseQuoteSearchResponse.java +src/main/java/xiresellers/client/model/QuoteListResponseQuoteSearchResponseQuoteListInner.java +src/main/java/xiresellers/client/model/QuoteListResponseQuoteSearchResponseResponsePreamble.java +src/main/java/xiresellers/client/model/QuoteProductList.java +src/main/java/xiresellers/client/model/QuoteProductListPrice.java +src/main/java/xiresellers/client/model/QuoteSearchResponse.java +src/main/java/xiresellers/client/model/QuoteSearchResponseQuotesInner.java +src/main/java/xiresellers/client/model/QuoteToOrderDetailsDTO.java +src/main/java/xiresellers/client/model/QuoteToOrderDetailsDTOAdditionalAttributesInner.java +src/main/java/xiresellers/client/model/QuoteToOrderDetailsDTOEndUserInfoInner.java +src/main/java/xiresellers/client/model/QuoteToOrderDetailsDTOLinesInner.java +src/main/java/xiresellers/client/model/QuoteToOrderDetailsDTOShipToInfoInner.java +src/main/java/xiresellers/client/model/QuoteToOrderDetailsDTOVmfadditionalAttributesInner.java +src/main/java/xiresellers/client/model/QuoteToOrderResponse.java +src/main/java/xiresellers/client/model/RenewalsDetailsResponse.java +src/main/java/xiresellers/client/model/RenewalsDetailsResponseAdditionalAttributesInner.java +src/main/java/xiresellers/client/model/RenewalsDetailsResponseEndUserInfoInner.java +src/main/java/xiresellers/client/model/RenewalsDetailsResponseProductsInner.java +src/main/java/xiresellers/client/model/RenewalsDetailsResponseReferenceNumberInner.java +src/main/java/xiresellers/client/model/RenewalsSearchRequest.java +src/main/java/xiresellers/client/model/RenewalsSearchRequestDataType.java +src/main/java/xiresellers/client/model/RenewalsSearchRequestDataTypeEndDate.java +src/main/java/xiresellers/client/model/RenewalsSearchRequestDataTypeExpirationDate.java +src/main/java/xiresellers/client/model/RenewalsSearchRequestDataTypeInvoiceDate.java +src/main/java/xiresellers/client/model/RenewalsSearchRequestDataTypeStartDate.java +src/main/java/xiresellers/client/model/RenewalsSearchRequestStatus.java +src/main/java/xiresellers/client/model/RenewalsSearchRequestStatusOpporutinyStatus.java +src/main/java/xiresellers/client/model/RenewalsSearchResponse.java +src/main/java/xiresellers/client/model/RenewalsSearchResponseRenewalsInner.java +src/main/java/xiresellers/client/model/RenewalsSearchResponseRenewalsInnerLinksInner.java +src/main/java/xiresellers/client/model/ReturnsCreateRequest.java +src/main/java/xiresellers/client/model/ReturnsCreateRequestListInner.java +src/main/java/xiresellers/client/model/ReturnsCreateRequestListInnerShipFromInfoInner.java +src/main/java/xiresellers/client/model/ReturnsCreateResponse.java +src/main/java/xiresellers/client/model/ReturnsCreateResponseReturnsClaimsInner.java +src/main/java/xiresellers/client/model/ReturnsDetailsResponse.java +src/main/java/xiresellers/client/model/ReturnsDetailsResponseProductsInner.java +src/main/java/xiresellers/client/model/ReturnsSearchResponse.java +src/main/java/xiresellers/client/model/ReturnsSearchResponseReturnsClaimsInner.java +src/main/java/xiresellers/client/model/ReturnsSearchResponseReturnsClaimsInnerLinksInner.java +src/main/java/xiresellers/client/model/ValidateQuoteResponse.java +src/main/java/xiresellers/client/model/ValidateQuoteResponseLinesInner.java +src/main/java/xiresellers/client/model/ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner.java +src/main/java/xiresellers/client/model/ValidateQuoteResponseVmfAdditionalAttributesInner.java +src/main/java/xiresellers/client/model/WarehouseListType.java +src/test/java/xiresellers/client/api/DealsApiTest.java +src/test/java/xiresellers/client/api/FreightEstimateApiTest.java +src/test/java/xiresellers/client/api/InvoicesApiTest.java +src/test/java/xiresellers/client/api/InvoicesV4ApiTest.java +src/test/java/xiresellers/client/api/InvoicesV5ApiTest.java +src/test/java/xiresellers/client/api/InvoicesV6ApiTest.java +src/test/java/xiresellers/client/api/OrderStatusApiTest.java +src/test/java/xiresellers/client/api/OrdersApiTest.java +src/test/java/xiresellers/client/api/OrdersV4ApiTest.java +src/test/java/xiresellers/client/api/OrdersV5ApiTest.java +src/test/java/xiresellers/client/api/OrdersV6ApiTest.java +src/test/java/xiresellers/client/api/ProductCatalogApiTest.java +src/test/java/xiresellers/client/api/ProductCatalogV4ApiTest.java +src/test/java/xiresellers/client/api/ProductCatalogV5ApiTest.java +src/test/java/xiresellers/client/api/QuoteToOrderApiTest.java +src/test/java/xiresellers/client/api/QuotesApiTest.java +src/test/java/xiresellers/client/api/QuotesV4ApiTest.java +src/test/java/xiresellers/client/api/QuotesV5ApiTest.java +src/test/java/xiresellers/client/api/RenewalsApiTest.java +src/test/java/xiresellers/client/api/ReturnsApiTest.java +src/test/java/xiresellers/client/api/StockUpdateApiTest.java +src/test/java/xiresellers/client/model/AddressTypeTest.java +src/test/java/xiresellers/client/model/AvailabilityAsyncNotificationRequestResourceInnerLinksInnerTest.java +src/test/java/xiresellers/client/model/AvailabilityAsyncNotificationRequestResourceInnerTest.java +src/test/java/xiresellers/client/model/AvailabilityAsyncNotificationRequestTest.java +src/test/java/xiresellers/client/model/DealsDetailsResponseProductsInnerTest.java +src/test/java/xiresellers/client/model/DealsDetailsResponseTest.java +src/test/java/xiresellers/client/model/DealsSearchResponseDealsInnerTest.java +src/test/java/xiresellers/client/model/DealsSearchResponseTest.java +src/test/java/xiresellers/client/model/ErrorResponseDTOTest.java +src/test/java/xiresellers/client/model/ErrorResponseErrorsInnerFieldsInnerTest.java +src/test/java/xiresellers/client/model/ErrorResponseErrorsInnerTest.java +src/test/java/xiresellers/client/model/ErrorResponseTest.java +src/test/java/xiresellers/client/model/ErrorTest.java +src/test/java/xiresellers/client/model/FieldsTest.java +src/test/java/xiresellers/client/model/FreightRequestLinesInnerTest.java +src/test/java/xiresellers/client/model/FreightRequestShipToAddressInnerTest.java +src/test/java/xiresellers/client/model/FreightRequestTest.java +src/test/java/xiresellers/client/model/FreightResponseFreightEstimateResponseDistributionInnerCarrierListInnerTest.java +src/test/java/xiresellers/client/model/FreightResponseFreightEstimateResponseDistributionInnerTest.java +src/test/java/xiresellers/client/model/FreightResponseFreightEstimateResponseLinesInnerTest.java +src/test/java/xiresellers/client/model/FreightResponseFreightEstimateResponseTest.java +src/test/java/xiresellers/client/model/FreightResponseTest.java +src/test/java/xiresellers/client/model/GetResellerV6ValidateQuote400ResponseFieldsInnerTest.java +src/test/java/xiresellers/client/model/GetResellerV6ValidateQuote400ResponseTest.java +src/test/java/xiresellers/client/model/GetResellerV6ValidateQuote500ResponseTest.java +src/test/java/xiresellers/client/model/InvoiceDetailRequestServicerequestInvoicedetailrequestTest.java +src/test/java/xiresellers/client/model/InvoiceDetailRequestServicerequestRequestpreambleTest.java +src/test/java/xiresellers/client/model/InvoiceDetailRequestServicerequestTest.java +src/test/java/xiresellers/client/model/InvoiceDetailRequestTest.java +src/test/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInnerTest.java +src/test/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInnerTest.java +src/test/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseInvoicedetailresponseTest.java +src/test/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseResponsepreambleTest.java +src/test/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseTest.java +src/test/java/xiresellers/client/model/InvoiceDetailResponseTest.java +src/test/java/xiresellers/client/model/InvoiceDetailsTest.java +src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseBillToInfoTest.java +src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseFxRateInfoTest.java +src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseLinesInnerSerialNumbersInnerTest.java +src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseLinesInnerTest.java +src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponsePaymentTermsInfoTest.java +src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseShipToInfoTest.java +src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryForeignFxTotalsTest.java +src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryLinesTest.java +src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryMiscChargesInnerTest.java +src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryTest.java +src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryTotalsTest.java +src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseTest.java +src/test/java/xiresellers/client/model/InvoiceSearchResponseInvoicesInnerTest.java +src/test/java/xiresellers/client/model/InvoiceSearchResponseTest.java +src/test/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItemTest.java +src/test/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestTest.java +src/test/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestRequestpreambleTest.java +src/test/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestTest.java +src/test/java/xiresellers/client/model/MultiSKUPriceAndStockRequestTest.java +src/test/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerTest.java +src/test/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInnerTest.java +src/test/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseTest.java +src/test/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponseTest.java +src/test/java/xiresellers/client/model/MultiSKUPriceAndStockResponseTest.java +src/test/java/xiresellers/client/model/OrderCancelResponseServiceresponseResponsepreambleTest.java +src/test/java/xiresellers/client/model/OrderCancelResponseServiceresponseTest.java +src/test/java/xiresellers/client/model/OrderCancelResponseTest.java +src/test/java/xiresellers/client/model/OrderCreateRequestAdditionalAttributesInnerTest.java +src/test/java/xiresellers/client/model/OrderCreateRequestEndUserInfoTest.java +src/test/java/xiresellers/client/model/OrderCreateRequestLinesInnerAdditionalAttributesInnerTest.java +src/test/java/xiresellers/client/model/OrderCreateRequestLinesInnerEndUserInfoInnerTest.java +src/test/java/xiresellers/client/model/OrderCreateRequestLinesInnerTest.java +src/test/java/xiresellers/client/model/OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInnerTest.java +src/test/java/xiresellers/client/model/OrderCreateRequestLinesInnerWarrantyInfoInnerTest.java +src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInnerTest.java +src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduserTest.java +src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInnerTest.java +src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerTest.java +src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddressTest.java +src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsTest.java +src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestRequestpreambleTest.java +src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestTest.java +src/test/java/xiresellers/client/model/OrderCreateRequestResellerInfoTest.java +src/test/java/xiresellers/client/model/OrderCreateRequestShipToInfoTest.java +src/test/java/xiresellers/client/model/OrderCreateRequestShipmentDetailsTest.java +src/test/java/xiresellers/client/model/OrderCreateRequestTest.java +src/test/java/xiresellers/client/model/OrderCreateRequestVmfTest.java +src/test/java/xiresellers/client/model/OrderCreateResponseEndUserInfoTest.java +src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerAdditionalAttributesInnerTest.java +src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInnerTest.java +src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInnerTest.java +src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinesInnerTest.java +src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinksInnerTest.java +src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerMiscellaneousChargesInnerTest.java +src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerRejectedLineItemsInnerTest.java +src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerTest.java +src/test/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInnerTest.java +src/test/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdercreateresponseInnerTest.java +src/test/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdersummaryShiptoaddressTest.java +src/test/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdersummaryTest.java +src/test/java/xiresellers/client/model/OrderCreateResponseServiceresponseTest.java +src/test/java/xiresellers/client/model/OrderCreateResponseShipToInfoTest.java +src/test/java/xiresellers/client/model/OrderCreateResponseTest.java +src/test/java/xiresellers/client/model/OrderDeleteRequestServicerequestOrderDeleteRequestDetailsTest.java +src/test/java/xiresellers/client/model/OrderDeleteRequestServicerequestRequestpreambleTest.java +src/test/java/xiresellers/client/model/OrderDeleteRequestServicerequestTest.java +src/test/java/xiresellers/client/model/OrderDeleteRequestTest.java +src/test/java/xiresellers/client/model/OrderDeleteResponseTest.java +src/test/java/xiresellers/client/model/OrderDetailB2BAdditionalAttributesInnerTest.java +src/test/java/xiresellers/client/model/OrderDetailB2BBillToInfoTest.java +src/test/java/xiresellers/client/model/OrderDetailB2BEndUserInfoTest.java +src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerAdditionalAttributesInnerTest.java +src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRangeTest.java +src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryTest.java +src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRangeTest.java +src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerShipTest.java +src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerTest.java +src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerLinksInnerTest.java +src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerMultipleShipmentsInnerTest.java +src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerScheduleLinesInnerTest.java +src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoContractInfoTest.java +src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoLicenseInfoTest.java +src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoSubscriptionsTest.java +src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoTest.java +src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTest.java +src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInnerTest.java +src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerTest.java +src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerTest.java +src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerTest.java +src/test/java/xiresellers/client/model/OrderDetailB2BMiscellaneousChargesInnerTest.java +src/test/java/xiresellers/client/model/OrderDetailB2BShipToInfoTest.java +src/test/java/xiresellers/client/model/OrderDetailB2BTest.java +src/test/java/xiresellers/client/model/OrderDetailRequestServicerequestOrderdetailrequestTest.java +src/test/java/xiresellers/client/model/OrderDetailRequestServicerequestTest.java +src/test/java/xiresellers/client/model/OrderDetailRequestTest.java +src/test/java/xiresellers/client/model/OrderDetailResponseBillToInfoTest.java +src/test/java/xiresellers/client/model/OrderDetailResponseEndUserInfoTest.java +src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerAdditionalAttributesInnerTest.java +src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerLinksInnerTest.java +src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTest.java +src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInnerTest.java +src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerTest.java +src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerTest.java +src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerTest.java +src/test/java/xiresellers/client/model/OrderDetailResponseMiscellaneousChargesInnerTest.java +src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddressTest.java +src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInnerTest.java +src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfoTest.java +src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInnerTest.java +src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInnerTest.java +src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetailsTest.java +src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerTest.java +src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerTest.java +src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInnerTest.java +src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddressTest.java +src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseTest.java +src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseTest.java +src/test/java/xiresellers/client/model/OrderDetailResponseShipToInfoTest.java +src/test/java/xiresellers/client/model/OrderDetailResponseTest.java +src/test/java/xiresellers/client/model/OrderModifyRequestAdditionalAttributesInnerTest.java +src/test/java/xiresellers/client/model/OrderModifyRequestLinesInnerTest.java +src/test/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestHeaderdataTest.java +src/test/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestLinedataInnerTest.java +src/test/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestShiptoTest.java +src/test/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestTest.java +src/test/java/xiresellers/client/model/OrderModifyRequestServicerequestRequestpreambleTest.java +src/test/java/xiresellers/client/model/OrderModifyRequestServicerequestTest.java +src/test/java/xiresellers/client/model/OrderModifyRequestShipToInfoTest.java +src/test/java/xiresellers/client/model/OrderModifyRequestTest.java +src/test/java/xiresellers/client/model/OrderModifyResponseLinesInnerAdditionalAttributesInnerTest.java +src/test/java/xiresellers/client/model/OrderModifyResponseLinesInnerShipmentDetailsTest.java +src/test/java/xiresellers/client/model/OrderModifyResponseLinesInnerTest.java +src/test/java/xiresellers/client/model/OrderModifyResponseRejectedLineItemsInnerTest.java +src/test/java/xiresellers/client/model/OrderModifyResponseServiceresponseOrdermodifyresponseTest.java +src/test/java/xiresellers/client/model/OrderModifyResponseServiceresponseResponsepreambleTest.java +src/test/java/xiresellers/client/model/OrderModifyResponseServiceresponseTest.java +src/test/java/xiresellers/client/model/OrderModifyResponseShipToInfoTest.java +src/test/java/xiresellers/client/model/OrderModifyResponseTest.java +src/test/java/xiresellers/client/model/OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumberTest.java +src/test/java/xiresellers/client/model/OrderSearchRequestServicerequestOrderLookupRequestOrderNumberTest.java +src/test/java/xiresellers/client/model/OrderSearchRequestServicerequestOrderLookupRequestTest.java +src/test/java/xiresellers/client/model/OrderSearchRequestServicerequestRequestpreambleTest.java +src/test/java/xiresellers/client/model/OrderSearchRequestServicerequestTest.java +src/test/java/xiresellers/client/model/OrderSearchRequestTest.java +src/test/java/xiresellers/client/model/OrderSearchResponseOrdersInnerLinksTest.java +src/test/java/xiresellers/client/model/OrderSearchResponseOrdersInnerSubOrdersInnerLinksInnerTest.java +src/test/java/xiresellers/client/model/OrderSearchResponseOrdersInnerSubOrdersInnerTest.java +src/test/java/xiresellers/client/model/OrderSearchResponseOrdersInnerTest.java +src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinksTest.java +src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInnerTest.java +src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerTest.java +src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerTest.java +src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseTest.java +src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseResponsepreambleTest.java +src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseTest.java +src/test/java/xiresellers/client/model/OrderSearchResponseTest.java +src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInnerTest.java +src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInnerTest.java +src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerTest.java +src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerTest.java +src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinksInnerTest.java +src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerTest.java +src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestTest.java +src/test/java/xiresellers/client/model/PostQuoteToOrderV6400ResponseFieldsInnerTest.java +src/test/java/xiresellers/client/model/PostQuoteToOrderV6400ResponseTest.java +src/test/java/xiresellers/client/model/PostRenewalssearch400ResponseTest.java +src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestAdditionalAttributesInnerTest.java +src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestAvailabilityByWarehouseInnerTest.java +src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInnerTest.java +src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestProductsInnerTest.java +src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInnerTest.java +src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestPriceandstockrequestTest.java +src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestRequestpreambleTest.java +src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestTest.java +src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestTest.java +src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInnerTest.java +src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerTest.java +src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerAvailabilityTest.java +src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInnerTest.java +src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInnerTest.java +src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerDiscountsInnerTest.java +src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerPricingTest.java +src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerReserveInventoryDetailsInnerTest.java +src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerServiceFeesInnerTest.java +src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerTest.java +src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInnerTest.java +src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponsePriceandstockresponseTest.java +src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponseResponsepreambleTest.java +src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponseTest.java +src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseTest.java +src/test/java/xiresellers/client/model/ProductDetailResponseAdditionalInformationProductWeightInnerTest.java +src/test/java/xiresellers/client/model/ProductDetailResponseAdditionalInformationTest.java +src/test/java/xiresellers/client/model/ProductDetailResponseCiscoFieldsInnerTest.java +src/test/java/xiresellers/client/model/ProductDetailResponseIndicatorsInnerTest.java +src/test/java/xiresellers/client/model/ProductDetailResponseTechnicalSpecificationsInnerTest.java +src/test/java/xiresellers/client/model/ProductDetailResponseTest.java +src/test/java/xiresellers/client/model/ProductLineTypeSerialnumberdetailsInnerTest.java +src/test/java/xiresellers/client/model/ProductLineTypeTest.java +src/test/java/xiresellers/client/model/ProductLineTypeTrackingnumberdetailsInnerTest.java +src/test/java/xiresellers/client/model/ProductSearchRequestServicerequestProductsearchrequestSearchcriteriaTest.java +src/test/java/xiresellers/client/model/ProductSearchRequestServicerequestProductsearchrequestTest.java +src/test/java/xiresellers/client/model/ProductSearchRequestServicerequestRequestpreambleTest.java +src/test/java/xiresellers/client/model/ProductSearchRequestServicerequestTest.java +src/test/java/xiresellers/client/model/ProductSearchRequestTest.java +src/test/java/xiresellers/client/model/ProductSearchResponseCatalogInnerLinksInnerTest.java +src/test/java/xiresellers/client/model/ProductSearchResponseCatalogInnerTest.java +src/test/java/xiresellers/client/model/ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInnerTest.java +src/test/java/xiresellers/client/model/ProductSearchResponseServiceresponseProductsearchresponseInnerTest.java +src/test/java/xiresellers/client/model/ProductSearchResponseServiceresponseResponsepreambleTest.java +src/test/java/xiresellers/client/model/ProductSearchResponseServiceresponseTest.java +src/test/java/xiresellers/client/model/ProductSearchResponseTest.java +src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseResponsePreambleTest.java +src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfoTest.java +src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfoTest.java +src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUserTest.java +src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseTest.java +src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributesTest.java +src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseTest.java +src/test/java/xiresellers/client/model/QuoteDetailsRequestQuoteProductsRequestRequestpreambleTest.java +src/test/java/xiresellers/client/model/QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequestTest.java +src/test/java/xiresellers/client/model/QuoteDetailsRequestQuoteProductsRequestTest.java +src/test/java/xiresellers/client/model/QuoteDetailsRequestTest.java +src/test/java/xiresellers/client/model/QuoteDetailsResponseAdditionalAttributesInnerTest.java +src/test/java/xiresellers/client/model/QuoteDetailsResponseEndUserInfoTest.java +src/test/java/xiresellers/client/model/QuoteDetailsResponseProductsInnerPriceTest.java +src/test/java/xiresellers/client/model/QuoteDetailsResponseProductsInnerTest.java +src/test/java/xiresellers/client/model/QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponseTest.java +src/test/java/xiresellers/client/model/QuoteDetailsResponseQuoteDetailResponseTest.java +src/test/java/xiresellers/client/model/QuoteDetailsResponseResellerInfoTest.java +src/test/java/xiresellers/client/model/QuoteDetailsResponseTest.java +src/test/java/xiresellers/client/model/QuoteDetailsTest.java +src/test/java/xiresellers/client/model/QuoteListRequestQuoteSearchRequestRequestPreambleTest.java +src/test/java/xiresellers/client/model/QuoteListRequestQuoteSearchRequestRetrieveQuoteRequestTest.java +src/test/java/xiresellers/client/model/QuoteListRequestQuoteSearchRequestTest.java +src/test/java/xiresellers/client/model/QuoteListRequestTest.java +src/test/java/xiresellers/client/model/QuoteListResponseQuoteSearchResponseQuoteListInnerTest.java +src/test/java/xiresellers/client/model/QuoteListResponseQuoteSearchResponseResponsePreambleTest.java +src/test/java/xiresellers/client/model/QuoteListResponseQuoteSearchResponseTest.java +src/test/java/xiresellers/client/model/QuoteListResponseTest.java +src/test/java/xiresellers/client/model/QuoteProductListPriceTest.java +src/test/java/xiresellers/client/model/QuoteProductListTest.java +src/test/java/xiresellers/client/model/QuoteSearchResponseQuotesInnerTest.java +src/test/java/xiresellers/client/model/QuoteSearchResponseTest.java +src/test/java/xiresellers/client/model/QuoteToOrderDetailsDTOAdditionalAttributesInnerTest.java +src/test/java/xiresellers/client/model/QuoteToOrderDetailsDTOEndUserInfoInnerTest.java +src/test/java/xiresellers/client/model/QuoteToOrderDetailsDTOLinesInnerTest.java +src/test/java/xiresellers/client/model/QuoteToOrderDetailsDTOShipToInfoInnerTest.java +src/test/java/xiresellers/client/model/QuoteToOrderDetailsDTOTest.java +src/test/java/xiresellers/client/model/QuoteToOrderDetailsDTOVmfadditionalAttributesInnerTest.java +src/test/java/xiresellers/client/model/QuoteToOrderResponseTest.java +src/test/java/xiresellers/client/model/RenewalsDetailsResponseAdditionalAttributesInnerTest.java +src/test/java/xiresellers/client/model/RenewalsDetailsResponseEndUserInfoInnerTest.java +src/test/java/xiresellers/client/model/RenewalsDetailsResponseProductsInnerTest.java +src/test/java/xiresellers/client/model/RenewalsDetailsResponseReferenceNumberInnerTest.java +src/test/java/xiresellers/client/model/RenewalsDetailsResponseTest.java +src/test/java/xiresellers/client/model/RenewalsSearchRequestDataTypeEndDateTest.java +src/test/java/xiresellers/client/model/RenewalsSearchRequestDataTypeExpirationDateTest.java +src/test/java/xiresellers/client/model/RenewalsSearchRequestDataTypeInvoiceDateTest.java +src/test/java/xiresellers/client/model/RenewalsSearchRequestDataTypeStartDateTest.java +src/test/java/xiresellers/client/model/RenewalsSearchRequestDataTypeTest.java +src/test/java/xiresellers/client/model/RenewalsSearchRequestStatusOpporutinyStatusTest.java +src/test/java/xiresellers/client/model/RenewalsSearchRequestStatusTest.java +src/test/java/xiresellers/client/model/RenewalsSearchRequestTest.java +src/test/java/xiresellers/client/model/RenewalsSearchResponseRenewalsInnerLinksInnerTest.java +src/test/java/xiresellers/client/model/RenewalsSearchResponseRenewalsInnerTest.java +src/test/java/xiresellers/client/model/RenewalsSearchResponseTest.java +src/test/java/xiresellers/client/model/ReturnsCreateRequestListInnerShipFromInfoInnerTest.java +src/test/java/xiresellers/client/model/ReturnsCreateRequestListInnerTest.java +src/test/java/xiresellers/client/model/ReturnsCreateRequestTest.java +src/test/java/xiresellers/client/model/ReturnsCreateResponseReturnsClaimsInnerTest.java +src/test/java/xiresellers/client/model/ReturnsCreateResponseTest.java +src/test/java/xiresellers/client/model/ReturnsDetailsResponseProductsInnerTest.java +src/test/java/xiresellers/client/model/ReturnsDetailsResponseTest.java +src/test/java/xiresellers/client/model/ReturnsSearchResponseReturnsClaimsInnerLinksInnerTest.java +src/test/java/xiresellers/client/model/ReturnsSearchResponseReturnsClaimsInnerTest.java +src/test/java/xiresellers/client/model/ReturnsSearchResponseTest.java +src/test/java/xiresellers/client/model/ValidateQuoteResponseLinesInnerTest.java +src/test/java/xiresellers/client/model/ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInnerTest.java +src/test/java/xiresellers/client/model/ValidateQuoteResponseTest.java +src/test/java/xiresellers/client/model/ValidateQuoteResponseVmfAdditionalAttributesInnerTest.java +src/test/java/xiresellers/client/model/WarehouseListTypeTest.java diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION new file mode 100644 index 00000000..4b49d9bb --- /dev/null +++ b/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.2.0 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..1b6741c0 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,22 @@ +# +# Generated by OpenAPI Generator: https://openapi-generator.tech +# +# Ref: https://docs.travis-ci.com/user/languages/java/ +# +language: java +jdk: + - openjdk12 + - openjdk11 + - openjdk10 + - openjdk9 + - openjdk8 +before_install: + # ensure gradlew has proper permission + - chmod a+x ./gradlew +script: + # test using maven + #- mvn test + # test using gradle + - gradle test + # test using sbt + # - sbt test diff --git a/README.md b/README.md index 3f349d56..1e7c51e6 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,518 @@ -# xi-sdk-java -Ingram Micro - Xvantage Integration Java Server-side SDK +# xi.sdk.resellers + +Reseller API +- API version: 6.0 + - Build date: 2024-01-22T11:06:29.712836Z[Etc/UTC] + +For Resellers.
+Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + + +*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* + + +## Requirements + +Building the API client library requires: +1. Java 1.8+ +2. Maven (3.8.3+)/Gradle (7.2+) + +## Installation + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn clean install +``` + +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: + +```shell +mvn clean deploy +``` + +Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. + +### Maven users + +Add this dependency to your project's POM: + +```xml + + xi.sdk.resellers + xi.sdk.resellers + 6.0 + compile + +``` + +### Gradle users + +Add this dependency to your project's build file: + +```groovy + repositories { + mavenCentral() // Needed if the 'xi.sdk.resellers' jar has been published to maven central. + mavenLocal() // Needed if the 'xi.sdk.resellers' jar has been published to the local maven repo. + } + + dependencies { + implementation "xi.sdk.resellers:xi.sdk.resellers:6.0" + } +``` + +### Others + +At first generate the JAR by executing: + +```shell +mvn clean package +``` + +Then manually install the following JARs: + +* `target/xi.sdk.resellers-6.0.jar` +* `target/lib/*.jar` + +## Getting Started + +Please follow the [installation](#installation) instruction and execute the following Java code: + +```java + +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.DealsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + DealsApi apiInstance = new DealsApi(defaultClient); + String imCustomerNumber = "20-222222"; // String | Your unique Ingram Micro customer number. + String imCountryCode = "US"; // String | Two-character ISO country code. + String imCorrelationID = "fbac82ba-cf0a-4bcf-fc03-0c5084"; // String | Unique transaction number to identify each transaction across all the systems. + String dealId = "12345678"; // String | Unique deal ID. + String imSenderID = "MyCompany"; // String | Unique value used to identify the sender of the transaction. Example: MyCompany + try { + DealsDetailsResponse result = apiInstance.getResellersV6Dealsdetails(imCustomerNumber, imCountryCode, imCorrelationID, dealId, imSenderID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DealsApi#getResellersV6Dealsdetails"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.ingrammicro.com:443/sandbox* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DealsApi* | [**getResellersV6Dealsdetails**](docs/DealsApi.md#getResellersV6Dealsdetails) | **GET** /resellers/v6/deals/{dealId} | Deals Details +*DealsApi* | [**getResellersV6Dealssearch**](docs/DealsApi.md#getResellersV6Dealssearch) | **GET** /resellers/v6/deals/search | Deals Search +*FreightEstimateApi* | [**postFreightestimate**](docs/FreightEstimateApi.md#postFreightestimate) | **POST** /resellers/v6/freightestimate | Freight Estimate +*InvoicesApi* | [**getInvoicedetailsV61**](docs/InvoicesApi.md#getInvoicedetailsV61) | **GET** /resellers/v6.1/invoices/{invoiceNumber} | Get Invoice Details v6.1 +*InvoicesApi* | [**getResellersV6Invoicesearch**](docs/InvoicesApi.md#getResellersV6Invoicesearch) | **GET** /resellers/v6/invoices/ | Search your invoice +*InvoicesV4Api* | [**postV4Invoicedetails**](docs/InvoicesV4Api.md#postV4Invoicedetails) | **POST** /invoices/v4/invoicedetails | Get Invoice Details +*InvoicesV5Api* | [**getInvoices**](docs/InvoicesV5Api.md#getInvoices) | **GET** /resellers/v5/invoices/{invoiceNumber} | Get Invoice Details +*InvoicesV6Api* | [**getInvoicedetailsV6**](docs/InvoicesV6Api.md#getInvoicedetailsV6) | **GET** /resellers/v6/invoices/{invoicenumber} | Get Invoice Details v6 +*OrderStatusApi* | [**resellersV1WebhooksOrderstatuseventPost**](docs/OrderStatusApi.md#resellersV1WebhooksOrderstatuseventPost) | **POST** /resellers/v1/webhooks/orderstatusevent | Order Status +*OrdersApi* | [**deleteOrdercancel**](docs/OrdersApi.md#deleteOrdercancel) | **DELETE** /resellers/v6/orders/{OrderNumber} | Cancel your Order +*OrdersApi* | [**getOrderdetailsV61**](docs/OrdersApi.md#getOrderdetailsV61) | **GET** /resellers/v6.1/orders/{ordernumber} | Get Order Details v6.1 +*OrdersApi* | [**getResellersV6Ordersearch**](docs/OrdersApi.md#getResellersV6Ordersearch) | **GET** /resellers/v6/orders/search | Search your Orders +*OrdersApi* | [**postCreateorderV6**](docs/OrdersApi.md#postCreateorderV6) | **POST** /resellers/v6/orders | Create your Order +*OrdersApi* | [**putOrdermodify**](docs/OrdersApi.md#putOrdermodify) | **PUT** /resellers/v6/orders/{orderNumber} | Modify your Order +*OrdersV4Api* | [**postV4Ordercreate**](docs/OrdersV4Api.md#postV4Ordercreate) | **POST** /orders/v4/ordercreate | Create a new Order +*OrdersV4Api* | [**postV4Orderdelete**](docs/OrdersV4Api.md#postV4Orderdelete) | **POST** /orders/v4/orderdelete | Delete an Order +*OrdersV4Api* | [**postV4Orderdetails**](docs/OrdersV4Api.md#postV4Orderdetails) | **POST** /orders/v4/orderdetails | Get Order Details +*OrdersV4Api* | [**postV4Ordermodify**](docs/OrdersV4Api.md#postV4Ordermodify) | **POST** /orders/v4/ordermodify | Modify an Existing Order +*OrdersV4Api* | [**postV4Ordersearch**](docs/OrdersV4Api.md#postV4Ordersearch) | **POST** /orders/v4/orderlookup | Order Search +*OrdersV5Api* | [**deleteOrdersOrderNumber**](docs/OrdersV5Api.md#deleteOrdersOrderNumber) | **DELETE** /resellers/v5/Orders/{ordernumber} | Cancel an Existing Order +*OrdersV5Api* | [**getOrdersSearch**](docs/OrdersV5Api.md#getOrdersSearch) | **GET** /resellers/v5/Orders/search | Search your Orders +*OrdersV5Api* | [**getV5OrdersDetails**](docs/OrdersV5Api.md#getV5OrdersDetails) | **GET** /resellers/v5/Orders/{ordernumber} | Get Order Details +*OrdersV5Api* | [**postV5OrdersCreate**](docs/OrdersV5Api.md#postV5OrdersCreate) | **POST** /resellers/v5/Orders | Create a New Order +*OrdersV6Api* | [**getOrderdetailsV6**](docs/OrdersV6Api.md#getOrderdetailsV6) | **GET** /resellers/v6/orders/{ordernumber} | Get Order Details v6 +*ProductCatalogApi* | [**getResellerV6Productdetail**](docs/ProductCatalogApi.md#getResellerV6Productdetail) | **GET** /resellers/v6/catalog/details/{ingramPartNumber} | Product Details +*ProductCatalogApi* | [**getResellerV6Productsearch**](docs/ProductCatalogApi.md#getResellerV6Productsearch) | **GET** /resellers/v6/catalog | Search Products +*ProductCatalogApi* | [**postPriceandavailability**](docs/ProductCatalogApi.md#postPriceandavailability) | **POST** /resellers/v6/catalog/priceandavailability | Price and Availability +*ProductCatalogV4Api* | [**postV4Multiskupriceandstock**](docs/ProductCatalogV4Api.md#postV4Multiskupriceandstock) | **POST** /products/v4/multiskupriceandstock | Product availability for upto 50 SKUs +*ProductCatalogV4Api* | [**postV4Productsearch**](docs/ProductCatalogV4Api.md#postV4Productsearch) | **POST** /products/v4/productsearch | Real-time Product Search +*ProductCatalogV5Api* | [**getV5CatalogProductsearch**](docs/ProductCatalogV5Api.md#getV5CatalogProductsearch) | **GET** /resellers/v5/Catalog | Search Product Catalog +*ProductCatalogV5Api* | [**multiSKUPriceAndStock**](docs/ProductCatalogV5Api.md#multiSKUPriceAndStock) | **POST** /resellers/v5/Catalog/priceandavailability | Find availability of upto 50 SKUs +*QuoteToOrderApi* | [**postQuoteToOrderV6**](docs/QuoteToOrderApi.md#postQuoteToOrderV6) | **POST** /resellers/v6/q2o/orders | Quote To Order +*QuotesApi* | [**getQuotessearchV6**](docs/QuotesApi.md#getQuotessearchV6) | **GET** /resellers/v6/quotes/search | Quote Search +*QuotesApi* | [**getResellerV6ValidateQuote**](docs/QuotesApi.md#getResellerV6ValidateQuote) | **GET** /resellers/v6/q2o/validatequote | Validate Quote +*QuotesApi* | [**getResellersV6Quotes**](docs/QuotesApi.md#getResellersV6Quotes) | **GET** /resellers/v6/quotes/{quoteNumber} | Get Quote Details +*QuotesV4Api* | [**postV4Quotedetails**](docs/QuotesV4Api.md#postV4Quotedetails) | **POST** /quotes/v1/quotedetails | Get Quote Details +*QuotesV4Api* | [**postV4Quotesearch**](docs/QuotesV4Api.md#postV4Quotesearch) | **POST** /quotes/v1/quotes | Get Quote List +*QuotesV5Api* | [**getV5QuotesDetails**](docs/QuotesV5Api.md#getV5QuotesDetails) | **GET** /resellers/v5/quote/{quoteNumber} | Get Quote Details +*QuotesV5Api* | [**postV5QuotesSearch**](docs/QuotesV5Api.md#postV5QuotesSearch) | **POST** /resellers/v5/quote/search | Search Quotes +*RenewalsApi* | [**getResellersV6Renewalsdetails**](docs/RenewalsApi.md#getResellersV6Renewalsdetails) | **GET** /resellers/v6/renewals/{renewalId} | Renewals Details +*RenewalsApi* | [**postRenewalssearch**](docs/RenewalsApi.md#postRenewalssearch) | **POST** /resellers/v6/renewals/search | Renewals Search +*ReturnsApi* | [**getResellersV6Returnsdetails**](docs/ReturnsApi.md#getResellersV6Returnsdetails) | **GET** /resellers/v6/returns/{caseRequestNumber} | Returns Details +*ReturnsApi* | [**getResellersV6Returnssearch**](docs/ReturnsApi.md#getResellersV6Returnssearch) | **GET** /resellers/v6/returns/search | Returns Search +*ReturnsApi* | [**postReturnscreate**](docs/ReturnsApi.md#postReturnscreate) | **POST** /resellers/v6/returns/create | Returns Create +*StockUpdateApi* | [**resellersV1WebhooksAvailabilityupdatePost**](docs/StockUpdateApi.md#resellersV1WebhooksAvailabilityupdatePost) | **POST** /resellers/v1/webhooks/availabilityupdate | Stock Update + + +## Documentation for Models + + - [AddressType](docs/AddressType.md) + - [AvailabilityAsyncNotificationRequest](docs/AvailabilityAsyncNotificationRequest.md) + - [AvailabilityAsyncNotificationRequestResourceInner](docs/AvailabilityAsyncNotificationRequestResourceInner.md) + - [AvailabilityAsyncNotificationRequestResourceInnerLinksInner](docs/AvailabilityAsyncNotificationRequestResourceInnerLinksInner.md) + - [DealsDetailsResponse](docs/DealsDetailsResponse.md) + - [DealsDetailsResponseProductsInner](docs/DealsDetailsResponseProductsInner.md) + - [DealsSearchResponse](docs/DealsSearchResponse.md) + - [DealsSearchResponseDealsInner](docs/DealsSearchResponseDealsInner.md) + - [Error](docs/Error.md) + - [ErrorResponse](docs/ErrorResponse.md) + - [ErrorResponseDTO](docs/ErrorResponseDTO.md) + - [ErrorResponseErrorsInner](docs/ErrorResponseErrorsInner.md) + - [ErrorResponseErrorsInnerFieldsInner](docs/ErrorResponseErrorsInnerFieldsInner.md) + - [Fields](docs/Fields.md) + - [FreightRequest](docs/FreightRequest.md) + - [FreightRequestLinesInner](docs/FreightRequestLinesInner.md) + - [FreightRequestShipToAddressInner](docs/FreightRequestShipToAddressInner.md) + - [FreightResponse](docs/FreightResponse.md) + - [FreightResponseFreightEstimateResponse](docs/FreightResponseFreightEstimateResponse.md) + - [FreightResponseFreightEstimateResponseDistributionInner](docs/FreightResponseFreightEstimateResponseDistributionInner.md) + - [FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner](docs/FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner.md) + - [FreightResponseFreightEstimateResponseLinesInner](docs/FreightResponseFreightEstimateResponseLinesInner.md) + - [GetResellerV6ValidateQuote400Response](docs/GetResellerV6ValidateQuote400Response.md) + - [GetResellerV6ValidateQuote400ResponseFieldsInner](docs/GetResellerV6ValidateQuote400ResponseFieldsInner.md) + - [GetResellerV6ValidateQuote500Response](docs/GetResellerV6ValidateQuote500Response.md) + - [InvoiceDetailRequest](docs/InvoiceDetailRequest.md) + - [InvoiceDetailRequestServicerequest](docs/InvoiceDetailRequestServicerequest.md) + - [InvoiceDetailRequestServicerequestInvoicedetailrequest](docs/InvoiceDetailRequestServicerequestInvoicedetailrequest.md) + - [InvoiceDetailRequestServicerequestRequestpreamble](docs/InvoiceDetailRequestServicerequestRequestpreamble.md) + - [InvoiceDetailResponse](docs/InvoiceDetailResponse.md) + - [InvoiceDetailResponseServiceresponse](docs/InvoiceDetailResponseServiceresponse.md) + - [InvoiceDetailResponseServiceresponseInvoicedetailresponse](docs/InvoiceDetailResponseServiceresponseInvoicedetailresponse.md) + - [InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner](docs/InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner.md) + - [InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner](docs/InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner.md) + - [InvoiceDetailResponseServiceresponseResponsepreamble](docs/InvoiceDetailResponseServiceresponseResponsepreamble.md) + - [InvoiceDetails](docs/InvoiceDetails.md) + - [InvoiceDetailsv61Response](docs/InvoiceDetailsv61Response.md) + - [InvoiceDetailsv61ResponseBillToInfo](docs/InvoiceDetailsv61ResponseBillToInfo.md) + - [InvoiceDetailsv61ResponseFxRateInfo](docs/InvoiceDetailsv61ResponseFxRateInfo.md) + - [InvoiceDetailsv61ResponseLinesInner](docs/InvoiceDetailsv61ResponseLinesInner.md) + - [InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner](docs/InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner.md) + - [InvoiceDetailsv61ResponsePaymentTermsInfo](docs/InvoiceDetailsv61ResponsePaymentTermsInfo.md) + - [InvoiceDetailsv61ResponseShipToInfo](docs/InvoiceDetailsv61ResponseShipToInfo.md) + - [InvoiceDetailsv61ResponseSummary](docs/InvoiceDetailsv61ResponseSummary.md) + - [InvoiceDetailsv61ResponseSummaryForeignFxTotals](docs/InvoiceDetailsv61ResponseSummaryForeignFxTotals.md) + - [InvoiceDetailsv61ResponseSummaryLines](docs/InvoiceDetailsv61ResponseSummaryLines.md) + - [InvoiceDetailsv61ResponseSummaryMiscChargesInner](docs/InvoiceDetailsv61ResponseSummaryMiscChargesInner.md) + - [InvoiceDetailsv61ResponseSummaryTotals](docs/InvoiceDetailsv61ResponseSummaryTotals.md) + - [InvoiceSearchResponse](docs/InvoiceSearchResponse.md) + - [InvoiceSearchResponseInvoicesInner](docs/InvoiceSearchResponseInvoicesInner.md) + - [MultiSKUPriceAndStockRequest](docs/MultiSKUPriceAndStockRequest.md) + - [MultiSKUPriceAndStockRequestServicerequest](docs/MultiSKUPriceAndStockRequestServicerequest.md) + - [MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest](docs/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest.md) + - [MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem](docs/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem.md) + - [MultiSKUPriceAndStockRequestServicerequestRequestpreamble](docs/MultiSKUPriceAndStockRequestServicerequestRequestpreamble.md) + - [MultiSKUPriceAndStockResponse](docs/MultiSKUPriceAndStockResponse.md) + - [MultiSKUPriceAndStockResponseServiceresponse](docs/MultiSKUPriceAndStockResponseServiceresponse.md) + - [MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse](docs/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse.md) + - [MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner](docs/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.md) + - [MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner](docs/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner.md) + - [OrderCancelResponse](docs/OrderCancelResponse.md) + - [OrderCancelResponseServiceresponse](docs/OrderCancelResponseServiceresponse.md) + - [OrderCancelResponseServiceresponseResponsepreamble](docs/OrderCancelResponseServiceresponseResponsepreamble.md) + - [OrderCreateRequest](docs/OrderCreateRequest.md) + - [OrderCreateRequestAdditionalAttributesInner](docs/OrderCreateRequestAdditionalAttributesInner.md) + - [OrderCreateRequestEndUserInfo](docs/OrderCreateRequestEndUserInfo.md) + - [OrderCreateRequestLinesInner](docs/OrderCreateRequestLinesInner.md) + - [OrderCreateRequestLinesInnerAdditionalAttributesInner](docs/OrderCreateRequestLinesInnerAdditionalAttributesInner.md) + - [OrderCreateRequestLinesInnerEndUserInfoInner](docs/OrderCreateRequestLinesInnerEndUserInfoInner.md) + - [OrderCreateRequestLinesInnerWarrantyInfoInner](docs/OrderCreateRequestLinesInnerWarrantyInfoInner.md) + - [OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner](docs/OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner.md) + - [OrderCreateRequestOrdercreaterequest](docs/OrderCreateRequestOrdercreaterequest.md) + - [OrderCreateRequestOrdercreaterequestOrdercreatedetails](docs/OrderCreateRequestOrdercreaterequestOrdercreatedetails.md) + - [OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner](docs/OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner.md) + - [OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner](docs/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.md) + - [OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser](docs/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.md) + - [OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner](docs/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner.md) + - [OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress](docs/OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.md) + - [OrderCreateRequestOrdercreaterequestRequestpreamble](docs/OrderCreateRequestOrdercreaterequestRequestpreamble.md) + - [OrderCreateRequestResellerInfo](docs/OrderCreateRequestResellerInfo.md) + - [OrderCreateRequestShipToInfo](docs/OrderCreateRequestShipToInfo.md) + - [OrderCreateRequestShipmentDetails](docs/OrderCreateRequestShipmentDetails.md) + - [OrderCreateRequestVmf](docs/OrderCreateRequestVmf.md) + - [OrderCreateResponse](docs/OrderCreateResponse.md) + - [OrderCreateResponseEndUserInfo](docs/OrderCreateResponseEndUserInfo.md) + - [OrderCreateResponseOrdersInner](docs/OrderCreateResponseOrdersInner.md) + - [OrderCreateResponseOrdersInnerAdditionalAttributesInner](docs/OrderCreateResponseOrdersInnerAdditionalAttributesInner.md) + - [OrderCreateResponseOrdersInnerLinesInner](docs/OrderCreateResponseOrdersInnerLinesInner.md) + - [OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner](docs/OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner.md) + - [OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner](docs/OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner.md) + - [OrderCreateResponseOrdersInnerLinksInner](docs/OrderCreateResponseOrdersInnerLinksInner.md) + - [OrderCreateResponseOrdersInnerMiscellaneousChargesInner](docs/OrderCreateResponseOrdersInnerMiscellaneousChargesInner.md) + - [OrderCreateResponseOrdersInnerRejectedLineItemsInner](docs/OrderCreateResponseOrdersInnerRejectedLineItemsInner.md) + - [OrderCreateResponseServiceresponse](docs/OrderCreateResponseServiceresponse.md) + - [OrderCreateResponseServiceresponseOrdercreateresponseInner](docs/OrderCreateResponseServiceresponseOrdercreateresponseInner.md) + - [OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner](docs/OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.md) + - [OrderCreateResponseServiceresponseOrdersummary](docs/OrderCreateResponseServiceresponseOrdersummary.md) + - [OrderCreateResponseServiceresponseOrdersummaryShiptoaddress](docs/OrderCreateResponseServiceresponseOrdersummaryShiptoaddress.md) + - [OrderCreateResponseShipToInfo](docs/OrderCreateResponseShipToInfo.md) + - [OrderDeleteRequest](docs/OrderDeleteRequest.md) + - [OrderDeleteRequestServicerequest](docs/OrderDeleteRequestServicerequest.md) + - [OrderDeleteRequestServicerequestOrderDeleteRequestDetails](docs/OrderDeleteRequestServicerequestOrderDeleteRequestDetails.md) + - [OrderDeleteRequestServicerequestRequestpreamble](docs/OrderDeleteRequestServicerequestRequestpreamble.md) + - [OrderDeleteResponse](docs/OrderDeleteResponse.md) + - [OrderDetailB2B](docs/OrderDetailB2B.md) + - [OrderDetailB2BAdditionalAttributesInner](docs/OrderDetailB2BAdditionalAttributesInner.md) + - [OrderDetailB2BBillToInfo](docs/OrderDetailB2BBillToInfo.md) + - [OrderDetailB2BEndUserInfo](docs/OrderDetailB2BEndUserInfo.md) + - [OrderDetailB2BLinesInner](docs/OrderDetailB2BLinesInner.md) + - [OrderDetailB2BLinesInnerAdditionalAttributesInner](docs/OrderDetailB2BLinesInnerAdditionalAttributesInner.md) + - [OrderDetailB2BLinesInnerEstimatedDatesInner](docs/OrderDetailB2BLinesInnerEstimatedDatesInner.md) + - [OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery](docs/OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery.md) + - [OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange](docs/OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange.md) + - [OrderDetailB2BLinesInnerEstimatedDatesInnerShip](docs/OrderDetailB2BLinesInnerEstimatedDatesInnerShip.md) + - [OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange](docs/OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange.md) + - [OrderDetailB2BLinesInnerLinksInner](docs/OrderDetailB2BLinesInnerLinksInner.md) + - [OrderDetailB2BLinesInnerMultipleShipmentsInner](docs/OrderDetailB2BLinesInnerMultipleShipmentsInner.md) + - [OrderDetailB2BLinesInnerScheduleLinesInner](docs/OrderDetailB2BLinesInnerScheduleLinesInner.md) + - [OrderDetailB2BLinesInnerServiceContractInfo](docs/OrderDetailB2BLinesInnerServiceContractInfo.md) + - [OrderDetailB2BLinesInnerServiceContractInfoContractInfo](docs/OrderDetailB2BLinesInnerServiceContractInfoContractInfo.md) + - [OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo](docs/OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo.md) + - [OrderDetailB2BLinesInnerServiceContractInfoSubscriptions](docs/OrderDetailB2BLinesInnerServiceContractInfoSubscriptions.md) + - [OrderDetailB2BLinesInnerShipmentDetailsInner](docs/OrderDetailB2BLinesInnerShipmentDetailsInner.md) + - [OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner](docs/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.md) + - [OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner](docs/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner.md) + - [OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner](docs/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner.md) + - [OrderDetailB2BMiscellaneousChargesInner](docs/OrderDetailB2BMiscellaneousChargesInner.md) + - [OrderDetailB2BShipToInfo](docs/OrderDetailB2BShipToInfo.md) + - [OrderDetailRequest](docs/OrderDetailRequest.md) + - [OrderDetailRequestServicerequest](docs/OrderDetailRequestServicerequest.md) + - [OrderDetailRequestServicerequestOrderdetailrequest](docs/OrderDetailRequestServicerequestOrderdetailrequest.md) + - [OrderDetailResponse](docs/OrderDetailResponse.md) + - [OrderDetailResponseBillToInfo](docs/OrderDetailResponseBillToInfo.md) + - [OrderDetailResponseEndUserInfo](docs/OrderDetailResponseEndUserInfo.md) + - [OrderDetailResponseLinesInner](docs/OrderDetailResponseLinesInner.md) + - [OrderDetailResponseLinesInnerAdditionalAttributesInner](docs/OrderDetailResponseLinesInnerAdditionalAttributesInner.md) + - [OrderDetailResponseLinesInnerLinksInner](docs/OrderDetailResponseLinesInnerLinksInner.md) + - [OrderDetailResponseLinesInnerShipmentDetailsInner](docs/OrderDetailResponseLinesInnerShipmentDetailsInner.md) + - [OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails](docs/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails.md) + - [OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner](docs/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner.md) + - [OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner](docs/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner.md) + - [OrderDetailResponseMiscellaneousChargesInner](docs/OrderDetailResponseMiscellaneousChargesInner.md) + - [OrderDetailResponseServiceresponse](docs/OrderDetailResponseServiceresponse.md) + - [OrderDetailResponseServiceresponseOrderdetailresponse](docs/OrderDetailResponseServiceresponseOrderdetailresponse.md) + - [OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress](docs/OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.md) + - [OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner](docs/OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner.md) + - [OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo](docs/OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo.md) + - [OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner](docs/OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner.md) + - [OrderDetailResponseServiceresponseOrderdetailresponseLinesInner](docs/OrderDetailResponseServiceresponseOrderdetailresponseLinesInner.md) + - [OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner](docs/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner.md) + - [OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner](docs/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.md) + - [OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails](docs/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails.md) + - [OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner](docs/OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner.md) + - [OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress](docs/OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.md) + - [OrderDetailResponseShipToInfo](docs/OrderDetailResponseShipToInfo.md) + - [OrderModifyRequest](docs/OrderModifyRequest.md) + - [OrderModifyRequestAdditionalAttributesInner](docs/OrderModifyRequestAdditionalAttributesInner.md) + - [OrderModifyRequestLinesInner](docs/OrderModifyRequestLinesInner.md) + - [OrderModifyRequestServicerequest](docs/OrderModifyRequestServicerequest.md) + - [OrderModifyRequestServicerequestOrdermodifyrequest](docs/OrderModifyRequestServicerequestOrdermodifyrequest.md) + - [OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata](docs/OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata.md) + - [OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner](docs/OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner.md) + - [OrderModifyRequestServicerequestOrdermodifyrequestShipto](docs/OrderModifyRequestServicerequestOrdermodifyrequestShipto.md) + - [OrderModifyRequestServicerequestRequestpreamble](docs/OrderModifyRequestServicerequestRequestpreamble.md) + - [OrderModifyRequestShipToInfo](docs/OrderModifyRequestShipToInfo.md) + - [OrderModifyResponse](docs/OrderModifyResponse.md) + - [OrderModifyResponseLinesInner](docs/OrderModifyResponseLinesInner.md) + - [OrderModifyResponseLinesInnerAdditionalAttributesInner](docs/OrderModifyResponseLinesInnerAdditionalAttributesInner.md) + - [OrderModifyResponseLinesInnerShipmentDetails](docs/OrderModifyResponseLinesInnerShipmentDetails.md) + - [OrderModifyResponseRejectedLineItemsInner](docs/OrderModifyResponseRejectedLineItemsInner.md) + - [OrderModifyResponseServiceresponse](docs/OrderModifyResponseServiceresponse.md) + - [OrderModifyResponseServiceresponseOrdermodifyresponse](docs/OrderModifyResponseServiceresponseOrdermodifyresponse.md) + - [OrderModifyResponseServiceresponseResponsepreamble](docs/OrderModifyResponseServiceresponseResponsepreamble.md) + - [OrderModifyResponseShipToInfo](docs/OrderModifyResponseShipToInfo.md) + - [OrderSearchRequest](docs/OrderSearchRequest.md) + - [OrderSearchRequestServicerequest](docs/OrderSearchRequestServicerequest.md) + - [OrderSearchRequestServicerequestOrderLookupRequest](docs/OrderSearchRequestServicerequestOrderLookupRequest.md) + - [OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber](docs/OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber.md) + - [OrderSearchRequestServicerequestOrderLookupRequestOrderNumber](docs/OrderSearchRequestServicerequestOrderLookupRequestOrderNumber.md) + - [OrderSearchRequestServicerequestRequestpreamble](docs/OrderSearchRequestServicerequestRequestpreamble.md) + - [OrderSearchResponse](docs/OrderSearchResponse.md) + - [OrderSearchResponseOrdersInner](docs/OrderSearchResponseOrdersInner.md) + - [OrderSearchResponseOrdersInnerLinks](docs/OrderSearchResponseOrdersInnerLinks.md) + - [OrderSearchResponseOrdersInnerSubOrdersInner](docs/OrderSearchResponseOrdersInnerSubOrdersInner.md) + - [OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner](docs/OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner.md) + - [OrderSearchResponseServiceResponse](docs/OrderSearchResponseServiceResponse.md) + - [OrderSearchResponseServiceResponseOrdersearchresponse](docs/OrderSearchResponseServiceResponseOrdersearchresponse.md) + - [OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner](docs/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner.md) + - [OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks](docs/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks.md) + - [OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner](docs/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner.md) + - [OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner](docs/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner.md) + - [OrderSearchResponseServiceResponseResponsepreamble](docs/OrderSearchResponseServiceResponseResponsepreamble.md) + - [OrderStatusAsyncNotificationRequest](docs/OrderStatusAsyncNotificationRequest.md) + - [OrderStatusAsyncNotificationRequestResourceInner](docs/OrderStatusAsyncNotificationRequestResourceInner.md) + - [OrderStatusAsyncNotificationRequestResourceInnerLinesInner](docs/OrderStatusAsyncNotificationRequestResourceInnerLinesInner.md) + - [OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner](docs/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner.md) + - [OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner](docs/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner.md) + - [OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner](docs/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner.md) + - [OrderStatusAsyncNotificationRequestResourceInnerLinksInner](docs/OrderStatusAsyncNotificationRequestResourceInnerLinksInner.md) + - [PostQuoteToOrderV6400Response](docs/PostQuoteToOrderV6400Response.md) + - [PostQuoteToOrderV6400ResponseFieldsInner](docs/PostQuoteToOrderV6400ResponseFieldsInner.md) + - [PostRenewalssearch400Response](docs/PostRenewalssearch400Response.md) + - [PriceAndAvailabilityRequest](docs/PriceAndAvailabilityRequest.md) + - [PriceAndAvailabilityRequestAdditionalAttributesInner](docs/PriceAndAvailabilityRequestAdditionalAttributesInner.md) + - [PriceAndAvailabilityRequestAvailabilityByWarehouseInner](docs/PriceAndAvailabilityRequestAvailabilityByWarehouseInner.md) + - [PriceAndAvailabilityRequestProductsInner](docs/PriceAndAvailabilityRequestProductsInner.md) + - [PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner](docs/PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner.md) + - [PriceAndAvailabilityRequestServicerequest](docs/PriceAndAvailabilityRequestServicerequest.md) + - [PriceAndAvailabilityRequestServicerequestPriceandstockrequest](docs/PriceAndAvailabilityRequestServicerequestPriceandstockrequest.md) + - [PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner](docs/PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.md) + - [PriceAndAvailabilityRequestServicerequestRequestpreamble](docs/PriceAndAvailabilityRequestServicerequestRequestpreamble.md) + - [PriceAndAvailabilityResponse](docs/PriceAndAvailabilityResponse.md) + - [PriceAndAvailabilityResponseInner](docs/PriceAndAvailabilityResponseInner.md) + - [PriceAndAvailabilityResponseInnerAvailability](docs/PriceAndAvailabilityResponseInnerAvailability.md) + - [PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner](docs/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner.md) + - [PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner](docs/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner.md) + - [PriceAndAvailabilityResponseInnerDiscountsInner](docs/PriceAndAvailabilityResponseInnerDiscountsInner.md) + - [PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner](docs/PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner.md) + - [PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner](docs/PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.md) + - [PriceAndAvailabilityResponseInnerPricing](docs/PriceAndAvailabilityResponseInnerPricing.md) + - [PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner](docs/PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner.md) + - [PriceAndAvailabilityResponseInnerServiceFeesInner](docs/PriceAndAvailabilityResponseInnerServiceFeesInner.md) + - [PriceAndAvailabilityResponseServiceresponse](docs/PriceAndAvailabilityResponseServiceresponse.md) + - [PriceAndAvailabilityResponseServiceresponsePriceandstockresponse](docs/PriceAndAvailabilityResponseServiceresponsePriceandstockresponse.md) + - [PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner](docs/PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.md) + - [PriceAndAvailabilityResponseServiceresponseResponsepreamble](docs/PriceAndAvailabilityResponseServiceresponseResponsepreamble.md) + - [ProductDetailResponse](docs/ProductDetailResponse.md) + - [ProductDetailResponseAdditionalInformation](docs/ProductDetailResponseAdditionalInformation.md) + - [ProductDetailResponseAdditionalInformationProductWeightInner](docs/ProductDetailResponseAdditionalInformationProductWeightInner.md) + - [ProductDetailResponseCiscoFieldsInner](docs/ProductDetailResponseCiscoFieldsInner.md) + - [ProductDetailResponseIndicatorsInner](docs/ProductDetailResponseIndicatorsInner.md) + - [ProductDetailResponseTechnicalSpecificationsInner](docs/ProductDetailResponseTechnicalSpecificationsInner.md) + - [ProductLineType](docs/ProductLineType.md) + - [ProductLineTypeSerialnumberdetailsInner](docs/ProductLineTypeSerialnumberdetailsInner.md) + - [ProductLineTypeTrackingnumberdetailsInner](docs/ProductLineTypeTrackingnumberdetailsInner.md) + - [ProductSearchRequest](docs/ProductSearchRequest.md) + - [ProductSearchRequestServicerequest](docs/ProductSearchRequestServicerequest.md) + - [ProductSearchRequestServicerequestProductsearchrequest](docs/ProductSearchRequestServicerequestProductsearchrequest.md) + - [ProductSearchRequestServicerequestProductsearchrequestSearchcriteria](docs/ProductSearchRequestServicerequestProductsearchrequestSearchcriteria.md) + - [ProductSearchRequestServicerequestRequestpreamble](docs/ProductSearchRequestServicerequestRequestpreamble.md) + - [ProductSearchResponse](docs/ProductSearchResponse.md) + - [ProductSearchResponseCatalogInner](docs/ProductSearchResponseCatalogInner.md) + - [ProductSearchResponseCatalogInnerLinksInner](docs/ProductSearchResponseCatalogInnerLinksInner.md) + - [ProductSearchResponseServiceresponse](docs/ProductSearchResponseServiceresponse.md) + - [ProductSearchResponseServiceresponseProductsearchresponseInner](docs/ProductSearchResponseServiceresponseProductsearchresponseInner.md) + - [ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner](docs/ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner.md) + - [ProductSearchResponseServiceresponseResponsepreamble](docs/ProductSearchResponseServiceresponseResponsepreamble.md) + - [QuoteDetails](docs/QuoteDetails.md) + - [QuoteDetailsQuoteDetailResponse](docs/QuoteDetailsQuoteDetailResponse.md) + - [QuoteDetailsQuoteDetailResponseResponsePreamble](docs/QuoteDetailsQuoteDetailResponseResponsePreamble.md) + - [QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse](docs/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse.md) + - [QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo](docs/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo.md) + - [QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo](docs/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo.md) + - [QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser](docs/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.md) + - [QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes](docs/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes.md) + - [QuoteDetailsRequest](docs/QuoteDetailsRequest.md) + - [QuoteDetailsRequestQuoteProductsRequest](docs/QuoteDetailsRequestQuoteProductsRequest.md) + - [QuoteDetailsRequestQuoteProductsRequestRequestpreamble](docs/QuoteDetailsRequestQuoteProductsRequestRequestpreamble.md) + - [QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest](docs/QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest.md) + - [QuoteDetailsResponse](docs/QuoteDetailsResponse.md) + - [QuoteDetailsResponseAdditionalAttributesInner](docs/QuoteDetailsResponseAdditionalAttributesInner.md) + - [QuoteDetailsResponseEndUserInfo](docs/QuoteDetailsResponseEndUserInfo.md) + - [QuoteDetailsResponseProductsInner](docs/QuoteDetailsResponseProductsInner.md) + - [QuoteDetailsResponseProductsInnerPrice](docs/QuoteDetailsResponseProductsInnerPrice.md) + - [QuoteDetailsResponseQuoteDetailResponse](docs/QuoteDetailsResponseQuoteDetailResponse.md) + - [QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse](docs/QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.md) + - [QuoteDetailsResponseResellerInfo](docs/QuoteDetailsResponseResellerInfo.md) + - [QuoteListRequest](docs/QuoteListRequest.md) + - [QuoteListRequestQuoteSearchRequest](docs/QuoteListRequestQuoteSearchRequest.md) + - [QuoteListRequestQuoteSearchRequestRequestPreamble](docs/QuoteListRequestQuoteSearchRequestRequestPreamble.md) + - [QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest](docs/QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest.md) + - [QuoteListResponse](docs/QuoteListResponse.md) + - [QuoteListResponseQuoteSearchResponse](docs/QuoteListResponseQuoteSearchResponse.md) + - [QuoteListResponseQuoteSearchResponseQuoteListInner](docs/QuoteListResponseQuoteSearchResponseQuoteListInner.md) + - [QuoteListResponseQuoteSearchResponseResponsePreamble](docs/QuoteListResponseQuoteSearchResponseResponsePreamble.md) + - [QuoteProductList](docs/QuoteProductList.md) + - [QuoteProductListPrice](docs/QuoteProductListPrice.md) + - [QuoteSearchResponse](docs/QuoteSearchResponse.md) + - [QuoteSearchResponseQuotesInner](docs/QuoteSearchResponseQuotesInner.md) + - [QuoteToOrderDetailsDTO](docs/QuoteToOrderDetailsDTO.md) + - [QuoteToOrderDetailsDTOAdditionalAttributesInner](docs/QuoteToOrderDetailsDTOAdditionalAttributesInner.md) + - [QuoteToOrderDetailsDTOEndUserInfoInner](docs/QuoteToOrderDetailsDTOEndUserInfoInner.md) + - [QuoteToOrderDetailsDTOLinesInner](docs/QuoteToOrderDetailsDTOLinesInner.md) + - [QuoteToOrderDetailsDTOShipToInfoInner](docs/QuoteToOrderDetailsDTOShipToInfoInner.md) + - [QuoteToOrderDetailsDTOVmfadditionalAttributesInner](docs/QuoteToOrderDetailsDTOVmfadditionalAttributesInner.md) + - [QuoteToOrderResponse](docs/QuoteToOrderResponse.md) + - [RenewalsDetailsResponse](docs/RenewalsDetailsResponse.md) + - [RenewalsDetailsResponseAdditionalAttributesInner](docs/RenewalsDetailsResponseAdditionalAttributesInner.md) + - [RenewalsDetailsResponseEndUserInfoInner](docs/RenewalsDetailsResponseEndUserInfoInner.md) + - [RenewalsDetailsResponseProductsInner](docs/RenewalsDetailsResponseProductsInner.md) + - [RenewalsDetailsResponseReferenceNumberInner](docs/RenewalsDetailsResponseReferenceNumberInner.md) + - [RenewalsSearchRequest](docs/RenewalsSearchRequest.md) + - [RenewalsSearchRequestDataType](docs/RenewalsSearchRequestDataType.md) + - [RenewalsSearchRequestDataTypeEndDate](docs/RenewalsSearchRequestDataTypeEndDate.md) + - [RenewalsSearchRequestDataTypeExpirationDate](docs/RenewalsSearchRequestDataTypeExpirationDate.md) + - [RenewalsSearchRequestDataTypeInvoiceDate](docs/RenewalsSearchRequestDataTypeInvoiceDate.md) + - [RenewalsSearchRequestDataTypeStartDate](docs/RenewalsSearchRequestDataTypeStartDate.md) + - [RenewalsSearchRequestStatus](docs/RenewalsSearchRequestStatus.md) + - [RenewalsSearchRequestStatusOpporutinyStatus](docs/RenewalsSearchRequestStatusOpporutinyStatus.md) + - [RenewalsSearchResponse](docs/RenewalsSearchResponse.md) + - [RenewalsSearchResponseRenewalsInner](docs/RenewalsSearchResponseRenewalsInner.md) + - [RenewalsSearchResponseRenewalsInnerLinksInner](docs/RenewalsSearchResponseRenewalsInnerLinksInner.md) + - [ReturnsCreateRequest](docs/ReturnsCreateRequest.md) + - [ReturnsCreateRequestListInner](docs/ReturnsCreateRequestListInner.md) + - [ReturnsCreateRequestListInnerShipFromInfoInner](docs/ReturnsCreateRequestListInnerShipFromInfoInner.md) + - [ReturnsCreateResponse](docs/ReturnsCreateResponse.md) + - [ReturnsCreateResponseReturnsClaimsInner](docs/ReturnsCreateResponseReturnsClaimsInner.md) + - [ReturnsDetailsResponse](docs/ReturnsDetailsResponse.md) + - [ReturnsDetailsResponseProductsInner](docs/ReturnsDetailsResponseProductsInner.md) + - [ReturnsSearchResponse](docs/ReturnsSearchResponse.md) + - [ReturnsSearchResponseReturnsClaimsInner](docs/ReturnsSearchResponseReturnsClaimsInner.md) + - [ReturnsSearchResponseReturnsClaimsInnerLinksInner](docs/ReturnsSearchResponseReturnsClaimsInnerLinksInner.md) + - [ValidateQuoteResponse](docs/ValidateQuoteResponse.md) + - [ValidateQuoteResponseLinesInner](docs/ValidateQuoteResponseLinesInner.md) + - [ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner](docs/ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner.md) + - [ValidateQuoteResponseVmfAdditionalAttributesInner](docs/ValidateQuoteResponseVmfAdditionalAttributesInner.md) + - [WarehouseListType](docs/WarehouseListType.md) + + + +## Documentation for Authorization + + +Authentication schemes defined for the API: + +### application + +- **Type**: OAuth +- **Flow**: application +- **Authorization URL**: +- **Scopes**: + - write: allows modifying resources + - read: allows reading resources + + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. + +## Author + + + diff --git a/api/openapi.yaml b/api/openapi.yaml new file mode 100644 index 00000000..5db71277 --- /dev/null +++ b/api/openapi.yaml @@ -0,0 +1,27543 @@ +openapi: 3.0.0 +info: + description: |- + For Resellers.
+ Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + title: Reseller API + version: "6.0" +servers: +- description: Sandbox + url: https://api.ingrammicro.com:443/sandbox +tags: +- description: "\nThe Ingram Micro Product Catalog v6 API endpoints enable users to:\n\ + \ - Search products by SKU or additional criteria.\n - Find price and availability\ + \ for up to 50 SKUs at one time.\n - View inventory by location in the product\ + \ catalog.\n \n *Host Production URL - https://api.ingrammicro.com:443/resellers/v6*\n\ + \ " + name: Product Catalog +- description: "\nIngram Micro’s Orders v6 API endpoints support both standard products\ + \ and direct-ship products, including licensing and warranties SKUs. Users can:\n\ + \ - Search existing orders by Ingram Micro sales order number.\n - View order\ + \ details.\n - Create and place new orders.\n - Cancel orders, as permitted\ + \ by order status.\n \n*Host Production URL - https://api.ingrammicro.com:443/resellers/v6*\n\ + \ " + name: Orders +- description: "\nThis endpoint enables the retrieval and filtering of relevant quote\ + \ list key criteria data, such as quote number, special bid numbers, end user\ + \ name, status, and date ranges from the Ingram Micro system. By default, the\ + \ Quotes endpoint retrieves quotes modified or created within the last 30 days.\n\ + Observe these additional parameters:\n - Only active quotes are available through\ + \ this API.\n - Quotes older than 365 days are excluded by default.\n - You\ + \ can use date range filters to retrieve quotes older than 30 days and up to 365\ + \ days.\n - Quotes that are in draft and closed states are excluded, and are\ + \ not accessible through this API.\n \n*Host Production URL - https://api.ingrammicro.com:443/resellers/v6*\ + \ " + name: Quotes +- description: ' ' + name: Quote To Order +- description: |2 + + The Ingram Micro Invoice v6 API endpoint provide real-time information for invoices. Users can: + - Get invoice information. + - View invoice information is available for orders placed in the last 2 years, by providing an Invoice number. + + + *Host Production URL - https://api.ingrammicro.com:443/resellers/v6* + name: Invoices +- description: "\nA customer/reseller can select one or all of the events listed above\ + \ under one webhook or can create individual webhook for each event. The primary\ + \ reason to create multiple webhooks would be to have a dedicated destination\ + \ URL for each event for processing. It is not required to do so and is recommended\ + \ to have a single webhook for a resource type, for example a webhook for orders\ + \ and in future you may have a dedicated webhook for quotes.\n\n\n*Host Production\ + \ URL - https://api.ingrammicro.com:443/resellers/v1* \n" + name: OrderStatus +- description: "\nA customer/reseller can select this event to get the updated quantity\ + \ of the IPN. This event will trigger the updated quantity with a particular interval.\ + \ To get the information of any SKU/IPN the customer should be authorized.\n\n\ + \n*Host Production URL - https://api.ingrammicro.com:443/resellers/v1* \n" + name: StockUpdate +- description: ' ' + name: Renewals +- description: ' ' + name: Deals +- description: ' ' + name: Returns +- description: ' ' + name: Freight Estimate +- description: |2 + + Ingram Micro’s Orders v5 API endpoints support both standard products and direct-ship products, including licensing and warranties SKUs. Users can: + - Search existing orders by Ingram Micro sales order number. + - View order details. + - Create and place new orders. + - Cancel orders, as permitted by order status. + + + *Host Production URL - https://api.ingrammicro.com:443/resellers/v5* + name: Orders v5 +- description: |2 + + The Ingram Micro Product Catalog v6 API endpoints enable users to: + - Search products by SKU or additional criteria. + - Find price and availability for up to 50 SKUs at one time. + - View inventory by location in the product catalog. + + + *Host Production URL - https://api.ingrammicro.com:443/resellers/v5* + name: Product Catalog v5 +- description: |2 + + The Ingram Micro Quotes v5 API endpoints enable users to: + - Obtain a list of all quotes. + - View details for each quote, including: quote name, quote number, expiration date, product quantity and product price. + - Ingram Micro does not currently offer an API to create a quote. + + + *Host Production URL - https://api.ingrammicro.com:443/resellers/v5* + name: Quotes v5 +- description: |2 + + The Ingram Micro Invoice v5 API endpoint provide real-time information for invoices and corresponding orders. Users can: + - Get invoice information for an open order or shipped order. + - View invoice information is available for orders placed in the last 9 months, by providing a sales order number. + + + *Host Production URL - https://api.ingrammicro.com:443/resellers/v5* + name: Invoices V5 +- description: |2- + + All our archived API endpoints, these APIs will be deprecated in 2021. We recommend using the latest version 6.0 endpoints. + name: Invoices v4 +- description: |2- + + All our archived API endpoints, these APIs will be deprecated in 2021. We recommend using the latest version 6.0 endpoints. + name: Orders v4 +- description: |2- + + All our archived API endpoints, these APIs will be deprecated in 2021. We recommend using the latest version 6.0 endpoints. + name: Product Catalog v4 +- description: |2- + + All our archived API endpoints, these APIs will be deprecated in 2021. We recommend using the latest version 6.0 endpoints. + name: Quotes v4 +paths: + /resellers/v6/catalog/priceandavailability: + post: + description: "The PriceAndAvailability API, will retrieve Pricing, Availability,\ + \ discounts, Inventory Location, Reserve Inventory for the products upto 50\ + \ products. " + operationId: post-priceandavailability + parameters: + - description: "Pass boolean value as input, if true the response will contain\ + \ warehouse availability details, if false the response will not hold warehouse\ + \ availability details" + explode: true + in: query + name: includeAvailability + required: true + schema: + items: + type: boolean + uniqueItems: false + type: array + style: form + - description: "Pass boolean value as input, if true the response will contain\ + \ Pricing details of the Product, if false the response will not hold Pricing\ + \ details." + explode: true + in: query + name: includePricing + required: true + schema: + type: boolean + style: form + - description: "Pass boolean value as input, if true the response will contain\ + \ detailed attributes related to the Product, if false or not sent the response\ + \ will contain very few Product details." + explode: true + in: query + name: includeProductAttributes + required: false + schema: + type: boolean + style: form + - description: Your unique Ingram Micro customer number. + explode: false + in: header + name: IM-CustomerNumber + required: true + schema: + example: 20-222222 + maxLength: 10 + type: string + style: simple + - description: Two-character ISO country code. + explode: false + in: header + name: IM-CountryCode + required: true + schema: + example: US + maxLength: 2 + minLength: 2 + type: string + style: simple + - description: Unique transaction number to identify each transaction across + all the systems. + explode: false + in: header + name: IM-CorrelationID + required: true + schema: + example: fbac82ba-cf0a-4bcf-fc03-0c5084 + maxLength: 32 + type: string + style: simple + - description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + in: header + name: IM-SenderID + required: false + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + requestBody: + content: + application/json: + examples: + with one product: + value: + products: + - ingramPartNumber: "123512" + with multiple products (both valid): + value: + products: + - ingramPartNumber: "123512" + - ingramPartNumber: QQ0202 + with multiple products (valid + invalid): + value: + products: + - ingramPartNumber: "123512" + - ingramPartNumber: "12351211" + Request with combination of part numbers: + value: + products: + - ingramPartNumber: QQ0202 + - vendorPartNumber: "5204303" + To find availability for particular Ingram Warehouse: + value: + products: + - ingramPartNumber: 3N7314 + availabilityByWarehouse: + - availabilityByWarehouseId: "40" + schema: + $ref: '#/components/schemas/PriceAndAvailabilityRequest' + required: true + responses: + "200": + content: + application/json: + examples: + SampleResponse: + value: + - productStatusMessage: ACOPS ARE AVAILABLE FOR THIS CUSTOMER AND + SKU + ingramPartNumber: 4A0036 + vendorPartNumber: E2016HV + extendedVendorPartNumber: E2016HV + upc: "0884116186519" + vendorNumber: 802U + vendorName: DELL + description: 20IN MONITOR E2016HV 210-AGLU  MNTR + productClass: B + uom: EA + acceptBackOrder: true + productAuthorized: true + returnableProduct: true + endUserInfoRequired: false + govtSpecialPriceAvailable: true + availability: + available: false + totalAvailability: 0 + availabilityByWarehouse: + - warehouseId: 20 + location: "Fort Worth, TX" + quantityBackordered: 0 + backOrderInfo: + - quantity: 1437 + etaDate: 2025-01-01 + - quantity: 8163 + etaDate: 2026-01-01 + - quantityAvailable: 0 + warehouseId: 40 + location: "Carol Stream, IL" + quantityBackordered: 156 + - quantityAvailable: 0 + warehouseId: 80 + location: "Jonestown, PA" + quantityBackordered: 70 + - quantityAvailable: 0 + warehouseId: 10 + location: "Mira Loma, CA" + quantityBackordered: 576 + pricing: + mapPrice: 0 + currencyCode: USD + retailPrice: 189.99 + customerPrice: 74.34 + discounts: + - specialPricing: + - specialPricingAvailableQuantity: 9999999 + specialPricingExpirationDate: 2023-12-31 + specialBidNumber: TESTRKP1 + specialPricingMinQuantity: 0 + specialPricingEffectiveDate: 2022-03-24 + discountType: Special Bid + specialPricingDiscount: 6.74 + governmentDiscountType: Federal + governmentDiscountedCustomerPrice: 67.6 + - specialPricingAvailableQuantity: 0 + specialPricingExpirationDate: 2022-08-12 + specialPricingMinQuantity: 0 + specialPricingEffectiveDate: 2022-07-20 + discountType: Promo Discount + specialPricingDiscount: 135.56 + quantityDiscounts: + - currencyType: string + amount: 0 + quantity: 0 + conditionType: string + currencyCode: string + bundlePartIndicator: boolean + serviceFees: + - conditionType: string + description: string + amount: decimal + endDate: 2023-01-27 + currencyCode: string + schema: + $ref: '#/components/schemas/PriceAndAvailabilityResponse' + description: OK + "207": + content: + application/json: + examples: + with multiple products (valid + invalid): + value: + - productStatusMessage: ACOPS ARE AVAILABLE FOR THIS CUSTOMER AND + SKU + ingramPartNumber: "123512" + vendorPartNumber: LS1016A-CISCO + customerPartNumber: A5-8963TEST + upc: "0718908728116" + partNumberType: T + vendorNumber: "1234" + vendorName: INTERNAL + description: 6FT PARALLEL PRINTER DB25M TO SVCS CENT36M PRO SERIES + 28AWG ROHS + productClass: P + uom: EA + acceptBackOrder: true + productAuthorized: true + returnableProduct: true + endUserInfoRequired: true + availability: + available: true + totalAvailability: 240479 + availabilityByWarehouse: + - location: "Fort Worth, TX" + warehouseId: "20" + quantityAvailable: 105415 + - warehouseId: "25" + quantityAvailable: 100000 + - location: "Millington, TN" + warehouseId: "30" + quantityAvailable: 9981 + - location: "Carol Stream, IL" + warehouseId: "40" + quantityAvailable: 1049 + - location: "Jonestown, PA" + warehouseId: "80" + quantityAvailable: 995 + - location: "Mira Loma, CA" + warehouseId: "10" + quantityAvailable: 23039 + - warehouseId: "81" + - warehouseId: "05" + pricing: + currencyCode: USD + retailPrice: 10 + mapPrice: 540.25 + customerPrice: 5.43 + - productStatusCode: E + productStatusMessage: "Product not found for IngramPartNumber:\ + \ 12351211" + ingramPartNumber: "12351211" + schema: + $ref: '#/components/schemas/PriceAndAvailabilityResponse' + description: Multi Status + "400": + content: + application/json: + examples: + Single Error: + value: + errors: + - id: -bw0a10t1-2021-02-19T11:04:37.312-08:00 + type: /errors/validation-failed + message: Validation failed + fields: + - field: IM-CorrelationID + value: "" + message: IM-CorrelationID cannot be blank + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad Request + headers: + IM-CorrelationID: + description: Unique transaction number to identify each transaction + across all the systems. + explode: false + schema: + type: string + style: simple + IM-SenderID: + description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + schema: + example: MyCompany + type: string + style: simple + "401": + description: Unauthorized + "500": + content: + application/json: + examples: + Server Error: + value: + errors: + - id: C123-bw0a10u3-2021-02-19T11:12:26.436-08:00 + type: /errors/system-errors + message: "Some unexpected error occured, please contact support\ + \ team for more details." + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal Server Error + security: + - application: + - read + summary: Price and Availability + tags: + - Product Catalog + x-content-type: application/json + x-accepts: application/json + /resellers/v6/catalog: + get: + description: Search the Ingram Micro product catalog by providing any of the + information in the keyword(Ingram part number / vendor part number/ product + description / UPC + operationId: get-reseller-v6-productsearch + parameters: + - description: Current page number. Default is 1 + explode: true + in: query + name: pageNumber + required: false + schema: + format: int32 + type: integer + style: form + - description: Your unique Ingram Micro customer number + explode: false + in: header + name: IM-CustomerNumber + required: true + schema: + example: 20-222222 + maxLength: 10 + type: string + style: simple + - description: Number of records required in the call - max records 100 per + page + explode: true + in: query + name: pageSize + required: false + schema: + format: int32 + type: integer + style: form + - description: Sender Identification text + explode: false + in: header + name: IM-SenderID + required: false + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + - description: "The SKU type of product. One of Physical, Digital, or Any." + explode: true + in: query + name: type + required: false + schema: + enum: + - IM::physical + - IM::digital + - IM::any + type: string + style: form + - description: Unique transaction number to identify each transaction accross + all the systems + explode: false + in: header + name: IM-CorrelationID + required: true + schema: + example: fbac82ba-cf0a-4bcf-fc03-0c5084 + maxLength: 32 + type: string + style: simple + - description: Specifies if there are discounts available for the product. + explode: true + in: query + name: hasDiscounts + required: false + schema: + example: "true" + type: string + style: form + - description: The name of the vendor/manufacturer of the product. + explode: true + in: query + name: vendor + required: false + schema: + items: + type: string + uniqueItems: false + type: array + style: form + - description: The vendors part number for the product. + explode: true + in: query + name: vendorPartNumber + required: false + schema: + items: + type: string + uniqueItems: false + type: array + style: form + - description: Two-character ISO country code. + explode: false + in: header + name: IM-CountryCode + required: true + schema: + example: US + maxLength: 2 + minLength: 2 + type: string + style: simple + - description: "Header to the API calls, the content will help us identify the\ + \ response language." + explode: false + in: header + name: Accept-Language + required: false + schema: + default: en + type: string + style: simple + - description: Vendor number of the product + explode: true + in: query + name: vendorNumber + required: false + schema: + type: string + style: form + - description: "Keyword search,can be ingram part number or vendor part number\ + \ or product title or vendor nameKeyword search. Can be Ingram Micro part\ + \ number, vender part number, product title, or vendor name." + explode: true + in: query + name: keyword + required: false + schema: + items: + type: string + uniqueItems: false + type: array + style: form + - description: "The category of the product. Example: Displays." + explode: true + in: query + name: category + required: false + schema: + example: Accessories + type: string + style: form + - description: "This parameter is True when you want Skip the authorization,\ + \ so template will work like current B2b template." + explode: true + in: query + name: skipAuthorisation + required: false + schema: + example: "true" + type: string + style: form + responses: + "200": + content: + application/json: + examples: + Success - 200: + value: + recordsFound: 1180 + pageSize: 25 + pageNumber: 2 + catalog: + - description: ' CLASS 10 100MB/S UHS-I CARD' + category: device storage + subCategory: Flash Memory Devices + productType: "" + ingramPartNumber: 1A8249 + vendorPartNumber: SDSQUNC-016G-AN6IA + upcCode: "0619659134587" + vendorName: Sandisk Mobile + endUserRequired: "false" + hasDiscounts: "" + type: IM::Physical + discontinued: "false" + newProduct: "false" + directShip: "false" + hasWarranty: "false" + extraDescription: 'IPAD AIR CELL 256GB SKY BLUE ' + replacementSku: "" + authorizedToPurchase: "true" + links: + - topic: catalog + href: /catalog/1A8249 + type: GET + nextPage: /resellers/v6/catalog?keyword=mobilepageSize=25&pageNumber=3 + previousPage: /resellers/v6/catalog?keyword=mobilepageSize=25&pageNumber=1 + schema: + $ref: '#/components/schemas/ProductSearch_Response' + description: a ProductSearchv6ResponseElement to be returned + headers: + IM-CorrelationID: + description: Unique transaction number to identify each transaction + accross all the systems. + explode: false + schema: + type: string + style: simple + IM-SenderID: + description: Sender Identification text . + explode: false + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + "400": + content: + application/json: + examples: + "400 - Bad Request": + value: + errors: + - id: C123-bw0a10u3-2021-03-18T11:12:26.436-08:00 + type: /errors/validation-failed + message: Validation failed + fields: + - field: IM-CountryCode + message: Required field is missing + - field: IM-CustomerNumber + message: Required field is missing + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad Request + headers: + IM-CorrelationID: + description: Unique transaction number to identify each transaction + accross all the systems. + explode: false + schema: + type: string + style: simple + IM-SenderID: + description: Sender Identification text . + explode: false + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + "404": + content: + application/json: + examples: + "404 - Not Found": + value: + errors: + - id: 123 + type: Validation error + message: No Records Found + schema: + $ref: '#/components/schemas/ErrorResponse' + description: No Content + "500": + content: + application/json: + examples: + Server Error: + value: + errors: + - id: C123-bw0a10u3-2021-03-18T11:12:26.436-08:00 + type: /errors/system-errors + message: "Some unexpected error occured, please contact support\ + \ team for more details" + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal Server Error + headers: + IM-CorrelationID: + description: Unique transaction number to identify each transaction + accross all the systems. + explode: false + schema: + type: string + style: simple + IM-SenderID: + description: Sender Identification text . + explode: false + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + security: + - application: + - read + summary: Search Products + tags: + - Product Catalog + x-accepts: application/json + /resellers/v6/catalog/details/{ingramPartNumber}: + get: + description: "Search all the product-related details using a unique Ingram Part\ + \ Number. Currently, this API is available in the USA, India, and Netherlands." + operationId: get-reseller-v6-productdetail + parameters: + - description: Ingram Micro unique part number for the product + explode: false + in: path + name: ingramPartNumber + required: true + schema: + example: 6YE881 + maxLength: 6 + type: string + style: simple + - description: Your unique Ingram Micro customer number + explode: false + in: header + name: IM-CustomerNumber + required: true + schema: + example: 20-222222 + maxLength: 10 + type: string + style: simple + - description: Two-character ISO country code. + explode: false + in: header + name: IM-CountryCode + required: true + schema: + example: US + maxLength: 2 + minLength: 2 + type: string + style: simple + - description: Sender Identification text + explode: false + in: header + name: IM-SenderID + required: false + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + - description: Unique transaction number to identify each transaction accross + all the systems + explode: false + in: header + name: IM-CorrelationID + required: true + schema: + example: fbac82ba-cf0a-4bcf-fc03-0c5084 + maxLength: 32 + type: string + style: simple + responses: + "200": + content: + application/json: + examples: + "200": + description: OK + value: + ingramPartNumber: "5348387" + vendorPartNumber: 20VE0117MH + productAuthorized: "True" + description: TB 15 G2 CI5-1135G7 8/256GB 15.6 W11P + productDetailDescription: Lenovo ThinkBook 15 G2 ITL 20VE0117MH + 39.6 cm (15.6") Notebook - Full HD - 1920 x 1080 - Intel Core + i5 11th Gen i5-1135G7 Quad-core (4 Core) 2.40 GHz - 8 GB Total + RAM - 256 GB SSD - Mineral Gray - Intel Chip - Windows 11 Pro + - Intel Iris Xe Graphics - In-plane Switching (IPS) Technology + - English (Euro) Keyboard - 6 Hours Battery Run Time - IEEE + 802.11ax Wireless LAN Standard + upc: "196119831243" + productCategory: Computers Test Duplicate + productSubcategory: Notebooks & Tablets + vendorName: Lenovo + vendorNumber: "0000500082" + productStatusCode: null + productClass: null + indicators: + hasWarranty: true + isNewProduct: false + hasReturnLimits: false + isBackOrderAllowed: false + isShippedFromPartner: false + isReplacementProduct: false + replacementType: null + isDirectship: false + isDownloadable: false + isDigitalType: false + skuType: M + hasStdSpecialPrice: false + hasAcopSpecialPrice: false + hasAcopQuantityBreak: false + hasStdWebDiscount: false + hasAcopWebDiscount: false + hasSpecialBid: false + isExportableToCountry: false + isDiscontinuedProduct: true + isRefurbished: false + isReturnableProduct: false + isIngramShip: true + isEnduserRequired: false + isHeavyWeight: false + hasLtl: false + isClearanceProduct: false + hasBundle: false + isOversizeProduct: false + isPreorderProduct: false + isLicenseProduct: false + isDirectshipOrderable: true + isServiceSku: false + isConfigurable: false + ciscoFields: + productSubGroup: null + serviceProgramName: null + itemCatalogCategory: null + configurationIndicator: null + internalBusinessEntity: null + itemType: null + globalListPrice: null + technicalSpecifications: + - headername: Basic + attributevalue: Notebook + attributedisplay: Basic|Product Type|Notebook + attributename: Product Type + - headername: Basic + attributevalue: 1920 x 1080 + attributedisplay: Basic|Screen Resolution|1920 x 1080 + attributename: Screen Resolution + - headername: Basic + attributevalue: 1.70 kg + attributedisplay: Basic|Weight (Approximate)|1.70 kg + attributename: Weight (Approximate) + - headername: Basic + attributevalue: Windows 11 Pro + attributedisplay: Basic|Operating System|Windows 11 Pro + attributename: Operating System + - headername: Basic + attributevalue: Intel + attributedisplay: Basic|Chipset|Intel + attributename: Chipset + - headername: Basic + attributevalue: SSD + attributedisplay: Basic|Drive Type|SSD + attributename: Drive Type + - headername: Basic + attributevalue: 2.40 GHz + attributedisplay: Basic|Processor Speed|2.40 GHz + attributename: Processor Speed + - headername: Basic + attributevalue: Core i5 + attributedisplay: Basic|Processor Type|Core i5 + attributename: Processor Type + - headername: Basic + attributevalue: 39.6 cm (15.6") + attributedisplay: Basic|Screen Size|39.6 cm (15.6") + attributename: Screen Size + - headername: Basic + attributevalue: Lenovo + attributedisplay: Basic|Brand Name|Lenovo + attributename: Brand Name + - headername: Basic + attributevalue: Full HD + attributedisplay: Basic|Screen Mode|Full HD + attributename: Screen Mode + - headername: Basic + attributevalue: i5-1135G7 + attributedisplay: Basic|Processor Model|i5-1135G7 + attributename: Processor Model + - headername: Basic + attributevalue: Quad-core (4 Core) + attributedisplay: Basic|Processor Core|Quad-core (4 Core) + attributename: Processor Core + - headername: Basic + attributevalue: "No" + attributedisplay: Basic|Touchscreen|No + attributename: Touchscreen + - headername: Basic + attributevalue: Intel + attributedisplay: Basic|Processor Manufacturer|Intel + attributename: Processor Manufacturer + - headername: Basic + attributevalue: Intel + attributedisplay: Basic|Graphics Controller Manufacturer|Intel + attributename: Graphics Controller Manufacturer + - headername: Basic + attributevalue: Iris Xe Graphics + attributedisplay: Basic|Graphics Controller Model|Iris Xe Graphics + attributename: Graphics Controller Model + - headername: Basic + attributevalue: "Yes" + attributedisplay: Basic|Bluetooth|Yes + attributename: Bluetooth + - headername: Basic + attributevalue: "No" + attributedisplay: Basic|Optical Drive Type|No + attributename: Optical Drive Type + - headername: Basic + attributevalue: Shared + attributedisplay: Basic|Graphics Memory Accessibility|Shared + attributename: Graphics Memory Accessibility + - headername: Basic + attributevalue: 6 Hours + attributedisplay: Basic|Maximum Battery Run Time|6 Hours + attributename: Maximum Battery Run Time + - headername: Basic + attributevalue: "Yes" + attributedisplay: Basic|Finger Print Reader|Yes + attributename: Finger Print Reader + - headername: Basic + attributevalue: IEEE 802.11ax + attributedisplay: Basic|Wireless LAN Standard|IEEE 802.11ax + attributename: Wireless LAN Standard + - headername: Basic + attributevalue: 65 W + attributedisplay: Basic|Maximum Power Supply Wattage|65 W + attributename: Maximum Power Supply Wattage + - headername: Basic + attributevalue: ThinkBook 15 G2 ITL + attributedisplay: Basic|Product Family|ThinkBook 15 G2 ITL + attributename: Product Family + - headername: Basic + attributevalue: 64-bit + attributedisplay: Basic|Operating System Architecture|64-bit + attributename: Operating System Architecture + - headername: Basic + attributevalue: "3" + attributedisplay: Basic|Total Number of USB Ports|3 + attributename: Total Number of USB Ports + - headername: Basic + attributevalue: "Yes" + attributedisplay: Basic|Keyboard Backlight|Yes + attributename: Keyboard Backlight + - headername: Basic + attributevalue: 256 GB + attributedisplay: Basic|Total Solid State Drive Capacity|256 + GB + attributename: Total Solid State Drive Capacity + - headername: Basic + attributevalue: Windows + attributedisplay: Basic|Operating System Platform|Windows + attributename: Operating System Platform + - headername: Basic + attributevalue: English (Euro) + attributedisplay: Basic|Keyboard Localization|English (Euro) + attributename: Keyboard Localization + - headername: Basic + attributevalue: Dutch/English/French/German + attributedisplay: Basic|Operating System Language|Dutch/English/French/German + attributename: Operating System Language + - headername: Basic + attributevalue: 11th Gen + attributedisplay: Basic|Processor Generation|11th Gen + attributename: Processor Generation + - headername: Basic + attributevalue: "Yes" + attributedisplay: Basic|Energy Star|Yes + attributename: Energy Star + - headername: Basic + attributevalue: 1 Year + attributedisplay: Basic|Limited Warranty Duration|1 Year + attributename: Limited Warranty Duration + - headername: Basic + attributevalue: Mineral Gray + attributedisplay: Basic|Product Color|Mineral Gray + attributename: Product Color + - headername: Basic + attributevalue: 8 GB + attributedisplay: Basic|Total Installed System Memory|8 GB + attributename: Total Installed System Memory + - headername: Battery Information + attributevalue: 6 Hours + attributedisplay: Battery Information|Maximum Battery Run Time|6 + Hours + attributename: Maximum Battery Run Time + - headername: Built-in Devices + attributevalue: "Yes" + attributedisplay: Built-in Devices|Finger Print Reader|Yes + attributename: Finger Print Reader + - headername: Built-in Devices + attributevalue: "Yes" + attributedisplay: Built-in Devices|Front Camera/Webcam|Yes + attributename: Front Camera/Webcam + - headername: Chipset + attributevalue: Intel + attributedisplay: Chipset|Chipset Manufacturer|Intel + attributename: Chipset Manufacturer + - headername: Display & Graphics + attributevalue: 1920 x 1080 + attributedisplay: Display & Graphics|Screen Resolution|1920 + x 1080 + attributename: Screen Resolution + - headername: Display & Graphics + attributevalue: 39.6 cm (15.6") + attributedisplay: Display & Graphics|Screen Size|39.6 cm (15.6") + attributename: Screen Size + - headername: Display & Graphics + attributevalue: Full HD + attributedisplay: Display & Graphics|Screen Mode|Full HD + attributename: Screen Mode + - headername: Display & Graphics + attributevalue: "No" + attributedisplay: Display & Graphics|Touchscreen|No + attributename: Touchscreen + - headername: Display & Graphics + attributevalue: Intel + attributedisplay: Display & Graphics|Graphics Controller Manufacturer|Intel + attributename: Graphics Controller Manufacturer + - headername: Display & Graphics + attributevalue: Iris Xe Graphics + attributedisplay: Display & Graphics|Graphics Controller Model|Iris + Xe Graphics + attributename: Graphics Controller Model + - headername: Display & Graphics + attributevalue: DDR4 SDRAM + attributedisplay: Display & Graphics|Graphics Memory Technology|DDR4 + SDRAM + attributename: Graphics Memory Technology + - headername: Display & Graphics + attributevalue: Shared + attributedisplay: Display & Graphics|Graphics Memory Accessibility|Shared + attributename: Graphics Memory Accessibility + - headername: Display & Graphics + attributevalue: In-plane Switching (IPS) Technology + attributedisplay: Display & Graphics|Display Screen Technology|In-plane + Switching (IPS) Technology + attributename: Display Screen Technology + - headername: General Information + attributevalue: Notebook + attributedisplay: General Information|Product Type|Notebook + attributename: Product Type + - headername: General Information + attributevalue: 20VE0117MH + attributedisplay: General Information|Manufacturer Part Number|20VE0117MH + attributename: Manufacturer Part Number + - headername: General Information + attributevalue: http://www.lenovo.com/nl/en + attributedisplay: General Information|Manufacturer Website Address|http://www.lenovo.com/nl/en + attributename: Manufacturer Website Address + - headername: General Information + attributevalue: Lenovo Group Limited + attributedisplay: General Information|Manufacturer|Lenovo Group + Limited + attributename: Manufacturer + - headername: General Information + attributevalue: 20VE0117MH + attributedisplay: General Information|Product Model|20VE0117MH + attributename: Product Model + - headername: General Information + attributevalue: ThinkBook 15 G2 ITL 20VE0117MH Notebook + attributedisplay: General Information|Product Name|ThinkBook + 15 G2 ITL 20VE0117MH Notebook + attributename: Product Name + - headername: General Information + attributevalue: ThinkBook + attributedisplay: General Information|Product Line|ThinkBook + attributename: Product Line + - headername: General Information + attributevalue: 15 G2 ITL + attributedisplay: General Information|Product Series|15 G2 ITL + attributename: Product Series + - headername: General Information + attributevalue: Lenovo + attributedisplay: General Information|Brand Name|Lenovo + attributename: Brand Name + - headername: General Information + attributevalue: "

Built for business, designed for you

These\ + \ laptops make it easy to do business with style. From options\ + \ that keep you up and running without pause, to security\ + \ that works behind the scenes. And that's not all-ThinkBook\ + \ laptops boast awesome entertainment features. And they're\ + \ eye catching too.

" + attributedisplay: "General Information|Marketing Information|

Built\ + \ for business, designed for you

These laptops make\ + \ it easy to do business with style. From options that keep\ + \ you up and running without pause, to security that works\ + \ behind the scenes. And that's not all-ThinkBook laptops\ + \ boast awesome entertainment features. And they're eye catching\ + \ too.

" + attributename: Marketing Information + - headername: Input Devices + attributevalue: "Yes" + attributedisplay: Input Devices|Keyboard Backlight|Yes + attributename: Keyboard Backlight + - headername: Input Devices + attributevalue: English (Euro) + attributedisplay: Input Devices|Keyboard Localization|English + (Euro) + attributename: Keyboard Localization + - headername: Interfaces/Ports + attributevalue: "Yes" + attributedisplay: Interfaces/Ports|Network (RJ-45)|Yes + attributename: Network (RJ-45) + - headername: Interfaces/Ports + attributevalue: "3" + attributedisplay: Interfaces/Ports|Total Number of USB Ports|3 + attributename: Total Number of USB Ports + - headername: Interfaces/Ports + attributevalue: "2" + attributedisplay: Interfaces/Ports|Number of USB 3.2 Gen 1 Ports|2 + attributename: Number of USB 3.2 Gen 1 Ports + - headername: Interfaces/Ports + attributevalue: "1" + attributedisplay: Interfaces/Ports|Number of USB 3.2 Gen 2 Type-C + Ports|1 + attributename: Number of USB 3.2 Gen 2 Type-C Ports + - headername: Interfaces/Ports + attributevalue: "1" + attributedisplay: Interfaces/Ports|Number of Thunderbolt 4 Ports|1 + attributename: Number of Thunderbolt 4 Ports + - headername: Memory + attributevalue: 8 GB + attributedisplay: Memory|Total Installed System Memory|8 GB + attributename: Total Installed System Memory + - headername: Memory + attributevalue: DDR4 SDRAM + attributedisplay: Memory|System Memory Technology|DDR4 SDRAM + attributename: System Memory Technology + - headername: Memory + attributevalue: 3200 MHz + attributedisplay: Memory|System Memory Speed|3200 MHz + attributename: System Memory Speed + - headername: Miscellaneous + attributevalue:
  • ThinkBook 15 G2 ITL 20VE0117MH Notebook
  • +
  • AC Adapter
  • + attributedisplay: Miscellaneous|Package Contents|
  • ThinkBook + 15 G2 ITL 20VE0117MH Notebook
  • AC Adapter
  • + attributename: Package Contents + - headername: Miscellaneous + attributevalue: Anti-glare Screen + attributedisplay: Miscellaneous|Features|Anti-glare Screen + attributename: Features + - headername: Miscellaneous + attributevalue: "Yes" + attributedisplay: Miscellaneous|Environmentally Friendly|Yes + attributename: Environmentally Friendly + - headername: Miscellaneous + attributevalue: RoHS + attributedisplay: Miscellaneous|Environmental Certification|RoHS + attributename: Environmental Certification + - headername: Miscellaneous + attributevalue: ErP Lot 3 + attributedisplay: Miscellaneous|Environmental Certification|ErP + Lot 3 + attributename: Environmental Certification + - headername: Miscellaneous + attributevalue: ENERGY STAR 8.0 + attributedisplay: Miscellaneous|Environmental Certification|ENERGY + STAR 8.0 + attributename: Environmental Certification + - headername: Miscellaneous + attributevalue: EPEAT Silver + attributedisplay: Miscellaneous|Environmental Certification|EPEAT + Silver + attributename: Environmental Certification + - headername: Miscellaneous + attributevalue: "Yes" + attributedisplay: Miscellaneous|Energy Star|Yes + attributename: Energy Star + - headername: Network & Communication + attributevalue: "Yes" + attributedisplay: Network & Communication|Bluetooth|Yes + attributename: Bluetooth + - headername: Network & Communication + attributevalue: "Yes" + attributedisplay: Network & Communication|Wireless LAN|Yes + attributename: Wireless LAN + - headername: Network & Communication + attributevalue: IEEE 802.11ax + attributedisplay: Network & Communication|Wireless LAN Standard|IEEE + 802.11ax + attributename: Wireless LAN Standard + - headername: Network & Communication + attributevalue: Gigabit Ethernet + attributedisplay: Network & Communication|Ethernet Technology|Gigabit + Ethernet + attributename: Ethernet Technology + - headername: Operating System + attributevalue: Windows 11 Pro + attributedisplay: Operating System|Operating System|Windows + 11 Pro + attributename: Operating System + - headername: Operating System + attributevalue: 64-bit + attributedisplay: Operating System|Operating System Architecture|64-bit + attributename: Operating System Architecture + - headername: Operating System + attributevalue: Windows + attributedisplay: Operating System|Operating System Platform|Windows + attributename: Operating System Platform + - headername: Operating System + attributevalue: Dutch/English/French/German + attributedisplay: Operating System|Operating System Language|Dutch/English/French/German + attributename: Operating System Language + - headername: Physical Characteristics + attributevalue: 1.70 kg + attributedisplay: Physical Characteristics|Weight (Approximate)|1.70 + kg + attributename: Weight (Approximate) + - headername: Physical Characteristics + attributevalue: 18.80 mm + attributedisplay: Physical Characteristics|Height|18.80 mm + attributename: Height + - headername: Physical Characteristics + attributevalue: 358.1 mm + attributedisplay: Physical Characteristics|Width|358.1 mm + attributename: Width + - headername: Physical Characteristics + attributevalue: 235 mm + attributedisplay: Physical Characteristics|Depth|235 mm + attributename: Depth + - headername: Physical Characteristics + attributevalue: Mineral Gray + attributedisplay: Physical Characteristics|Product Color|Mineral + Gray + attributename: Product Color + - headername: Power Description + attributevalue: 65 W + attributedisplay: Power Description|Maximum Power Supply Wattage|65 + W + attributename: Maximum Power Supply Wattage + - headername: Processor + attributevalue: 2.40 GHz + attributedisplay: Processor|Processor Speed|2.40 GHz + attributename: Processor Speed + - headername: Processor + attributevalue: Core i5 + attributedisplay: Processor|Processor Type|Core i5 + attributename: Processor Type + - headername: Processor + attributevalue: i5-1135G7 + attributedisplay: Processor|Processor Model|i5-1135G7 + attributename: Processor Model + - headername: Processor + attributevalue: Quad-core (4 Core) + attributedisplay: Processor|Processor Core|Quad-core (4 Core) + attributename: Processor Core + - headername: Processor + attributevalue: Intel + attributedisplay: Processor|Processor Manufacturer|Intel + attributename: Processor Manufacturer + - headername: Processor + attributevalue: 4.20 GHz + attributedisplay: Processor|Maximum Turbo Speed|4.20 GHz + attributename: Maximum Turbo Speed + - headername: Processor + attributevalue: 11th Gen + attributedisplay: Processor|Processor Generation|11th Gen + attributename: Processor Generation + - headername: Storage + attributevalue: SSD + attributedisplay: Storage|Drive Type|SSD + attributename: Drive Type + - headername: Storage + attributevalue: "No" + attributedisplay: Storage|Optical Drive Type|No + attributename: Optical Drive Type + - headername: Storage + attributevalue: 256 GB + attributedisplay: Storage|Total Solid State Drive Capacity|256 + GB + attributename: Total Solid State Drive Capacity + - headername: Storage + attributevalue: NVMe M.2 PCI Express + attributedisplay: Storage|SSD Form Factor|NVMe M.2 PCI Express + attributename: SSD Form Factor + warrantyInformation: [] + additionalInformation: + productWeight: + - plantId: NL01 + weight: 2.6 + weightUnit: KG + isBulkFreight: false + height: "8" + width: "31" + length: "50" + netWeight: null + dimensionUnit: CM + schema: + $ref: '#/components/schemas/ProductDetailResponse' + description: Success + "400": + content: + application/json: + examples: + "400": + description: Bad Request + value: + errors: + - traceid: "123" + type: errors/bad-request + message: Input passed is not in right or expected format. Model + Binding Error Happens at Global Model Binding Exception Handler. + fields: + - field: IM-CustomerNumber + message: The customerNumber field is required. + value: "" + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad Request + "404": + content: + application/json: + examples: + "404 - Not Found": + value: + errors: + - id: 123 + type: Validation error + message: No Records Found + schema: + $ref: '#/components/schemas/ErrorResponse' + description: No Content + "500": + content: + application/json: + examples: + "500": + description: Internal Server Error + value: + errors: + - id: C123-bw0a10u3-2021-02-19T11:12:26.436-08:00 + type: /errors/system-errors + message: "Some unexpected error occured, please contact support\ + \ team for more details" + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal Server Error + security: + - application: + - read + summary: Product Details + tags: + - Product Catalog + x-accepts: application/json + /resellers/v1/webhooks/availabilityupdate: + post: + parameters: + - description: The webhook url where the request needs to sent. + explode: false + in: header + name: targeturl + required: true + schema: + example: https://59a2dc5368073ab42fd9a92e210a9fdb.m.pipedream.net/ + type: string + style: simple + - description: "Ingram Micro creates a signature token by use of a secret key\ + \ + Event ID. The algorithm to generate the secret ley is given at link\ + \ https://developer.ingrammicro.com/reseller/article/how-use-webhook-secret-key.\ + \ Use the event Id in the below sample along with your secret key to generate\ + \ the key. Alternatively, to send try this out, use a random text to see\ + \ how it works." + explode: false + in: header + name: x-hub-signature + required: true + schema: + example: 3LeaTfLE5FLj1FcYflwdwFosH4ADHmMbds6thtirGC3e9lEkF9/1pt4T2fQQGlxf40EznDBER0b60M75K6ZW0A== + type: string + style: simple + requestBody: + content: + application/json: + examples: + Order with Header Comments: + value: + topic: resellers/catalog + event: im::updated + eventTimeStamp: 2021-11-01T13:02:06.369Z + eventId: AH7ESSIWSIO22Y77DD + resource: + - eventType: IM::STOCK_UPDATE + ingramPartNumber: 5CX579 + vendorPartNumber: 710412-001-BTI + vendorName: BATTERY TECHNOLOGY INC. + upcCode: "0886734869201" + skuStatus: null + backOrderFlag: "Y" + totalAvailability: "120" + links: + - topic: orders + href: /resellers/v5/catalog/5CX579 + type: GET + - eventType: IM::STOCK_UPDATE + ingramPartNumber: 5CT275 + vendorPartNumber: AC-U90W-HP + vendorName: BATTERY TECHNOLOGY INC. + upcCode: "0745473120182" + skuStatus: null + backOrderFlag: "Y" + totalAvailability: "120" + links: + - topic: orders + href: /resellers/v5/catalog/5CT275 + type: GET + schema: + $ref: '#/components/schemas/AvailabilityAsyncNotificationRequest' + required: true + responses: + "200": + description: OK + "500": + description: Internal Server Error + security: + - application: + - read + summary: Stock Update + tags: + - StockUpdate + x-content-type: application/json + x-accepts: application/json + /resellers/v1/webhooks/orderstatusevent: + post: + parameters: + - description: The webhook url where the request needs to sent. + explode: false + in: header + name: targeturl + required: true + schema: + example: https://59a2dc5368073ab42fd9a92e210a9fdb.m.pipedream.net/ + type: string + style: simple + - description: "Ingram Micro creates a signature token by use of a secret key\ + \ + Event ID. The algorithm to generate the secret ley is given at link\ + \ https://developer.ingrammicro.com/reseller/article/how-use-webhook-secret-key.\ + \ Use the event Id in the below sample along with your secret key to generate\ + \ the key. Alternatively, to send try this out, use a random text to see\ + \ how it works." + explode: false + in: header + name: x-hub-signature + required: true + schema: + example: 3LeaTfLE5FLj1FcYflwdwFosH4ADHmMbds6thtirGC3e9lEkF9/1pt4T2fQQGlxf40EznDBER0b60M75K6ZW0A== + type: string + style: simple + requestBody: + content: + application/json: + examples: + Order with Header Comments: + value: + topic: resellers/orders + event: im::updated + eventTimeStamp: 2021-11-01T13:02:06.369Z + eventId: N01CIB9VVFYKR9J6ZW + resource: + - eventType: im::order_shipped + orderNumber: 20-RD128 + customerOrderNumber: ZENPO + orderEntryTimeStamp: 2020-04-03T08:54:39-07:00 + lines: + - ingramLineNumber: "001" + subOrderNumber: 20-RD128-21 + lineStatus: IM::shipped + ingramPartNumber: 5CX895 + vendorPartNumber: TC57HO-1PEZU4P-NA + requestedQuantity: 3 + shippedQuantity: 2 + backOrderedQuantity: 1 + shipmentDetails: + - shipmentDate: 2019-11-06 + shipFromWarehouseId: "10" + warehouseName: New York + carrierCode: 4M + carrierName: SMARTPOST-BM + packageDetails: + - cartonNumber: "" + quantityInbox: "" + trackingNumber: "" + serialNumberDetails: + - serialNumber: "123123123" + links: + - topic: orders + href: /resellers/v5/orders/20-RD128 + type: GET + schema: + $ref: '#/components/schemas/OrderStatusAsyncNotificationRequest' + required: true + responses: + "200": + description: OK + "500": + description: Internal Server Error + security: + - application: + - read + summary: Order Status + tags: + - OrderStatus + x-content-type: application/json + x-accepts: application/json + /resellers/v6/orders: + post: + description: "Instantly create and place orders. The POST API supports stocked\ + \ SKUs as well as licensing and warranties SKUs.\nIM-CustomerNumber, IM-CountryCode,\ + \ IM-SenderID and IM-CorrelationID are required parameters.\nIngram Micro\ + \ recommends that you provide the ingrampartnumber for each SKU contained\ + \ in each order.\nNOTE: You must have net terms to use the Ingram Micro Order\ + \ Create API. Ingram Micro offers trade credit when using our APIs, and repayment\ + \ is based on net terms. For example, if your net terms agreement is net-30,\ + \ you will have 30 days to make a full payment. Ingram Micro does not allow\ + \ credit card transactions for API ordering. " + operationId: post-createorder_v6 + parameters: + - description: Your unique Ingram Micro customer number. + explode: false + in: header + name: IM-CustomerNumber + required: true + schema: + example: 20-222222 + maxLength: 10 + type: string + style: simple + - description: Two-character ISO country code. + explode: false + in: header + name: IM-CountryCode + required: true + schema: + example: US + maxLength: 2 + minLength: 2 + type: string + style: simple + - description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + in: header + name: IM-SenderID + required: false + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + - description: Unique transaction number to identify each transaction accross + all the systems. + explode: false + in: header + name: IM-CorrelationID + required: true + schema: + example: fbac82ba-cf0a-4bcf-fc03-0c5084 + maxLength: 32 + type: string + style: simple + requestBody: + content: + application/json: + examples: + Order with Header Comments: + value: + customerOrderNumber: SWAGGER-01 + notes: This is the field for comments + lines: + - customerLineNumber: "1" + ingramPartNumber: DF4128 + quantity: 1 + additionalAttributes: + - attributeName: allowDuplicateCustomerOrderNumber + attributeValue: "true" + Shipping Instructions and Signature Required: + value: + customerOrderNumber: SHIPVIAeg + shipToInfo: + email: dummy.email@ingrammicro.co.in + lines: + - customerLineNumber: "1" + ingramPartNumber: 4U0212 + quantity: 1 + additionalAttributes: + - attributeName: allowDuplicateCustomerOrderNumber + attributeValue: "true" + shipmentDetails: + signatureRequired: "true" + shippingInstructions: This is the shipping instruction for this + order + Combined Order(Stock + Direct ship): + value: + customerOrderNumber: Tejal899 + endCustomerOrderNumber: ENDUSER + notes: direct ship and stock Order + shipToInfo: + contact: TOM SORENSEN + companyName: FIRST NATIONAL BANK OF OMAHA + addressLine1: 17501 W 98TH ST SPC 1833 + city: LENEXA + state: KS + postalCode: "662191736" + countryCode: US + lines: + - customerLineNumber: "1" + ingramPartNumber: DF4128 + quantity: 1 + - customerLineNumber: "1" + ingramPartNumber: RQ6000 + quantity: 1 + additionalAttributes: + - attributeName: allowDuplicateCustomerOrderNumber + attributeValue: "true" + Ship from warehouseid: + value: + customerOrderNumber: newcustomerPO4 + notes: this is an partial order process sample + billToAddressId: "000" + lines: + - customerLineNumber: "1" + ingramPartNumber: DF4128 + quantity: 1 + additionalAttributes: + - attributeName: shipFromWarehouseId + attributeValue: "10" + - attributeName: allowDuplicateCustomerOrderNumber + attributeValue: "true" + Ship Complete Order: + value: + customerOrderNumber: THIS_IS-121 + shipToInfo: + email: dummy.email@ingrammicro.co.in + lines: + - customerLineNumber: "1" + ingramPartNumber: 4U0212 + quantity: 1 + additionalAttributes: + - attributeName: allowPartialOrder + attributeValue: "true" + - attributeName: allowDuplicateCustomerOrderNumber + attributeValue: "true" + shipmentDetails: + shipComplete: "true" + Partial Order and Special Bid Number: + value: + customerOrderNumber: newcustomerPO4 + specialBidNumber: "43426380" + notes: this is an partial order process sample + billToAddressId: "000" + shipToInfo: + contact: TOM SORENSEN + companyName: FIRST NATIONAL BANK OF OMAHA + addressLine1: 17501 W 98TH ST SPC 1833 + city: LENEXA + state: KS + postalCode: "662191736" + countryCode: US + lines: + - customerLineNumber: "1" + ingramPartNumber: DF4128 + quantity: 1 + - customerLineNumber: "1" + ingramPartNumber: XXXXXX + quantity: 1 + additionalAttributes: + - attributeName: allowPartialOrder + attributeValue: "true" + - attributeName: allowDuplicateCustomerOrderNumber + attributeValue: "true" + Backordered Request: + value: + customerOrderNumber: newcustomerP1O6 + notes: this is backorder sample + acceptBackOrder: "true" + shipToInfo: + contact: TOM SORENSEN + companyName: FIRST NATIONAL BANK OF OMAHA + addressLine1: 17501 W 98TH ST SPC 1833 + city: LENEXA + state: KS + postalCode: "662191736" + countryCode: US + lines: + - customerLineNumber: "1" + ingramPartNumber: DF4128 + quantity: 1 + additionalAttributes: + - attributeName: allowDuplicateCustomerOrderNumber + attributeValue: "true" + Order with CarrierCode & Freight Acount Number: + value: + customerOrderNumber: SPCLBID1 + notes: Sample Order with Required Shipvia + lines: + - customerLineNumber: "1" + ingramPartNumber: DF4128 + quantity: 1 + unitPrice: 60 + shipmentDetails: + carrierCode: RG + freightAccountNumber: FRT100 + additionalAttributes: + - attributeName: allowDuplicateCustomerOrderNumber + attributeValue: "true" + Order on CustomerHold: + value: + customerOrderNumber: SWAGGER-01 + notes: CustomerHoldOrderSample + lines: + - customerLineNumber: "1" + ingramPartNumber: DF4128 + quantity: 1 + additionalAttributes: + - attributeName: allowDuplicateCustomerOrderNumber + attributeValue: "true" + - attributeName: allowOrderOnCustomerHold + attributeValue: "true" + Requested Unit Price or Price Variance: + value: + customerOrderNumber: SWAGGER-02 + specialBidNumber: "43426380" + notes: Test Order for Unit Price + lines: + - customerLineNumber: "1" + ingramPartNumber: TSXML1 + quantity: 1 + unitPrice: 10 + additionalAttributes: + - attributeName: allowDuplicateCustomerOrderNumber + attributeValue: "true" + Direct Ship with EndUser Info: + value: + customerOrderNumber: newcustomerPO9 + notes: This is enduser info Order + shipToInfo: + contact: Customer 1 + companyName: ABC priavte Ltd + addressLine1: 7001 SW 24th Ave + addressLine2: testing + city: Gainesville + state: FL + postalCode: "326070001" + countryCode: US + phoneNumber: "987654321" + email: testing@yaho.com + endUserInfo: + endUserId: "" + companyName: MEDECISION INC + contact: AARON RICCITELLI + addressLine1: 601 LEE RD + city: wayne + state: pa + postalCode: "190875607" + countryCode: US + phoneNumber: "6105400202" + email: aaron.riccitelli@medecision.com + lines: + - customerLineNumber: "1" + ingramPartNumber: YZ1478 + quantity: 1 + additionalAttributes: + - attributeName: allowDuplicateCustomerOrderNumber + attributeValue: "true" + Order with Shipping Address: + value: + customerOrderNumber: SWAGGER-03 + endCustomerOrderNumber: ENDUSER1 + notes: Order with Shipping Address + shipToInfo: + contact: TOM SORENSEN + companyName: FIRST NATIONAL BANK OF OMAHA + addressLine1: 17501 W 98TH ST SPC 1833 + city: LENEXA + state: KS + postalCode: "662191736" + countryCode: US + phoneNumber: "987654321" + email: testing@yaho.com + lines: + - customerLineNumber: "1" + ingramPartNumber: DF4128 + quantity: 1 + additionalAttributes: + - attributeName: allowDuplicateCustomerOrderNumber + attributeValue: "true" + All Distributions ShipComplete-SplitOrder: + value: + customerOrderNumber: newcustomerP1O6 + notes: this is a Ship Complete Order + acceptBackOrder: "true" + shipToInfo: + contact: TOM SORENSEN + companyName: FIRST NATIONAL BANK OF OMAHA + addressLine1: 17501 W 98TH ST SPC 1833 + city: LENEXA + state: KS + postalCode: "662191736" + countryCode: US + lines: + - customerLineNumber: "1" + ingramPartNumber: DF4128 + quantity: 10 + - customerLineNumber: "2" + ingramPartNumber: RQ6000 + quantity: 1 + additionalAttributes: + - attributeName: allowDuplicateCustomerOrderNumber + attributeValue: "true" + shipmentDetails: + shipComplete: E + APPLE DEP Sample: + value: + customerOrderNumber: APPLE DEP-01 + notes: this is APPLE DEP sample + lines: + - customerLineNumber: "1" + ingramPartNumber: DF4128 + quantity: 10 + additionalAttributes: + - attributeName: allowDuplicateCustomerOrderNumber + attributeValue: "true" + - attributeName: eudepid + attributeValue: DepIDTest1 + - attributeName: depordernbr + attributeValue: Test1 + Order with CPN - SAP: + value: + customerOrderNumber: Order with CPN-SAP + lines: + - customerLineNumber: "2" + customerPartNumber: 90NB0GI4-M03110 + quantity: 1 + Warranty order sample: + value: + customerOrderNumber: Warranty-01 + endCustomerOrderNumber: Warranty-01 + notes: Multiple Line items with Hardware and Warranty links + resellerInfo: + companyName: Dummy + email: dummy.email@ingrammicro.co.in + vmf: + vendAuthNumber: MJDVATC10001A + lines: + - customerLineNumber: "001" + ingramPartNumber: 9VL970 + quantity: 2 + additionalAttributes: + - attributeName: SHIPFROMWAREHOUSEID + attributeValue: "10" + warrantyInfo: + - directLineLink: MJDVATC10001B + - customerLineNumber: "002" + ingramPartNumber: 8RB884 + quantity: 2 + additionalAttributes: + - attributeName: SHIPFROMWAREHOUSEID + attributeValue: "10" + warrantyInfo: + - warrantyLineLink: "005" + - customerLineNumber: "003" + ingramPartNumber: 8RB881 + quantity: 3 + additionalAttributes: + - attributeName: SHIPFROMWAREHOUSEID + attributeValue: "40" + warrantyInfo: + - warrantyLineLink: "006" + - customerLineNumber: "004" + ingramPartNumber: 9YG948 + quantity: 2 + additionalAttributes: + - attributeName: SHIPFROMWAREHOUSEID + attributeValue: "49" + endUserInfo: + - endUserId: "5" + addressSequenceNumber: "1" + contactId: "1" + contact: Dummy John + phoneNumber: "78776777771" + email: dummy.email1@ingrammicro.co.in + warrantyInfo: + - directLineLink: MJDVATC10001B + - customerLineNumber: "005" + ingramPartNumber: 9HG002 + quantity: 1 + additionalAttributes: + - attributeName: SHIPFROMWAREHOUSEID + attributeValue: "49" + endUserInfo: + - endUserId: "5" + addressSequenceNumber: "1" + contactId: "1" + contact: Dummy John + phoneNumber: "78776777771" + email: dummy.email1@ingrammicro.co.in + warrantyInfo: + - hardwareLineLink: "002" + - customerLineNumber: "006" + ingramPartNumber: 9HF999 + quantity: 3 + additionalAttributes: + - attributeName: SHIPFROMWAREHOUSEID + attributeValue: "49" + endUserInfo: + - endUserId: "5" + addressSequenceNumber: "1" + contactId: "1" + contact: Dummy John + phoneNumber: "78776777771" + email: dummy.email1@ingrammicro.co.in + warrantyInfo: + - hardwareLineLink: "003" + additionalAttributes: + - attributeName: enableCommentsAsLines + attributeValue: "true" + - attributeName: allowDuplicateCustomerOrderNumber + attributeValue: "true" + - attributeName: allowOrderOnCustomerHold + attributeValue: "false" + Govt fields with End User Info: + value: + customerOrderNumber: GovtOrder-01 + endCustomerOrderNumber: EPK_01081841 + endUserInfo: + companyName: US AIR FORCEE + addressLine1: 14300 FANG DR + city: JACKSONVILLE + state: FL + postalCode: "322187933" + countryCode: US + phoneNumber: "4786620376" + email: MATT.DIXON@US.AF.MIL + lines: + - customerLineNumber: "1" + ingramPartNumber: 4A0036 + quantity: "1," + unitPrice: 41.71 + additionalAttributes: + - attributeName: allowDuplicateCustomerOrderNumber + attributeValue: "true" + - attributeName: govtProgramType + attributeValue: PA + - attributeName: govtEndUserType + attributeValue: F + - attributeName: govtSolicitationNumber + attributeValue: "438" + - attributeName: govtEndUserData + attributeValue: US AIR FORCEE + - attributeName: govtEndUserPostalCode + attributeValue: "322187933" + - attributeName: govtPublicPrivateCode + attributeValue: P + schema: + $ref: '#/components/schemas/OrderCreateRequest' + required: true + responses: + "201": + content: + application/json: + examples: + Order with Header Comments Response: + value: + customerOrderNumber: SWAGGER-01 + billToAddressId: "000" + orderSplit: false + processedPartially: false + purchaseOrderTotal: 14.29 + resellerInfo: {} + shipToInfo: + addressId: "200" + companyName: INGRAM MICRO TEST ACCOUNT + addressLine1: ATTN TOD DEBIE + addressLine2: 1610 E SAINT ANDREW PL + city: SANTA ANA + state: CA + postalCode: "927054931" + countryCode: US + orders: + - numberOfLinesWithSuccess: 1 + numberOfLinesWithError: 0 + numberOfLinesWithWarning: 0 + ingramOrderNumber: 20-RFKW4 + ingramOrderDate: 2021-05-26 + notes: "" + orderType: S + orderTotal: 14.29 + freightCharges: 14.29 + totalTax: 0 + currencyCode: USD + lines: + - subOrderNumber: 20-RFKW4-11 + ingramLineNumber: "001" + customerLineNumber: "1" + lineStatus: Backordered + ingramPartNumber: DF4128 + unitPrice: 61.22 + extendedUnitPrice: 0 + quantityOrdered: 1 + quantityConfirmed: 0 + quantityBackOrdered: 1 + notes: COMBO WAVE MK550 WRLS DESKTOP WRLS || WRLS LASER MOUSE + shipmentDetails: + carrierCode: O1 + carrierName: ONTRAC + shipFromWarehouseId: "10" + shipFromLocation: "Mira Loma, CA" + links: + - topic: orders + href: /resellers/v6/orders/20-RFKW4 + type: GET + Order on customer Hold: + value: + customerOrderNumber: SWAGGER-01 + billToAddressId: "000" + orderSplit: false + processedPartially: false + purchaseOrderTotal: 0 + resellerInfo: {} + shipToInfo: + addressId: "200" + companyName: INGRAM MICRO TEST ACCOUNT + addressLine1: ATTN TOD DEBIE + addressLine2: 1610 E SAINT ANDREW PL + city: SANTA ANA + state: CA + postalCode: "927054931" + countryCode: US + orders: + - numberOfLinesWithSuccess: 1 + numberOfLinesWithError: 0 + numberOfLinesWithWarning: 0 + ingramOrderNumber: 20-RFKWQ + ingramOrderDate: 2021-05-26 + notes: CUSTOMERHOLDORDERSAMPLE + orderType: S + orderTotal: 0 + freightCharges: 0 + totalTax: 0 + currencyCode: USD + lines: + - subOrderNumber: 20-RFKWQ-11 + ingramLineNumber: "002" + customerLineNumber: "1" + lineStatus: Backordered + ingramPartNumber: DF4128 + unitPrice: 61.22 + extendedUnitPrice: 0 + quantityOrdered: 1 + quantityConfirmed: 0 + quantityBackOrdered: 1 + notes: COMBO WAVE MK550 WRLS DESKTOP WRLS || WRLS LASER MOUSE + shipmentDetails: + carrierCode: XC + carrierName: RG 3001 ND + shipFromWarehouseId: "10" + shipFromLocation: "Mira Loma, CA" + links: + - topic: orders + href: /resellers/v6/orders/20-RFKWQ + type: GET + Ship Complete Order Response: + value: + customerOrderNumber: THIS_IS-12 + billToAddressId: "000" + orderSplit: false + processedPartially: false + purchaseOrderTotal: 70.84 + resellerInfo: {} + shipToInfo: + addressId: "200" + companyName: INGRAM MICRO TEST ACCOUNT + addressLine1: ATTN TOD DEBIE + addressLine2: 1610 E SAINT ANDREW PL + city: SANTA ANA + state: CA + postalCode: "927054931" + countryCode: US + orders: + - numberOfLinesWithSuccess: 1 + numberOfLinesWithError: 0 + numberOfLinesWithWarning: 0 + ingramOrderNumber: 20-RFJN3 + ingramOrderDate: 2021-05-13 + notes: ////ORDER HEADER + orderType: D + orderTotal: 70.84 + freightCharges: 0 + totalTax: 0 + currencyCode: USD + lines: + - subOrderNumber: 20-RFJN3-11 + ingramLineNumber: "002" + customerLineNumber: "1" + lineStatus: In Progress + ingramPartNumber: 4U0212 + unitPrice: 70.84 + extendedUnitPrice: 70.84 + quantityOrdered: 1 + quantityConfirmed: 1 + quantityBackOrdered: 0 + notes: 3YR NBD EXCH SJ PRO 3XXX SVC SVCS + shipmentDetails: + carrierCode: VL + carrierName: VIRTUAL + shipFromWarehouseId: "10" + shipFromLocation: "Mira Loma, CA" + links: + - topic: orders + href: /resellers/v6/orders/20-RFJN3 + type: GET + Backordered response: + value: + customerOrderNumber: NEWCUSTOMERP1O6 + billToAddressId: "000" + orderSplit: false + processedPartially: false + purchaseOrderTotal: 7.83 + resellerInfo: {} + shipToInfo: + contact: TOM SORENSEN + companyName: FIRST NATIONAL BANK OF OMAHA + addressLine1: 17501 W 98TH ST SPC 1833 + city: LENEXA + state: KS + postalCode: "662191736" + countryCode: US + orders: + - numberOfLinesWithSuccess: 1 + numberOfLinesWithError: 0 + numberOfLinesWithWarning: 0 + ingramOrderNumber: 20-RFKWP + ingramOrderDate: 2021-05-26 + notes: "" + orderType: S + orderTotal: 7.83 + freightCharges: 7.83 + totalTax: 0 + currencyCode: USD + lines: + - subOrderNumber: 20-RFKWP-11 + ingramLineNumber: "002" + customerLineNumber: "1" + lineStatus: Backordered + ingramPartNumber: DF4128 + unitPrice: 61.22 + extendedUnitPrice: 0 + quantityOrdered: 1 + quantityConfirmed: 0 + quantityBackOrdered: 1 + notes: COMBO WAVE MK550 WRLS DESKTOP WRLS || WRLS LASER MOUSE + shipmentDetails: + carrierCode: 4M + carrierName: SMARTPOST-BM + shipFromWarehouseId: "30" + shipFromLocation: "Millington, TN" + miscellaneousCharges: + - subOrderNumber: 20-RFKWP-11 + chargeLineReference: "895" + chargeDescription: FREE FREIGHT + chargeAmount: 0 + links: + - topic: orders + href: /resellers/v6/orders/20-RFKWP + type: GET + Shipping Instruction and Signature Required: + value: + customerOrderNumber: SHIPVIAEG + billToAddressId: "20-RFKKT : 000" + orderSplit: false + processedPartially: false + purchaseOrderTotal: 70.84 + resellerInfo: {} + shipToInfo: + addressId: "20-RFKKT : 200" + companyName: INGRAM MICRO TEST ACCOUNT + addressLine1: ATTN TOD DEBIE + addressLine2: 1610 E SAINT ANDREW PL + city: SANTA ANA + state: CA + postalCode: "927054931" + countryCode: US + orders: + - numberOfLinesWithSuccess: 1 + numberOfLinesWithError: 0 + numberOfLinesWithWarning: 0 + ingramOrderNumber: 20-RFKKT + ingramOrderDate: 2021-05-24 + notes: "20-RFKKT : ///SHPI:THIS IS THE SHIPPING INSTRU || 20-RFKKT\ + \ : ///SHPI:CTION FOR THIS ORDER" + orderType: D + orderTotal: 70.84 + freightCharges: 0 + totalTax: 0 + currencyCode: "20-RFKKT : USD" + lines: + - subOrderNumber: 20-RFKKT-11 + ingramLineNumber: "003" + customerLineNumber: "1" + lineStatus: In Progress + ingramPartNumber: 4U0212 + unitPrice: 70.84 + extendedUnitPrice: 70.84 + quantityOrdered: 1 + quantityConfirmed: 1 + quantityBackOrdered: 0 + notes: 3YR NBD EXCH SJ PRO 3XXX SVC SVCS + shipmentDetails: + carrierCode: VL + carrierName: VIRTUAL + shipFromWarehouseId: "10" + shipFromLocation: "Mira Loma, CA" + signatureRequired: "true" + shippingInstructions: This is the shipping instruction for + this order + links: + - topic: orders + href: /resellers/v6/orders/20-RFKKT + type: GET + Carrier Code & Fright Account Number Response: + value: + customerOrderNumber: SPCLBID1 + billToAddressId: "000" + orderSplit: false + processedPartially: false + purchaseOrderTotal: 9.54 + resellerInfo: {} + shipToInfo: + addressId: "200" + companyName: INGRAM MICRO TEST ACCOUNT + addressLine1: ATTN TOD DEBIE + addressLine2: 1610 E SAINT ANDREW PL + city: SANTA ANA + state: CA + postalCode: "927054931" + countryCode: US + orders: + - numberOfLinesWithSuccess: 1 + numberOfLinesWithError: 0 + numberOfLinesWithWarning: 0 + ingramOrderNumber: 20-RFK3K + ingramOrderDate: 2021-05-21 + notes: TESTING MAULTIPLE LINE ITEMS + orderType: S + orderTotal: 9.54 + freightCharges: 9.54 + totalTax: 0 + currencyCode: USD + lines: + - subOrderNumber: 20-RFK3K-11 + ingramLineNumber: "002" + customerLineNumber: "1" + lineStatus: Backordered + ingramPartNumber: DF4128 + unitPrice: 61.22 + extendedUnitPrice: 0 + quantityOrdered: 1 + quantityConfirmed: 0 + quantityBackOrdered: 1 + notes: COMBO WAVE MK550 WRLS DESKTOP WRLS || WRLS LASER MOUSE + shipmentDetails: + carrierCode: RG + carrierName: FEDEX GROUND + shipFromWarehouseId: "10" + shipFromLocation: "Mira Loma, CA" + freightAccountNumber: FRT100 + miscellaneousCharges: + - subOrderNumber: 20-RFK3K-11 + chargeLineReference: "895" + chargeDescription: FREE FREIGHT + chargeAmount: 0 + links: + - topic: orders + href: /resellers/v6/orders/20-RFK3K + type: GET + Response with Shipping Address: + value: + customerOrderNumber: TESTING_APR07 + endCustomerOrderNumber: ENDUSER + billToAddressId: "000" + orderSplit: false + processedPartially: false + purchaseOrderTotal: 0 + resellerInfo: + companyName: Demo + shipToInfo: + contact: TOM SORENSEN + companyName: FIRST NATIONAL BANK OF OMAHA + addressLine1: 17501 W 98TH ST SPC 1833 + city: LENEXA + state: KS + postalCode: "662191736" + countryCode: US + phoneNumber: "987654321" + email: testing@yaho.com + orders: + - numberOfLinesWithSuccess: 1 + numberOfLinesWithError: 0 + numberOfLinesWithWarning: 0 + ingramOrderNumber: 20-RFDMQ + ingramOrderDate: 2021-04-07 + notes: "" + orderType: S + orderTotal: 7.13 + freightCharges: 7.13 + totalTax: 0 + currencyCode: USD + lines: + - subOrderNumber: 20-RFDMQ-11 + ingramLineNumber: "001" + customerLineNumber: "1" + lineStatus: im::backordered + ingramPartNumber: DF4128 + unitPrice: 61.22 + quantityOrdered: 1 + quantityConfirmed: 0 + quantityBackOrdered: 1 + notes: COMBO WAVE MK550 WRLS DESKTOP WRLS || WRLS LASER MOUSE + shipmentDetails: + carrierCode: 4M + carrierName: SMARTPOST-BM + shipFromWarehouseId: "30" + shipFromLocation: "Millington, TN" + links: + - topic: orders + href: /resellers/v5/orders/20-RFDMQ + type: GET + Direct Ship with EndUser Info: + value: + customerOrderNumber: SWAGGER-03 + billToAddressId: "000" + orderSplit: false + processedPartially: false + purchaseOrderTotal: 2802.71 + resellerInfo: {} + shipToInfo: + contact: CUSTOMER 1 + companyName: ABC PRIAVTE LTD + addressLine1: 7001 SW 24TH AVE + addressLine2: TESTING + city: GAINESVILLE + state: FL + postalCode: "326073704" + countryCode: US + orders: + - numberOfLinesWithSuccess: 1 + numberOfLinesWithError: 0 + numberOfLinesWithWarning: 0 + ingramOrderNumber: 20-RFJYX + ingramOrderDate: 2021-05-20 + notes: This is enduser info Order + orderType: D + orderTotal: 2802.71 + freightCharges: 0 + totalTax: 0 + currencyCode: USD + lines: + - subOrderNumber: 20-RFJYX-11 + ingramLineNumber: "002" + customerLineNumber: "1" + lineStatus: In Progress + ingramPartNumber: YZ1478 + unitPrice: 2802.71 + extendedUnitPrice: 2802.71 + quantityOrdered: 1 + quantityConfirmed: 1 + quantityBackOrdered: 0 + notes: PROD SNS VSPHERE 6 ESSLPL KIT SLIC || 3YR || EU#- + 000418285 MEDIA3 TECHNOLOGIES || MC# C + shipmentDetails: + carrierCode: VL + carrierName: VIRTUAL + shipFromWarehouseId: "40" + shipFromLocation: "Carol Stream, IL" + links: + - topic: orders + href: /resellers/v6/orders/20-RFJYX + type: GET + Combined Order(Stock + Diret Ship): + value: + customerOrderNumber: TEJAL899 + endCustomerOrderNumber: ENDUSER + billToAddressId: "000000" + orderSplit: true + processedPartially: false + purchaseOrderTotal: 34212.93 + resellerInfo: {} + shipToInfo: + contact: TOM SORENSEN + companyName: FIRST NATIONAL BANK OF OMAHA + addressLine1: 17501 W 98TH ST SPC 1833 + city: LENEXA + state: KS + postalCode: "662191736" + countryCode: US + orders: + - numberOfLinesWithSuccess: 1 + numberOfLinesWithError: 0 + numberOfLinesWithWarning: 0 + ingramOrderNumber: 20-RFKM1 + ingramOrderDate: 2021-05-25 + notes: "" + orderType: S + orderTotal: 7.83 + freightCharges: 7.83 + totalTax: 0 + currencyCode: USD USD + lines: + - subOrderNumber: 20-RFKM1-11 + ingramLineNumber: "001" + customerLineNumber: "1" + lineStatus: Backordered + ingramPartNumber: DF4128 + unitPrice: 61.22 + extendedUnitPrice: 0 + quantityOrdered: 1 + quantityConfirmed: 0 + quantityBackOrdered: 1 + notes: COMBO WAVE MK550 WRLS DESKTOP WRLS || WRLS LASER MOUSE + shipmentDetails: + carrierCode: 4M + carrierName: SMARTPOST-BM + shipFromWarehouseId: "30" + shipFromLocation: "Millington, TN" + links: + - topic: orders + href: /resellers/v6/orders/20-RFKM1 + type: GET + - numberOfLinesWithSuccess: 1 + numberOfLinesWithError: 0 + numberOfLinesWithWarning: 0 + ingramOrderNumber: 20-RFKM2 + ingramOrderDate: 2021-05-25 + notes: ////ORDER HEADER + orderType: D + orderTotal: 34205.1 + freightCharges: 0 + totalTax: 0 + currencyCode: USD USD + lines: + - subOrderNumber: 20-RFKM2-11 + ingramLineNumber: "002" + customerLineNumber: "2" + lineStatus: In Progress + ingramPartNumber: RQ6000 + unitPrice: 34205.1 + extendedUnitPrice: 34205.1 + quantityOrdered: 1 + quantityConfirmed: 1 + quantityBackOrdered: 0 + notes: TIERBEAST 2CTRL 8GB 14X600GB PERP || SAS 28X1TB SATA + BLACK + shipmentDetails: + carrierCode: XC + carrierName: GR 127050 UN + shipFromWarehouseId: "40" + shipFromLocation: "Carol Stream, IL" + links: + - topic: orders + href: /resellers/v6/orders/20-RFKM2 + type: GET + Ship from warehouseid Response: + value: + customerOrderNumber: NEWCUSTOMERPO4 + billToAddressId: "000" + orderSplit: false + processedPartially: false + purchaseOrderTotal: 14.29 + resellerInfo: {} + shipToInfo: + addressId: "200" + companyName: INGRAM MICRO TEST ACCOUNT + addressLine1: ATTN TOD DEBIE + addressLine2: 1610 E SAINT ANDREW PL + city: SANTA ANA + state: CA + postalCode: "927054931" + countryCode: US + orders: + - numberOfLinesWithSuccess: 1 + numberOfLinesWithError: 0 + numberOfLinesWithWarning: 0 + ingramOrderNumber: 20-RFKTB + ingramOrderDate: 2021-05-25 + notes: "" + orderType: S + orderTotal: 14.29 + freightCharges: 14.29 + totalTax: 0 + currencyCode: USD + lines: + - subOrderNumber: 20-RFKTB-11 + ingramLineNumber: "003" + customerLineNumber: "1" + lineStatus: Backordered + ingramPartNumber: DF4128 + unitPrice: 61.22 + extendedUnitPrice: 0 + quantityOrdered: 1 + quantityConfirmed: 0 + quantityBackOrdered: 1 + notes: COMBO WAVE MK550 WRLS DESKTOP WRLS || WRLS LASER MOUSE + shipmentDetails: + carrierCode: O1 + carrierName: ONTRAC + shipFromWarehouseId: "10" + shipFromLocation: "Mira Loma, CA" + miscellaneousCharges: + - subOrderNumber: 20-RFKTB-11 + chargeLineReference: "895" + chargeDescription: FREE FREIGHT + chargeAmount: 0 + links: + - topic: orders + href: /resellers/v6/orders/20-RFKTB + type: GET + Order Split Response: + value: + customerOrderNumber: TEJAL899 + endCustomerOrderNumber: ENDUSER + billToAddressId: "000" + orderSplit: true + processedPartially: false + purchaseOrderTotal: 36445.03 + shipToInfo: + contact: TOM SORENSEN + companyName: FIRST BANK OF OMAHA + addressLine1: 17501 W 98TH ST SPC 1833 + city: LENEXA + state: KS + postalCode: "662191736" + countryCode: US + orders: + - numberOfLinesWithSuccess: 1 + numberOfLinesWithError: 0 + numberOfLinesWithWarning: 0 + ingramOrderNumber: 50-65931 + ingramOrderDate: 2021-03-31 + notes: ////ORDER HEADER + orderType: S + orderTotal: 0 + freightCharges: 9.03 + totalTax: 0 + currencyCode: USD + lines: + - subOrderNumber: 50-65931-11 + ingramLineNumber: "001" + customerLineNumber: "1" + lineStatus: im::backordered + ingramPartNumber: DF4128 + unitPrice: 69.51 + quantityOrdered: 1 + quantityConfirmed: 0 + quantityBackOrdered: 1 + notes: COMBO WAVE MK550 WRLS DESKTOP WRLS || WRLS LASER MOUSE + shipmentDetails: + carrierCode: RG + carrierName: FEDEX GROUND + shipFromWarehouseId: "30" + shipFromLocation: "Millington, TN" + links: + - topic: orders + href: /resellers/v5/orders/50-65931 + type: GET + - numberOfLinesWithSuccess: 1 + numberOfLinesWithError: 0 + numberOfLinesWithWarning: 0 + ingramOrderNumber: 50-65932 + ingramOrderDate: 2021-03-31 + notes: ////ORDER HEADER + orderType: D + orderTotal: 36436 + freightCharges: 0 + totalTax: 0 + currencyCode: USD + lines: + - subOrderNumber: 50-65932-11 + ingramLineNumber: "002" + customerLineNumber: "1" + lineStatus: im::open + ingramPartNumber: RQ6000 + unitPrice: 36436 + quantityOrdered: 1 + quantityConfirmed: 1 + quantityBackOrdered: 0 + notes: TIERBEAST 2CTRL 8GB 14X600GB PERP || SAS 28X1TB SATA + BLACK + shipmentDetails: + carrierCode: GR + carrierName: DR SHP GROUN + shipFromWarehouseId: "10" + shipFromLocation: "Mira Loma, CA" + links: + - topic: orders + href: /resellers/v5/orders/50-65932 + type: GET + Price Variance Response: + value: + customerOrderNumber: PRICEVARIANCE + billToAddressId: "000" + orderSplit: false + processedPartially: false + purchaseOrderTotal: 9.54 + resellerInfo: {} + shipToInfo: + companyName: B2B_TESTING_DEV + addressLine1: "100 LIGHTING WAY, 3RD FLOOR" + city: SECAUCUS + state: NJ + postalCode: 70940000 + countryCode: US + orders: + - numberOfLinesWithSuccess: 1 + numberOfLinesWithError: 0 + numberOfLinesWithWarning: 0 + ingramOrderNumber: 20-B31TK + ingramOrderDate: 2021-05-20 + notes: "" + orderType: S + orderTotal: 9.54 + freightCharges: 9.54 + totalTax: 0 + currencyCode: USD + lines: + - subOrderNumber: 20-B31TK-11 + ingramLineNumber: "001" + customerLineNumber: "1" + lineStatus: Backordered + ingramPartNumber: TSXML1 + unitPrice: 7.15 + extendedUnitPrice: 0 + quantityOrdered: 1 + quantityConfirmed: 0 + quantityBackOrdered: 1 + notes: TEST XML SKU WITH NO AVAILABLE CABL || STOCK + shipmentDetails: + carrierCode: RG + carrierName: FEDEX GROUND + shipFromWarehouseId: "80" + shipFromLocation: "Jonestown, PA" + links: + - topic: orders + href: /resellers/v6/orders/20-B31TK + type: GET + All Distributions ShipComplete-SplitOrder: + value: + customerOrderNumber: NEWCUSTOMERP1O6 + billToAddressId: "000" + orderSplit: true + processedPartially: false + purchaseOrderTotal: 34212.93 + resellerInfo: {} + shipToInfo: + contact: TOM SORENSEN + companyName: FIRST NATIONAL BANK OF OMAHA + addressLine1: 17501 W 98TH ST SPC 1833 + city: LENEXA + state: KS + postalCode: "662191736" + countryCode: US + orders: + - numberOfLinesWithSuccess: 1 + numberOfLinesWithError: 0 + numberOfLinesWithWarning: 0 + ingramOrderNumber: 20-RFL62 + ingramOrderDate: 2021-05-28 + notes: THIS IS A SHIP COMPLETE ORDER + orderType: S + orderTotal: 7.83 + freightCharges: 7.83 + totalTax: 0 + currencyCode: USD + lines: + - subOrderNumber: 20-RFL62-11 + ingramLineNumber: "002" + customerLineNumber: "1" + lineStatus: Backordered + ingramPartNumber: DF4128 + unitPrice: 61.22 + extendedUnitPrice: 0 + quantityOrdered: 10 + quantityConfirmed: 0 + quantityBackOrdered: 10 + notes: COMBO WAVE MK550 WRLS DESKTOP WRLS || WRLS LASER MOUSE + shipmentDetails: + carrierCode: 4M + carrierName: SMARTPOST-BM + shipFromWarehouseId: "30" + shipFromLocation: "Millington, TN" + links: + - topic: orders + href: /resellers/v6/orders/20-RFL62 + type: GET + - numberOfLinesWithSuccess: 1 + numberOfLinesWithError: 0 + numberOfLinesWithWarning: 0 + ingramOrderNumber: 20-RFL63 + ingramOrderDate: 2021-05-28 + notes: THIS IS BACKORDER SAMPLE + orderType: D + orderTotal: 34205.1 + freightCharges: 0 + totalTax: 0 + currencyCode: USD + lines: + - subOrderNumber: 20-RFL63-11 + ingramLineNumber: "002" + customerLineNumber: "2" + lineStatus: In Progress + ingramPartNumber: RQ6000 + unitPrice: 34205.1 + extendedUnitPrice: 34205.1 + quantityOrdered: 1 + quantityConfirmed: 1 + quantityBackOrdered: 0 + notes: TIERBEAST 2CTRL 8GB 14X600GB PERP || SAS 28X1TB SATA + BLACK + shipmentDetails: + carrierCode: XC + carrierName: GR 127050 UN + shipFromWarehouseId: "40" + shipFromLocation: "Carol Stream, IL" + links: + - topic: orders + href: /resellers/v6/orders/20-RFL63 + type: GET + APPLE DEP Response: + value: + customerOrderNumber: APPLE DEP-01 + billToAddressId: "000" + orderSplit: false + processedPartially: false + purchaseOrderTotal: 14.29 + resellerInfo: {} + shipToInfo: + addressId: "200" + companyName: INGRAM MICRO TEST ACCOUNT + addressLine1: ATTN TOD DEBIE + addressLine2: 1610 E SAINT ANDREW PL + city: SANTA ANA + state: CA + postalCode: "927054931" + countryCode: US + orders: + - numberOfLinesWithSuccess: 1 + numberOfLinesWithError: 0 + numberOfLinesWithWarning: 0 + ingramOrderNumber: 20-RFLV4 + ingramOrderDate: 2021-06-03 + notes: THIS IS APPLE DEP SAMPLE + orderType: S + orderTotal: 14.29 + freightCharges: 14.29 + totalTax: 0 + currencyCode: USD + lines: + - subOrderNumber: 20-RFLV4-11 + ingramLineNumber: "002" + customerLineNumber: "1" + lineStatus: Backordered + ingramPartNumber: DF4128 + unitPrice: 61.22 + extendedUnitPrice: 0 + quantityOrdered: 10 + quantityConfirmed: 0 + quantityBackOrdered: 10 + notes: COMBO WAVE MK550 WRLS DESKTOP WRLS || WRLS LASER MOUSE + shipmentDetails: + carrierCode: O1 + carrierName: ONTRAC + shipFromWarehouseId: "10" + shipFromLocation: "Mira Loma, CA" + links: + - topic: orders + href: /resellers/v6/orders/20-RFLV4 + type: GET + Order with CPN Response-SAP: + value: + customerOrderNumber: Order with CPN-SAP + orderSplit: false + processedPartially: false + purchaseOrderTotal: 5 + resellerInfo: {} + shipToInfo: + addressId: "292711" + companyName: ASUS ONLINE STORE + addressLine1: "205 KALLANG BAHRU, 04-00" + city: SINGAPORE + state: SG + postalCode: "339341" + countryCode: SG + orders: + - numberOfLinesWithSuccess: 1 + numberOfLinesWithError: 0 + numberOfLinesWithWarning: 0 + ingramOrderNumber: "7059827143" + ingramOrderDate: 2021-06-03T18:37:08+08:00 + notes: "" + orderType: ZOR + orderTotal: 5 + freightCharges: 0 + totalTax: 0 + currencyCode: SGD + lines: + - ingramLineNumber: "10" + customerLineNumber: "2" + lineStatus: Backordered + ingramPartNumber: "4008025" + unitPrice: 2218 + extendedUnitPrice: 2218 + quantityOrdered: 1 + quantityConfirmed: 0 + quantityBackOrdered: 1 + shipmentDetails: + carrierCode: FR1SG00030 + shipFromWarehouseId: SG01 + links: + - topic: orders + href: /resellers/v6/orders/7059827143 + type: GET + Warranty Order Response: + value: + customerOrderNumber: MJD114TC1041A + endCustomerOrderNumber: MJD114TC1041A + billToAddressId: "000" + orderSplit: true + processedPartially: false + purchaseOrderTotal: 17577.08 + resellerInfo: + companyName: Dummy + email: dummy.email@ingrammicro.co.in + shipToInfo: {} + orders: + - numberOfLinesWithSuccess: 5 + numberOfLinesWithError: 0 + numberOfLinesWithWarning: 0 + ingramOrderNumber: 20-99999 + ingramOrderDate: 2022-04-11 + orderType: S + orderTotal: 6147.92 + freightCharges: 0 + totalTax: 0 + currencyCode: USD + lines: + - subOrderNumber: 20-99999-31 + ingramLineNumber: "001" + customerLineNumber: "002" + lineStatus: In Progress + globalSkuId: A300-8RB884 + ingramPartNumber: 8RB884 + vendorPartNumber: MYD82LL/A + unitPrice: 1258.33 + extendedUnitPrice: 2516.66 + quantityOrdered: 2 + quantityConfirmed: 2 + quantityBackOrdered: 0 + notes: MACBOOK PRO 13IN M1 256GB SG SYST || 8-CORE CPU 8-CORE + GPU + shipmentDetails: + carrierCode: RG + carrierName: FEDEX GROUND + shipFromWarehouseId: "10" + shipFromLocation: "Mira Loma, CA" + - subOrderNumber: 20-99999-11 + ingramLineNumber: "002" + customerLineNumber: "003" + lineStatus: In Progress + globalSkuId: A300-8RB881 + ingramPartNumber: 8RB881 + vendorPartNumber: MGN73LL/A + unitPrice: 1210.42 + extendedUnitPrice: 3631.26 + quantityOrdered: 3 + quantityConfirmed: 3 + quantityBackOrdered: 0 + notes: MACBOOK AIR 13IN M1 512GB SG SYST || 8-CORE CPU 8-CORE + GPU + shipmentDetails: + carrierCode: FC + carrierName: FOX HOURLY + shipFromWarehouseId: "40" + shipFromLocation: "Carol Stream, IL" + - subOrderNumber: 20-99999-21 + ingramLineNumber: "003" + customerLineNumber: "004" + lineStatus: Backordered + globalSkuId: A300-9YG948 + ingramPartNumber: 9YG948 + vendorPartNumber: SCPG2LL/A + unitPrice: 203.13 + extendedUnitPrice: 0 + quantityOrdered: 2 + quantityConfirmed: 0 + quantityBackOrdered: 2 + notes: APPLECARE+ 14IN MACBOOK PRO SVCS || EU#- 009999999 + TEST END USER || MC# C || EUSR CONT:DUMMY JOHN || EUSR EMAL:DUMMY.EMAIL1@INGRAMMICRO.CO.IN + shipmentDetails: + carrierCode: Q5 + carrierName: OUT SOURCE S + shipFromWarehouseId: "49" + shipFromLocation: Electronic Download + - subOrderNumber: 20-99999-21 + ingramLineNumber: "004" + customerLineNumber: "005" + lineStatus: Backordered + globalSkuId: A300-9HG002 + ingramPartNumber: 9HG002 + vendorPartNumber: 'S9736LL/A ' + unitPrice: 181.25 + extendedUnitPrice: 0 + quantityOrdered: 1 + quantityConfirmed: 0 + quantityBackOrdered: 1 + notes: APPLECARE+ FOR 13-INCH MACBOOK DOWN || PRO M1 || EU#- + 009999999 TEST END USER || MC# C || EUSR CONT:DUMMY JOHN + || EUSR EMAL:DUMMY.EMAIL1@INGRAMMICRO.CO.IN + shipmentDetails: + carrierCode: Q5 + carrierName: OUT SOURCE S + shipFromWarehouseId: "49" + shipFromLocation: Electronic Download + - subOrderNumber: 20-99999-21 + ingramLineNumber: "005" + customerLineNumber: "006" + lineStatus: Backordered + globalSkuId: A300-9HF999 + ingramPartNumber: 9HF999 + vendorPartNumber: S9788LL/A + unitPrice: 144.79 + extendedUnitPrice: 0 + quantityOrdered: 3 + quantityConfirmed: 0 + quantityBackOrdered: 3 + notes: APPLECARE+ FOR MACBOOK AIR DOWN || EU#- 009999999 + TEST END USER || MC# C || EUSR CONT:DUMMY JOHN || EUSR EMAL:DUMMY.EMAIL1@INGRAMMICRO.CO.IN + shipmentDetails: + carrierCode: Q5 + carrierName: OUT SOURCE S + shipFromWarehouseId: "49" + shipFromLocation: Electronic Download + links: + - topic: orders + href: /resellers/v6/orders/20-99999 + type: GET + - numberOfLinesWithSuccess: 1 + numberOfLinesWithError: 0 + numberOfLinesWithWarning: 0 + ingramOrderNumber: 20-99998 + ingramOrderDate: 2022-04-11 + orderType: D + orderTotal: 11429.16 + freightCharges: 0 + totalTax: 0 + currencyCode: USD + lines: + - subOrderNumber: 20-99998-11 + ingramLineNumber: "002" + customerLineNumber: "001" + lineStatus: In Progress + globalSkuId: A300-9VL970 + ingramPartNumber: 9VL970 + vendorPartNumber: Z15G001XM + unitPrice: 5714.58 + extendedUnitPrice: 11429.16 + quantityOrdered: 2 + quantityConfirmed: 2 + quantityBackOrdered: 0 + notes: CTO 14IN MACBOOK PRO M1 MAX SYST || 10C CPU 32C + GPU 64GB 8TB SP GRAY + shipmentDetails: + carrierCode: GR + carrierName: DR SHP GROUN + shipFromWarehouseId: "10" + shipFromLocation: "Mira Loma, CA" + links: + - topic: orders + href: /resellers/v6/orders/20-99998 + type: GET + Govt fields with End User Info: + value: + customerOrderNumber: GovtOrder-01 + endCustomerOrderNumber: EPK_01081841 + orderSplit: false + processedPartially: false + purchaseOrderTotal: 41.71 + resellerInfo: {} + shipToInfo: {} + orders: + - numberOfLinesWithSuccess: 1 + numberOfLinesWithError: 0 + numberOfLinesWithWarning: 0 + ingramOrderNumber: 20-B31TK + ingramOrderDate: 2021-05-20 + notes: "EUNAME: US AIR FORCEE || EUADD1: 14300 FANG DR || EUPH:\ + \ 4786620376 || EUEMAIL: MATT.DIXON@US.AF.MIL" + orderType: S + orderTotal: 41.71 + freightCharges: 0 + totalTax: 0 + currencyCode: USD + lines: + - subOrderNumber: 20-B31TK-11 + ingramLineNumber: "001" + customerLineNumber: "1" + lineStatus: Backordered + globalSkuId: A300-4A0036 + ingramPartNumber: 4A0036 + vendorPartNumber: E2016HV + vendorNumber: 802U + unitPrice: 41.71 + extendedUnitPrice: 0 + quantityOrdered: 1 + quantityConfirmed: 0 + quantityBackOrdered: 1 + notes: 20IN MONITOR E2016HV 210-AGLU MNTR || EU#- 010004087 + US AIR FORCEE || MC# F + shipmentDetails: + carrierCode: UG + carrierName: UPS GROUND + shipFromWarehouseId: "40" + shipFromLocation: "Carol Stream, IL" + links: + - topic: orders + href: /resellers/v6/orders/20-B31TK + type: GET + schema: + $ref: '#/components/schemas/OrderCreateResponse' + description: Created + headers: + IM-CorrelationID: + description: Unique transaction number to identify each transaction + across all the systems. + explode: false + schema: + type: string + style: simple + IM-SenderID: + description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + schema: + example: MyCompany + type: string + style: simple + "207": + content: + application/json: + examples: + Partial Success: + value: + customerOrderNumber: TESTING_APR08 + endCustomerOrderNumber: ENDUSER + billToAddressId: "000" + orderSplit: false + processedPartially: false + purchaseOrderTotal: 0 + resellerInfo: + companyName: Demo + shipToInfo: + contact: TOM SORENSEN + companyName: FIRST NATIONAL BANK OF OMAHA + addressLine1: 17501 W 98TH ST SPC 1833 + city: LENEXA + state: KS + postalCode: "662191736" + countryCode: US + orders: + - numberOfLinesWithSuccess: 1 + numberOfLinesWithError: 0 + numberOfLinesWithWarning: 0 + ingramOrderNumber: 20-RFDMQ + ingramOrderDate: 2021-04-07 + notes: "" + orderType: S + orderTotal: 7.13 + freightCharges: 7.13 + totalTax: 0 + currencyCode: USD + lines: + - subOrderNumber: 20-RFDMR-11 + ingramLineNumber: "001" + customerLineNumber: "1" + lineStatus: im::backordered + ingramPartNumber: DF4128 + unitPrice: 61.22 + quantityOrdered: 1 + quantityConfirmed: 0 + quantityBackOrdered: 1 + notes: COMBO WAVE MK550 WRLS DESKTOP WRLS || WRLS LASER MOUSE + shipmentDetails: + carrierCode: 4M + carrierName: SMARTPOST-BM + shipFromWarehouseId: "30" + shipFromLocation: "Millington, TN" + links: + - topic: orders + href: /resellers/v5/orders/20-RFDMQ + type: GET + rejectedLineItems: + - customerLinenumber: "1" + ingramPartNumber: DF4128MW + quantityOrdered: 1 + rejectCode: EN + rejectReason: SKU-NOTFOUND DF4128MW + Partial Order and special bid Number: + value: + customerOrderNumber: NEWCUSTOMERPO4 + billToAddressId: "000" + orderSplit: false + processedPartially: true + purchaseOrderTotal: 7.83 + resellerInfo: + companyName: Demo + shipToInfo: + contact: TOM SORENSEN + companyName: FIRST NATIONAL BANK OF OMAHA + addressLine1: 17501 W 98TH ST SPC 1833 + city: LENEXA + state: KS + postalCode: "662191736" + countryCode: US + orders: + - numberOfLinesWithSuccess: 1 + numberOfLinesWithError: 1 + numberOfLinesWithWarning: 0 + ingramOrderNumber: 20-RFJYP + ingramOrderDate: 2021-05-20 + notes: "" + orderType: S + orderTotal: 7.83 + freightCharges: 7.83 + totalTax: 0 + currencyCode: USD + lines: + - subOrderNumber: 20-RFJYP-11 + ingramLineNumber: "001" + customerLineNumber: "1" + lineStatus: Backordered + ingramPartNumber: DF4128 + unitPrice: 61.22 + extendedUnitPrice: 0 + quantityOrdered: 1 + quantityConfirmed: 0 + quantityBackOrdered: 1 + notes: COMBO WAVE MK550 WRLS DESKTOP WRLS || WRLS LASER MOUSE + shipmentDetails: + carrierCode: 4M + carrierName: SMARTPOST-BM + shipFromWarehouseId: "30" + shipFromLocation: "Millington, TN" + links: + - topic: orders + href: /resellers/v6/orders/20-RFJYP + type: GET + rejectedLineItems: + - customerLinenumber: "1" + ingramPartNumber: XXXXXX + quantityOrdered: 1 + rejectCode: EN + rejectReason: SKU-NOTFOUND XXXXXX + schema: + $ref: '#/components/schemas/OrderCreateResponse' + description: Multi-Status + headers: + IM-CorrelationID: + description: Unique transaction number to identify each transaction + across all the systems. + explode: false + schema: + type: string + style: simple + IM-SenderID: + description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + schema: + example: MyCompany + type: string + style: simple + "400": + content: + application/json: + examples: + Error: + value: + errors: + - id: 123-345-678-bw0a1077-2021-04-07T01:26:54.411-07:00 + type: /errors/validation-failed + messaage: Validation failed + fields: + - field: IM-CountryCode + value: USA + message: IM-CountryCode is not valid + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad Request + headers: + IM-CorrelationID: + description: Unique transaction number to identify each transaction + across all the systems. + explode: false + schema: + type: string + style: simple + IM-SenderID: + description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + schema: + example: MyCompany + type: string + style: simple + "500": + content: + application/json: + examples: + Server Error: + value: + errors: + - id: C123-bw0a10u3-2021-02-19T11:12:26.436-08:00 + type: /errors/system-errors + message: "Some unexpected error occured, please contact support\ + \ team for more details" + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal Server Error + headers: + IM-CorrelationID: + description: Unique transaction number to identify each transaction + across all the systems. + explode: false + schema: + type: string + style: simple + IM-SenderID: + description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + schema: + example: MyCompany + type: string + style: simple + security: + - application: + - read + summary: Create your Order + tags: + - Orders + x-content-type: application/json + x-accepts: application/json + /resellers/v6/orders/{orderNumber}: + put: + description: "The Order Modify API endpoint allows for changes to be made to\ + \ an order after the order creation process as long as the order was created\ + \ with the customer hold flag.\n\n* Orders can be modified within 24hrs of\ + \ being placed with the customer hold flag, after 24hrs they are voided if\ + \ they are not released by the customer.\n\n* Modifying orders that were placed\ + \ without the customer hold flag is not possible " + operationId: put-ordermodify + parameters: + - description: Ingram sales order number. + explode: false + in: path + name: orderNumber + required: true + schema: + example: 20-RC1RD + type: string + style: simple + - description: Action code to be used for order release. + explode: true + in: query + name: actionCode + required: false + schema: + example: release + type: string + style: form + - description: Region code paramter to be used only for order release functionality.Region + code is only for sandbox not for production + explode: true + in: query + name: regionCode + required: false + schema: + example: CS + type: string + style: form + - description: Your unique Ingram Micro customer number. + explode: false + in: header + name: IM-CustomerNumber + required: true + schema: + example: 20-222222 + maxLength: 10 + type: string + style: simple + - description: Two-character ISO country code. + explode: false + in: header + name: IM-CountryCode + required: true + schema: + example: US + maxLength: 2 + minLength: 2 + type: string + style: simple + - description: Unique transaction number to identify each transaction across + all the systems. + explode: false + in: header + name: IM-CorrelationID + required: true + schema: + example: fbac82ba-cf0a-4bcf-fc03-0c5084 + maxLength: 32 + type: string + style: simple + - description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + in: header + name: IM-SenderID + required: false + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + requestBody: + content: + application/json: + examples: + SingleLine: + value: + lines: + - customerLineNumber: "002" + ingramPartNumber: 2GZ200 + addUpdateDeleteLine: ADD + quantity: 2 + MultipleLines: + value: + lines: + - customerLineNumber: "003" + ingramPartNumber: 2GZ200 + addUpdateDeleteLine: ADD + quantity: 2 + - customerLineNumber: "004" + ingramPartNumber: DF4128 + addUpdateDeleteLine: ADD + quantity: 2 + Valid SKU and Blank Line Number: + value: + lines: + - customerLineNumber: "" + ingramPartNumber: 1C6094 + addUpdateDeleteLine: ADD + quantity: 1 + Modify Quantity with integer value: + value: + lines: + - ingramLineNumber: "003" + ingramPartNumber: 1C6094 + addUpdateDeleteLine: UPDATE + quantity: 2 + Delete single line: + value: + lines: + - ingramLineNumber: "004" + ingramPartNumber: 1C6094 + addUpdateDeleteLine: DELETE + quantity: 2 + Delete multiple lines: + value: + lines: + - ingramLineNumber: "005" + ingramPartNumber: 1C6094 + addUpdateDeleteLine: DELETE + quantity: 2 + - ingramLineNumber: "006" + ingramPartNumber: TXSLM3 + addUpdateDeleteLine: DELETE + quantity: 2 + Modify address with valid details: + value: + shipToInfo: + contact: Shinchan Corp Contact + companyName: SHINCHAN CORP + addressLine1: 2502 N. Fort Valley Road + addressLine2: building 1 + addressLine3: "" + city: flagstaff + state: AZ + postalCode: "86001" + countryCode: US + phoneNumber: 800-000-000 + email: newcorp@hotmail.com + Add header comments(>35 characters) with additionalAttributes: + value: + notes: This is a header comment greater than 35 characters + additionalAttributes: + - attributeName: enableCommentsAsLines + attributeValue: "true" + Add header comments(<35 characters) without additionalAttributes: + value: + notes: This is a header comment + Modify header comments: + value: + lines: + - ingramLineNumber: 9 + addUpdateDeleteLine: UPDATE + notes: Updated header coments + additionalAttributes: + - attributeName: enableCommentsAsLines + attributeValue: "true" + Delete header comments: + value: + lines: + - ingramLineNumber: "010" + addUpdateDeleteLine: DELETE + Add line notes: + value: + lines: + - customerLineNumber: "010" + ingramPartNumber: 1C6094 + addUpdateDeleteLine: ADD + quantity: 1 + notes: Line comment + additionalAttributes: + - attributeName: enableCommentsAsLines + attributeValue: "true" + Modify line notes: + value: + lines: + - ingramLineNumber: "011" + ingramPartNumber: 1C6094 + addUpdateDeleteLine: UPDATE + quantity: 1 + notes: Updated Line comment + additionalAttributes: + - attributeName: enableCommentsAsLines + attributeValue: "true" + Delete line notes: + value: + lines: + - ingramLineNumber: "012" + ingramPartNumber: 1C6094 + addUpdateDeleteLine: UPDATE + quantity: 1 + additionalAttributes: + - attributeName: enableCommentsAsLines + attributeValue: "true" + schema: + $ref: '#/components/schemas/OrderModifyRequest' + required: true + responses: + "200": + content: + application/json: + examples: + OneValidLine-OneInvalidPart: + value: + ingramOrderNumber: 30-B3PF2 + orderModifiedDate: 2021-02-20T15:05:19.515+05:30 + customerOrderNumber: MIGRATION_30172001 + orderTotal: 3801.32 + orderSubTotal: 3801.32 + freightCharges: 0 + totalTax: 0 + orderStatus: im::hold + billToAddressId: "000" + lines: + - subOrderNumber: 30-B3PF2-11 + lineNumber: "005" + customerLineNumber: "005" + ingramPartNumber: 2GZ200 + vendorPartNumber: SIP-T46S + quantityOrdered: 5 + quantityConfirmed: 5 + shipmentDetails: + carrierCode: OT + carrierName: OTHER + rejectedLineItems: + - customerLineNumber: "006" + ingramPartNumber: 2GZ2000001 + quantityOrdered: 6 + rejectCode: EN + rejectReason: "Line Modification/ Addition for Line Number 006\ + \ Failed for reason : ERROR-PART-NOT-FOUNDEN" + Release: + value: null + Valid SKU and Blank quantity: + value: + orderNumber: 20-RF9N6 + orderModifiedDate: 2021-03-10T03:31:24.657-08:00 + customerOrderNumber: PO79123920 + orderTotal: 140.02 + orderSubTotal: 140.02 + freightCharges: 0 + totalTax: 0 + orderStatus: ON HOLD + billToAddressId: "000" + rejectedLineItems: + - customerLineNumber: "1" + ingramPartNumber: DF4128 + rejectCode: EQ + rejectReason: ERROR-INVALID-QTY + Valid SKU with 0 quantity: + value: + ingramOrderNumber: 20-RFJWZ + orderModifiedDate: 2021-05-20T05:14:26.451-07:00 + customerOrderNumber: STYPETEST3 + orderTotal: 14.29 + orderSubTotal: 14.29 + freightCharges: 0 + totalTax: 0 + orderStatus: ON HOLD + billToAddressId: "000" + rejectedLineItems: + - customerLineNumber: "001" + ingramPartNumber: 1C6094 + rejectCode: EQ + rejectReason: ERROR-INVALID-QTY + Modify Quantity with invalid ingramLineNumber: + value: + ingramOrderNumber: 20-RFJWZ + orderModifiedDate: 2021-05-20T05:48:36.31-07:00 + customerOrderNumber: STYPETEST3 + orderTotal: 14.29 + orderSubTotal: 14.29 + freightCharges: 0 + totalTax: 0 + orderStatus: ON HOLD + billToAddressId: "000" + rejectedLineItems: + - ingramLineNumber: "009" + ingramPartNumber: 1C6094 + quantityOrdered: 2 + rejectCode: EL + rejectReason: ERROR-LINE-NOT-FOUND + Delete single line: + value: + ingramOrderNumber: 20-RFJWZ + orderModifiedDate: 2021-05-20T05:51:30.809-07:00 + customerOrderNumber: STYPETEST3 + orderTotal: 14.29 + orderSubTotal: 14.29 + freightCharges: 0 + totalTax: 0 + orderStatus: ON HOLD + billToAddressId: "000" + lines: + - ingramLineNumber: "004" + customerLineNumber: "000" + ingramPartNumber: 1C6094 + Delete single line with invalid ingramLineNumber: + value: + ingramOrderNumber: 20-RFJWZ + orderModifiedDate: 2021-05-20T06:09:26.746-07:00 + customerOrderNumber: STYPETEST3 + orderTotal: 14.29 + orderSubTotal: 14.29 + freightCharges: 0 + totalTax: 0 + orderStatus: ON HOLD + billToAddressId: "000" + rejectedLineItems: + - ingramLineNumber: "004" + ingramPartNumber: 1C6094 + quantityOrdered: 2 + rejectCode: EL + rejectReason: ERROR-LINE-NOT-FOUND + Delete multiple lines: + value: + ingramOrderNumber: 20-RFJWZ + orderModifiedDate: 2021-05-20T06:12:29.656-07:00 + customerOrderNumber: STYPETEST3 + orderTotal: 14.29 + orderSubTotal: 14.29 + freightCharges: 0 + totalTax: 0 + orderStatus: ON HOLD + billToAddressId: "000" + lines: + - ingramLineNumber: "005" + customerLineNumber: "000" + ingramPartNumber: 1C6094 + - ingramLineNumber: "006" + customerLineNumber: "000" + ingramPartNumber: TXSLM3 + Delete header comments: + value: + ingramOrderNumber: 20-RFJWZ + orderModifiedDate: 2021-05-21T00:21:33.419-07:00 + customerOrderNumber: STYPETEST3 + orderTotal: 14.29 + orderSubTotal: 14.29 + freightCharges: 0 + totalTax: 0 + orderStatus: ON HOLD + billToAddressId: "000" + lines: + - ingramLineNumber: "010" + customerLineNumber: "000" + schema: + $ref: '#/components/schemas/OrderModifyResponse' + description: OK + headers: + IM-CorrelationID: + description: Unique transaction number to identify each transaction + across all the systems. + explode: false + schema: + type: string + style: simple + IM-SenderID: + description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + schema: + example: MyCompany + type: string + style: simple + "201": + content: + application/json: + examples: + SingleLine: + value: + ingramOrderNumber: 30-B3PF2 + orderModifiedDate: 2021-02-20T15:05:19.515+05:30 + customerOrderNumber: MIGRATION_30172001 + orderTotal: 3801.32 + orderSubTotal: 3801.32 + freightCharges: 0 + totalTax: 0 + orderStatus: im::hold + billToAddressId: "000" + lines: + - subOrderNumber: 30-B3PF2-11 + lineNumber: "002" + customerLineNumber: "002" + ingramPartNumber: 2GZ200 + vendorPartNumber: SIP-T46S + quantityOrdered: 2 + quantityConfirmed: 2 + shipmentDetails: + carrierCode: OT + carrierName: OTHER + MultipleLines: + value: + ingramOrderNumber: 30-B3PF2 + orderModifiedDate: 2021-02-20T15:05:19.515+05:30 + customerOrderNumber: MIGRATION_30172001 + orderTotal: 3801.32 + orderSubTotal: 3801.32 + freightCharges: 0 + totalTax: 0 + orderStatus: im::hold + billToAddressId: "000" + lines: + - subOrderNumber: 30-B3PF2-11 + lineNumber: "003" + customerLineNumber: "003" + ingramPartNumber: 2GZ200 + vendorPartNumber: SIP-T46S + quantityOrdered: 2 + quantityConfirmed: 2 + shipmentDetails: + carrierCode: OT + carrierName: OTHER + - subOrderNumber: 30-B3PF2-11 + lineNumber: "004" + customerLineNumber: "004" + ingramPartNumber: DF4128 + vendorPartNumber: 920-002555 + quantityOrdered: 2 + quantityConfirmed: 2 + shipmentDetails: + carrierCode: PV + carrierName: AMAZON PRIME WC + Valid SKU and Blank Line Number: + value: + ingramOrderNumber: 20-RFJWZ + orderModifiedDate: 2021-05-20T05:42:50.003-07:00 + customerOrderNumber: STYPETEST3 + orderTotal: 14.29 + orderSubTotal: 14.29 + freightCharges: 0 + totalTax: 0 + orderStatus: ON HOLD + billToAddressId: "000" + lines: + - subOrderNumber: 20-RFJWZ-11 + ingramLineNumber: "3" + customerLineNumber: "000" + ingramPartNumber: 1C6094 + quantityOrdered: 1 + quantityBackOrdered: 1 + shipmentDetails: + carrierCode: OT + carrierName: OTHER + Modify Quantity with integer value: + value: + ingramOrderNumber: 20-RFJWZ + orderModifiedDate: 2021-05-20T05:46:22.36-07:00 + customerOrderNumber: STYPETEST3 + orderTotal: 14.29 + orderSubTotal: 14.29 + freightCharges: 0 + totalTax: 0 + orderStatus: ON HOLD + billToAddressId: "000" + lines: + - subOrderNumber: 20-RFJWZ-11 + ingramLineNumber: "4" + customerLineNumber: "000" + ingramPartNumber: 1C6094 + quantityOrdered: 2 + quantityBackOrdered: 2 + shipmentDetails: + carrierCode: OT + carrierName: OTHER + Modify address with valid details: + value: + ingramOrderNumber: 20-RFJWZ + orderModifiedDate: 2021-05-20T06:47:39.455-07:00 + customerOrderNumber: STYPETEST3 + orderTotal: 14.29 + orderSubTotal: 14.29 + freightCharges: 0 + totalTax: 0 + orderStatus: ON HOLD + billToAddressId: "000" + shipToInfo: + contact: SHINCHAN CORP CONTACT + companyName: SHINCHAN CORP + addressLine1: 2502 N FORT VALLEY RD + addressLine2: BUILDING 1 + city: FLAGSTAFF + state: AZ + postalCode: "860010000" + countryCode: US + phoneNumber: 800-000-000 + email: newcorphotmail.com + Add header comments(>35 characters) with additionalAttributes: + value: + ingramOrderNumber: 20-RFJWZ + orderModifiedDate: 2021-05-20T06:56:53.403-07:00 + customerOrderNumber: STYPETEST3 + orderTotal: 14.29 + orderSubTotal: 14.29 + freightCharges: 0 + totalTax: 0 + orderStatus: ON HOLD + billToAddressId: "000" + lines: + - ingramLineNumber: "007" + customerLineNumber: "1" + notes: THIS IS A HEADER COMMENT GREATER TH + - ingramLineNumber: 8 + customerLineNumber: "2" + notes: AN 35 CHARACTERS + Add header comments(<35 characters) without additionalAttributes: + value: + ingramOrderNumber: 20-RFJWZ + orderModifiedDate: 2021-05-20T07:02:03.521-07:00 + customerOrderNumber: STYPETEST3 + orderTotal: 14.29 + notes: This is a header comment + orderSubTotal: 14.29 + freightCharges: 0 + totalTax: 0 + orderStatus: ON HOLD + billToAddressId: "000" + lines: + - ingramLineNumber: 9 + customerLineNumber: "1" + notes: THIS IS A HEADER COMMENT + Modify header comments: + value: + ingramOrderNumber: 20-RFJWZ + orderModifiedDate: 2021-05-20T07:04:48.453-07:00 + customerOrderNumber: STYPETEST3 + orderTotal: 14.29 + orderSubTotal: 14.29 + freightCharges: 0 + totalTax: 0 + orderStatus: ON HOLD + billToAddressId: "000" + lines: + - subOrderNumber: 20-RFJWZ-11 + ingramLineNumber: "10" + customerLineNumber: "000" + notes: UPDATED HEADER COMENTS + Add line notes: + value: + ingramOrderNumber: 20-RFJWZ + orderModifiedDate: 2021-05-20T07:08:46.101-07:00 + customerOrderNumber: STYPETEST3 + orderTotal: 14.29 + orderSubTotal: 14.29 + freightCharges: 0 + totalTax: 0 + orderStatus: ON HOLD + billToAddressId: "000" + lines: + - subOrderNumber: 20-RFJWZ-11 + ingramLineNumber: "11" + customerLineNumber: "010" + ingramPartNumber: 1C6094 + quantityOrdered: 1 + quantityBackOrdered: 1 + shipmentDetails: + carrierCode: OT + carrierName: OTHER + notes: 20IN WS LED 1080P VA2055SM VGA MNTR || DVI SUPERCLEAR + MVA PANEL || LINE COMMENT + Modify line notes: + value: + ingramOrderNumber: 20-RFJWZ + orderModifiedDate: 2021-05-20T07:11:33.17-07:00 + customerOrderNumber: STYPETEST3 + orderTotal: 14.29 + orderSubTotal: 14.29 + freightCharges: 0 + totalTax: 0 + orderStatus: ON HOLD + billToAddressId: "000" + lines: + - subOrderNumber: 20-RFJWZ-11 + ingramLineNumber: "12" + customerLineNumber: "000" + ingramPartNumber: 1C6094 + quantityOrdered: 1 + quantityBackOrdered: 1 + shipmentDetails: + carrierCode: OT + carrierName: OTHER + notes: 20IN WS LED 1080P VA2055SM VGA MNTR || DVI SUPERCLEAR + MVA PANEL || UPDATED LINE COMMENT + Delete line notes: + value: + ingramOrderNumber: 20-RFJWZ + orderModifiedDate: 2021-05-20T07:13:56.466-07:00 + customerOrderNumber: STYPETEST3 + orderTotal: 14.29 + orderSubTotal: 14.29 + freightCharges: 0 + totalTax: 0 + orderStatus: ON HOLD + billToAddressId: "000" + lines: + - subOrderNumber: 20-RFJWZ-11 + ingramLineNumber: "13" + customerLineNumber: "000" + ingramPartNumber: 1C6094 + quantityOrdered: 1 + quantityBackOrdered: 1 + shipmentDetails: + carrierCode: OT + carrierName: OTHER + schema: + $ref: '#/components/schemas/OrderModifyResponse' + description: Created + headers: + IM-CorrelationID: + description: Unique transaction number to identify each transaction + across all the systems. + explode: false + schema: + type: string + style: simple + IM-SenderID: + description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + schema: + example: MyCompany + type: string + style: simple + "207": + content: + application/json: + examples: + ValidLine-InvalidAddress: + value: + ingramOrderNumber: 30-B3PF2 + orderModifiedDate: 2021-02-20T15:05:19.515+05:30 + changeDescription: Invalid details in shipping adress.Please update + line details with valid data + customerOrderNumber: MIGRATION_30172001 + orderTotal: 3801.32 + orderSubTotal: 3801.32 + freightCharges: 0 + totalTax: 0 + orderStatus: im::hold + billToAddressId: "000" + lines: + - subOrderNumber: 30-B3PF2-11 + lineNumber: "002" + customerLineNumber: "002" + ingramPartNumber: 2GZ200 + vendorPartNumber: SIP-T46S + quantityOrdered: 1 + quantityConfirmed: 1 + shipmentDetails: + carrierCode: OT + carrierName: OTHER + schema: + $ref: '#/components/schemas/OrderModifyResponse' + description: Multi-Status + headers: + IM-CorrelationID: + description: Unique transaction number to identify each transaction + across all the systems. + explode: false + schema: + type: string + style: simple + IM-SenderID: + description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + schema: + example: MyCompany + type: string + style: simple + "400": + content: + application/json: + examples: + Single Error: + value: + errors: + - id: 123-bw0a10t3-2021-02-19T11:10:03.497-08:00 + type: /errors/validation-failed + message: Validation failed + fields: + - field: OrderNumber + value: 20-123 + message: OrderNumber must be in the format xx-xxxxx or xx-xxxxx-xx + Multiple Errors: + value: + errors: + - id: -bw0a10t1-2021-02-19T11:04:37.312-08:00 + type: /errors/validation-failed + message: Validation failed + fields: + - field: IM-CustomerNumber + value: 20-22222222 + message: IM-CustomerNumber must be in the format XX-XXXXXX + - field: IM-CorrelationID + value: "" + message: IM-CorrelationID cannot be blank + Modify address with invalid details: + value: + errors: + - id: AxYqwpeo=sa-Fgwh + type: /errors/validation-failed + message: Validation failed + fields: + - field: shipToAddress + message: Invalid details in shipping adress.Please update + shipping address details with valid data + Order already released: + value: + errors: + - id: AxYqwpeo=sa-Fgwh + type: /errors/validation-failed + message: Validation failed + fields: + - message: Order can not be modified/released. Order is already + released or Order is not placed on Customer Hold + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad Request + headers: + IM-CorrelationID: + description: Unique transaction number to identify each transaction + across all the systems. + explode: false + schema: + type: string + style: simple + IM-SenderID: + description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + schema: + example: MyCompany + type: string + style: simple + "401": + description: Unauthorized + "404": + description: Not Found + "500": + content: + application/json: + examples: + Server Error: + value: + errors: + - id: C123-bw0a10u3-2021-02-19T11:12:26.436-08:00 + type: /errors/system-errors + message: "Some unexpected error occured, please contact support\ + \ team for more details. " + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal Server Error + headers: + IM-CorrelationID: + description: Unique transaction number to identify each transaction + across all the systems. + explode: false + schema: + type: string + style: simple + IM-SenderID: + description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + schema: + example: MyCompany + type: string + style: simple + security: + - application: + - read + summary: Modify your Order + tags: + - Orders + x-content-type: application/json + x-accepts: application/json + /resellers/v6.1/orders/{ordernumber}: + get: + description: |+ + The Orders details API endpoint allows a customer to retrieve their Ingram Micro orders details by using the Ingram Micro sales order number as a path parameter. The sales order number, IM-CustomerNumber, IM-CountryCode, and IM-CorrelationID are required parameters.

    *Service contracts, subscriptions, and license information are unavailable at the moment, this information will be available in the future.

    Recent bug fixes: + + - Fixed duplication of serial numbers in the API response. + + - Fixed API time-out issues + + - Fixed missing tracking information. + + - Implemented enhanced order status. + + operationId: get-orderdetails-v6.1 + parameters: + - description: The Ingram Micro sales order number. + explode: false + in: path + name: ordernumber + required: true + schema: + example: 20-RD3QV + maxLength: 12 + type: string + style: simple + - description: Your unique Ingram Micro customer number. + explode: false + in: header + name: IM-CustomerNumber + required: true + schema: + example: 20-222222 + maxLength: 10 + type: string + style: simple + - description: Two-character ISO country code. + explode: false + in: header + name: IM-CountryCode + required: true + schema: + example: US + maxLength: 2 + minLength: 2 + type: string + style: simple + - description: Unique transaction number to identify each transaction accross + all the systems. + explode: false + in: header + name: IM-CorrelationID + required: true + schema: + example: fbac82ba-cf0a-4bcf-fc03-0c5084 + maxLength: 32 + type: string + style: simple + - description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany." + explode: false + in: header + name: IM-SenderID + required: false + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + - description: The date and time in UTC format that the order was created. + explode: true + in: query + name: ingramOrderDate + required: false + schema: + example: 2020-05-13 + format: date + type: string + style: form + - description: Vendor Number. + explode: true + in: query + name: vendorNumber + required: false + schema: + type: string + style: form + - description: Order response for various order statuses. Not for use in production. + explode: true + in: query + name: simulateStatus + required: false + schema: + enum: + - IM::SHIPPED + - IM::PARTIALLY_SHIPPED + - IM::HOLD + - IM::INVOICED + type: string + style: form + - description: True/False only for IML customers. + explode: true + in: query + name: isIml + required: false + schema: + type: boolean + style: form + - description: Region code for sandbox testing - Not for use in production. + explode: true + in: query + name: regionCode + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + examples: + Success: + value: + ingramOrderNumber: 20-RD3QV + ingramOrderDate: 2020-05-13T00:38:52-07:00 + orderType: D + customerOrderNumber: "16" + endCustomerOrderNumber: "16" + webOrderId: "93455594" + vendorSalesOrderNumber: "114945339" + ingramPurchaseOrderNumber: 80CLY55 + orderStatus: Processing + orderTotal: 25371.27 + orderSubTotal: 25371.27 + freightCharges: 0 + currencyCode: USD + totalWeight: 1 + totalTax: 0 + paymentTerms: NET 20 DAYS + notes: "********* DIRECT SHIP INFO ******** || JON.HAWKINS@PNMRESOURCES.COM\ + \ || ECTN PNM || EU-CNT-PH #505-987-3456 - || EU-PO-ID# 16" + billToInfo: + contact: CLAY MORGANX67468 + companyName: INGRAM MICRO CAPS TEST ACCOUNT + addressLine1: 1759 WEHRLE DR + addressLine2: "" + addressLine3: "" + city: WILLIAMSVILLE + state: NY + postalCode: "142210000" + countryCode: US + phoneNumber: "8286674626" + email: clay.morgan@ingram.com + shipToInfo: + contact: RALPH BIZZELL + companyName: ASBURY METHODIST CHURCH + addressLine1: INGRAM MICRO TEST ACCOUNT + addressLine2: ATTN TOD DEBIE + addressLine3: city + city: SANTA ANA + state: CA + postalCode: "927054931" + countryCode: US + phoneNumber: "8286674626" + email: clay.morgan@ingram.com + endUserInfo: + contact: RALPH BIZZELL + companyName: ASBURY METHODIST CHURCH + addressLine1: INGRAM MICRO TEST ACCOUNT + addressLine2: ATTN TOD DEBIE + addressLine3: city + city: SANTA ANA + state: CA + postalCode: "927054931" + countryCode: US + phoneNumber: "8286674626" + email: clay.morgan@ingram.com + lines: + - subOrderNumber: 20-RD3QV-11 + ingramOrderLineNumber: "002" + vendorSalesOrderLineNumber: "114945339" + customerLineNumber: "001" + lineStatus: In Progress + ingramPartNumber: 4AW708 + vendorPartNumber: BE7H-M5-K9 + vendorName: CISCO - HW UNIFIED COMM + partDescription: BUSINESS ED 7000H M5 APPL + unitWeight: 0 + weightUom: EA + unitPrice: 20887.57 + upcCode: "" + extendedPrice: 20887.57 + taxAmount: 0 + currencyCode: USD + quantityOrdered: 1 + quantityConfirmed: 1 + quantityBackOrdered: 0 + specialBidNumber: 3223A + requestedDeliverydate: "" + promisedDeliveryDate: 2020-05-13 + lineNotes: EU#- 001837114 ABC Technologies || MC# C + shipmentDetails: + - quantity: 1 + deliveryNumber: "23423423" + estimatedShipDate: 2022-10-07 + shipFromWarehouseId: "10" + shipFromLocation: "Mira Loma, CA" + invoiceNumber: 20RD3QV11 + invoiceDate: 2022-10-07 + carrierDetails: + - carrierCode: VL + carrierName: VIRTUAL + quantity: 0 + shippedDate: 2022-10-07 + estimatedDeliveryDate: 2022-10-07 + deliveredDate: 2022-10-07 + carrierPickupDate: 2022-10-07 + trackingDetails: + - trackingNumber: "390064340282" + trackingUrl: string + packageWeight: "1.2" + cartonNumber: "1" + quantityInBox: "1" + serialNumbers: + - serialNumber: Q2EV-5SJ3-E6LN + serviceContractInfo: + contractInfo: + contractDescription: Cisco IP Phone 7841 with Multiplatform + Phone firmwareSNTC-8X + contractNumber: "205004823" + contractStatus: MANUALLY_CONVERTED + contractStartDate: 2022-10-09 + contractEndDate: 2023-10-08 + contractDuration: null + subscriptions: + subscriptionId: Cisco IP Phone 7841 with Multiplatform + subscriptionTerm: "1" + renewalTerm: "1" + billingModel: YEAR + subcriptionStartDate: 2022-10-09 + subcriptionEndDate: 2023-10-09 + licenseInfo: + licenseNumber: + - EX2SXV2NBNR + licenseStartDate: 2022-10-07 + licenseEndDate: 2023-10-07 + description: "Cisco AnyConnect VPN Only, 25 Simultaneous\ + \ (eDelivery)" + quantity: "1" + additionalAttributes: + - attributeName: additional description + attributeValue: EXPORT RESTR SW + links: + - topic: invoices + href: /resellers/v5/invoices/7870011?customerNumber=70-386612&isoCountryCode=US + type: GET + estimatedDates: + - ship: + shipDateType: Single + shipDateRange: + startDate: null + endDate: null + shipSource: INGRAM + shipDescription: Warehouse is processing your Shipment + shipDate: 2023-06-05 + delivery: null + - ship: null + delivery: + deliveryDateType: Single + deliveryDateRange: + startDate: null + endDate: null + deliverySource: null + deliveryDescription: null + deliveryDate: 2023-06-08 + scheduleLines: null + multipleShipments: + - lineNumber: null + requestedQuantity: 0 + confirmedQuantity: 1 + dateType: Single + dateRange: + startDate: null + endDate: null + source: INGRAM + description: Warehouse is processing your Shipment + date: 2023-06-05 + deliveryDate: 2023-06-08 + miscellaneousCharges: + - subOrderNumber: 20-RD3QV-11 + chargeLineReference: "885" + chargeDescription: RECYCLING FEE BC + chargeAmount: "4.7" + - subOrderNumber: 20-RD3QV-11 + chargeLineReference: GST + chargeDescription: STATETAX + chargeAmount: "100.4" + additionalAttributes: + - attributeName: additional description + attributeValue: EXPORT RESTR SW + schema: + $ref: '#/components/schemas/OrderDetailB2B' + description: Success + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponseDTO' + description: Server Error + security: + - application: + - read + summary: Get Order Details v6.1 + tags: + - Orders + x-accepts: application/json + /resellers/v6/orders/{ordernumber}: + get: + description: |- + Use your Ingram Micro sales order number to search for existing orders or retrieve existing order details. + + The sales order number, IM-CustomerNumber, IM-CountryCode, IM-SenderID and IM-CorrelationID are required parameters. + + In a case when the IM sales order number is repeated, you can refine the result by providing for additional filtering. + + Use the "simulateStatus" query parameter to test the GET order response for various order statuses. This parameter is only available in the sandbox to help with development and testing of the GET order endpoint. + operationId: get-orderdetails-v6 + parameters: + - description: The Ingram Micro sales order number. + explode: false + in: path + name: ordernumber + required: true + schema: + example: 20-RD3QV + maxLength: 12 + type: string + style: simple + - description: Your unique Ingram Micro customer number. + explode: false + in: header + name: IM-CustomerNumber + required: true + schema: + example: 20-222222 + maxLength: 10 + type: string + style: simple + - description: Two-character ISO country code. + explode: false + in: header + name: IM-CountryCode + required: true + schema: + example: US + maxLength: 2 + minLength: 2 + type: string + style: simple + - description: Unique transaction number to identify each transaction accross + all the systems. + explode: false + in: header + name: IM-CorrelationID + required: true + schema: + example: fbac82ba-cf0a-4bcf-fc03-0c5084 + maxLength: 32 + type: string + style: simple + - description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany." + explode: false + in: header + name: IM-SenderID + required: false + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + - description: The date and time in UTC format that the order was created. + explode: true + in: query + name: ingramOrderDate + required: false + schema: + example: 2020-05-13 + format: date + type: string + style: form + - description: Vendor Number. + explode: true + in: query + name: vendorNumber + required: false + schema: + type: string + style: form + - description: Order response for various order statuses. Not for use in production. + explode: true + in: query + name: simulateStatus + required: false + schema: + enum: + - IM::SHIPPED + - IM::PARTIALLY_SHIPPED + - IM::HOLD + - IM::INVOICED + type: string + style: form + - description: True/False only for IML customers. + explode: true + in: query + name: isIml + required: false + schema: + type: boolean + style: form + - description: Region code for sandbox testing - Not for use in production. + explode: true + in: query + name: regionCode + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + examples: + Success: + value: + ingramOrderNumber: 20-RD3QV + ingramOrderDate: 2020-05-13T00:38:52-07:00 + orderType: D + customerOrderNumber: "16" + endCustomerOrderNumber: "16" + orderStatus: Processing + orderTotal: 25371.27 + orderSubTotal: 25371.27 + currencyCode: USD + totalWeight: 1 + totalTax: 0 + paymentTerms: NET 20 DAYS + notes: "********* DIRECT SHIP INFO ******** || JON.HAWKINS@PNMRESOURCES.COM\ + \ || ECTN PNM || EU-CNT-PH #505-987-3456 - || EU-PO-ID# 16" + billToInfo: + contact: CLAY MORGANX67468 + companyName: INGRAM MICRO CAPS TEST ACCOUNT + addressLine1: 1759 WEHRLE DR + city: WILLIAMSVILLE + state: NY + postalCode: "142210000" + countryCode: US + shipToInfo: + addressLine1: INGRAM MICRO TEST ACCOUNT + addressLine2: ATTN TOD DEBIE + addressLine3: city + city: SANTA ANA + state: CA + postalCode: "927054931" + countryCode: US + lines: + - subOrderNumber: 20-RD3QV-11 + ingramOrderLineNumber: "002" + customerLineNumber: "001" + lineStatus: In Progress + ingramPartNumber: 4AW708 + vendorPartNumber: BE7H-M5-K9 + vendorName: CISCO - HW UNIFIED COMM + partDescription: BUSINESS ED 7000H M5 APPL + unitWeight: 0 + weightUom: EA + unitPrice: 20887.57 + extendedPrice: 20887.57 + taxAmount: 0 + currencyCode: USD + quantityOrdered: 1 + quantityConfirmed: 1 + quantityBackOrdered: 0 + promisedDeliveryDate: 2020-05-13 + lineNotes: EU#- 001837114 ABC Technologies || MC# C + shipmentDetails: + - quantity: 1 + shipFromWarehouseId: "10" + shipFromLocation: "Mira Loma, CA" + carrierDetails: + carrierCode: VL + carrierName: VIRTUAL + additionalAttributes: + - attributeName: additional description + attributeValue: EXPORT RESTR SW + schema: + $ref: '#/components/schemas/OrderDetailResponse' + description: OK + headers: + IM-CorrelationID: + description: Unique transaction number to identify each transaction + across all the systems. + explode: false + schema: + type: string + style: simple + IM-SenderID: + description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + schema: + example: MyCompany + type: string + style: simple + "204": + content: + application/json: + examples: + Data not found: + value: null + schema: + $ref: '#/components/schemas/ErrorResponse' + description: No Content + "400": + content: + application/json: + examples: + Single Error: + value: + errors: + - id: 123-bw0a10t3-2021-02-19T11:10:03.497-08:00 + type: /errors/validation-failed + message: Validation failed + fields: + - field: OrderNumber + value: 20-123 + message: OrderNumber must be in the format xx-xxxxx or xx-xxxxx-xx + Multiple Errors: + value: + errors: + - id: -bw0a10t1-2021-02-19T11:04:37.312-08:00 + type: /errors/validation-failed + message: Validation failed + fields: + - field: IM-CustomerNumber + value: 20-22222222 + message: IM-CustomerNumber must be in the format XX-XXXXXX + - field: IM-CorrelationID + value: "" + message: IM-CorrelationID cannot be blank + - field: IM-SenderID + value: "" + message: IM-SenderID cannot be blank + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad Request + "500": + content: + application/json: + examples: + Server Error: + value: + errors: + - id: C123-bw0a10u3-2021-02-19T11:12:26.436-08:00 + type: /errors/system-errors + message: "Some unexpected error occured, please contact support\ + \ team for more details" + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal Server Error + security: + - application: + - read + summary: Get Order Details v6 + tags: + - Orders v6 + x-accepts: application/json + /resellers/v6/orders/search: + get: + description: "The Orders Search API endpoint allows a customer to search their\ + \ Ingram Micro orders by using any of the available query string parameters,\ + \ customer can search their order by using single query string parameters\ + \ or combining them together. This endpoint supports the pagination of results." + operationId: get-resellers-v6-ordersearch + parameters: + - description: The Ingram Micro order number. + explode: true + in: query + name: ingramOrderNumber + required: false + schema: + maxLength: 11 + type: string + style: form + - description: Ingram Micro order status. + explode: true + in: query + name: orderStatus + required: false + schema: + enum: + - SHIPPED + - PROCESSING + - ON HOLD + - BACKORDERED + - CANCELLED + type: string + style: form + - description: Ingram Micro order status(can use it for multiple entries). + explode: true + in: query + name: orderStatus-in + required: false + schema: + items: + type: string + uniqueItems: false + type: array + style: form + - description: Search by Order date(yyyy-MM-dd). + explode: true + in: query + name: ingramOrderDate + required: false + schema: + example: 2021-04-23 + type: string + style: form + - description: Search with the start and end date(only 2 entries allowed). + explode: true + in: query + name: ingramOrderDate-bt + required: false + schema: + items: + type: string + uniqueItems: false + type: array + style: form + - description: Your unique Ingram Micro customer number. + explode: false + in: header + name: IM-CustomerNumber + required: true + schema: + example: 20-222222 + maxLength: 10 + type: string + style: simple + - description: Two-character ISO country code. + explode: false + in: header + name: IM-CountryCode + required: true + schema: + example: US + maxLength: 2 + minLength: 2 + type: string + style: simple + - description: Unique transaction number to identify each transaction accross + all the systems. + explode: false + in: header + name: IM-CorrelationID + required: true + schema: + example: fbac82ba-cf0a-4bcf-fc03-0c5084 + maxLength: 32 + type: string + style: simple + - description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + in: header + name: IM-SenderID + required: false + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + - description: Search using your PO/Order number. + explode: true + in: query + name: customerOrderNumber + required: false + schema: + maxLength: 35 + type: string + style: form + - description: The number of records required in the call - max records 100 + per page. + explode: true + in: query + name: pageSize + required: false + schema: + format: int32 + type: integer + style: form + - description: The page number reference. + explode: true + in: query + name: pageNumber + required: false + schema: + format: int32 + type: integer + style: form + - description: End customer/user purchase order number. + explode: true + in: query + name: endCustomerOrderNumber + required: false + schema: + maxLength: 35 + type: string + style: form + - description: "Invoice date of order, search with the start and end date(only\ + \ 2 entries allowed).*Currently, this feature is not available in Australia." + explode: true + in: query + name: invoiceDate_bt + required: false + schema: + items: + type: string + uniqueItems: false + type: array + style: form + - description: "Shipment date of order, search with the start and end date(only\ + \ 2 entries allowed)." + explode: true + in: query + name: shipDate_bt + required: false + schema: + items: + type: string + uniqueItems: false + type: array + style: form + - description: "The delivery date of the order, search with the start and end\ + \ date(only 2 entries allowed).*Currently, this feature is not available\ + \ in Australia" + explode: true + in: query + name: deliveryDate_bt + required: false + schema: + items: + type: string + uniqueItems: false + type: array + style: form + - description: Ingram Micro unique part number for the product. + explode: true + in: query + name: ingramPartNumber + required: false + schema: + maxLength: 35 + type: string + style: form + - description: Vendor’s part number for the product. + explode: true + in: query + name: vendorPartNumber + required: false + schema: + maxLength: 35 + type: string + style: form + - description: A serial number of the product. + explode: true + in: query + name: serialNumber + required: false + schema: + maxLength: 35 + type: string + style: form + - description: "The tracking number of the order.*Currently, this feature is\ + \ not available in Australia" + explode: true + in: query + name: trackingNumber + required: false + schema: + maxLength: 35 + type: string + style: form + - description: Name of the vendor. + explode: true + in: query + name: vendorName + required: false + schema: + maxLength: 35 + type: string + style: form + - description: "The bid number provided to the reseller by the vendor for special\ + \ pricing and discounts. Line-level bid numbers take precedence over header-level\ + \ bid numbers.*Currently, this feature is not available in Australia" + explode: true + in: query + name: specialBidNumber + required: false + schema: + maxLength: 35 + type: string + style: form + responses: + "200": + content: + application/json: + examples: + Success - 200: + value: + recordsFound: "123" + pageSize: "25" + pageNumber: "1" + orders: + - ingramOrderNumber: 20-RD128 + ingramOrderDate: 2020-04-03T08:54:39+05:30 + customerOrderNumber: MyPONumber + vendorSalesOrderNumber: "8987380" + vendorName: Microsoft + endUserCompanyName: ABC TECHNOLOGIES + orderTotal: "120.00" + orderStatus: OPEN + subOrders: + - subOrderNumber: 20-RD128-11 + subOrderTotal: "100.00" + subOrderStatus: SHIPPED + links: + topic: orders + href: /resellers/v6.1/orders/20-RD128-11 + type: GET + - links: + topic: orders + href: /resellers/v6.1/orders/20-RD128 + type: GET + nextPage: "/resellers/v6/orders/[original_parameters]&pageNumber=2" + previousPage: "/resellers/v6/orders/[original_parameters]&pageNumber=1" + schema: + $ref: '#/components/schemas/OrderSearch_Response' + description: OrderSearch_Response to be returned + "204": + description: No Content + headers: + IM-CorrelationID: + description: Unique transaction number to identify each transaction + accross all the systems. + explode: false + schema: + type: string + style: simple + IM-SenderID: + description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + schema: + example: MyCompany + type: string + style: simple + "400": + content: + application/json: + examples: + "400 - Bad Request": + value: + errors: + - id: d27059e19119 + "1ype": /errors/validation-failed + message: Validation failed + fields: + - field: customerOrderNumber + message: Required field is missing + - field: ingramOrderDate/ingramOrderDate-bt + message: input date format error expected format is - yyyy-MM-dd + value: 2020-10-21 + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad Request + "500": + content: + application/json: + examples: + Server Error: + value: + errors: + - id: 74681b27-b1ea-454d-9847-d27059e19119 + type: /errors/server-error + message: 'ConnectivityIssue/ERP issue Contact Ingram Micro API + Support ' + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal Server Error + security: + - application: + - read + summary: Search your Orders + tags: + - Orders + x-accepts: application/json + /resellers/v6/orders/{OrderNumber}: + delete: + description: This call must be submitted before the order is released to Ingram + Micro’s warehouse. The order cannot be canceled once it is released to the + warehouse. Order should be on customer hold to delete any order from Ingram + system. + operationId: delete-ordercancel + parameters: + - description: Region code for sandbox testing - Not for use in production. + explode: true + in: query + name: regionCode + required: false + schema: + example: CS + type: string + style: form + - description: Ingram Micro sales order number. + explode: false + in: path + name: OrderNumber + required: true + schema: + example: 20-RD128 + type: string + style: simple + - description: Your unique Ingram Micro customer number. + explode: false + in: header + name: IM-CustomerNumber + required: true + schema: + example: 20-222222 + type: string + style: simple + - description: Two-character ISO country code. + explode: false + in: header + name: IM-CountryCode + required: true + schema: + example: US + maxLength: 2 + minLength: 2 + type: string + style: simple + - description: Unique transaction number to identify each transaction accross + all the systems. + explode: false + in: header + name: IM-CorrelationID + required: true + schema: + example: fbac82ba-cf0a-4bcf-fc03-0c5084 + maxLength: 32 + type: string + style: simple + - description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + in: header + name: IM-SenderID + required: false + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + responses: + "200": + content: {} + description: Ok + headers: + IM-CorrelationID: + description: Unique transaction number to identify each transaction + across all the systems. + explode: false + schema: + type: string + style: simple + IM-SenderID: + description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + schema: + example: MyCompany + type: string + style: simple + "400": + content: + application/json: + examples: + "400 - Bad Request": + value: + errors: + - id: 74681b27-b1ea-454d-9847-d27059e19119 + "1ype": /errors/validation-failed + message: Validation failed + fields: + - field: Country Code + message: Country Code is missing. + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad Request + headers: + IM-CorrelationID: + description: Unique transaction number to identify each transaction + across all the systems. + explode: false + schema: + type: string + style: simple + IM-SenderID: + description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + schema: + example: MyCompany + type: string + style: simple + "404": + content: + application/json: + examples: + "404 - Not Found": + value: + errors: + - id: 74681b27-b1ea-454d-9847-d27059e19119 + type: /errors/validation-error + message: Order not found. + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Not Found + headers: + IM-CorrelationID: + description: Unique transaction number to identify each transaction + across all the systems. + explode: false + schema: + type: string + style: simple + IM-SenderID: + description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + schema: + example: MyCompany + type: string + style: simple + "405": + content: + application/json: + examples: + "405 - Method Not Allowed": + value: + errors: + - id: 74681b27-b1ea-454d-9847-d27059e19119 + type: /errors/validation-error + message: Order can not be deleted as the order is not no hold. + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Method Not Allowed + headers: + IM-CorrelationID: + description: Unique transaction number to identify each transaction + across all the systems. + explode: false + schema: + type: string + style: simple + IM-SenderID: + description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + schema: + example: MyCompany + type: string + style: simple + "500": + content: + application/json: + examples: + "500 - Internal Server Error": + value: + errors: + - id: 74681b27-b1ea-454d-9847-d27059e19119 + type: /errors/server-error + message: 'ConnectivityIssue/ERP issue Contact Ingram Micro API + Support. ' + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal Server Error + headers: + IM-CorrelationID: + description: Unique transaction number to identify each transaction + across all the systems. + explode: false + schema: + type: string + style: simple + IM-SenderID: + description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + schema: + example: MyCompany + type: string + style: simple + security: + - application: + - read + summary: Cancel your Order + tags: + - Orders + x-accepts: application/json + /resellers/v6/quotes/search: + get: + description: "The Quote Search API, by default, will retrieve quotes modified\ + \ or created within the last 30 days. Quotes older than 365 days are excluded\ + \ by default. The date filters enable the retrieval of quotes older than 30\ + \ days and up to 365 days when using date range criteria. The Quote Search\ + \ API enables the retrieval and filtering of relevant quote list key criteria\ + \ data such as Quote Number, Special Bid Numbers, End User Name, Quote Status,\ + \ and Date Ranges from Ingram Micros CRM system. Only Active quotes are avaiable\ + \ through the API. Draft and Closed quotes are excluded and are not accessable\ + \ through the Quote List Search API." + operationId: get-quotessearch_v6 + parameters: + - description: Search with start and end date(only 2 entries allowed). + explode: true + in: query + name: ingramOrderDate-bt + required: false + schema: + items: + type: string + uniqueItems: false + type: array + style: form + - description: "Unique identifier generated by Ingram Micros CRM specific to\ + \ each quote. When applying a filter to the quoteNumber and including a\ + \ partial quote number in the filter, all quotes containing any information\ + \ included in the filter can be retrieved as a subset of all available customer\ + \ quotes." + explode: true + in: query + name: quoteNumber + required: false + schema: + example: QUO-10985-C4C3F7 + type: string + style: form + - description: "Special Pricing Bid Number, also referred to as a Dart Number\ + \ by some vendors, is a unique identifier associated with vendor specific\ + \ products and discounts." + explode: true + in: query + name: specialBidNumber + required: false + schema: + example: 9638445-1880 + type: string + style: form + - description: End User Name is the end customer name that is associated with + a quote in Ingram Micros CRM. + explode: true + in: query + name: endUserContact + required: false + schema: + example: JD Enterprises + type: string + style: form + - description: Sort applies to the selected column (sortingColumnName) and may + be specified in Ascending (asc) or Descending (desc) order. The default + sort is Descending (desc) - most recent first. + explode: true + in: query + name: sortingOrder + required: false + schema: + example: desc + type: string + style: form + - description: "Refers to the column selected to apply the sorting criteria.\ + \ The default column is dateCreated and will sort by the most recently\ + \ created quote first with the following in descending order. The default\ + \ filter retrieves quotes created within the last 30 days. Filtering allows\ + \ user to select a specific column to sort: quoteNumber, createdDate, lastModifiedDate\ + \ and expiryDate." + explode: true + in: query + name: sortBy + required: false + schema: + example: quoteNumber + type: string + style: form + - description: "Number of records (quotes) to display per page in the quote\ + \ list. The default is 25, but may be decreased using the filter ." + explode: true + in: query + name: pageSize + required: false + schema: + example: 25 + type: integer + style: form + - description: Page index or page number for the list of quotes being returned. + explode: true + in: query + name: pageNumber + required: false + schema: + default: 1 + type: integer + style: form + - description: The name of the vendor. + explode: true + in: query + name: vendorName + required: false + schema: + example: Dell + type: string + style: form + - description: The quote name was given by the customer while creating quote. + explode: true + in: query + name: quoteName + required: false + schema: + example: MyQuote + type: string + style: form + - description: The status of the quote. + explode: true + in: query + name: status + required: false + schema: + example: Ready to Order + type: string + style: form + - description: Search with start and end date(only 2 entries allowed). + explode: true + in: query + name: quoteCreateDate-bt + required: false + schema: + type: string + style: form + - description: Your unique Ingram Micro customer number. + explode: false + in: header + name: IM-CustomerNumber + required: true + schema: + example: 20-222222 + maxLength: 10 + type: string + style: simple + - description: Two-character ISO country code. + explode: false + in: header + name: IM-CountryCode + required: true + schema: + example: US + maxLength: 2 + minLength: 2 + type: string + style: simple + - description: Logged in Users email address contact. + explode: false + in: header + name: IM-CustomerContact + required: true + schema: + example: John.Doe@reseller.com + maxLength: 64 + type: string + style: simple + - description: Unique transaction number to identify each transaction across + all the systems. + explode: false + in: header + name: IM-CorrelationID + required: true + schema: + example: fbac82ba-cf0a-4bcf-fc03-0c5084 + maxLength: 32 + type: string + style: simple + - description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + in: header + name: IM-SenderID + required: false + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + responses: + "200": + content: + application/json: + examples: + SampleResponse: + value: + recordsFound: 4 + pageSize: 25 + pageNumber: 1 + quotes: + - quoteGuid: 30786810-d7e8-e911-a97b-000d3a30e34c + quoteName: Test Quote - 999 + quoteNumber: QUO-10985-C4C3F7 + revision: "1" + endUserContact: test + createdBy: Ingram Micro + specialBidNumber: null + vendor: ABC SERIES + quoteTotal: 400.03 + quoteStatus: Active + ingramQuoteDate: 2019-10-07 + lastModifiedDate: 2020-01-10 + ingramQuoteExpiryDate: 0001-01-01 + - quoteGuid: 88f0efdc-53e5-e911-a97b-000d3a30e34c + quoteName: Test1 + quoteNumber: QUO-10637-W4M3G1 + revision: "0" + endUserContact: null + createdBy: Ingram Micro + specialBidNumber: null + vendor: ABC SERIES + quoteTotal: 0 + quoteStatus: Active + ingramQuoteDate: 2019-10-02 + lastModifiedDate: 2019-10-02 + ingramQuoteExpiryDate: 0001-01-01 + - quoteGuid: 02bdecfd-33e1-e911-a97a-000d3a30eb04 + quoteName: MSJ Singapore Test 02 + quoteNumber: QUO-10477-X9M2N4 + revision: "0" + endUserContact: null + createdBy: Ingram Micro + specialBidNumber: null + vendor: ABC SERIES + quoteTotal: 11642.1 + quoteStatus: Active + ingramQuoteDate: 2019-09-27 + lastModifiedDate: 2019-09-27 + ingramQuoteExpiryDate: 0001-01-01 + - quoteGuid: 994690a2-33e1-e911-a97a-000d3a30eb04 + quoteName: MSJ Singapore Test 01 + quoteNumber: QUO-10475-S4M1N0 + revision: "0" + endUserContact: null + createdBy: Ingram Micro + specialBidNumber: null + vendor: ABC SERIES + quoteTotal: 11902.38 + quoteStatus: Active + ingramQuoteDate: 2019-09-27 + lastModifiedDate: 2019-09-27 + ingramQuoteExpiryDate: 0001-01-01 + schema: + $ref: '#/components/schemas/QuoteSearchResponse' + description: OK + headers: + IM-CorrelationID: + description: Unique transaction number to identify each transaction + across all the systems. + explode: false + schema: + type: string + style: simple + IM-SenderID: + description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + schema: + example: MyCompany + type: string + style: simple + "400": + content: + application/json: + examples: + Multiple Errors: + value: + errors: + - id: -bw0a10t1-2021-02-19T11:04:37.312-08:00 + type: /errors/validation-failed + message: Validation failed + fields: + - field: IM-CustomerNumber + value: 20-22222222 + message: IM-CustomerNumber must be in the format XX-XXXXXX + - field: IM-CorrelationID + value: "" + message: IM-CorrelationID cannot be blank + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad Request + headers: + IM-CorrelationID: + description: Unique transaction number to identify each transaction + across all the systems. + explode: false + schema: + type: string + style: simple + IM-SenderID: + description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + schema: + example: MyCompany + type: string + style: simple + "401": + description: Unauthorized + "404": + content: + application/json: + examples: + No records found: + value: + errors: + - id: -bw0a10t1-2021-02-19T11:04:37.312-08:00 + type: /errors/validation-failed + message: No records found for the provided criteria. + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Not Found + headers: + IM-CorrelationID: + description: Unique transaction number to identify each transaction + across all the systems. + explode: false + schema: + type: string + style: simple + IM-SenderID: + description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + schema: + example: MyCompany + type: string + style: simple + "500": + content: + application/json: + examples: + Server Error: + value: + errors: + - id: C123-bw0a10u3-2021-02-19T11:12:26.436-08:00 + type: /errors/system-errors + message: "Some unexpected error occured, please contact support\ + \ team for more details." + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal Server Error + headers: + IM-CorrelationID: + description: Unique transaction number to identify each transaction + across all the systems. + explode: false + schema: + type: string + style: simple + IM-SenderID: + description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + schema: + example: MyCompany + type: string + style: simple + security: + - application: + - read + summary: Quote Search + tags: + - Quotes + x-accepts: application/json + /resellers/v6/quotes/{quoteNumber}: + get: + description: "The quote details API provides all quote details associated with\ + \ the quote number provided.\n\nThe **“quoteNumber”**, **“isoCountryCode”\ + ** and **“customerNumber”** parameters are required. " + operationId: get-resellers-v6-quotes + parameters: + - description: Your Ingram Micro unique customer number + explode: false + in: header + name: IM-CustomerNumber + required: true + schema: + example: 20-222222 + maxLength: 10 + type: string + style: simple + - description: Two-character ISO country code. + explode: false + in: header + name: IM-CountryCode + required: true + schema: + example: US + maxLength: 2 + minLength: 2 + type: string + style: simple + - description: Unique identifier used to identify the third party source accessing + the services. + explode: false + in: header + name: IM-SenderID + required: false + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + - description: Unique transaction number to identify each transaction accross + all the systems. + explode: false + in: header + name: IM-CorrelationID + required: true + schema: + example: ASJDasbjdn-asjnd12dalks-asjkn + maxLength: 32 + type: string + style: simple + - description: "Unique identifier generated by Ingram Micro's CRM specific to\ + \ each quote. When applying a filter to the quoteNumber and including a\ + \ partial quote number in the filter, all quotes containing any information\ + \ included in the filter can be retrieved as a subset of all available customer\ + \ quotes." + explode: false + in: path + name: quoteNumber + required: true + schema: + example: QUO-10926-Y8G1B3 + type: string + style: simple + responses: + "200": + content: + application/json: + examples: + Success: + value: + quoteName: Q3 + quoteNumber: QUO-10926-Y8G1B3 + revision: "0" + ingramQuoteDate: 2019-10-04T18:17:28Z + lastModifiedDate: 2019-10-04T19:12:03Z + currencyCode: USD + specialBidId: TEST-9771006-1923 + specialBidExpirationDate: 2020-01-01T00:00:00 + status: Active + customerNeed: Customer Need + introPreamble: "#####Thank\ + \ you for contacting Ingram Micro. We value your business greatly\ + \ and will continue to deliver the services you need to retain\ + \ it. This quote is not intended to represent the entire conversation;\ + \ only what was relevant to the solution you requested. We make\ + \ every effort to provide a complete and correct solution. However,\ + \ the accuracy of the solution provided is dependent on the\ + \ information gathered. If relevant information is not provided\ + \ by our customer, Ingram Micro cannot be held responsible.\ + \ We urge you to review this quote fully, to ensure it reflects\ + \ all of your required specifications. If you have additional\ + \ questions, please contact your designated Ingram Micro contact.\ + \ Remember to reference your Quote Number.#####Call\ + \ reference #
    To ensure fastest and most\ + \ accurate processing of your order, please provide the quote#\ + \ at the time of purchase
    " + purchaseInstructions: "For specific pricing and to order the above\ + \ products, you may \r\n\r\n • Some product may be orderable\ + \ on Imonline at http://us-new.ingrammicro.com\r\n\r\n • Call\ + \ the Ingram Micro Sales department at 1.800.456.8000\r\n* Your\ + \ PO number *End User\r\n* Your fax number\r\n* Shipping instructions\r\ + \n* End user PO number\r\n* End user license, contract or authorization\ + \ number\r\n\r\nThank you for your order!" + legalTerms: "This offer to sell the listed product(s) is subject\ + \ to product availability and Ingram Micro's standard terms\ + \ and conditions that are published on http://www.ingrammicro.com\ + \ prices are subject to change without notice.\r\nPlease contact\ + \ the Ingram Micro Sales desk at 1.800.456.8000 if you have\ + \ any additional questions." + leaseInfo: "" + leasingInstructions: "" + resellerInfo: + contact: INGRAM MICRO ITSOLUTIONS LLC Contact3 INGRAM MICRO + ITSOLUTIONS LLC last name3 + companyName: INGRAM MICRO IT SOLUTIONS LLC + email: TestQuote3@INGRAMMICROITSOLUTIONS.com + phoneNumber: "9999999000" + customerNumber: 20-222222 + endUserInfo: + companyName: End User3 + products: + - quoteProductGuid: f428080c-9319-ee11-8f6e-000d3a34da18 + lineNumber: 2a2fb5df-46a6-485e-903e-c025dc2216b6 + quantity: 1 + ean: "-" + coo: ' ' + ingramPartNumber: 9DD701 + vendorPartNumber: CBL-PWR-C15-C14-US + description: POWER CORD FOR EX4300 US + weight: 0 + isSuggestionProduct: false + terms: -- + price: + quotePrice: 122.5 + msrp: 175 + extendedMsrp: 175 + extendedQuotePrice: 122.5 + discountOffList: "0.00" + productsCount: 1 + extendedMsrpTotal: 12000 + quantityTotal: 10 + extendedQuotePriceTotal: 10000 + additionalAttributes: + - attributeName: estimateId + attributeValue: DO85027550IK + - attributeName: dealId + attributeValue: "123456" + schema: + $ref: '#/components/schemas/QuoteDetailsResponse' + description: OK + "400": + content: + application/json: + examples: + CustomerNumber format incorrect: + value: + errors: + - id: 1629203530223-2021-08-17T18:02:10.21+05:30-123 + type: /errors/validation-failed + message: Validation failed + fields: + - field: IM-CustomerNumber + value: "20222222" + message: IM-CustomerNumber must be in the format xx-xxxx or + xx-xxxxx or xx-xxxxxx + CustomerNumber blank: + value: + errors: + - id: 1629204354596-2021-08-17T18:15:54.596+05:30-123 + type: /errors/validation-failed + message: Validation failed + fields: + - field: IM-CustomerNumber + value: "" + message: IM-CustomerNumber is blank + CountryCode invalid: + value: + errors: + - id: 1629204465806-2021-08-17T18:17:45.806+05:30-123 + type: /errors/validation-failed + message: Validation failed + fields: + - field: IM-CountryCode + value: UU + message: IM-CountryCode is invalid + Multiple error: + value: + errors: + - id: 1629204746878-2021-08-17T18:22:26.867+05:30-123 + type: /errors/validation-failed + message: Validation failed + fields: + - field: IM-CountryCode + value: UU + message: IM-CountryCode is invalid + - field: IM-CustomerNumber + value: "" + message: IM-CustomerNumber is blank + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad Request + "500": + content: + application/json: + examples: + Unexpected Error: + value: + errors: + - id: 1629204961192-2021-08-17T18:26:01.191+05:30-bw0a103 + type: /errors/system-errors + message: "Some unexpected error occured, please contact support\ + \ team for more details " + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal Server Error + security: + - application: + - read + summary: Get Quote Details + tags: + - Quotes + x-accepts: application/json + /resellers/v6/q2o/validatequote: + get: + description: "The validate quote helps the customer validate the quote created\ + \ in Ingram Micro's system. Apart from validating the quote, the endpoint\ + \ also identifies all the mandatory fields that are required by the vendor\ + \ at the header and line levels." + operationId: get-reseller-v6-validateQuote + parameters: + - description: A unique identifier generated by Ingram Micro's CRM specific + to each quote. + explode: true + in: query + name: quoteNumber + required: true + schema: + example: QUO-14551943-D2Y9L9 + type: string + style: form + - description: Your Ingram Micro unique customer number. + explode: false + in: header + name: IM-CustomerNumber + required: true + schema: + example: 20-222222 + maxLength: 10 + type: string + style: simple + - description: Two-character ISO country code. + explode: false + in: header + name: IM-CountryCode + required: true + schema: + example: US + maxLength: 2 + minLength: 2 + type: string + style: simple + - description: Unique identifier used to identify the third party source accessing + the services. + explode: false + in: header + name: IM-SenderID + required: false + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + - description: Unique transaction number to identify each transaction accross + all the systems. + explode: false + in: header + name: IM-CorrelationID + required: true + schema: + example: fbac82ba-cf0a-4bcf-fc03-0c5084 + maxLength: 32 + type: string + style: simple + responses: + "200": + content: + application/json: + examples: + "200": + description: OK + value: + quoteNumber: QUO-14551943-D2Y9L9 + vendorName: Cisco + vmfAdditionalAttributes: + - attributeName: VEND_AUTH_NBR_FLG + attributeValue: ABC1234 + attributeDescription: Authorization Number + - attributeName: ResellerCompanyName + attributeValue: String + attributeDescription: resellerCompanyNameFlag + lines: + - customerLineNumber: "11" + ingramPartNumber: YN6551 + quantity: "1" + vmfAdditionalAttributesLines: + - attributeName: resellerCtacEmail + attributeValue: String + attributeDescription: resellerContactEmailFlag + - attributeName: "" + attributeValue: "" + attributeDescription: "" + - customerLineNumber: "12" + ingramPartNumber: YN6231 + quantity: "2" + linesVendorMandatoryAttributes: + - attributeName: rslrg360CtacName + attributeValue: String + attributeDescription: resellerContactNameFlag + - attributeName: "" + attributeValue: "" + attributeDescription: "" + schema: + $ref: '#/components/schemas/ValidateQuoteResponse' + description: Success + "400": + content: + application/json: + examples: + "400": + description: Bad Request + value: + errors: + - traceid: "123456" + type: /errors/validation-failed + message: customer validation failed + fields: + - field: IM-CountryCode + message: Required field is missing + value: null + schema: + $ref: '#/components/schemas/get_reseller_v6_validateQuote_400_response' + description: Bad Request + "500": + content: + application/json: + examples: + "500": + description: Internal Server Error + value: + errors: + - traceid: "123456" + type: /errors/system-errors + message: "Some unexpected error occured, please contact support\ + \ team for more details" + schema: + $ref: '#/components/schemas/get_reseller_v6_validateQuote_500_response' + description: Internal Server Error + security: + - application: + - read + summary: Validate Quote + tags: + - Quotes + x-accepts: application/json + /resellers/v6/q2o/orders: + post: + description: "The “Quote to Order” (QTO) endpoint allows a customer to create\ + \ an order using the existing quote which is in “Ready to Order” status. A\ + \ customer can create an order using Configure to order (CTO) quote or a non-configure\ + \ to order (Non-CTO) quote. Upon successful submission of the order create\ + \ request, a confirmation message will be returned as an API response.
    Ingram Micro offers webhooks as a method to send notifications to\ + \ Resellers once the order creation request is received. All the updates related\ + \ to Order creation will be pushed as a notification to the customer via a\ + \ pre-defined callback URL as an HTTP post.

    **Prerequisite:**\ + \ Pre-defined callback URL

    Before creating an order using the\ + \ quote, it’s recommended to validate the quote using the “Validate Quote”\ + \ endpoint. Validate Quote endpoint will not only validate the quote but also\ + \ outline all the mandatory fields required by the vendor at a header level\ + \ and at the line level which a customer need to pass to the Quote To Order\ + \ endpoint request. For a detailed understanding of the “Validate Quote”\ + \ endpoint, review the “Validate Quote” endpoint documentation.

    \ + \ **How it works:**

    - The customer validates the quote with a quote\ + \ number from Validate Quote endpoint.
    - The customer copies all the\ + \ mandatory fields required by the vendor and adds them to the QTO request\ + \ body.
    - The customer provides all the values for Vendor mandatory\ + \ fields along with other required information for QTO to create an order.\ + \
    - After the order creation request receipt acknowledgment from the\ + \ QTO endpoint, all further order creation updates will be provided via webhook\ + \ push notification." + operationId: post-QuoteToOrder_v6 + parameters: + - description: Your unique Ingram Micro customer number. + explode: false + in: header + name: IM-CustomerNumber + required: true + schema: + example: 20-222222 + maxLength: 10 + type: string + style: simple + - description: Two-character ISO country code. + explode: false + in: header + name: IM-CountryCode + required: true + schema: + example: US + maxLength: 2 + minLength: 2 + type: string + style: simple + - description: Unique value used to identify the sender of the transaction. + explode: false + in: header + name: IM-SenderID + required: false + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + - description: Unique transaction number to identify each transaction accross + all the systems. + explode: false + in: header + name: IM-CorrelationID + required: true + schema: + example: fbac82ba-cf0a-4bcf-fc03-0c5084 + maxLength: 32 + type: string + style: simple + requestBody: + content: + application/json: + examples: + Sample: + value: + quoteNumber: QUO-14551943-D2Y9L9 + customerOrderNumber: "12345" + enduserOrderNumber: "" + billToAddressId: XYZ + endUserInfo: + companyName: ABC TECH + contact: "44045678" + addressLine1: Texas + addressLine2: "4" + addressLine3: "" + city: "" + state: "" + postalCode: "" + countryCode: US + email: abc@gmail.com + phoneNumber: "445678901" + shipToInfo: + addressId: "12345" + companyName: "" + contact: "" + addressLine1: Texas + addressLine2: "4" + addressLine3: "" + city: "" + state: "" + postalCode: "" + countryCode: US + email: abc@gmail.com + additionalAttributes: + - attributeName: VEND_AUTH_NBR_FLG + attributeValue: ABC1234 + vmfAdditionalAttributes: + - attributeName: "" + attributeValue: "" + attributeDescription: "" + lines: + - customerLineNumber: "12" + ingramPartNumber: YN6231 + quantity: "2" + vmfAdditionalAttributesLines: + - attributeName: "" + attributeValue: "" + attributeDescription: "" + schema: + $ref: '#/components/schemas/QuoteToOrderDetailsDTO' + required: true + responses: + "200": + content: + application/json: + examples: + "200": + description: OK + value: + quoteNumber: QUO-148378-R0M3Z6 + confirmationNumber: 1669783293 + message: "Thank you for submitting the order request, it’s currently\ + \ under process.We will notify you of the status via the Order\ + \ Status webhook." + schema: + $ref: '#/components/schemas/QuoteToOrderResponse' + description: Success + "400": + content: + application/json: + examples: + "400": + description: Bad Request + value: + errors: + - traceid: "123456" + type: /errors/validation-failed + message: customer validation failed + fields: + - field: IM-CountryCode + message: Required field is missing + value: null + schema: + $ref: '#/components/schemas/post_QuoteToOrder_v6_400_response' + description: Bad Request + "500": + content: + application/json: + examples: + "500": + description: Internal Server Error + value: + errors: + - traceid: "123456" + type: /errors/system-errors + message: "Some unexpected error occured, please contact support\ + \ team for more details" + schema: + $ref: '#/components/schemas/get_reseller_v6_validateQuote_500_response' + description: Server Error + security: + - application: + - read + summary: Quote To Order + tags: + - Quote To Order + x-content-type: application/json + x-accepts: application/json + /resellers/v6/invoices/: + get: + description: Search your Ingram Micro invoices. This endpoint searches by multiple + invoice parameters and supports pagination of results. + operationId: get-resellers-v6-invoicesearch + parameters: + - description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + in: header + name: 'IM-ApplicationID ' + required: true + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + - description: Your unique Ingram Micro customer number. + explode: false + in: header + name: IM-CustomerNumber + required: true + schema: + example: 20-222222 + maxLength: 10 + type: string + style: simple + - description: Two-character ISO country code. + explode: false + in: header + name: IM-CountryCode + required: true + schema: + example: US + maxLength: 2 + minLength: 2 + type: string + style: simple + - description: Unique transaction number to identify each transaction across + all the systems. + explode: false + in: header + name: IM-CorrelationID + required: true + schema: + example: fbac82ba-cf0a-4bcf-fc03-0c5084 + maxLength: 32 + type: string + style: simple + - description: Search by payment terms net date(yyyy-MM-dd). + explode: true + in: query + name: paymentTermsNetDate + required: false + schema: + example: 2021-04-23 + type: string + style: form + - description: Search by invoice date(yyyy-MM-dd). + explode: true + in: query + name: invoiceDate + required: false + schema: + example: 2021-04-23 + type: string + style: form + - description: Search by invoice date from(yyyy-MM-dd). + explode: true + in: query + name: invoiceDueDate + required: false + schema: + example: 2021-04-23 + type: string + style: form + - description: Search by OrderDate date(yyyy-MM-dd). + explode: true + in: query + name: orderDate + required: false + schema: + example: 2021-04-23 + type: string + style: form + - description: Search by OrderFromDate date(yyyy-MM-dd). + explode: true + in: query + name: orderFromDate + required: false + schema: + example: 2021-04-23 + type: string + style: form + - description: Search by OrderToDate date(yyyy-MM-dd). + explode: true + in: query + name: orderToDate + required: false + schema: + example: 2021-04-23 + type: string + style: form + - description: Search by order number + explode: true + in: query + name: orderNumber + required: false + schema: + example: 2021-04-23 + type: string + style: form + - description: Search by delivery number. + explode: true + in: query + name: DeliveryNumber + required: false + schema: + example: "335238411" + type: string + style: form + - description: The Ingram Micro invoice number. + explode: true + in: query + name: invoiceNumber + required: false + schema: + maxLength: 11 + type: string + style: form + - description: Ingram Micro invoice status. + explode: true + in: query + name: invoiceStatus + required: false + schema: + type: string + style: form + - description: Ingram Micro InvoiceType. + explode: true + in: query + name: invoiceType + required: false + schema: + type: string + style: form + - description: Ingram Micro CustomerOrderNumber. + explode: true + in: query + name: customerOrderNumber + required: false + schema: + type: string + style: form + - description: Ingram Micro EndCustomerOrderNumber. + explode: true + in: query + name: endCustomerOrderNumber + required: false + schema: + type: string + style: form + - description: Ingram Micro SpecialBidNumber. + explode: true + in: query + name: specialBidNumber + required: false + schema: + type: string + style: form + - description: Search by invoice due date from(yyyy-MM-dd). + explode: true + in: query + name: invoiceFromDueDate + required: false + schema: + example: 2021-04-23 + type: string + style: form + - description: Search by invoice due date to(yyyy-MM-dd). + explode: true + in: query + name: invoiceToDueDate + required: false + schema: + example: 2021-04-23 + type: string + style: form + - description: Search by invoice date from(yyyy-MM-dd). + explode: true + in: query + name: invoiceFromDate + required: false + schema: + items: + example: 2021-04-23 + type: string + type: array + style: form + - description: Search by invoice date To(yyyy-MM-dd). + explode: true + in: query + name: invoiceToDate + required: false + schema: + items: + example: 2021-04-23 + type: string + type: array + style: form + - description: Number of records required in the call - max records 100 per + page. + explode: true + in: query + name: pageSize + required: false + schema: + format: int32 + type: integer + style: form + - description: The page number reference. + explode: true + in: query + name: pageNumber + required: false + schema: + format: int32 + type: integer + style: form + - description: Column name with which we want to sort. + explode: true + in: query + name: orderby + required: false + schema: + example: InvoiceDate + maxLength: 32 + type: string + style: form + - description: "asc or desc , along with orderby column result set will be sorted." + explode: true + in: query + name: direction + required: false + schema: + example: desc + maxLength: 32 + type: string + style: form + - description: Serial number of the product. + explode: true + in: query + name: serialNumber + required: false + schema: + maxLength: 32 + type: string + style: form + responses: + "200": + content: + application/json: + examples: + Success - 200: + value: + invoices: + - paymentTermsDueDate: 2022-11-10 + erpOrderNumber: 40-MKTRW-11 + invoiceAmountInclTax: 85.23 + invoiceNumber: 40MKTRW11 + invoiceStatus: OPEN + invoiceDate: 2022-10-29 + invoiceDueDate: 2022-11-10 + invoicedAmountDue: 243.16 + customerOrderNumber: ZBJ3724 + endCustomerOrderNumber: NFP259 + orderCreateDate: 2022-10-27 + nextPage: /resellers/v6/invoices/?customerNumber=40-017165&invoiceDateFrom=5/3/2022&invoiceDateTo=10/30/2022&page=1&size=10&orderBy=invoiceDate&direction=desc&pageNumber=2 + recordsFound: 89701 + pageSize: 10 + pageNumber: 1 + schema: + $ref: '#/components/schemas/InvoiceSearchResponse' + description: InvoiceSearchResponse to be returned + "400": + content: + application/json: + examples: + "400 - Bad Request": + value: + errors: + - traceid: "1" + type: errors/bad-request + message: Input passed is not in right or expected format. Model + Binding Error Happens at Global Model Binding Exception Handler. + fields: + - field: IM-CountryCode + message: The countryCode field is required. + value: null + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad Request + "500": + content: + application/json: + examples: + Server Error: + value: + errors: + - traceid: "121" + type: System.Net.WebException + message: "Error while processing request for 1121,for SiteCode\ + \ sg,for CorrelationId :121 , Message :The remote server returned\ + \ an error: (404) Not Found." + fields: [] + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal Server Error + security: + - application: + - read + summary: Search your invoice + tags: + - Invoices + x-accepts: application/json + /resellers/v6/invoices/{invoicenumber}: + get: + description: |- + Use your Ingram Micro invoice number to search for existing invoices or retrieve existing invoice details. + + The invoice number, IM-CustomerNumber, IM-CountryCode, IM-ApplicationId and IM-CorrelationID are required parameters. + + . + operationId: get-invoicedetails-v6 + parameters: + - description: The Ingram Micro invoice number. + explode: false + in: path + name: invoicenumber + required: true + schema: + example: "335238411" + maxLength: 12 + type: string + style: simple + - description: Version of codebase. + explode: false + in: header + name: version + required: true + schema: + example: 20-222222 + maxLength: 10 + type: string + style: simple + - description: Your unique Ingram Micro customer number. + explode: false + in: header + name: IM-CustomerNumber + required: true + schema: + example: 20-222222 + maxLength: 10 + type: string + style: simple + - description: Two-character ISO country code. + explode: false + in: header + name: IM-CountryCode + required: true + schema: + example: US + maxLength: 2 + minLength: 2 + type: string + style: simple + - description: Unique transaction number to identify each transaction across + all the systems. + explode: false + in: header + name: IM-CorrelationID + required: true + schema: + example: fbac82ba-cf0a-4bcf-fc03-0c5084 + maxLength: 32 + type: string + style: simple + - description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany." + explode: false + in: header + name: IM-ApplicationID + required: true + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + - description: it should be invoice or order + explode: true + in: query + name: customerType + required: false + schema: + example: invoice + maxLength: 32 + type: string + style: form + - description: if serial in the response send as true or else false + explode: true + in: query + name: includeSerialNumbers + required: false + schema: + example: false + type: boolean + style: form + responses: + "200": + content: + application/json: + examples: + Success: + value: + InvoiceNumber: 40-DPJ17-11 + InvoiceDate: 2022-09-07 + OrderDate: 2022-09-07 + IngramPurchaseOrderNumber: 70GZJ35 + InvoiceType: Invoice + InvoiceDueDate: 2022-10-22 + IngramInvoiceNumber: "" + Notes: HEADER || H:1427214 + PaymentTermsInfo: + PaymentTermsCode: "45" + PaymentTermsDescription: NET 45 DAYS + PaymentTermsDueDate: 2022-10-22 + BillToInfo: + CompanyName: SOFTWARE ONE INC + AddressLine1: 20875 CROSSROADS CIR + City: WAUKESHA + State: WI + PostalCode: "531864052" + ShipToInfo: + CompanyName: RITE-HITE CORPORATION + AddressLine1: 8900 N ARBON DR + City: MILWAUKEE + State: WI + PostalCode: "532230000" + Lines: + - IngramLineNumber: "12" + CustomerLineNumber: "1" + IngramPartNumber: 05QC29 + VendorPartNumber: 65324394AD01A00 + VendorName: ADOBE COMMERCIA + ProductDescription: AOO LICS ACROBAT PRO 2020 MPLATLICS || 1+ + 540PT + UnitWeight: "0.0" + Quantity: 1 + UnitPrice: 533.33 + UnitOfMeasure: EA + CurrencyCode: USD + ExtendedPrice: 533.33 + TaxPercentage: 0 + taxPercentage: 0 + TaxAmount: 0 + serialNumbers: + - serialNumber: 0AMY3CPRA00359 + - serialNumber: 0AMY3CPRA00484 + - serialNumber: 0AMY3CPRA00485 + - serialNumber: 0AMY3CPRA00479 + - serialNumber: 0AMY3CPRA00486 + - serialNumber: 0AMY3CPRA00480 + - serialNumber: 0AMY3CPRA00465 + - serialNumber: 0AMY3CPRA00481 + - serialNumber: 0AMY3CPRA00483 + - serialNumber: 0AMY3CPRA00493 + - serialNumber: 0AMY3CPRA00476 + QuantityOrdered: 1 + QuantityShipped: 1 + EndUserInfo: + Contact: RITE-HITE CORPORATION + AddressLine1: 8900 N ARBON DR + AddressLine2: "" + AddressLine3: "" + City: MILWAUKEE + State: WI + PostalCode: "532232451" + CountryCode: US + PhoneNumber: "14143624491" + Email: MPOWERS@RITEHITE.COM + FxRateInfo: + CurrencyCode: USD + CompanyCurrency: USD + InvoiceCurrency: USD + CurrencyFxRate: 1 + Summary: + Lines: + ProductLineCount: 1 + ProductLineTotalQuantity: 1 + MiscCharges: + - ChargeDescription: STATETAX + MiscChargeLineCount: 0 + MiscChargeLineTotal: 355.83 + ChargeLineReference: GST + - ChargeDescription: FREIGHT OUT + MiscChargeLineCount: 1 + MiscChargeLineTotal: 31.9 + ChargeLineReference: "8" + Totals: + NetInvoiceAmount: 533.33 + DiscountAmount: 0 + DiscountType: Terms Charge + InvoicedAmountDue: 533.33 + ForeignFxTotals: + ForeignCurrencyCode: USD + ForeignCurrencyFxRate: 1 + ForeignTotalTaxableAmount: "533.33" + ForeignTotalTaxAmount: 0 + ForeignInvoiceAmountDue: "533.33" + schema: + $ref: '#/components/schemas/InvoiceDetailResponse' + description: OK + headers: + IM-CorrelationID: + description: Unique transaction number to identify each transaction + across all the systems. + explode: false + schema: + type: string + style: simple + IM-ApplicationID: + description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + schema: + example: MyCompany + type: string + style: simple + "400": + content: + application/json: + examples: + CustomerNumber format incorrect: + value: + errors: + - id: 1629203530223-2021-08-17T18:02:10.21+05:30-123 + type: /errors/validation-failed + message: Validation failed + fields: + - field: IM-CustomerNumber + value: "20222222" + message: IM-CustomerNumber must be in the format xx-xxxx or + xx-xxxxx or xx-xxxxxx + CustomerNumber blank: + value: + errors: + - id: 1629204354596-2021-08-17T18:15:54.596+05:30-123 + type: /errors/validation-failed + message: Validation failed + fields: + - field: IM-CustomerNumber + value: "" + message: IM-CustomerNumber is blank + CountryCode invalid: + value: + errors: + - id: 1629204465806-2021-08-17T18:17:45.806+05:30-123 + type: /errors/validation-failed + message: Validation failed + fields: + - field: IM-CountryCode + value: UU + message: IM-CountryCode is invalid + Multiple error: + value: + errors: + - id: 1629204746878-2021-08-17T18:22:26.867+05:30-123 + type: /errors/validation-failed + message: Validation failed + fields: + - field: IM-CountryCode + value: UU + message: IM-CountryCode is invalid + - field: IM-CustomerNumber + value: "" + message: IM-CustomerNumber is blank + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad Request + "500": + content: + application/json: + examples: + Server Error: + value: + errors: + - id: "1" + type: InternalServerError + message: "Un-handled Exception \n Please contact to administrator." + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal Server Error + security: + - application: + - read + summary: Get Invoice Details v6 + tags: + - Invoices v6 + x-accepts: application/json + /resellers/v6.1/invoices/{invoiceNumber}: + get: + description: |- + Use your Ingram Micro invoice number to search for existing invoices or retrieve existing invoice details. + + The invoice number, IM-CustomerNumber, IM-CountryCode, IM-ApplicationId and IM-CorrelationID are required parameters. + + . + operationId: get-invoicedetails-v6.1 + parameters: + - description: The Ingram Micro invoice number. + explode: false + in: path + name: invoiceNumber + required: true + schema: + example: "335238411" + maxLength: 12 + type: string + style: simple + - description: Your unique Ingram Micro customer number. + explode: false + in: header + name: IM-CustomerNumber + required: true + schema: + example: 20-222222 + maxLength: 10 + type: string + style: simple + - description: Two-character ISO country code. + explode: false + in: header + name: IM-CountryCode + required: true + schema: + example: US + maxLength: 2 + minLength: 2 + type: string + style: simple + - description: Unique transaction number to identify each transaction across + all the systems. + explode: false + in: header + name: IM-CorrelationID + required: true + schema: + example: fbac82ba-cf0a-4bcf-fc03-0c5084 + maxLength: 32 + type: string + style: simple + - description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany." + explode: false + in: header + name: IM-ApplicationID + required: true + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + - description: it should be invoice or order + explode: true + in: query + name: customerType + required: false + schema: + example: invoice + maxLength: 32 + type: string + style: form + - description: if serial in the response send as true or else false + explode: true + in: query + name: includeSerialNumbers + required: false + schema: + example: false + type: boolean + style: form + responses: + "200": + content: + application/json: + examples: + Success: + value: + invoiceNumber: 40-DPJ17-11 + invoiceStatus: Open + invoiceDate: 2022-09-07 + customerOrderNumber: "6593806021209101" + endCustomerOrderNumber: XPO37686 + orderDate: 2022-09-07 + billToID: "000" + invoiceType: Invoice + invoiceDueDate: 2022-10-22 + customerCountryCode: US + customerNumber: 20-222222 + ingramOrderNumber: 40-25436-11 + notes: HEADER || H:1427214 + paymentTermsInfo: + paymentTermsCode: "45" + paymentTermsDescription: NET 45 DAYS + paymentTermsDueDate: 2022-10-22 + billToInfo: + companyName: DELL MARKETING LP + addressLine1: 1 DELL WAY + addressLine2: BUSINESS SALES + city: ROUND ROCK + state: TX + postalCode: "786827000" + countryCode: US + shipToInfo: + contact: ALVARADO ALICIA + companyName: USA-EL PASO-1851 RESLER DRIVE + addressLine1: 1851 RESLER DR + city: EL PASO + state: TX + postalCode: "799120000" + countryCode: US + lines: + - ingramLineNumber: "12" + customerLineNumber: "1" + ingramPartNumber: 05QC29 + vendorPartNumber: 65324394AD01A00 + vendorName: ADOBE COMMERCIA + productDescription: AOO LICS ACROBAT PRO 2020 MPLATLICS || 1+ + 540PT + unitWeight: "0.0" + quantity: 1 + unitPrice: 533.33 + unitOfMeasure: EA + currencyCode: USD + extendedPrice: 533.33 + taxPercentage: 0 + taxRate: 0 + taxAmount: 0 + serialNumbers: + - serialNumber: 2TEPYT + - serialNumber: 2TER09 + quantityOrdered: 1 + quantityShipped: 1 + endUserInfo: + contact: ABC CORPORATION + addressLine1: 1 N ARBON DR + addressLine2: "" + addressLine3: "" + city: MILWAUKEE + state: WI + postalCode: "532232451" + countryCode: US + phoneNumber: "14143624491" + email: ABC@GMAIL.COM + fxRateInfo: + currencyCode: USD + companyCurrency: USD + invoiceCurrency: USD + currencyFxRate: 1 + summary: + lines: + productLineCount: 1 + productLineTotalQuantity: 1 + miscCharges: + - ChargeDescription: TAX + MiscChargeLineCount: 0 + MiscChargeLineTotal: 355.83 + ChargeLineReference: "" + - ChargeDescription: FREIGHT OUT + MiscChargeLineCount: 1 + MiscChargeLineTotal: 31.9 + ChargeLineReference: "8" + totals: + netInvoiceAmount: 533.33 + discountAmount: 0 + discountType: Terms Charge + totalTaxAmount: 0 + invoicedAmountDue: 533.33 + foreignFxTotals: + foreignCurrencyCode: USD + foreignCurrencyFxRate: 1 + foreignTotalTaxableAmount: "533.33" + foreignTotalTaxAmount: 0 + foreignInvoiceAmountDue: "533.33" + schema: + $ref: '#/components/schemas/InvoiceDetailsv6.1Response' + description: OK + "400": + content: + application/json: + examples: + CustomerNumber format incorrect: + value: + errors: + - id: 1629203530223-2021-08-17T18:02:10.21+05:30-123 + type: /errors/validation-failed + message: Validation failed + fields: + - field: IM-CustomerNumber + value: "20222222" + message: IM-CustomerNumber must be in the format xx-xxxx or + xx-xxxxx or xx-xxxxxx + CustomerNumber blank: + value: + errors: + - id: 1629204354596-2021-08-17T18:15:54.596+05:30-123 + type: /errors/validation-failed + message: Validation failed + fields: + - field: IM-CustomerNumber + value: "" + message: IM-CustomerNumber is blank + CountryCode invalid: + value: + errors: + - id: 1629204465806-2021-08-17T18:17:45.806+05:30-123 + type: /errors/validation-failed + message: Validation failed + fields: + - field: IM-CountryCode + value: UU + message: IM-CountryCode is invalid + Multiple error: + value: + errors: + - id: 1629204746878-2021-08-17T18:22:26.867+05:30-123 + type: /errors/validation-failed + message: Validation failed + fields: + - field: IM-CountryCode + value: UU + message: IM-CountryCode is invalid + - field: IM-CustomerNumber + value: "" + message: IM-CustomerNumber is blank + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad Request + "500": + content: + application/json: + examples: + Server Error: + value: + errors: + - id: "1" + type: InternalServerError + message: "Un-handled Exception \n Please contact to administrator." + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal Server Error + security: + - application: + - read + summary: Get Invoice Details v6.1 + tags: + - Invoices + x-accepts: application/json + /resellers/v6/renewals/search: + post: + description: "The Renewal Search API, by default, will retrieve all the renewals\ + \ that are associated with the customer’s account. The customer will be able\ + \ to search for renewals via basic search or advanced search. Basic search\ + \ is available thru the query string parameters, whereas the advanced search\ + \ is available thru the request body schema. " + operationId: post-renewalssearch + parameters: + - description: Your unique Ingram Micro customer number. + explode: false + in: header + name: IM-CustomerNumber + required: true + schema: + example: 20-222222 + maxLength: 10 + type: string + style: simple + - description: Two-character ISO country code. + explode: false + in: header + name: IM-CountryCode + required: true + schema: + example: US + maxLength: 2 + minLength: 2 + type: string + style: simple + - description: Unique transaction number to identify each transaction across + all the systems. + explode: false + in: header + name: IM-CorrelationID + required: true + schema: + example: fbac82ba-cf0a-4bcf-fc03-0c5084 + maxLength: 32 + type: string + style: simple + - description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + in: header + name: IM-SenderID + required: false + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + - description: The media type for JSON Request. + explode: false + in: header + name: Content type + required: true + schema: + example: application/json + type: string + style: simple + - description: The reseller's unique PO/Order number. + explode: true + in: query + name: customerOrderNumber + required: false + schema: + type: string + style: form + - description: Sales order number. + explode: true + in: query + name: ingramPurchaseOrderNumber + required: false + schema: + type: string + style: form + - description: A serial number of the product. + explode: true + in: query + name: serialNumber + required: false + schema: + type: string + style: form + - description: Number of page. + explode: true + in: query + name: page + required: false + schema: + type: string + style: form + - description: "The submitted pagesize, default is 25." + explode: true + in: query + name: size + required: false + schema: + type: string + style: form + - description: Refers to the column selected to apply the sorting criteria. + explode: true + in: query + name: sort + required: false + schema: + type: string + style: form + requestBody: + content: + application/json: + examples: + Sample: + value: + - status: + OpporutinyStatus: + value: Closed + subStatus: Renewal went direct + dateType: + startDate: + customStartDate: 05/27/2023 + customEndDate: 06/26/2023 + endDate: + customStartDate: 06/26/2023 + customEndDate: 07/26/2023 + invoiceDate: + customStartDate: 05/27/2023 + customEndDate: 06/26/2023 + expirationDate: + customStartDate: 06/26/2023 + customEndDate: 07/26/2023 + vendor: HP + endUser: STARK + schema: + $ref: '#/components/schemas/renewalsSearchRequest' + responses: + "200": + content: + application/json: + examples: + SampleResponse: + value: + - recordsFound: 114 + pageSize: 25 + pageNumber: 1 + renewals: + - renewalId: 4239056 + customerOrderNumber: MyPONumber + referenceNumber: "" + endUser: ABC TECHNOLOGIES + vendor: HP + expirationDate: 2023-07-04T00:00:00 + renewalValue: 381.5 + status: Quote pending + links: + - topic: renewals + href: /resellers/v6/renewals/4419005 + type: Get + - topic: quotedetails + href: /resellers/v6/quotes/QUO-15850886-M6H4V9 + type: Get + nextPage: /resellers/v6/renewals/search?page=2 + schema: + $ref: '#/components/schemas/renewalsSearchResponse' + description: OK + "400": + content: + application/json: + examples: + SampleResponse: + value: + - errors: + - traceid: fbac82ba-cf0a-4bcf-fc03-0c5084 + type: /errors/validation-failed + fields: + - field: IM-CustomerNumber + message: Invalid CustomerNumber + value: "20222222" + - field: IM-CountryCode + message: Invalid CountryCode + value: USA + schema: + $ref: '#/components/schemas/post_renewalssearch_400_response' + description: "Error: Bad Request" + "500": + content: + application/json: + examples: + SampleResponse: + value: + - errors: + - traceid: "123" + type: /errors/system-errors + message: Some unexpected error occurred. Please contact Ingram + Micro API support team + fields: [] + schema: + $ref: '#/components/schemas/get_reseller_v6_validateQuote_500_response' + description: Internal Server Error + security: + - application: + - read + summary: Renewals Search + tags: + - Renewals + x-content-type: application/json + x-accepts: application/json + /resellers/v6/renewals/{renewalId}: + get: + description: The Renewal Details API endpoint will retrieve all the details + related to the renewal. The customer is required to pass renewalId as a path + parameter while sending a request. + operationId: get-resellers-v6-renewalsdetails + parameters: + - description: Your unique Ingram Micro customer number. + explode: false + in: header + name: IM-CustomerNumber + required: true + schema: + example: 20-222222 + maxLength: 10 + type: string + style: simple + - description: Two-character ISO country code. + explode: false + in: header + name: IM-CountryCode + required: true + schema: + example: US + maxLength: 2 + minLength: 2 + type: string + style: simple + - description: Unique transaction number to identify each transaction across + all the systems. + explode: false + in: header + name: IM-CorrelationID + required: true + schema: + example: fbac82ba-cf0a-4bcf-fc03-0c5084 + maxLength: 32 + type: string + style: simple + - description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + in: header + name: IM-SenderID + required: false + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + - description: Unique Ingram renewal ID. + explode: false + in: path + name: renewalId + required: true + schema: + example: "123456" + type: string + style: simple + responses: + "200": + content: + application/json: + examples: + Success - 200: + value: + renewalId: "1234567" + ingramOrderNumber: "" + ingramOrderDate: null + expirationDate: 2023-07-20T00:00:00 + ingramPurchaseOrderNumber: "" + customerOrderNumber: "80000" + endCustomerOrderNumber: "115030.0" + renewalValue: "5594" + endUser: ABC + vendor: VMWARE + status: Quote closed contact sales desk + endUserInfo: + contact: 'Thanos ' + name1: "" + name2: "" + companyName: ABC Technologies + addressLine1: 182 Pine Ave + addressLine2: "" + addressLine3: "" + addressLine4: "" + city: Buffalo + state: NY + postalCode: "13206" + countryCode: "" + phoneNumber: (206)123-4567 + email: user@ingrammicro.com + referenceNumber: + notificationId: "" + quoteNumber: "" + products: + - ingramLineNumber: "1" + productDescription: "" + vendorPartNumber: "21556581" + ingramPartNumber: 08NM78 + manufacturerPartNumber: "" + unitPrice: 5594 + quantity: 4 + isConsolidated: "No" + - ingramLineNumber: "2" + productDescription: "" + vendorPartNumber: "22322080" + ingramPartNumber: 08NM78 + manufacturerPartNumber: "" + unitPrice: 5594 + quantity: 6 + isConsolidated: "Yes" + additionalAttributes: + - attributeDescription: LicenseCertificate + attributeValue: "3729027" + startDate: null + expirationDate: null + isConsolidated: "" + - attributeDescription: SerialNumber + attributeValue: "9517647541" + startDate: null + expirationDate: null + isConsolidated: "" + schema: + $ref: '#/components/schemas/renewalsDetailsResponse' + description: OK + "400": + content: + application/json: + examples: + "400 - Bad Request": + value: + errors: + - traceid: Test + type: /errors/validation-failed + message: null + fields: + - field: IM-CustomerNumber + message: Invalid CustomerNumber + value: "20222222" + - field: IM-CountryCode + message: Invalid CountryCode + value: USA + schema: + $ref: '#/components/schemas/post_renewalssearch_400_response' + description: Bad Request + "500": + content: + application/json: + examples: + Server Error: + value: + errors: + - traceid: "123" + type: /errors/system-errors + message: Some unexpected error occurred. Please contact Ingram + Micro API support team + fields: [] + schema: + $ref: '#/components/schemas/get_reseller_v6_validateQuote_500_response' + description: Internal Server Error + security: + - application: + - read + summary: Renewals Details + tags: + - Renewals + x-accepts: application/json + /resellers/v6/deals/search: + get: + description: "The Deals Search API, by default, will retrieve all the deals\ + \ that are associated with the customer’s account. The customer will be able\ + \ to search deals using the End-user name, Vendor name, or DealID. " + operationId: get-resellers-v6-dealssearch + parameters: + - description: Your unique Ingram Micro customer number. + explode: false + in: header + name: IM-CustomerNumber + required: true + schema: + example: 20-222222 + maxLength: 10 + type: string + style: simple + - description: Two-character ISO country code. + explode: false + in: header + name: IM-CountryCode + required: true + schema: + example: US + maxLength: 2 + minLength: 2 + type: string + style: simple + - description: Unique transaction number to identify each transaction across + all the systems. + explode: false + in: header + name: IM-CorrelationID + required: true + schema: + example: fbac82ba-cf0a-4bcf-fc03-0c5084 + maxLength: 32 + type: string + style: simple + - description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + in: header + name: IM-SenderID + required: false + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + - description: The end user/customer's name. + explode: true + in: query + name: endUser + required: false + schema: + example: EnduserCompany + type: string + style: form + - description: The vendor's name. + explode: true + in: query + name: vendor + required: false + schema: + example: Cisco + type: string + style: form + - description: Deal/Special bid number. + explode: true + in: query + name: dealId + required: false + schema: + example: "12345678" + type: string + style: form + responses: + "200": + content: + application/json: + examples: + Success - 200: + value: + recordsFound: 2301 + pageSize: 2 + pageNumber: 1 + deals: + - dealId: TEST-RESEU DISC + version: "1" + endUser: AB & C DEALS + vendor: TESTVENDOR + dealExpiryDate: 2023-07-31T00:00:00 + links: + topic: Deals + href: /resellers/v6/deals/TEST-RESEU DISC + type: GET + - dealId: TEST-RESEU DISC2 + version: "1" + endUser: AB & C DEALS + vendor: TESTVENDOR + dealExpiryDate: 2023-07-31T00:00:00 + links: + topic: Deals + href: /resellers/v6/deals/TEST-RESEU DISC2 + type: GET + nextPage: /bids/v1/special-bidsB2B?Size=25&Page=2 + previousPage: null + schema: + $ref: '#/components/schemas/dealsSearchResponse' + description: OK + "400": + content: + application/json: + examples: + "400 - Bad Request": + value: + errors: + - traceid: Test + type: /errors/validation-failed + message: null + fields: + - field: IM-CustomerNumber + message: Invalid CustomerNumber + value: "20222222" + - field: IM-CountryCode + message: Invalid CountryCode + value: USA + schema: + $ref: '#/components/schemas/post_renewalssearch_400_response' + description: Bad Request + "500": + content: + application/json: + examples: + Server Error: + value: + errors: + - traceid: "123" + type: /errors/system-errors + message: Some unexpected error occurred. Please contact Ingram + Micro API support team + fields: [] + schema: + $ref: '#/components/schemas/get_reseller_v6_validateQuote_500_response' + description: Internal Server Error + security: + - application: + - read + summary: Deals Search + tags: + - Deals + x-accepts: application/json + /resellers/v6/deals/{dealId}: + get: + description: The Deals Details API will retrieve all the details related to + the specific deal id. + operationId: get-resellers-v6-dealsdetails + parameters: + - description: Your unique Ingram Micro customer number. + explode: false + in: header + name: IM-CustomerNumber + required: true + schema: + example: 20-222222 + maxLength: 10 + type: string + style: simple + - description: Two-character ISO country code. + explode: false + in: header + name: IM-CountryCode + required: true + schema: + example: US + maxLength: 2 + minLength: 2 + type: string + style: simple + - description: Unique transaction number to identify each transaction across + all the systems. + explode: false + in: header + name: IM-CorrelationID + required: true + schema: + example: fbac82ba-cf0a-4bcf-fc03-0c5084 + maxLength: 32 + type: string + style: simple + - description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + in: header + name: IM-SenderID + required: false + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + - description: Unique deal ID. + explode: false + in: path + name: dealId + required: true + schema: + example: "12345678" + type: string + style: simple + responses: + "200": + content: + application/json: + examples: + Success - 200: + value: + dealId: "23456789" + version: "6" + endUser: 1ST MACHINE USA INC + extendedMsrp: 15944.61 + vendor: null + dealReceivedOn: 2023-06-15T02:30:00 + dealExpiryDate: 2023-07-11T00:00:00 + priceProtectionEndDate: 2023-07-11T13:18:30 + currencyCode: USD + endUserInfo: + contact: Stark + name1: null + name2: null + companyName: null + addressLine1: 567 BACK ST + addressLine2: "4" + addressLine3: null + addressLine4: null + city: BROOKLYN + state: NY + postalCode: "11801" + countryCode: US + phoneNumber: null + email: stark@newcomp.com + products: + - ingramPartNumber: US1860 + vendorPartNumber: NEW-MX100-SEE-2YR + upc: null + productDescription: CISCO MERAKI 1YR MX100 ADVANCED + msrp: 4906.11 + extendedMSRP: 4906.11 + approvedQuantity: 1 + remainingQuantity: 1 + comments: null + specialConditions: null + startDate: 2023-01-11T00:00:00 + expirationDate: 2023-07-11T00:00:00 + daysRemaining: 181 + schema: + $ref: '#/components/schemas/dealsDetailsResponse' + description: OK + "400": + content: + application/json: + examples: + "400 - Bad Request": + value: + errors: + - traceid: Test + type: /errors/validation-failed + message: null + fields: + - field: IM-CustomerNumber + message: Invalid CustomerNumber + value: "20222222" + - field: IM-CountryCode + message: Invalid CountryCode + value: USA + schema: + $ref: '#/components/schemas/post_renewalssearch_400_response' + description: Bad Request + "500": + content: + application/json: + examples: + Server Error: + value: + errors: + - traceid: "123" + type: /errors/system-errors + message: Some unexpected error occurred. Please contact Ingram + Micro API support team + fields: [] + schema: + $ref: '#/components/schemas/get_reseller_v6_validateQuote_500_response' + description: Internal Server Error + security: + - application: + - read + summary: Deals Details + tags: + - Deals + x-accepts: application/json + /resellers/v6/returns/search: + get: + description: "The Returns Search API, by default, will retrieve all the returns\ + \ that are associated with the customer’s account. The customer will be able\ + \ to search returns using the query parameters. The Returns Search response\ + \ will return the following information: returnClaimId, caseRequestNumber,\ + \ createdOn, referenceNumber, and returnReason." + operationId: get-resellers-v6-returnssearch + parameters: + - description: Your unique Ingram Micro customer number. + explode: false + in: header + name: IM-CustomerNumber + required: true + schema: + example: 20-222222 + maxLength: 10 + type: string + style: simple + - description: Two-character ISO country code. + explode: false + in: header + name: IM-CountryCode + required: true + schema: + example: US + maxLength: 2 + minLength: 2 + type: string + style: simple + - description: Unique transaction number to identify each transaction across + all the systems. + explode: false + in: header + name: IM-CorrelationID + required: true + schema: + example: fbac82ba-cf0a-4bcf-fc03-0c5084 + maxLength: 32 + type: string + style: simple + - description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + in: header + name: IM-SenderID + required: false + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + - description: A unique return request number. + explode: true + in: query + name: caseRequestNumber + required: false + schema: + type: string + style: form + - description: The Invoice number for the order. + explode: true + in: query + name: invoiceNumber + required: false + schema: + type: string + style: form + - description: A unique return claim Id. + explode: true + in: query + name: returnClaimId + required: false + schema: + type: string + style: form + - description: The reference number for the return. + explode: true + in: query + name: referenceNumber + required: false + schema: + type: string + style: form + - description: Unique IngramMicro part number. + explode: true + in: query + name: ingramPartNumber + required: false + schema: + type: string + style: form + - description: The vendor's part number. + explode: true + in: query + name: vendorPartNumber + required: false + schema: + type: string + style: form + - description: "Comma-separated values of pre-defined status. Open, Approved,\ + \ Partially Approved, Denied, Voided." + explode: true + in: query + name: returnStatus-in + required: false + schema: + type: string + style: form + - description: "Comma-separated values of pre-defined status. Open, Approved,\ + \ Partially Approved, Denied, Voided." + explode: true + in: query + name: claimStatus-in + required: false + schema: + type: string + style: form + - description: 'The date on which the return request was created. ' + explode: true + in: query + name: createdOn-bt + required: false + schema: + type: string + style: form + - description: The date on which the return request was last updated. + explode: true + in: query + name: modifiedOn-bt + required: false + schema: + type: string + style: form + - description: "Comma separated Pre-defined value. test, (EW) Express Warehousing,\ + \ (AR) Account Receivables, (BB) Buy Back, (BE) Stock Balance Exception,\ + \ (BO) Bill Only, (CE) Credit Dept Use - Credit Exception, (CF) Configuration\ + \ Fee, (CS ) Customer Service Discretion, (CS1) Customer Service Discretion\ + \ CS Error, (DE) Defective Exception, (DF) Defective Items, (DI) Direct\ + \ Credit, (DM) Damaged from Carrier, (DN) Damaged Without Product, (DT)\ + \ Direct/ Special Order, (DT1) Direct Ship billed, not shipped., (FO) Freight\ + \ Out, (FX) No-Scan, (IN) Incomplete, (LS) Lost Shipment, (MN) Minimum Order\ + \ Fee Credit, (OS) Over Shipment, (PR) Pricing Error, (RF) Refusal Credit,\ + \ (RI) Re-Invoice, (RP) Return For Repair, (RT) Return Not Credited, (RTD)\ + \ RCN, (SB) Stock Balance, (SD) Sales Discretion, (SH) Incorrect Shipping\ + \ And Handling, (SS) Short Shipment, (SSK) Short Ship kit, (SW) Sales Writeoff,\ + \ (TE) Opened Return, (TR) Training Refund, (TX) Tax Credit, (WS) Wrong\ + \ Sales Sealed, (WW) Wrong Warehouse, (FS) Warehouse Failed Serial# Capture,\ + \ Latin America Vebdor Credits, Select Source, ITAD - Trade-in Credit, Withholding\ + \ Tax" + explode: true + in: query + name: returnReason-in + required: false + schema: + type: string + style: form + - description: Number of page. + explode: true + in: query + name: page + required: false + schema: + type: string + style: form + - description: "The submitted pagesize, default is 25" + explode: true + in: query + name: size + required: false + schema: + type: string + style: form + - description: Refers to the column selected to apply the sorting criteria. + explode: true + in: query + name: sort + required: false + schema: + type: string + style: form + - description: The column name which will be sorted on. + explode: true + in: query + name: sortingColumnName + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + examples: + Success - 200: + value: + recordsFound: 1 + pageSize: 25 + pageNumber: 1 + returnsClaims: + - returnClaimId: "" + caseRequestNumber: CAS-12345-G0S5J1-1 + createdOn: 2023-04-13T04:08:35-07:00 + type: Claim + returnReason: "" + referenceNumber: RNGGG11CS/PN + estimatedTotalValue: 2324 + credit: 2324 + modifiedOn: 2023-07-18T04:16:16-07:00 + status: OPEN + links: + - topic: returnsClaimsDetails + href: /resellers/v6/returns/CAS-12345-G0S5J1-1 + type: get + nextPage: null + previousPage: null + schema: + $ref: '#/components/schemas/returnsSearchResponse' + description: OK + "400": + content: + application/json: + examples: + "400 - Bad Request": + value: + errors: + - traceid: Test + type: /errors/validation-failed + message: null + fields: + - field: IM-CustomerNumber + message: Invalid CustomerNumber + value: "20222222" + - field: IM-CountryCode + message: Invalid CountryCode + value: USA + schema: + $ref: '#/components/schemas/post_renewalssearch_400_response' + description: Bad Request + "500": + content: + application/json: + examples: + Server Error: + value: + errors: + - traceid: "123" + type: /errors/system-errors + message: Some unexpected error occurred. Please contact Ingram + Micro API support team + fields: [] + schema: + $ref: '#/components/schemas/get_reseller_v6_validateQuote_500_response' + description: Internal Server Error + security: + - application: + - read + summary: Returns Search + tags: + - Returns + x-accepts: application/json + /resellers/v6/returns/{caseRequestNumber}: + get: + description: The Returns Details API will retrieve all the details related to + the specific caseRequestNumber. + operationId: get-resellers-v6-returnsdetails + parameters: + - description: Your unique Ingram Micro customer number. + explode: false + in: header + name: IM-CustomerNumber + required: true + schema: + example: 20-222222 + maxLength: 10 + type: string + style: simple + - description: Two-character ISO country code. + explode: false + in: header + name: IM-CountryCode + required: true + schema: + example: US + maxLength: 2 + minLength: 2 + type: string + style: simple + - description: Unique transaction number to identify each transaction across + all the systems. + explode: false + in: header + name: IM-CorrelationID + required: true + schema: + example: fbac82ba-cf0a-4bcf-fc03-0c5084 + maxLength: 32 + type: string + style: simple + - description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + in: header + name: IM-SenderID + required: false + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + - description: A unique return request number. + explode: false + in: path + name: caseRequestNumber + required: true + schema: + example: "12345678" + type: string + style: simple + responses: + "200": + content: + application/json: + examples: + Success - 200: + value: + typeOfDetails: Claim + rmaClaimId: 12-RH5LX-34 + caseRequestNumber: CAS-12345-M4H2Y8-0 + createdOn: 2022-02-02T19:33:10Z + returnReason: (CS ) Customer Service Discretion + referenceNumber: RH4QP21CS/PN49 + status: Open + returnWarehouseAddress: | + Ingram Micro Returns (ref RMA#) + 82 Micro Drive + Jonestown, PA 17038 + products: + - ingramLineNumber: 1 + description: |- + PRO 3YR TOTAL COMPLETE FOR DOWN + BUSINESS ADP + ingramPartNumber: RX1000 + vendorPartNumber: A9W-12345 + upc: null + invoiceDate: 2022-01-24T00:00:00Z + invoiceNumber: 20-RH123-21 + customerOrderNumber: CONCURR021 + quantity: 1 + unitPrice: 213.75 + extendedPrice: 213.75 + status: Open + returnBranch: "96" + shipFromBranch: "49" + requestDetails: null + additionalDetails: null + subTotal: 213.75 + tax: 0 + additionalFees: 0 + estimatedTotal: 213.75 + schema: + $ref: '#/components/schemas/returnsDetailsResponse' + description: OK + "400": + content: + application/json: + examples: + "400 - Bad Request": + value: + errors: + - traceid: Test + type: /errors/validation-failed + message: null + fields: + - field: IM-CustomerNumber + message: Invalid CustomerNumber + value: "20222222" + - field: IM-CountryCode + message: Invalid CountryCode + value: USA + schema: + $ref: '#/components/schemas/post_renewalssearch_400_response' + description: Bad Request + "500": + content: + application/json: + examples: + Server Error: + value: + errors: + - traceid: "123" + type: /errors/system-errors + message: Some unexpected error occurred. Please contact Ingram + Micro API support team + fields: [] + schema: + $ref: '#/components/schemas/get_reseller_v6_validateQuote_500_response' + description: Internal Server Error + security: + - application: + - read + summary: Returns Details + tags: + - Returns + x-accepts: application/json + /resellers/v6/returns/create: + post: + description: "Return create endpoint will allow customers to create a return\ + \ request. In order to create a request, the customer must provide either\ + \ ingramPartNumber or vendorPartNumber along with other required fields listed\ + \ below. " + operationId: post-returnscreate + parameters: + - description: Your unique Ingram Micro customer number. + explode: false + in: header + name: IM-CustomerNumber + required: true + schema: + example: 20-222222 + maxLength: 10 + type: string + style: simple + - description: Two-character ISO country code. + explode: false + in: header + name: IM-CountryCode + required: true + schema: + example: US + maxLength: 2 + minLength: 2 + type: string + style: simple + - description: Unique transaction number to identify each transaction across + all the systems. + explode: false + in: header + name: IM-CorrelationID + required: true + schema: + example: fbac82ba-cf0a-4bcf-fc03-0c5084 + maxLength: 32 + type: string + style: simple + - description: "Unique value used to identify the sender of the transaction.\ + \ Example: MyCompany" + explode: false + in: header + name: IM-SenderID + required: false + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + requestBody: + content: + application/json: + examples: + Sample: + value: + list: + - invoiceNumber: 40-NFERG-11 + invoiceDate: 2023-07-18 + customerOrderNumber: "" + ingramPartNumber: 164B2G + vendorPartNumber: "" + serialNumber: "" + quantity: "1" + primaryReason: I have not received part or all of my order + secondaryReason: Received only partial shipment. + notes: B2BCartCreation20 + referenceNumber: RefNum + billToAddressId: "000" + shipFromInfo: + companyName: ABC TECH + contact: STARK + addressLine1: 17501 W 98TH ST SPC 1833 + addressLine2: string + addressLine3: string + city: LENEXA + state: KS + postalCode: "662191736" + countryCode: US + email: stark@gmail.com + phoneNumber: "" + numberOfBoxes: "1" + schema: + $ref: '#/components/schemas/returnsCreateRequest' + responses: + "200": + content: + application/json: + examples: + SampleResponse: + value: + returnsClaims: + - rmaClaimId: "" + caseRequestNumber: CAS-08946-G1W3J3-1 + referenceNumber: B2BTest-US + createdOn: 2023-07-31T07:00:00Z + type: CLAIM + returnReason: (SS) Short Shipment + ingramPartNumber: YZ3606 + vendorPartNumber: "" + quantity: 1 + notes: B2B RMA TEST-US + estimatedTotalValue: 4165 + credit: null + status: Open + links: + - topic: returnsClaimsDetails + href: /resellers/v6/returns/CAS-08946-G1W3J3-1 + type: get + schema: + $ref: '#/components/schemas/returnsCreateResponse' + description: OK + "400": + content: + application/json: + examples: + SampleResponse: + value: + - errors: + - traceid: fbac82ba-cf0a-4bcf-fc03-0c5084 + type: /errors/validation-failed + fields: + - field: IM-CustomerNumber + message: Invalid CustomerNumber + value: "20222222" + - field: IM-CountryCode + message: Invalid CountryCode + value: USA + schema: + $ref: '#/components/schemas/post_renewalssearch_400_response' + description: "Error: Bad Request" + "500": + content: + application/json: + examples: + SampleResponse: + value: + - errors: + - traceid: "123" + type: /errors/system-errors + message: Some unexpected error occurred. Please contact Ingram + Micro API support team + fields: [] + schema: + $ref: '#/components/schemas/get_reseller_v6_validateQuote_500_response' + description: Internal Server Error + security: + - application: + - read + summary: Returns Create + tags: + - Returns + x-content-type: application/json + x-accepts: application/json + /resellers/v6/freightestimate: + post: + description: The freight estimator endpoint will allow customers to understand + the freight cost for an order. + operationId: post-freightestimate + parameters: + - description: Your unique Ingram Micro customer number. + explode: false + in: header + name: IM-CustomerNumber + required: true + schema: + example: 20-222222 + maxLength: 10 + type: string + style: simple + - description: Two-character ISO country code. + explode: false + in: header + name: IM-CountryCode + required: true + schema: + example: US + maxLength: 2 + minLength: 2 + type: string + style: simple + - description: Unique transaction number to identify each transaction across + all the systems. + explode: false + in: header + name: IM-CorrelationID + required: true + schema: + example: fbac82ba-cf0a-4bcf-fc03-0c5084 + maxLength: 32 + type: string + style: simple + - description: Logged in Users email address contact. + explode: false + in: header + name: IM-CustomerContact + required: true + schema: + example: John.Doe@reseller.com + maxLength: 64 + type: string + style: simple + - description: Unique value used to identify the sender of the transaction. + explode: false + in: header + name: IM-SenderID + required: false + schema: + example: MyCompany + maxLength: 32 + type: string + style: simple + requestBody: + content: + application/json: + examples: + Sample: + value: + billToAddressId: "000" + shipToAddressId: "200" + shipToAddress: + companyName: ABC TECH + addressLine1: 17501 W 98TH ST SPC 1833 + addressLine2: string + addressLine3: string + city: LENEXA + state: KS + postalCode: "662191736" + countryCode: US + lines: + - customerLineNumber: "001" + ingramPartNumber: A300-123456 + quantity: "1" + warehouseId: "20" + carrierCode: "" + - customerLineNumber: "002" + ingramPartNumber: A300-789012 + quantity: "1" + warehouseId: "10" + carrierCode: "" + schema: + $ref: '#/components/schemas/freightRequest' + responses: + "200": + content: + application/json: + examples: + SampleResponse: + value: + freightEstimateResponse: + currencyCode: USD + totalFreightAmount: 58.64 + totalTaxAmount: 0 + totalFees: 0 + totalNetAmount: 0 + grossAmount: 418.17 + distribution: + - shipFromBranchNumber: "10" + carrierCode: RG + shipVia: FEDEX GROUND + freightRate: 19.7 + totalWeight: 13 + transitDays: 1 + carrierList: + - carrierCode: RG + shipVia: FEDEX GROUND + carrierMode: SML + estimatedFreightCharge: "19.7" + daysInTransit: "1" + - carrierCode: UG + shipVia: 'UPS GROUND ' + carrierMode: SML + estimatedFreightCharge: "23.8" + daysInTransit: "1" + - shipFromBranchNumber: "20" + carrierCode: RG + shipVia: FEDEX GROUND + freightRate: 38.94 + totalWeight: 13 + transitDays: 3 + carrierList: + - carrierCode: RG + shipVia: FEDEX GROUND + carrierMode: SML + estimatedFreightCharge: "38.94" + daysInTransit: "3" + - carrierCode: HD + shipVia: FDX HOME DEL + carrierMode: SML + estimatedFreightCharge: "46" + daysInTransit: "3" + lines: + - ingramPartNumber: A300-123456 + vendorPartNumber: "123456" + warehouseId: "20" + quantity: 1 + unitPrice: 198.07 + netAmount: 198.07 + - ingramPartNumber: A300-789012 + vendorPartNumber: "789012" + warehouseId: "10" + quantity: 1 + unitPrice: 161.46 + netAmount: 161.46 + schema: + $ref: '#/components/schemas/freightResponse' + description: OK + "400": + content: + application/json: + examples: + SampleResponse: + value: + - errors: + - traceid: fbac82ba-cf0a-4bcf-fc03-0c5084 + type: /errors/validation-failed + fields: + - field: IM-CustomerNumber + message: Invalid CustomerNumber + value: "20222222" + - field: IM-CountryCode + message: Invalid CountryCode + value: USA + schema: + $ref: '#/components/schemas/post_renewalssearch_400_response' + description: "Error: Bad Request" + "500": + content: + application/json: + examples: + SampleResponse: + value: + - errors: + - traceid: "123" + type: /errors/system-errors + message: Some unexpected error occurred. Please contact Ingram + Micro API support team + fields: [] + schema: + $ref: '#/components/schemas/get_reseller_v6_validateQuote_500_response' + description: Internal Server Error + security: + - application: + - read + summary: Freight Estimate + tags: + - Freight Estimate + x-content-type: application/json + x-accepts: application/json + /resellers/v5/invoices/{invoiceNumber}: + get: + description: |- + View invoice details. This is a request to query invoice details for a specific Ingram Micro order placed in the last 9 months, whether open or shipped. + + invoiceNumber, isoCountryCode and customerNumber parameters are required. + operationId: get-invoices + parameters: + - description: Ingram Micro Invoice Number + explode: false + in: path + name: invoiceNumber + required: true + schema: + default: 20-RCW67-11 + maxLength: 12 + type: string + style: simple + - description: Your unique Ingram Micro customer number + explode: true + in: query + name: customerNumber + required: true + schema: + default: 20-222222 + maxLength: 10 + type: string + style: form + - description: ISO 2 char country code + explode: true + in: query + name: isoCountryCode + required: true + schema: + default: US + maxLength: 2 + minLength: 2 + type: string + style: form + responses: + "200": + content: + application/json: + examples: + Example: + value: + serviceresponse: + responsepreamble: + responsestatus: SUCCESS + statuscode: "200" + responsemessage: Invoice Found + invoicedetailresponse: + invoicenumber: RCW67-11 + customerordernumber: ZFEDRGT + customerfreightamount: "0.00" + customerforeignfrightamt: "0.00" + totaltaxamount: "0" + totalamount: "61.22" + shiptosuffix: "200" + billtosuffix: "000" + billto: + name1: INGRAM MICRO CAPS TEST ACCOUNT + addressline1: 1759 WEHRLE DR + city: WILLIAMSVILLE + state: NY + postalcode: "142217033" + countrycode: US + paymentterms: "200" + orderdate: 2020-01-06 + carrier: OT + carrierdescription: OTHER + discountamount: "0.00" + enduserponumber: null + freightforwardercode: null + creditmemoreasoncode: null + holdreason: null + shipcomplete: null + shipdate: 2020-01-06 + companycurrency: USD + currencycode: USD + currencyrate: "1.000000" + globalorderid: 20-RCW67-11 + originalshipcode: null + orderstatus: I + shiptoaddress: + name1: INGRAM MICRO TEST ACCOUNT + addressline1: ATTN TOD DEBIE + addressline2: 1610 E SAINT ANDREW PL + city: SANTA ANA + state: CA + postalcode: "927054931" + countrycode: US + totalsales: "61.22" + weight: "5.00" + lines: + - linenumber: "1" + partnumber: "123511" + vendorpartnumber: F2A032-06 + partdescription: 666 PARALLEL PRINTER DB25M TO CABLCENT36M + PRO SERIES 28AWG ROHS + shipfrombranch: "10" + shippedquantity: "1" + orderedquantity: "1" + backorderquantity: "0" + extendedprice: "30.61" + specialbidnumber: null + ordersuffix: "11" + unitprice: "30.61" + unitofmeasure: EA + productextendedspecs: + - attributename: commenttext + attributevalue: EU#-001599983 ASPECT AUTOMATION LLMC#C + - linenumber: "2" + partnumber: "123511" + vendorpartnumber: F2A032-06 + partdescription: 666 PARALLEL PRINTER DB25M TO CABLCENT36M + PRO SERIES 28AWG ROHS + shipfrombranch: "10" + shippedquantity: "1" + orderedquantity: "1" + backorderquantity: "0" + extendedprice: "30.61" + specialbidnumber: null + ordersuffix: "11" + unitprice: "30.61" + unitofmeasure: EA + productextendedspecs: + - attributename: commenttext + attributevalue: EU#-001599983 ASPECT AUTOMATION LLMC#C + - linenumber: "3" + partnumber: "123511" + vendorpartnumber: F2A032-06 + partdescription: 666 PARALLEL PRINTER DB25M TO CABLCENT36M + PRO SERIES 28AWG ROHS + shipfrombranch: "10" + shippedquantity: "0" + orderedquantity: "1" + backorderquantity: "1" + extendedprice: "0.00" + specialbidnumber: null + ordersuffix: "11" + unitprice: "30.61" + unitofmeasure: EA + - linenumber: "895" + vendorpartnumber: null + partdescription: FREE FREIGHT + shipfrombranch: "10" + shippedquantity: "0" + orderedquantity: "0" + backorderquantity: "0" + extendedprice: "0.00" + specialbidnumber: null + ordersuffix: "11" + unitprice: "0" + unitofmeasure: null + schema: + $ref: '#/components/schemas/invoiceDetails' + description: OK + security: + - application: + - read + summary: Get Invoice Details + tags: + - Invoices V5 + x-accepts: application/json + /resellers/v5/Orders: + post: + description: |- + Instantly create and place orders. The POST API supports stocked SKUs as well as licensing and warranties SKUs. + + Every order to be created with this API must complete these validations to be placed and processed: + + Ingram Micro recommends that you provide the ingrampartnumber for each SKU contained in each order. + + When using vendorpartnumber to place an order, please use the product search endpoint to find the ingrampartnumber for a specific vendorpartnumber, and then supply the ingrampartnumber to place an order. + + NOTE: You must have net terms to use the Ingram Micro Order Create API. Ingram Micro offers trade credit when using our APIs, and repayment is based on net terms. For example, if your net terms agreement is net-30, you will have 30 days to make a full payment. Ingram Micro does not allow credit card transactions for API ordering. + operationId: post-v5-orders-create + requestBody: + content: + application/json: + examples: + With Ingram Part No.: + value: + ordercreaterequest: + requestpreamble: + isocountrycode: US + customernumber: 20-222222 + ordercreatedetails: + customerponumber: CustumerPO-1 + shiptoaddress: + attention: John Smith + addressline1: Ingram Micro + addressline2: 3351 Michelson Dr + city: Long Beach + state: CA + postalcode: "92612" + countrycode: US + carriercode: OT + lines: + - linetype: P + linenumber: "002" + quantity: "1" + ingrampartnumber: TSXML3 + extendedspecs: + - attributename: isdirectshiporder + attributevalue: "false" + - attributename: euponumber + attributevalue: "1234" + - attributename: commenttext + attributevalue: Happy Birthday Mom + - attributename: duplicatecustomerordernumbervalidate + attributevalue: ALLOW + - attributename: commenttext + attributevalue: ///This order must ship on FedEx + - attributename: commenttext + attributevalue: /// 3rd account# 12345678 + With Vendor Part No.: + value: + ordercreaterequest: + requestpreamble: + isocountrycode: US + customernumber: 20-222222 + ordercreatedetails: + customerponumber: CustumerPO-1 + carriercode: OT + lines: + - linetype: P + linenumber: "002" + quantity: "1" + vendorpartnumber: PA03670-B055 + extendedspecs: + - attributename: commenttext + attributevalue: This is a test comment text + schema: + $ref: '#/components/schemas/orderCreateRequest' + responses: + "200": + content: + application/json: + examples: + Example: + value: + serviceresponse: + responsepreamble: + responsestatus: SUCCESS + statuscode: WY + responsemessage: "Note: (WY) Address fixed by group 1" + ordersummary: + customerponumber: CUSTUMERPO-1 + totalorderamount: 6.77 + totalordercreated: "1" + shiptoaddress: + attention: INGRAM MICRO + addressline1: 3351 MICHELSON DR + city: IRVINE + state: CA + postalcode: "926120696" + countrycode: US + ordercreateresponse: + - numberoflineswithsuccess: "1" + numberoflineswitherror: "0" + numberoflineswithwarning: "0" + globalorderid: 20-RD12J + ordertype: S + ordertimestamp: 2020-04-04 + invoicingsystemorderid: 20-RD12J + taxamount: 0 + freightamount: 0 + orderamount: 6.77 + lines: + - linetype: P + globallinenumber: "002" + partnumber: TSXML3 + linenumber: "4" + carriercode: OT + carrierdescription: OTHER + requestedunitprice: 6.77 + requestedquantity: 1 + confirmedquantity: 1 + backorderedquantity: 0 + unitproductprice: 6.77 + netamount: 6.77 + warehouseid: "10" + ordersuffix: "11" + schema: + $ref: '#/components/schemas/orderCreateResponse' + description: OK + security: + - application: + - write + summary: Create a New Order + tags: + - Orders v5 + x-content-type: application/json + x-accepts: application/json + /resellers/v5/Orders/search: + get: + description: |- + Search your Ingram Micro orders. This endpoint searches by multiple order parameters and supports pagination of results. Search using one or more of the parameters below: + + + + For pagination, please use these parameters: + + + Order Status Values: + + + The search endpoint also returns HATEOAS links for order details and invoice details, if applicable. + operationId: get-orders-search + parameters: + - description: Your unique Ingram Micro customer number + explode: true + in: query + name: customerNumber + required: true + schema: + example: 20-222222 + type: string + style: form + - description: 2 char iso country code + explode: true + in: query + name: isocountrycode + required: true + schema: + example: US + maxLength: 2 + minLength: 2 + type: string + style: form + - description: Ingram sales order number + explode: true + in: query + name: ordernumber + required: false + schema: + type: string + style: form + - description: Search using your PO/Order number + explode: true + in: query + name: customerordernumber + required: false + schema: + example: ZENPO1 + type: string + style: form + - description: Ingram Micro order status + explode: true + in: query + name: orderstatus + required: false + schema: + default: any + enum: + - P + - R + - "4" + - I + - V + - any + example: "" + minLength: 1 + type: string + uniqueItems: false + style: form + - allowEmptyValue: false + allowReserved: false + description: Search start date/time in UTC format + explode: false + in: query + name: startcreatetimestamp + required: false + schema: + format: date-time + type: string + style: form + - description: Search end date/time in UTC format + explode: true + in: query + name: endcreatetimestamp + required: false + schema: + format: date-time + type: string + style: form + - description: Number of records required in the call + explode: true + in: query + name: pagesize + required: false + schema: + type: integer + style: form + - description: the page number reference + explode: true + in: query + name: pagenumber + required: false + schema: + default: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + examples: + Success Example: + value: + serviceresponse: + responsepreamble: + requeststatus: SUCCESS + returnmessage: Data found + ordesearchresponse: + ordersfound: "1" + pagesize: "1" + pagenumber: "1" + orders: + - ordernumber: 20-RD128 + entrytimestamp: 2020-04-03T15:54:39Z + customerordernumber: ZENPO + suborders: + - subordernumber: 20-RD128-11 + statuscode: C + status: CREDIT HOLD + holdreasoncode: CH + holdreason: HARD-9 CUST NOT FLOOR ORD + links: + - topic: orders + href: /resellers/v5/orders/20-RD128-11?customerNumber=20-222222&isoCountryCode=US + type: GET + - topic: invoices + href: /resellers/v5/invoices/20-RD128-11?customerNumber=20-222222&isoCountryCode=US + type: GET + links: + topic: orders + href: /resellers/v5/orders/20-RD128?customerNumber=20-222222&isoCountryCode=US + type: GET + Data not found: + value: + serviceresponse: + responsepreamble: + requeststatus: FAILED + returnmessage: No data found + ordesearchresponse: + ordersfound: "0" + pagesize: "0" + pagenumber: "1" + schema: + $ref: '#/components/schemas/orderSearchResponse' + description: OK + security: + - application: + - read + summary: Search your Orders + tags: + - Orders v5 + x-accepts: application/json + /resellers/v5/Orders/{ordernumber}: + delete: + description: |- + This endpoint is a request to cancel a previously accepted order. Use your Ingram Micro sales order number to cancel an order. + + The orderNumber, isoCountryCode, customerNumber and entryDate parameters are required. + + This call must be submitted before the order is released to Ingram Micro’s warehouse. The order cannot be canceled once it is released to the warehouse. + + Direct ship orders cannot be canceled. Contact your Ingram Micro sales rep for assistance. + operationId: delete-orders-orderNumber + parameters: + - description: Ingram Micro sales order number + explode: false + in: path + name: ordernumber + required: true + schema: + example: 20-RD128 + type: string + style: simple + - description: Your unique Ingram Micro customer number + explode: true + in: query + name: customerNumber + required: true + schema: + type: string + style: form + - description: 2 chars ISO country code + explode: true + in: query + name: isoCountryCode + required: true + schema: + maxLength: 2 + minLength: 2 + type: string + style: form + - description: Order entry date (yyyy-mm-dd) + explode: true + in: query + name: entryDate + required: true + schema: + default: 2020-04-03 + type: string + style: form + responses: + "200": + content: + application/json: + examples: + Example: + value: + serviceresponse: + responsepreamble: + requestStatus: SUCCESS + returnCode: "00" + returnMessage: Order Deleted Successfully + schema: + $ref: '#/components/schemas/orderCancelResponse' + description: OK + security: + - application: + - write + summary: Cancel an Existing Order + tags: + - Orders v5 + x-accepts: application/json + get: + description: |- + Use your Ingram Micro sales order number to search for existing orders or retrieve existing order details. + + The sales order number, customer number and isoCountryCode are required parameters. + + The sales order number is returned in the Order Create POST response. Ingram Micro recommends that you save this number for future uses. + + The IM sales order number can also be retrieved by searching for your existing order using the Order Search GET endpoint. You will need the customer PO number or order number that was provided at the time of order creation. + + In a case when the IM sales order number is repeated, you can refine the result by providing customer order number for additional filtering or using the date range to filter orders by creation date. + + Use the "simulate" query parameter to test the GET order response for various order statuses. This parameter is only available in the sandbox to help with development and testing of the GET order endpoint. + operationId: get-v5-orders-details + parameters: + - description: Ingram Micro sales order number + explode: false + in: path + name: ordernumber + required: true + schema: + example: 20-RD128 + type: string + style: simple + - description: Your unique Ingram Micro customer number + explode: true + in: query + name: customernumber + required: true + schema: + default: 20-222222 + type: string + style: form + - description: 2 chars ISO country code + explode: true + in: query + name: isocountrycode + required: true + schema: + default: US + maxLength: 2 + minLength: 2 + type: string + style: form + - description: Your PO/Order Number provide at the time of order creation + explode: true + in: query + name: customerordernumber + required: false + schema: + type: string + style: form + - description: Filter start date - format YYYY-MM-DD + explode: true + in: query + name: startcreatetimestamp + required: false + schema: + example: 2020-03-15 + format: date + type: string + style: form + - description: Filter end date - format YYYY-MM-DD + explode: true + in: query + name: endcreatetimestamp + required: false + schema: + example: 2020-04-20 + type: string + style: form + - description: Order response for various order statuses. Not for use in production. + explode: true + in: query + name: simulate + required: false + schema: + enum: + - IM::shipped + - IM::invoiced + - IM::hold + - IM::partially_shipped + example: "" + type: string + style: form + responses: + "200": + content: + application/json: + examples: + Success: + value: + serviceresponse: + responsepreamble: + responsestatus: SUCCESS + orderdetailresponse: + ordernumber: 20-RD128 + ordertype: D + customerordernumber: ZENPO + orderstatus: CREDIT HOLD + entrytimestamp: 2020-04-03T08:54:39-07:00 + entrymethoddescription: VIA LU62 + ordertotalvalue: 14.67 + ordersubtotal: 6.67 + freightamount: 8 + currencycode: USD + totalweight: "1" + totaltax: "0" + billtoaddress: + suffix: "000" + name: INGRAM MICRO CAPS TEST ACCOUNT + addressline1: 1759 WEHRLE DR + city: WILLIAMSVILLE + state: NY + postalcode: "142217033" + countrycode: US + shiptoaddress: null + enduserinfo: null + lines: + - linenumber: "004" + globallinenumber: "002" + ordersuffix: "11" + erpordernumber: 20-RD128-11 + linestatus: CREDIT HOLD + partnumber: TSXML2 + manufacturerpartnumber: TESTXMLSKU2 + vendorname: TEST VENDOR NUMBER 6 + vendorcode: TST6 + partdescription1: CLASS X SKU NO STOCK + unitweight: "1" + unitprice: 6.67 + extendedprice: 6.67 + taxamount: 0 + requestedquantity: "1" + confirmedquantity: "1" + backorderquantity: "0" + shipmentdetails: + - quantity: 1 + shipfromwarehouseid: "40" + warehousename: "Carol Stream, IL" + status: C + statusdescription: CREDIT HOLD + holdreasoncodedescription: NO DESCRIPTION + carriertype: LTL + carriercode: OT + carriername: OTHER + pronumber: OTHER + productextendedspecs: + - attributename: ponumber + attributevalue: PO NOT GENERATED YET + extendedspecs: + - attributename: commenttext + attributevalue: HAPPY BIRTHDAY MOM + - attributename: commenttext + attributevalue: ///THIS ORDER MUST SHIP ON FEDEX + - attributename: commenttext + attributevalue: /// 3RD ACCOUNT# 12345678 + Order number not found: + value: + serviceresponse: + responsepreamble: + responsestatus: FAILED + orderdetailresponse: + ordernumber: Not Found + customerordernumber: Not-Found + orderstatus: Not-Found + Shipped Order: + value: + serviceresponse: + responsepreamble: + responsestatus: SUCCESS + orderdetailresponse: + ordernumber: 20-V9R37 + ordertype: S + customerordernumber: 9WYLT4PNC + enduserponumber: "20369444086587527" + orderstatus: Shipped + entrytimestamp: 2020-01-22T09:11:14-08:00 + entrymethoddescription: XML/PCG + ordertotalvalue: 197.55 + ordersubtotal: 164.62 + currencycode: GBP + totalweight: "1.87" + totaltax: "32.93" + billtoaddress: + suffix: "000" + name: AMAZON EU SARL + addressline1: "AMAZON EU SARL, UK BRANCH" + addressline2: 1 PRINCIPAL PLACE + addressline3: WORSHIP STREET + city: LONDON + postalcode: EC2A 2FA + countrycode: UK + shiptoaddress: + attention: ATTENTION LINE + name: COMPANY NAME HERE + addressline1: ADDRESS LINE 1 + addressline2: ADDRESS LINE 2 + city: MILTON KEYNES + postalcode: MK9 2EA + countrycode: UK + enduserinfo: null + lines: + - linenumber: "002" + globallinenumber: "001" + ordersuffix: "11" + erpordernumber: 20-V9R37-11 + linestatus: Shipped + partnumber: V934027 + manufacturerpartnumber: 45PAT7MYL + vendorname: STARTECH - CABLES + vendorcode: D825 + partdescription1: 7M YELLOW CAT5E CABLE + partdescription2: SNAGLESS ETHERNET CABLE - UTP + unitweight: "0.36" + unitprice: 2.04 + extendedprice: 2.04 + taxamount: 0 + requestedquantity: "1" + confirmedquantity: "1" + backorderquantity: "0" + serialnumberdetails: + - serialnumber: "011" + deliverynumber: "1123" + trackingnumber: + - "10660208" + shipmentdetails: + - quantity: 1 + shipfromwarehouseid: "10" + warehousename: "Mira Loma, CA" + status: S + statusdescription: Shipped + holdreasoncodedescription: NA + carriercode: 4M + carriername: SMARTPOST-BM + pronumber: "121" + packagedetails: + - trackingnumber: "65792630" + packageweight: "2" + cartonnumber: "1" + quantityinbox: "3" + - linenumber: "003" + globallinenumber: "002" + ordersuffix: "11" + erpordernumber: 20-V9R37-11 + linestatus: Shipped + partnumber: V934357 + manufacturerpartnumber: DK30CHDPPDUE + vendorname: STARTECH - IO NETWORKING + vendorcode: D822 + partdescription1: DUAL MONITOR USB C DOCK - POWER + partdescription2: DELIVERY 60W - DUAL 4K DP/HDMI SD + unitweight: "1.35" + unitprice: 143.42 + extendedprice: 143.42 + taxamount: 0 + requestedquantity: "1" + confirmedquantity: "1" + backorderquantity: "0" + serialnumberdetails: + - serialnumber: "011" + deliverynumber: "1123" + trackingnumber: + - "10660208" + shipmentdetails: + - quantity: 1 + shipfromwarehouseid: "10" + warehousename: "Mira Loma, CA" + status: S + statusdescription: Shipped + holdreasoncodedescription: NA + carriercode: 4M + carriername: SMARTPOST-BM + pronumber: "121" + packagedetails: + - trackingnumber: "65792630" + packageweight: "2" + cartonnumber: "1" + quantityinbox: "3" + - linenumber: "004" + globallinenumber: "003" + ordersuffix: "11" + erpordernumber: 20-V9R37-11 + linestatus: Shipped + partnumber: 242F880 + manufacturerpartnumber: 1511B001 + vendorname: CANON - SUPPLIES INK HV + vendorcode: M032 + partdescription1: CLI-36 INK CARTRIDGE COLOUR + partdescription2: F/ PIXMA MINI260 + unitweight: "0.05" + unitprice: 8.88 + extendedprice: 8.88 + taxamount: 0 + requestedquantity: "1" + confirmedquantity: "1" + backorderquantity: "0" + serialnumberdetails: + - serialnumber: "011" + deliverynumber: "1123" + trackingnumber: + - "10660208" + shipmentdetails: + - quantity: 1 + shipfromwarehouseid: "10" + warehousename: "Mira Loma, CA" + status: S + statusdescription: Shipped + holdreasoncodedescription: NA + carriercode: 4M + carriername: SMARTPOST-BM + pronumber: "121" + packagedetails: + - trackingnumber: "65792630" + packageweight: "2" + cartonnumber: "1" + quantityinbox: "3" + - linenumber: "005" + globallinenumber: "004" + ordersuffix: "11" + erpordernumber: 20-V9R37-11 + linestatus: Shipped + partnumber: V931792 + manufacturerpartnumber: RJ45SPLITTER + vendorname: STARTECH - CABLES + vendorcode: D825 + partdescription1: 2-TO-1 RJ45 SPLITTER CABLE + partdescription2: ADAPTER - F/M + unitweight: "0.03" + unitprice: 4.8 + extendedprice: 4.8 + taxamount: 0 + requestedquantity: "1" + confirmedquantity: "1" + backorderquantity: "0" + serialnumberdetails: + - serialnumber: "011" + deliverynumber: "1123" + trackingnumber: + - "10660208" + shipmentdetails: + - quantity: 1 + shipfromwarehouseid: "10" + warehousename: "Mira Loma, CA" + status: S + statusdescription: Shipped + holdreasoncodedescription: NA + carriercode: 4M + carriername: SMARTPOST-BM + pronumber: "121" + packagedetails: + - trackingnumber: "65792630" + packageweight: "2" + cartonnumber: "1" + quantityinbox: "3" + - linenumber: "006" + globallinenumber: "005" + ordersuffix: "11" + erpordernumber: 20-V9R37-11 + linestatus: Shipped + partnumber: V931639 + manufacturerpartnumber: HDMM1MHS + vendorname: STARTECH - CABLES + vendorcode: D825 + partdescription1: 1M HIGH SPEED HDMI CABLE WITH + partdescription2: ETHERNET - HDMI - M/M + unitweight: "0.08" + unitprice: 3.48 + extendedprice: 3.48 + taxamount: 0 + requestedquantity: "1" + confirmedquantity: "1" + backorderquantity: "0" + serialnumberdetails: + - serialnumber: "011" + deliverynumber: "1123" + trackingnumber: + - "10660208" + shipmentdetails: + - quantity: 1 + shipfromwarehouseid: "10" + warehousename: "Mira Loma, CA" + status: S + statusdescription: Shipped + holdreasoncodedescription: NA + carriercode: 4M + carriername: SMARTPOST-BM + pronumber: "121" + packagedetails: + - trackingnumber: "65792630" + packageweight: "2" + cartonnumber: "1" + quantityinbox: "3" + miscfeeline: + - code: "895" + description: FN PARCELFORCE NEXT DAY + chargeamount: "2.00" + extendedspecs: + - attributename: commenttext + attributevalue: ///CN:CONTACT NAME HERE + schema: + $ref: '#/components/schemas/orderDetailResponse' + description: OK + security: + - application: + - read + summary: Get Order Details + tags: + - Orders v5 + x-accepts: application/json + /resellers/v5/Catalog/priceandavailability: + post: + description: "Search the product catalog for the price and availability for\ + \ up to 50 SKUs at one time. This endpoint helps to confirm the details just\ + \ prior to placing a real-time call." + operationId: MultiSKUPriceAndStock + parameters: [] + requestBody: + content: + application/json: + examples: + Ingram Part Number: + value: + servicerequest: + requestpreamble: + customernumber: 20-222223 + isocountrycode: US + priceandstockrequest: + showwarehouseavailability: "True" + extravailabilityflag: "Y" + item: + - ingrampartnumber: TB6489 + quantity: 1 + - ingrampartnumber: 1AQ821 + quantity: 1 + includeallsystems: false + schema: + $ref: '#/components/schemas/priceAndAvailabilityRequest' + responses: + "200": + content: + application/json: + examples: + Example: + value: + serviceresponse: + responsepreamble: + responsestatus: SUCCESS + statuscode: "200" + responsemessage: Data Found + priceandstockresponse: + details: + - itemstatus: SUCCESS + statusmessage: 3000-SKU not found/replic + ingrampartnumber: TB6489 + vendorpartnumber: H1180HD + globalskuid: A300-TB6489 + customerprice: 0 + partdescription1: H1180HD DLP 3D PROJ 2000L 1080PPROJ + partdescription2: 10000:1 VGA HDMI RCA + vendornumber: Q680 + vendorname: VIVITEK + cpucode: DLP-PR + class: X + skustatus: ACTIVE + mediacpu: PROJ DLP-PR + categorysubcategory: 04 25 + retailprice: 899 + newmedia: PROJ + enduserrequired: "Y" + backorderflag: "Y" + skuauthorized: "Y" + warehousedetails: + - warehouseid: "30" + warehousedescription: "Millington, TN" + availablequantity: 0 + onorderquantity: 0 + onholdquantity: 0 + - warehouseid: "49" + warehousedescription: Electronic Download + availablequantity: 0 + onorderquantity: 0 + onholdquantity: 0 + - warehouseid: "80" + warehousedescription: "Jonestown, PA" + availablequantity: 690 + onorderquantity: 0 + onholdquantity: 0 + - warehouseid: "40" + warehousedescription: "Carol Stream, IL" + availablequantity: 0 + onorderquantity: 0 + onholdquantity: 0 + - warehouseid: "10" + warehousedescription: "Mira Loma, CA" + availablequantity: 781 + onorderquantity: 2 + onholdquantity: 0 + etadate: 2028-07-06 + - warehouseid: "20" + warehousedescription: "Carrolton, TX" + availablequantity: 256 + onorderquantity: 0 + onholdquantity: 0 + - itemstatus: SUCCESS + statusmessage: 3000-SKU not found/replic + ingrampartnumber: 1AQ821 + vendorpartnumber: NP940X3M-K03US + globalskuid: A300-1AQ821 + customerprice: 0 + partdescription1: NOTEBOOK 9 PRO I5-7200U 2.5G SYST + partdescription2: 128GB SSD 13IN TITAN SILVER Z + vendornumber: QG86 + vendorname: SAMSUNG + cpucode: NOTEBK + class: E + skustatus: ACTIVE + mediacpu: SYST NOTEBK + categorysubcategory: 00 46 + retailprice: 949.99 + newmedia: SYST + backorderflag: "N" + skuauthorized: "N" + extendedvendorpartnumber: NP940X3M-K03US + warehousedetails: + - warehouseid: "30" + warehousedescription: "Millington, TN" + availablequantity: 0 + onorderquantity: 0 + onholdquantity: 0 + - warehouseid: "80" + warehousedescription: "Jonestown, PA" + availablequantity: 0 + onorderquantity: 0 + onholdquantity: 0 + - warehouseid: "40" + warehousedescription: "Carol Stream, IL" + availablequantity: 0 + onorderquantity: 0 + onholdquantity: 1 + - warehouseid: "17" + warehousedescription: "Miami, FL" + availablequantity: 0 + onorderquantity: 0 + onholdquantity: 0 + - warehouseid: "10" + warehousedescription: "Mira Loma, CA" + availablequantity: 0 + onorderquantity: 0 + onholdquantity: 0 + - warehouseid: "20" + warehousedescription: "Carrolton, TX" + availablequantity: 0 + onorderquantity: 0 + onholdquantity: 0 + schema: + $ref: '#/components/schemas/priceAndAvailabilityResponse' + description: Success + security: + - application: + - read + summary: Find availability of upto 50 SKUs + tags: + - Product Catalog v5 + x-content-type: application/json + x-accepts: application/json + /resellers/v5/Catalog: + get: + description: "Search the Ingram Micro product catalog using customerNumber,\ + \ isoCountryCode and partNumber." + operationId: get-v5-catalog-productsearch + parameters: + - description: Your unique Ingram Micro customer number + explode: true + in: query + name: customerNumber + required: true + schema: + default: 20-222222 + type: string + style: form + - description: 2 chars country code + explode: true + in: query + name: isoCountryCode + required: true + schema: + default: US + maxLength: 2 + minLength: 2 + type: string + style: form + - description: Part Number can be ingram part number or vendor part number or + customer part number or UPC + explode: true + in: query + name: partNumber + required: true + schema: + default: 1AQ821 + type: string + style: form + responses: + "200": + content: + application/json: + examples: + Using Ingram part number: + value: + serviceresponse: + responsepreamble: + requeststatus: SUCCESS + returncode: "200" + returnmessage: Data Available + productsearchresponse: + - responseflag: "1" + partnumbers: + - ingrampartnumber: 3AR598 + manufacturerpartnumber: NP940X5N-X01US + upccode: "0887276244266" + productdescription: NOTEBOOK 9 PRO 15IN 2018 I7-8550U 256GB + SSD + currency: USD + haswarranty: "false" + schema: + $ref: '#/components/schemas/productSearchResponse' + description: OK + security: + - application: + - read + summary: Search Product Catalog + tags: + - Product Catalog v5 + x-accepts: application/json + /resellers/v5/quote/search: + post: + description: |- + This endpoint enables the retrieval and filtering of relevant quote list key criteria data, such as quote number, special bid numbers, end user name, status, and date ranges from the Ingram Micro system. By default, the Quotes endpoint retrieves quotes modified or created within the last 30 days. + + Observe these additional parameters: + operationId: post-v5-quotes-search + requestBody: + content: + application/json: + examples: + Example: + value: + quoteSearchRequest: + requestPreamble: + customerNumber: 20-222222 + customerContact: customer@im.com + isoCountryCode: US + retrieveQuoteRequest: + fromDate: 2019-08-01 + toDate: 2019-11-01 + pageIndex: 1 + recordsPerPage: 5 + sorting: desc + sortingColumnName: createdon + thirdPartySource: 3RDPIDCONWISE + schema: + $ref: '#/components/schemas/quoteListRequest' + responses: + "200": + content: + application/json: + examples: + Success: + value: + serviceresponse: + responsepreamble: + responsestatus: SUCCESS + orderdetailresponse: + ordernumber: 10-12345 + customerordernumber: test order + enduserponumber: ABC + orderstatus: INVOICED + entrytimestamp: 2018-07-15T04:31:42-07:00 + entrymethoddescription: XML/PCG + fulfilmentordercode: "Y" + ordertotalvalue: 3907.38 + ordersubtotal: 3907.38 + freightamount: 141.34 + currencycode: USD + totalweight: "86" + totaltax: "0" + billtoaddress: + suffix: "000" + name: Ingram Micro + addressline1: 123 Ingram Way + addressline2: null + addressline3: null + city: Irvine + state: CA + postalcode: "12345000" + countrycode: US + shiptoaddress: + name: Mr Customer + addressline1: 123 Main St + city: Anywhere + state: CA + postalcode: "12345000" + countrycode: US + lines: + - globallinenumber: "001" + ordersuffix: "11" + linestatus: INVOICED + partnumber: 3AM612 + manufacturerpartnumber: QN75Q8FNBFXZA + vendorname: SAMSUNG - CONSUMER TV + partdescription1: 75IN Q8 FLAT 4K UHD HDR SMARTTV + partdescription2: FULL ARRAY BACKLIGHTIN CLEAN CABLE + freeitempromoflag: "false" + unitweight: "75" + unitprice: 50000.48 + foreignunitprice: 0 + extendedprice: 5000.48 + foreignextendedprice: 0 + taxamount: 0 + requestedquantity: "1" + confirmedquantity: "1" + backorderquantity: "0" + promisedate: 2018-07-15 + shipmentdetails: + - quantity: 1 + shipmentdate: 2018-07-16 + shipfromwarehouseid: "40" + warehousename: "Carol Stream, IL" + invoicenumber: "1234511" + invoicedate: 2018-07-16 + status: I + statusdescription: INVOICED + shippeddate: 2018-07-16 + carriercode: AY + carriername: ORD4708752 + packagedetails: + trackingnumber: 6838019 + packageweight: 80 + cartonnumber: "001" + quantityinbox: "0000001" + erpordernumber: 10-12345-11 + vendorcode: Q012 + isacopapplied: "N" + adjustedcost: "5000.09" + serialnumberdetails: + serialnumber: 07AS3CAK500682 + productextendedspecs: + attributename: commenttext + attributevalue: FULL ARRAY BACKLIGHTIN CLEAN CABLE + - globallinenumber: "002" + ordersuffix: "21" + linestatus: INVOICED + partnumber: 2GH590 + manufacturerpartnumber: F-ADT-STR-KT-1 + vendorname: SAMSUNG - SMART THINGS + partdescription1: ADT HOME SECURITY STARTER KIT + partdescription2: SECURITY STARTER KIT + freeitempromoflag: "false" + unitweight: "5.15" + unitprice: 500.9 + foreignunitprice: 0 + extendedprice: 500.9 + foreignextendedprice: 0 + taxamount: 0 + requestedquantity: "1" + confirmedquantity: "1" + backorderquantity: "0" + promisedate: 2018-07-15 + shipmentdetails: + - quantity: 1 + shipmentdate: 2018-07-17 + shipfromwarehouseid: "80" + warehousename: "Jonestown, PA" + invoicenumber: "1234521" + invoicedate: 2018-07-16 + status: I + statusdescription: INVOICED + shippeddate: 2018-07-17 + carriercode: RG + carriername: FEDEX GROUND + packagedetails: + trackingnumber: "017136225260674" + packageweight: "000000006" + cartonnumber: "001" + quantityinbox: "0000001" + erpordernumber: 10-12345-21 + vendorcode: QG64 + isacopapplied: "N" + adjustedcost: "400.99" + productextendedspecs: + attributename: commenttext + attributevalue: SECURITY STARTER KIT + extendedspecs: + - attributename: termscode + attributevalue: "300" + - attributename: termsdescription + attributevalue: NET 30 DAYS + - attributename: commenttext + attributevalue: PHONE:7148675309 + - attributename: commenttext + attributevalue: PHONE:7148675309 + ordertype: S + erpid: null + Customer not found: + value: + quoteSearchResponse: + responsePreamble: + responseStatus: Failed + responseStatusCode: "400" + responseMessage: Customer Not Found + totalCount: 0 + Invalid sort column: + value: + quoteSearchResponse: + responsePreamble: + responseStatus: Failed + responseStatusCode: "400" + responseMessage: Provide valid sort column name + totalCount: 0 + schema: + $ref: '#/components/schemas/quoteListResponse' + description: OK + security: + - application: + - read + summary: Search Quotes + tags: + - Quotes v5 + x-content-type: application/json + x-accepts: application/json + /resellers/v5/quote/{quoteNumber}: + get: + description: |- + The quote details API provides all quote details associated with the quote number provided. + + The “quoteNumber”, “isoCountryCode” and “customerNumber” parameters are required. + operationId: get-v5-quotes-details + parameters: + - description: Ingram Micro Quote Number + explode: false + in: path + name: quoteNumber + required: true + schema: + default: QUO-25576-C8S2W7 + type: string + style: simple + - description: Your Ingram Micro unique customer number + explode: true + in: query + name: customerNumber + required: true + schema: + default: 20-222222 + type: string + style: form + - description: "" + explode: true + in: query + name: isoCountryCode + required: true + schema: + default: US + maxLength: 2 + minLength: 2 + type: string + style: form + - description: Unique identifier used to identify the third party source accessing + the services + explode: true + in: query + name: thirdPartySource + required: false + schema: + default: customer + type: string + style: form + responses: + "200": + content: + application/json: + examples: + Example: + value: + quoteDetailResponse: + responsePreamble: + responseStatus: Passed + statusCode: 200 + responseMessage: Records Found + retrieveQuoteResponse: + quoteGuid: bfce8c7f-de74-ea11-a811-000d3a32deaa + quoteName: USName53 + quoteNumber: QUO-25576-C8S2W7 + quoteExpiryDate: 2020-08-13 + revisionNumber: "0" + introPreamble: "Thank you for contacting Ingram Micro. We\ + \ value your business greatly and will continue to deliver\ + \ the services you need to retain it. This quote is not\ + \ intended to represent the entire conversation; only what\ + \ was relevant to the solution you requested. We make every\ + \ effort to provide a complete and correct solution. However,\ + \ the accuracy of the solution provided is dependent on\ + \ the information gathered. If relevant information is not\ + \ provided by our customer, Ingram Micro cannot be held\ + \ responsible. We urge you to review this quote fully, to\ + \ ensure it reflects all of your required specifications.\ + \ If you have additional questions, please contact your\ + \ designated Ingram Micro contact. Remember to reference\ + \ your Quote Number.Call reference To ensure fastest\ + \ and most accurate processing of your order, please provide\ + \ the quote at the time of purchase" + purchaseInstructions: "For specific pricing and to order the\ + \ above products, you may : Some product may be orderable\ + \ on Imonline at http://us-new.ingrammicro.com : Call the\ + \ Ingram Micro Sales department at 1.800.456.8000; Your\ + \ PO number;End User; Your fax number; Shipping instructions;\ + \ End user PO number; End user license, contract or authorization\ + \ number Thank you for your order!" + legalTerms: This offer to sell the listed product(s) is subject + to product availability and Ingram Micro's standard terms + and conditions that are published on http://www.ingrammicro.com + prices are subject to change without notice. Please contact + the Ingram Micro Sales desk at 1.800.456.8000 if you have + any additional questions. + accountInfo: + accountName: INGRAM MICRO CAPS TEST ACCOUNT + bcn: "20222222" + phone: "7166333600" + contactInfo: + contactName: test9 user9 + contactEmail: null + currencyCode: USD + priceDeviationId: null + customerNeed: null + solutionProposed: null + status: Active + created: 2020-04-02 + modified: 2020-04-02 + vendorAttributes: + estimateId: FT93031874YX + dealId: "41168951" + vendorName: CISCO - HW SWITCHES DT + vendorSettingMessage: null + endUser: + endUserName: WAKE FOREST UNIVERSITY + endUserAddress: 391 TECHNOLOGY WAY + endUserAddress2: null + endUserAddress3: null + endUserCity: WINSTON SALEM + endUserState: NC + endUserEmail: null + endUserPhone: null + endUserZipCode: "27101" + endUserContactName: null + endUserMarketSegment: null + leasingCalculations: Lease Rate 2000 + leasingInstructions: "Win more opportunities by offering\ + \ your customers flexible financing solutions with Ingram\ + \ Micro Financial Solutions.###############Lease pricing is intended to be a good faith\ + \ estimate and is being used for marketing purposes only.\ + \ The actual rate and payment amount may vary, and is subject\ + \ to credit approval in addition to any terms and conditions\ + \ that may be required." + quoteProductList: + - quoteProductGuid: cfce8c7f-de74-ea11-a811-000d3a32deaa + quantity: "1.0" + comments: null + sku: 9Y6780 + lineNumber: "1.0" + price: + quotePrice: "1401.85" + msrp: "2645.00" + extendedMsrp: "2645.00" + extendedQuotePrice: "1401.85" + description: "Catalyst 9300 8 x 10GE Network Module, spare" + vendorPartNumber: C9300-NM-8X= + weight: "1.35" + isSuggestionProduct: "false" + vpnCategory: hwsw + quoteProductsSupplierPartAuxiliaryId: 69479607572;0;; + quoteProductsVendor: CISCO - HW SWITCHES DT + totalQuoteProductCount: "1" + totalExtendedMsrp: "2645.00" + totalQuantity: 1 + totalExtendedQuotePrice: "1401.85" + schema: + $ref: '#/components/schemas/quoteDetails' + description: OK + security: + - application: + - read + summary: Get Quote Details + tags: + - Quotes v5 + x-accepts: application/json + /products/v4/multiskupriceandstock: + post: + description: |- + Find price and availability of up to 50 SKUs in a single request. As you increase the number of items in the request response time will be extended. This transaction must not be used as a continuous cyclical call to populate availability and pricing for your full catalog. Customers that perform this activity will lose access to price and availability. + + Ingram can provide a Price catalog file and an Inventory file in flat file format, which can be obtained through FTP download. Please contact 1800-616-4665 or Electronic.Services@ingrammicro.com for more information on these files. + operationId: post-v4-multiskupriceandstock + parameters: [] + requestBody: + content: + application/json: + examples: + Ingram Part Number: + value: "{ \n \"servicerequest\":{\n \"requestpreamble\"\ + :{ \n \"customernumber\":\"20-222222\",\n \"isocountrycode\"\ + :\"US\"\n },\n \"priceandstockrequest\":{ \n \ + \ \"showwarehouseavailability\":\"True\",\n \"extravailabilityflag\"\ + :\"Y\",\n \"item\":[ \n {\"ingrampartnumber\"\ + :\"TB6489\",\"quantity\":1}\n ],\n \"includeallsystems\"\ + :false\n }\n }\n}" + schema: + $ref: '#/components/schemas/multiSKUPriceAndStockRequest' + responses: + "200": + content: + application/json: + examples: {} + schema: + $ref: '#/components/schemas/multiSKUPriceAndStockResponse' + description: Success + security: + - application: + - read + summary: Product availability for upto 50 SKUs + tags: + - Product Catalog v4 + x-content-type: application/json + x-accepts: application/json + /products/v4/productsearch: + post: + description: 'A real time search that provides the Ingram Micro part number + using the manufacturer part number. This API is helpful to eliminate any + errors when a manufactuer has the same part number and Ingram Micro has had + to create multiple sku numbers ' + operationId: post-v4-productsearch + parameters: [] + requestBody: + content: + application/json: + examples: + Ingram Part Number: + value: + servicerequest: + requestpreamble: + customernumber: 20-222222 + isocountrycode: US + productsearchrequest: + searchcriteria: + ingrampartnumber: TSXML3 + schema: + $ref: '#/components/schemas/productSearchRequest' + responses: + "200": + content: + application/json: + examples: + SKU found: + value: + serviceresponse: + responsepreamble: + requeststatus: SUCCESS + returnmessage: Details Found + productsearchresponse: + - partnumbers: + - ingrampartnumber: TSXML3 + manufacturerpartnumber: TESTXMLSKU3 + SKU Not Found: + value: + serviceresponse: + responsepreamble: + requeststatus: FAILED + returnmessage: PART-NOT-FOUND + schema: + $ref: '#/components/schemas/productSearchResponse' + description: Success + security: + - application: + - read + summary: Real-time Product Search + tags: + - Product Catalog v4 + x-content-type: application/json + x-accepts: application/json + /invoices/v4/invoicedetails: + post: + description: A real-time request that allows the customer to query Ingram Micro + for Invoice information for a specific open or shipped order (in the past + 9 months). Orders are searched using Ingram Micro Sales Order Number. + operationId: post-v4-invoicedetails + requestBody: + content: + application/json: + examples: + Test: + value: + servicerequest: + requestpreamble: + isocountrycode: US + customernumber: 20-222222 + invoicedetailrequest: + invoicenumber: 30-13649-13 + customerponumber: DH-200732 + schema: + $ref: '#/components/schemas/invoiceDetailRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/invoiceDetailResponse' + description: OK + security: + - application: + - read + summary: Get Invoice Details + tags: + - Invoices v4 + x-content-type: application/json + x-accepts: application/json + /orders/v4/ordermodify: + post: + description: | + The order modify transaction allows for changes to be made after the order creation process but before the order is released to Ingram Micro’s warehouse system. Order modify transaction submitted after the order is released will be rejected and will not be applied. + + Types of modifications allowable: Order release, add comment, and carrier change. + NOTE - Direct Ship orders cannot be modified. + operationId: post-v4-ordermodify + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/orderModifyRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/orderModifyResponse' + description: OK + security: + - application: + - read + - write + summary: Modify an Existing Order + tags: + - Orders v4 + x-content-type: application/json + x-accepts: application/json + /orders/v4/orderlookup: + post: + description: Search your orders using various search parameters + operationId: post-v4-ordersearch + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/orderSearchRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/orderSearchResponse' + description: OK + security: + - application: + - read + summary: Order Search + tags: + - Orders v4 + x-content-type: application/json + x-accepts: application/json + /orders/v4/orderdetails: + post: + description: A real-time request that allows the customer to query Ingram Micro + for detailed information for a specific open or shipped order. Orders are + searched using Ingram Micro Sales Order Number. + operationId: post-v4-orderdetails + requestBody: + content: + application/json: + examples: + Sample: + value: + servicerequest: + requestpreamble: + isocountrycode: US + customernumber: 20-222222 + orderdetailrequest: + ordernumber: 20-B2V9H + schema: + $ref: '#/components/schemas/orderDetailRequest' + responses: + "200": + content: + application/json: + examples: + Sample: + value: + serviceresponse: + responsepreamble: + responsestatus: SUCCESS + orderdetailresponse: + ordernumber: 10-12345 + customerordernumber: test order + enduserponumber: ABC + orderstatus: INVOICED + entrytimestamp: 2018-07-15T04:31:42-07:00 + entrymethoddescription: XML/PCG + fulfilmentordercode: "Y" + ordertotalvalue: 3907.38 + ordersubtotal: 3907.38 + freightamount: 141.34 + currencycode: USD + totalweight: "86" + totaltax: "0" + billtoaddress: + suffix: "000" + name: Ingram Micro + addressline1: 123 Ingram Way + addressline2: null + addressline3: null + city: Irvine + state: CA + postalcode: "12345000" + countrycode: US + shiptoaddress: + name: Mr Customer + addressline1: 123 Main St + city: Anywhere + state: CA + postalcode: "12345000" + countrycode: US + lines: + - globallinenumber: "001" + ordersuffix: "11" + linestatus: INVOICED + partnumber: 3AM612 + manufacturerpartnumber: QN75Q8FNBFXZA + vendorname: SAMSUNG - CONSUMER TV + partdescription1: 75IN Q8 FLAT 4K UHD HDR SMARTTV + partdescription2: FULL ARRAY BACKLIGHTIN CLEAN CABLE + freeitempromoflag: "false" + unitweight: "75" + unitprice: 50000.48 + foreignunitprice: 0 + extendedprice: 5000.48 + foreignextendedprice: 0 + taxamount: 0 + requestedquantity: "1" + confirmedquantity: "1" + backorderquantity: "0" + promisedate: 2018-07-15 + shipmentdetails: + - quantity: 1 + shipmentdate: 2018-07-16 + shipfromwarehouseid: "40" + warehousename: "Carol Stream, IL" + invoicenumber: "1234511" + invoicedate: 2018-07-16 + status: I + statusdescription: INVOICED + shippeddate: 2018-07-16 + carriercode: AY + carriername: ORD4708752 + packagedetails: + trackingnumber: 6838019 + packageweight: 80 + cartonnumber: "001" + quantityinbox: "0000001" + erpordernumber: 10-12345-11 + vendorcode: Q012 + isacopapplied: "N" + adjustedcost: "5000.09" + serialnumberdetails: + serialnumber: 07AS3CAK500682 + productextendedspecs: + attributename: commenttext + attributevalue: FULL ARRAY BACKLIGHTIN CLEAN CABLE + - globallinenumber: "002" + ordersuffix: "21" + linestatus: INVOICED + partnumber: 2GH590 + manufacturerpartnumber: F-ADT-STR-KT-1 + vendorname: SAMSUNG - SMART THINGS + partdescription1: ADT HOME SECURITY STARTER KIT + partdescription2: SECURITY STARTER KIT + freeitempromoflag: "false" + unitweight: "5.15" + unitprice: 500.9 + foreignunitprice: 0 + extendedprice: 500.9 + foreignextendedprice: 0 + taxamount: 0 + requestedquantity: "1" + confirmedquantity: "1" + backorderquantity: "0" + promisedate: 2018-07-15 + shipmentdetails: + - quantity: 1 + shipmentdate: 2018-07-17 + shipfromwarehouseid: "80" + warehousename: "Jonestown, PA" + invoicenumber: "1234521" + invoicedate: 2018-07-16 + status: I + statusdescription: INVOICED + shippeddate: 2018-07-17 + carriercode: RG + carriername: FEDEX GROUND + packagedetails: + trackingnumber: "017136225260674" + packageweight: "000000006" + cartonnumber: "001" + quantityinbox: "0000001" + erpordernumber: 10-12345-21 + vendorcode: QG64 + isacopapplied: "N" + adjustedcost: "400.99" + productextendedspecs: + attributename: commenttext + attributevalue: SECURITY STARTER KIT + extendedspecs: + - attributename: termscode + attributevalue: "300" + - attributename: termsdescription + attributevalue: NET 30 DAYS + - attributename: commenttext + attributevalue: PHONE:7148675309 + - attributename: commenttext + attributevalue: PHONE:7148675309 + ordertype: S + erpid: null + schema: + $ref: '#/components/schemas/orderDetailResponse' + description: OK + security: + - application: + - read + summary: Get Order Details + tags: + - Orders v4 + x-content-type: application/json + x-accepts: application/json + /orders/v4/orderdelete: + post: + description: A real-time request to delete a previously accepted order must + be submitted before the order is released to Ingram Micro’s warehouse. After + release the order is no longer eligible for deletion. Order delete transaction + submitted after the order is released will be rejected and will not be applied. + *Direct ship orders cannot be deleted. Contact your sales rep for assistance. + operationId: post-v4-orderdelete + requestBody: + content: + application/json: + examples: + Example: + value: + servicerequest: + requestpreamble: + isocountrycode: US + customerumber: 20-222222 + OrderDeleteRequestDetails: + entryDate: 2019-01-22 + orderBranch: "20" + orderNumber: RC62Z + schema: + $ref: '#/components/schemas/orderDeleteRequest' + responses: + "200": + content: + application/json: + examples: + Example: + value: + serviceresponse: + responsepreamble: + requestStatus: SUCCESS + returnCode: "00" + returnMessage: Order Deleted Successfully + schema: + $ref: '#/components/schemas/orderDeleteResponse' + description: OK + security: + - application: + - write + summary: Delete an Order + tags: + - Orders v4 + x-content-type: application/json + x-accepts: application/json + /orders/v4/ordercreate: + post: + description: The order create transaction is a real-time transaction that allows + customers to place standard product and direct ship (licensing and warranties) + orders with Ingram Micro using API. + operationId: post-v4-ordercreate + requestBody: + content: + application/json: + examples: + With Ingram Part Number: + value: + ordercreaterequest: + requestpreamble: + isocountrycode: US + customernumber: 20-222222 + ordercreatedetails: + systemid: "" + customerponumber: TESTAPI10156 + billtosuffix: "000" + shiptoaddress: + attention: HARRY WELLS + addressline1: THE COMPUTER STORE + addressline2: 754 LAS PALMAS DR + city: IRVINE + state: CA + postalcode: "926022004" + countrycode: US + lines: + - linetype: P + linenumber: "001" + globalskuid: "" + quantity: "1" + ingrampartnumber: NE7872 + extendedspecs: + - attributename: entrymethod + attributevalue: WEBS + schema: + $ref: '#/components/schemas/orderCreateRequest' + responses: + "200": + content: + application/json: + examples: + Sample: + value: + serviceresponse: + responsepreamble: + responsestatus: SUCCESS + ordercreateresponse: + numberoflineswithsuccess: "1" + numberoflineswitherror: "0" + numberoflineswithwarning: "0" + globalorderid: 20-RBRN9 + customerponumber: H3E + ordertype: S + ordertimestamp: 2018-07-18 + invoicingsystemorderid: 20-RBRN9 + taxamount: 0 + freightamount: 0 + totalorderamount: 0 + shiptoaddress: + attention: null + name: null + addressline1: null + addressline2: null + addressline3: null + addressline4: null + city: null + state: null + postalcode: null + countrycode: null + lines: + - linetype: P + globallinenumber: "002" + partnumber: 4K9938 + globalskuid: A300-4K9938 + freeitempromoflag: "false" + linenumber: "4" + carriercode: WC + carrierdescription: WILL CALL + requestedunitprice: 647.6 + requestedquantity: 1 + confirmedquantity: 0 + backorderedquantity: 1 + backorderetadate: 2018-05-15 + unitproductprice: 647.6 + netamount: 0 + warehouseid: "40" + ordersuffix: "11" + isacopapplied: "Y" + schema: + $ref: '#/components/schemas/orderCreateResponse' + description: OK + security: + - application: + - write + summary: Create a new Order + tags: + - Orders v4 + x-content-type: application/json + x-accepts: application/json + /quotes/v1/quotedetails: + post: + description: A real-time request to delete a previously accepted order must + be submitted before the order is released to Ingram Micro’s warehouse. After + release the order is no longer eligible for deletion. Order delete transaction + submitted after the order is released will be rejected and will not be applied. + *Direct ship orders cannot be deleted. Contact your sales rep for assistance. + operationId: post-v4-quotedetails + requestBody: + content: + application/json: + examples: + Example: + value: + servicerequest: + requestpreamble: + isocountrycode: US + customerumber: 20-222222 + OrderDeleteRequestDetails: + entryDate: 2019-01-22 + orderBranch: "20" + orderNumber: RC62Z + schema: + $ref: '#/components/schemas/quoteDetailsRequest' + responses: + "200": + content: + application/json: + examples: + Example: + value: + quoteDetailResponse: + responsePreamble: + responseStatus: Passed + statusCode: 200 + responseMessage: Records Found + retrieveQuoteResponse: + quoteGuid: bfce8c7f-de74-ea11-a811-000d3a32deaa + quoteName: USName53 + quoteNumber: QUO-25576-C8S2W7 + quoteExpiryDate: 2020-08-13 + revisionNumber: "0" + introPreamble: "Thank you for contacting Ingram Micro. We\ + \ value your business greatly and will continue to deliver\ + \ the services you need to retain it. This quote is not\ + \ intended to represent the entire conversation; only what\ + \ was relevant to the solution you requested. We make every\ + \ effort to provide a complete and correct solution. However,\ + \ the accuracy of the solution provided is dependent on\ + \ the information gathered. If relevant information is not\ + \ provided by our customer, Ingram Micro cannot be held\ + \ responsible. We urge you to review this quote fully, to\ + \ ensure it reflects all of your required specifications.\ + \ If you have additional questions, please contact your\ + \ designated Ingram Micro contact. Remember to reference\ + \ your Quote Number.Call reference To ensure fastest\ + \ and most accurate processing of your order, please provide\ + \ the quote at the time of purchase" + purchaseInstructions: "For specific pricing and to order the\ + \ above products, you may : Some product may be orderable\ + \ on Imonline at http://us-new.ingrammicro.com : Call the\ + \ Ingram Micro Sales department at 1.800.456.8000; Your\ + \ PO number;End User; Your fax number; Shipping instructions;\ + \ End user PO number; End user license, contract or authorization\ + \ number Thank you for your order!" + legalTerms: This offer to sell the listed product(s) is subject + to product availability and Ingram Micro's standard terms + and conditions that are published on http://www.ingrammicro.com + prices are subject to change without notice. Please contact + the Ingram Micro Sales desk at 1.800.456.8000 if you have + any additional questions. + accountInfo: + accountName: INGRAM MICRO CAPS TEST ACCOUNT + bcn: "20222222" + phone: "7166333600" + contactInfo: + contactName: test9 user9 + contactEmail: null + currencyCode: USD + priceDeviationId: null + customerNeed: null + solutionProposed: null + status: Active + created: 2020-04-02 + modified: 2020-04-02 + vendorAttributes: + estimateId: FT93031874YX + dealId: "41168951" + vendorName: CISCO - HW SWITCHES DT + vendorSettingMessage: null + endUser: + endUserName: WAKE FOREST UNIVERSITY + endUserAddress: 391 TECHNOLOGY WAY + endUserAddress2: null + endUserAddress3: null + endUserCity: WINSTON SALEM + endUserState: NC + endUserEmail: null + endUserPhone: null + endUserZipCode: "27101" + endUserContactName: null + endUserMarketSegment: null + leasingCalculations: Lease Rate 2000 + leasingInstructions: "Win more opportunities by offering\ + \ your customers flexible financing solutions with Ingram\ + \ Micro Financial Solutions.###############Lease pricing is intended to be a good faith\ + \ estimate and is being used for marketing purposes only.\ + \ The actual rate and payment amount may vary, and is subject\ + \ to credit approval in addition to any terms and conditions\ + \ that may be required." + quoteProductList: + - quoteProductGuid: cfce8c7f-de74-ea11-a811-000d3a32deaa + quantity: "1.0" + comments: null + sku: 9Y6780 + lineNumber: "1.0" + price: + quotePrice: "1401.85" + msrp: "2645.00" + extendedMsrp: "2645.00" + extendedQuotePrice: "1401.85" + description: "Catalyst 9300 8 x 10GE Network Module, spare" + vendorPartNumber: C9300-NM-8X= + weight: "1.35" + isSuggestionProduct: "false" + vpnCategory: hwsw + quoteProductsSupplierPartAuxiliaryId: 69479607572;0;; + quoteProductsVendor: CISCO - HW SWITCHES DT + totalQuoteProductCount: "1" + totalExtendedMsrp: "2645.00" + totalQuantity: 1 + totalExtendedQuotePrice: "1401.85" + schema: + $ref: '#/components/schemas/quoteDetailsResponse' + description: OK + security: + - application: + - write + summary: Get Quote Details + tags: + - Quotes v4 + x-content-type: application/json + x-accepts: application/json + /quotes/v1/quotes: + post: + description: A real-time request that allows the customer to query Ingram Micro + for detailed information for a specific open or shipped order. Orders are + searched using Ingram Micro Sales Order Number. + operationId: post-v4-quotesearch + requestBody: + content: + application/json: + examples: + Sample: + value: + servicerequest: + requestpreamble: + isocountrycode: US + customernumber: 20-222222 + orderdetailrequest: + ordernumber: 20-B2V9H + schema: + $ref: '#/components/schemas/quoteListRequest' + responses: + "200": + content: + application/json: + examples: + Sample: + value: + serviceresponse: + responsepreamble: + responsestatus: SUCCESS + orderdetailresponse: + ordernumber: 10-12345 + customerordernumber: test order + enduserponumber: ABC + orderstatus: INVOICED + entrytimestamp: 2018-07-15T04:31:42-07:00 + entrymethoddescription: XML/PCG + fulfilmentordercode: "Y" + ordertotalvalue: 3907.38 + ordersubtotal: 3907.38 + freightamount: 141.34 + currencycode: USD + totalweight: "86" + totaltax: "0" + billtoaddress: + suffix: "000" + name: Ingram Micro + addressline1: 123 Ingram Way + addressline2: null + addressline3: null + city: Irvine + state: CA + postalcode: "12345000" + countrycode: US + shiptoaddress: + name: Mr Customer + addressline1: 123 Main St + city: Anywhere + state: CA + postalcode: "12345000" + countrycode: US + lines: + - globallinenumber: "001" + ordersuffix: "11" + linestatus: INVOICED + partnumber: 3AM612 + manufacturerpartnumber: QN75Q8FNBFXZA + vendorname: SAMSUNG - CONSUMER TV + partdescription1: 75IN Q8 FLAT 4K UHD HDR SMARTTV + partdescription2: FULL ARRAY BACKLIGHTIN CLEAN CABLE + freeitempromoflag: "false" + unitweight: "75" + unitprice: 50000.48 + foreignunitprice: 0 + extendedprice: 5000.48 + foreignextendedprice: 0 + taxamount: 0 + requestedquantity: "1" + confirmedquantity: "1" + backorderquantity: "0" + promisedate: 2018-07-15 + shipmentdetails: + - quantity: 1 + shipmentdate: 2018-07-16 + shipfromwarehouseid: "40" + warehousename: "Carol Stream, IL" + invoicenumber: "1234511" + invoicedate: 2018-07-16 + status: I + statusdescription: INVOICED + shippeddate: 2018-07-16 + carriercode: AY + carriername: ORD4708752 + packagedetails: + trackingnumber: 6838019 + packageweight: 80 + cartonnumber: "001" + quantityinbox: "0000001" + erpordernumber: 10-12345-11 + vendorcode: Q012 + isacopapplied: "N" + adjustedcost: "5000.09" + serialnumberdetails: + serialnumber: 07AS3CAK500682 + productextendedspecs: + attributename: commenttext + attributevalue: FULL ARRAY BACKLIGHTIN CLEAN CABLE + - globallinenumber: "002" + ordersuffix: "21" + linestatus: INVOICED + partnumber: 2GH590 + manufacturerpartnumber: F-ADT-STR-KT-1 + vendorname: SAMSUNG - SMART THINGS + partdescription1: ADT HOME SECURITY STARTER KIT + partdescription2: SECURITY STARTER KIT + freeitempromoflag: "false" + unitweight: "5.15" + unitprice: 500.9 + foreignunitprice: 0 + extendedprice: 500.9 + foreignextendedprice: 0 + taxamount: 0 + requestedquantity: "1" + confirmedquantity: "1" + backorderquantity: "0" + promisedate: 2018-07-15 + shipmentdetails: + - quantity: 1 + shipmentdate: 2018-07-17 + shipfromwarehouseid: "80" + warehousename: "Jonestown, PA" + invoicenumber: "1234521" + invoicedate: 2018-07-16 + status: I + statusdescription: INVOICED + shippeddate: 2018-07-17 + carriercode: RG + carriername: FEDEX GROUND + packagedetails: + trackingnumber: "017136225260674" + packageweight: "000000006" + cartonnumber: "001" + quantityinbox: "0000001" + erpordernumber: 10-12345-21 + vendorcode: QG64 + isacopapplied: "N" + adjustedcost: "400.99" + productextendedspecs: + attributename: commenttext + attributevalue: SECURITY STARTER KIT + extendedspecs: + - attributename: termscode + attributevalue: "300" + - attributename: termsdescription + attributevalue: NET 30 DAYS + - attributename: commenttext + attributevalue: PHONE:7148675309 + - attributename: commenttext + attributevalue: PHONE:7148675309 + ordertype: S + erpid: null + schema: + $ref: '#/components/schemas/quoteListResponse' + description: OK + security: + - application: + - read + summary: Get Quote List + tags: + - Quotes v4 + x-content-type: application/json + x-accepts: application/json +components: + schemas: + OrderCreateRequest: + example: + notes: notes + endUserInfo: + endUserId: endUserId + city: city + companyName: companyName + postalCode: postalCode + phoneNumber: 6 + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + name2: name2 + addressLine4: addressLine4 + name1: name1 + email: email + endCustomerOrderNumber: endCustomerOrderNumber + billToAddressId: billToAddressId + customerOrderNumber: customerOrderNumber + vmf: + vendAuthNumber: vendAuthNumber + specialBidNumber: specialBidNumber + shipToInfo: + city: city + companyName: companyName + postalCode: postalCode + addressId: addressId + phoneNumber: phoneNumber + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + name2: name2 + addressLine4: addressLine4 + name1: name1 + email: email + shipmentDetails: + shipComplete: shipComplete + freightAccountNumber: freightAccountNumber + shippingInstructions: shippingInstructions + carrierCode: carrierCode + signatureRequired: true + requestedDeliveryDate: 2000-01-23 + resellerInfo: + resellerId: resellerId + phoneNumber: 0 + city: city + countryCode: countryCode + companyName: companyName + contact: contact + postalCode: postalCode + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + email: email + acceptBackOrder: true + lines: + - ingramPartNumber: ingramPartNumber + unitPrice: 5.962133916683182 + quantity: 1 + specialBidNumber: specialBidNumber + notes: notes + endUserInfo: + - endUserId: endUserId + city: city + companyName: companyName + postalCode: postalCode + phoneNumber: 2.3021358869347655 + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + endUserType: endUserType + name2: name2 + addressLine4: addressLine4 + name1: name1 + email: email + - endUserId: endUserId + city: city + companyName: companyName + postalCode: postalCode + phoneNumber: 2.3021358869347655 + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + endUserType: endUserType + name2: name2 + addressLine4: addressLine4 + name1: name1 + email: email + endUserPrice: 5.637376656633329 + warrantyInfo: + - hardwareLineLink: hardwareLineLink + directLineLink: directLineLink + warrantyLineLink: warrantyLineLink + serialInfo: + - dateofPurchase: 2000-01-23 + primarySerialNumber: primarySerialNumber + secondarySerialNumber: secondarySerialNumber + shipDate: 2000-01-23 + - dateofPurchase: 2000-01-23 + primarySerialNumber: primarySerialNumber + secondarySerialNumber: secondarySerialNumber + shipDate: 2000-01-23 + - hardwareLineLink: hardwareLineLink + directLineLink: directLineLink + warrantyLineLink: warrantyLineLink + serialInfo: + - dateofPurchase: 2000-01-23 + primarySerialNumber: primarySerialNumber + secondarySerialNumber: secondarySerialNumber + shipDate: 2000-01-23 + - dateofPurchase: 2000-01-23 + primarySerialNumber: primarySerialNumber + secondarySerialNumber: secondarySerialNumber + shipDate: 2000-01-23 + customerLineNumber: customerLineNumber + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + - ingramPartNumber: ingramPartNumber + unitPrice: 5.962133916683182 + quantity: 1 + specialBidNumber: specialBidNumber + notes: notes + endUserInfo: + - endUserId: endUserId + city: city + companyName: companyName + postalCode: postalCode + phoneNumber: 2.3021358869347655 + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + endUserType: endUserType + name2: name2 + addressLine4: addressLine4 + name1: name1 + email: email + - endUserId: endUserId + city: city + companyName: companyName + postalCode: postalCode + phoneNumber: 2.3021358869347655 + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + endUserType: endUserType + name2: name2 + addressLine4: addressLine4 + name1: name1 + email: email + endUserPrice: 5.637376656633329 + warrantyInfo: + - hardwareLineLink: hardwareLineLink + directLineLink: directLineLink + warrantyLineLink: warrantyLineLink + serialInfo: + - dateofPurchase: 2000-01-23 + primarySerialNumber: primarySerialNumber + secondarySerialNumber: secondarySerialNumber + shipDate: 2000-01-23 + - dateofPurchase: 2000-01-23 + primarySerialNumber: primarySerialNumber + secondarySerialNumber: secondarySerialNumber + shipDate: 2000-01-23 + - hardwareLineLink: hardwareLineLink + directLineLink: directLineLink + warrantyLineLink: warrantyLineLink + serialInfo: + - dateofPurchase: 2000-01-23 + primarySerialNumber: primarySerialNumber + secondarySerialNumber: secondarySerialNumber + shipDate: 2000-01-23 + - dateofPurchase: 2000-01-23 + primarySerialNumber: primarySerialNumber + secondarySerialNumber: secondarySerialNumber + shipDate: 2000-01-23 + customerLineNumber: customerLineNumber + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + properties: + customerOrderNumber: + description: The reseller's unique PO/Order number. + maxLength: 35 + type: string + endCustomerOrderNumber: + description: The end user/customer's Purchase Order number. + type: string + billToAddressId: + description: Suffix used to identify billing address. Created during onboarding. + Resellers are provided with one or more address IDs depending on how many + bill to addresses they need for various flooring companies they are using + for credit. + maxLength: 10 + type: string + specialBidNumber: + description: The bid number provided to the reseller by the vendor for special + pricing and discounts. Line-level bid numbers take precedence over header-level + bid numbers. + type: string + notes: + description: Order level notes. + type: string + acceptBackOrder: + description: "ENUM [\"true\",\"false\"] - accept order if this item is backordered.\ + \ This field along with shipComplete field decides the value of backorderflag.\ + \ The value of this field is ignored when shipComplete field is present." + type: boolean + resellerInfo: + $ref: '#/components/schemas/OrderCreateRequest_resellerInfo' + vmf: + $ref: '#/components/schemas/OrderCreateRequest_vmf' + shipToInfo: + $ref: '#/components/schemas/OrderCreateRequest_shipToInfo' + endUserInfo: + $ref: '#/components/schemas/OrderCreateRequest_endUserInfo' + lines: + description: The line-level details of the order. + items: + $ref: '#/components/schemas/OrderCreateRequest_lines_inner' + type: array + shipmentDetails: + $ref: '#/components/schemas/OrderCreateRequest_shipmentDetails' + additionalAttributes: + description: Shipment-level additional attributes. + items: + $ref: '#/components/schemas/OrderCreateRequest_additionalAttributes_inner' + type: array + required: + - customerOrderNumber + type: object + OrderCreateResponse: + example: + purchaseOrderTotal: 0.8008281904610115 + specialBidNumber: specialBidNumber + shipToInfo: + city: city + companyName: companyName + postalCode: postalCode + addressId: addressId + phoneNumber: phoneNumber + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + name2: name2 + addressLine4: addressLine4 + name1: name1 + email: email + endUserInfo: + endUserId: endUserId + city: city + companyName: companyName + postalCode: postalCode + phoneNumber: phoneNumber + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + name2: name2 + addressLine4: addressLine4 + name1: name1 + email: email + endCustomerOrderNumber: endCustomerOrderNumber + orderSplit: true + processedPartially: true + billToAddressId: billToAddressId + orders: + - orderType: orderType + rejectedLineItems: + - ingramPartNumber: ingramPartNumber + rejectReason: rejectReason + rejectCode: rejectCode + vendorPartNumber: vendorPartNumber + quantityOrdered: 1 + customerLinenumber: customerLinenumber + - ingramPartNumber: ingramPartNumber + rejectReason: rejectReason + rejectCode: rejectCode + vendorPartNumber: vendorPartNumber + quantityOrdered: 1 + customerLinenumber: customerLinenumber + miscellaneousCharges: + - chargeLineReference: chargeLineReference + subOrderNumber: subOrderNumber + chargeAmount: 1.2315135367772556 + chargeDescription: chargeDescription + - chargeLineReference: chargeLineReference + subOrderNumber: subOrderNumber + chargeAmount: 1.2315135367772556 + chargeDescription: chargeDescription + notes: notes + numberOfLinesWithSuccess: 6 + numberOfLinesWithError: 1 + orderTotal: 5.637376656633329 + ingramOrderNumber: ingramOrderNumber + totalTax: 7.061401241503109 + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + numberOfLinesWithWarning: 5 + lines: + - ingramPartNumber: ingramPartNumber + unitPrice: 9.301444243932576 + notes: notes + extendedUnitPrice: 3.616076749251911 + ingramLineNumber: ingramLineNumber + quantityOrdered: 2 + customerLineNumber: customerLineNumber + lineStatus: lineStatus + quantityBackOrdered: 7 + specialBidNumber: specialBidNumber + shipmentDetails: + - freightAccountNumber: freightAccountNumber + carrierName: carrierName + shippingInstructions: shippingInstructions + carrierCode: carrierCode + signatureRequired: signatureRequired + shipFromWarehouseId: shipFromWarehouseId + shipFromLocation: shipFromLocation + - freightAccountNumber: freightAccountNumber + carrierName: carrierName + shippingInstructions: shippingInstructions + carrierCode: carrierCode + signatureRequired: signatureRequired + shipFromWarehouseId: shipFromWarehouseId + shipFromLocation: shipFromLocation + subOrderNumber: subOrderNumber + quantityConfirmed: 4 + vendorPartNumber: vendorPartNumber + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + - ingramPartNumber: ingramPartNumber + unitPrice: 9.301444243932576 + notes: notes + extendedUnitPrice: 3.616076749251911 + ingramLineNumber: ingramLineNumber + quantityOrdered: 2 + customerLineNumber: customerLineNumber + lineStatus: lineStatus + quantityBackOrdered: 7 + specialBidNumber: specialBidNumber + shipmentDetails: + - freightAccountNumber: freightAccountNumber + carrierName: carrierName + shippingInstructions: shippingInstructions + carrierCode: carrierCode + signatureRequired: signatureRequired + shipFromWarehouseId: shipFromWarehouseId + shipFromLocation: shipFromLocation + - freightAccountNumber: freightAccountNumber + carrierName: carrierName + shippingInstructions: shippingInstructions + carrierCode: carrierCode + signatureRequired: signatureRequired + shipFromWarehouseId: shipFromWarehouseId + shipFromLocation: shipFromLocation + subOrderNumber: subOrderNumber + quantityConfirmed: 4 + vendorPartNumber: vendorPartNumber + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + currencyCode: currencyCode + freightCharges: 2.3021358869347655 + ingramOrderDate: ingramOrderDate + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + - orderType: orderType + rejectedLineItems: + - ingramPartNumber: ingramPartNumber + rejectReason: rejectReason + rejectCode: rejectCode + vendorPartNumber: vendorPartNumber + quantityOrdered: 1 + customerLinenumber: customerLinenumber + - ingramPartNumber: ingramPartNumber + rejectReason: rejectReason + rejectCode: rejectCode + vendorPartNumber: vendorPartNumber + quantityOrdered: 1 + customerLinenumber: customerLinenumber + miscellaneousCharges: + - chargeLineReference: chargeLineReference + subOrderNumber: subOrderNumber + chargeAmount: 1.2315135367772556 + chargeDescription: chargeDescription + - chargeLineReference: chargeLineReference + subOrderNumber: subOrderNumber + chargeAmount: 1.2315135367772556 + chargeDescription: chargeDescription + notes: notes + numberOfLinesWithSuccess: 6 + numberOfLinesWithError: 1 + orderTotal: 5.637376656633329 + ingramOrderNumber: ingramOrderNumber + totalTax: 7.061401241503109 + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + numberOfLinesWithWarning: 5 + lines: + - ingramPartNumber: ingramPartNumber + unitPrice: 9.301444243932576 + notes: notes + extendedUnitPrice: 3.616076749251911 + ingramLineNumber: ingramLineNumber + quantityOrdered: 2 + customerLineNumber: customerLineNumber + lineStatus: lineStatus + quantityBackOrdered: 7 + specialBidNumber: specialBidNumber + shipmentDetails: + - freightAccountNumber: freightAccountNumber + carrierName: carrierName + shippingInstructions: shippingInstructions + carrierCode: carrierCode + signatureRequired: signatureRequired + shipFromWarehouseId: shipFromWarehouseId + shipFromLocation: shipFromLocation + - freightAccountNumber: freightAccountNumber + carrierName: carrierName + shippingInstructions: shippingInstructions + carrierCode: carrierCode + signatureRequired: signatureRequired + shipFromWarehouseId: shipFromWarehouseId + shipFromLocation: shipFromLocation + subOrderNumber: subOrderNumber + quantityConfirmed: 4 + vendorPartNumber: vendorPartNumber + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + - ingramPartNumber: ingramPartNumber + unitPrice: 9.301444243932576 + notes: notes + extendedUnitPrice: 3.616076749251911 + ingramLineNumber: ingramLineNumber + quantityOrdered: 2 + customerLineNumber: customerLineNumber + lineStatus: lineStatus + quantityBackOrdered: 7 + specialBidNumber: specialBidNumber + shipmentDetails: + - freightAccountNumber: freightAccountNumber + carrierName: carrierName + shippingInstructions: shippingInstructions + carrierCode: carrierCode + signatureRequired: signatureRequired + shipFromWarehouseId: shipFromWarehouseId + shipFromLocation: shipFromLocation + - freightAccountNumber: freightAccountNumber + carrierName: carrierName + shippingInstructions: shippingInstructions + carrierCode: carrierCode + signatureRequired: signatureRequired + shipFromWarehouseId: shipFromWarehouseId + shipFromLocation: shipFromLocation + subOrderNumber: subOrderNumber + quantityConfirmed: 4 + vendorPartNumber: vendorPartNumber + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + currencyCode: currencyCode + freightCharges: 2.3021358869347655 + ingramOrderDate: ingramOrderDate + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + customerOrderNumber: customerOrderNumber + properties: + customerOrderNumber: + description: The reseller's unique PO/Order number. + type: string + endCustomerOrderNumber: + description: The end user/customer's Purchase Order number. + type: string + billToAddressId: + description: Suffix used to identify billing address. Created during onboarding. + Resellers are provided with one or more address IDs depending on how many + bill to addresses they need for various flooring companies they are using + for credit + type: string + specialBidNumber: + description: The bid number provided to the reseller by the vendor for special + pricing and discounts. Line-level bid numbers take precedence over header-level + bid numbers. + type: string + orderSplit: + description: true for multiple orders + type: boolean + processedPartially: + description: true for partial order succesfully placed + type: boolean + purchaseOrderTotal: + description: Total of all the orders including taxes and fees. + format: decimal + type: number + shipToInfo: + $ref: '#/components/schemas/OrderCreateResponse_shipToInfo' + endUserInfo: + $ref: '#/components/schemas/OrderCreateResponse_endUserInfo' + orders: + description: Order-level details. + items: + $ref: '#/components/schemas/OrderCreateResponse_orders_inner' + type: array + type: object + OrderModifyRequest: + example: + notes: notes + shipToInfo: + city: city + companyName: companyName + postalCode: postalCode + addressId: addressId + phoneNumber: phoneNumber + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + name2: name2 + name1: name1 + email: email + lines: + - ingramPartNumber: ingramPartNumber + quantity: 0 + notes: notes + addUpdateDeleteLine: UPDATE + ingramLineNumber: ingramLineNumber + customerLineNumber: customerLineNumber + - ingramPartNumber: ingramPartNumber + quantity: 0 + notes: notes + addUpdateDeleteLine: UPDATE + ingramLineNumber: ingramLineNumber + customerLineNumber: customerLineNumber + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + properties: + notes: + description: Shipment-level notes. + maxLength: 132 + type: string + shipToInfo: + $ref: '#/components/schemas/OrderModifyRequest_shipToInfo' + lines: + description: The order line items. + items: + $ref: '#/components/schemas/OrderModifyRequest_lines_inner' + type: array + additionalAttributes: + description: Header-level additional attributes. + items: + $ref: '#/components/schemas/OrderModifyRequest_additionalAttributes_inner' + type: array + type: object + OrderModifyResponse: + example: + rejectedLineItems: + - ingramPartNumber: ingramPartNumber + rejectReason: rejectReason + rejectCode: rejectCode + ingramLineNumber: ingramLineNumber + vendorPartNumber: vendorPartNumber + quantityOrdered: 9 + customerLineNumber: customerLineNumber + - ingramPartNumber: ingramPartNumber + rejectReason: rejectReason + rejectCode: rejectCode + ingramLineNumber: ingramLineNumber + vendorPartNumber: vendorPartNumber + quantityOrdered: 9 + customerLineNumber: customerLineNumber + changeDescription: changeDescription + orderModifiedDate: orderModifiedDate + notes: notes + endCustomerOrderNumber: endCustomerOrderNumber + orderStatus: orderStatus + billToAddressId: billToAddressId + customerOrderNumber: customerOrderNumber + orderTotal: 0.8008281904610115 + orderSubTotal: 6.027456183070403 + ingramOrderNumber: ingramOrderNumber + totalTax: 5.962133916683182 + shipToInfo: + phoneNumber: phoneNumber + city: city + countryCode: countryCode + contact: contact + companyName: companyName + postalCode: postalCode + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + email: email + addressId: addressId + lines: + - ingramPartNumber: ingramPartNumber + quantityBackOrdered: 7 + shipmentDetails: + freightAccountNumber: freightAccountNumber + carrierName: carrierName + carrierCode: carrierCode + notes: notes + subOrderNumber: subOrderNumber + quantityConfirmed: 2 + ingramLineNumber: ingramLineNumber + vendorPartNumber: vendorPartNumber + quantityOrdered: 5 + customerLineNumber: customerLineNumber + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + - ingramPartNumber: ingramPartNumber + quantityBackOrdered: 7 + shipmentDetails: + freightAccountNumber: freightAccountNumber + carrierName: carrierName + carrierCode: carrierCode + notes: notes + subOrderNumber: subOrderNumber + quantityConfirmed: 2 + ingramLineNumber: ingramLineNumber + vendorPartNumber: vendorPartNumber + quantityOrdered: 5 + customerLineNumber: customerLineNumber + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + freightCharges: 1.4658129805029452 + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + properties: + ingramOrderNumber: + description: The IngramMicro order number. + type: string + changeDescription: + description: The description of the change. + type: string + orderModifiedDate: + description: The date the order was modified. + type: string + customerOrderNumber: + description: The reseller's order number for reference in their system. + type: string + endCustomerOrderNumber: + description: The end user/customer's order number for reference in their + system. + type: string + orderTotal: + description: The total for the order. + format: decimal + type: number + notes: + description: Order-level notes. + type: string + orderSubTotal: + description: The sub total for the order. + format: decimal + type: number + freightCharges: + description: The freight charges for the order. + format: decimal + type: number + totalTax: + description: The total tax for the order. + format: decimal + type: number + orderStatus: + description: "The status of the order. One of the following. Backordered,\ + \ In Progress, Shipped, Delivered, Canceled, On Hold" + type: string + billToAddressId: + description: Suffix used to identify billing address. Created during onboarding. + Resellers are provided with one or more address IDs depending on how many + bill to addresses they need for various flooring companies they are using + for credit. + type: string + shipToInfo: + $ref: '#/components/schemas/OrderModifyResponse_shipToInfo' + lines: + description: The line-level details for the order. + items: + $ref: '#/components/schemas/OrderModifyResponse_lines_inner' + type: array + rejectedLineItems: + description: Details for failed lines in the order. + items: + $ref: '#/components/schemas/OrderModifyResponse_rejectedLineItems_inner' + type: array + additionalAttributes: + description: Header-level additional attributes. + items: + $ref: '#/components/schemas/OrderModifyResponse_lines_inner_additionalAttributes_inner' + type: array + type: object + OrderDetailResponse: + example: + orderType: orderType + miscellaneousCharges: + - chargeLineReference: chargeLineReference + subOrderNumber: subOrderNumber + chargeAmount: 1.0246457001441578 + chargeDescription: chargeDescription + - chargeLineReference: chargeLineReference + subOrderNumber: subOrderNumber + chargeAmount: 1.0246457001441578 + chargeDescription: chargeDescription + notes: notes + endUserInfo: + city: city + companyName: companyName + postalCode: postalCode + phoneNumber: phoneNumber + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + name2: name2 + name1: name1 + email: email + endCustomerOrderNumber: endCustomerOrderNumber + vendorSalesOrderNumber: vendorSalesOrderNumber + orderStatus: orderStatus + customerOrderNumber: customerOrderNumber + orderTotal: 0.8008281904610115 + orderSubTotal: 6.027456183070403 + ingramOrderNumber: ingramOrderNumber + totalTax: 5.637376656633329 + shipToInfo: + city: city + companyName: companyName + postalCode: postalCode + phoneNumber: phoneNumber + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + name2: name2 + name1: name1 + email: email + billToInfo: + city: city + companyName: companyName + postalCode: postalCode + phoneNumber: phoneNumber + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + name2: name2 + name1: name1 + email: email + totalWeight: 5.962133916683182 + lines: + - unitWeight: 2.3021358869347655 + vendorSalesOrderLineNumber: vendorSalesOrderLineNumber + quantityOrdered: 2 + customerLinenumber: customerLinenumber + lineStatus: lineStatus + extendedPrice: 9.301444243932576 + vendorPartNumber: vendorPartNumber + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + upcCode: upcCode + ingramPartNumber: ingramPartNumber + unitPrice: 7 + ingramOrderLineNumber: ingramOrderLineNumber + vendorName: vendorName + lineNotes: lineNotes + quantityBackOrdered: 7 + specialBidNumber: specialBidNumber + shipmentDetails: + - deliveredDate: 2000-01-23 + quantity: 1 + invoiceNumber: invoiceNumber + estimatedShipDate: 2000-01-23 + invoiceDate: 2000-01-23 + shippedDate: 2000-01-23 + estimatedDeliveryDate: 2000-01-23 + shipFromWarehouseId: shipFromWarehouseId + carrierDetails: + carrierName: carrierName + carrierCode: carrierCode + trackingDetails: + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + SerialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + cartonNumber: cartonNumber + trackingNumber: trackingNumber + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + SerialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + cartonNumber: cartonNumber + trackingNumber: trackingNumber + shipFromLocation: shipFromLocation + - deliveredDate: 2000-01-23 + quantity: 1 + invoiceNumber: invoiceNumber + estimatedShipDate: 2000-01-23 + invoiceDate: 2000-01-23 + shippedDate: 2000-01-23 + estimatedDeliveryDate: 2000-01-23 + shipFromWarehouseId: shipFromWarehouseId + carrierDetails: + carrierName: carrierName + carrierCode: carrierCode + trackingDetails: + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + SerialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + cartonNumber: cartonNumber + trackingNumber: trackingNumber + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + SerialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + cartonNumber: cartonNumber + trackingNumber: trackingNumber + shipFromLocation: shipFromLocation + promisedDeliveryDate: 2000-01-23 + subOrderNumber: subOrderNumber + partDescription: partDescription + quantityConfirmed: 4 + requestedDeliveryDate: 2000-01-23 + weightUom: weightUom + taxAmount: 3.616076749251911 + currencyCode: currencyCode + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + - unitWeight: 2.3021358869347655 + vendorSalesOrderLineNumber: vendorSalesOrderLineNumber + quantityOrdered: 2 + customerLinenumber: customerLinenumber + lineStatus: lineStatus + extendedPrice: 9.301444243932576 + vendorPartNumber: vendorPartNumber + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + upcCode: upcCode + ingramPartNumber: ingramPartNumber + unitPrice: 7 + ingramOrderLineNumber: ingramOrderLineNumber + vendorName: vendorName + lineNotes: lineNotes + quantityBackOrdered: 7 + specialBidNumber: specialBidNumber + shipmentDetails: + - deliveredDate: 2000-01-23 + quantity: 1 + invoiceNumber: invoiceNumber + estimatedShipDate: 2000-01-23 + invoiceDate: 2000-01-23 + shippedDate: 2000-01-23 + estimatedDeliveryDate: 2000-01-23 + shipFromWarehouseId: shipFromWarehouseId + carrierDetails: + carrierName: carrierName + carrierCode: carrierCode + trackingDetails: + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + SerialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + cartonNumber: cartonNumber + trackingNumber: trackingNumber + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + SerialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + cartonNumber: cartonNumber + trackingNumber: trackingNumber + shipFromLocation: shipFromLocation + - deliveredDate: 2000-01-23 + quantity: 1 + invoiceNumber: invoiceNumber + estimatedShipDate: 2000-01-23 + invoiceDate: 2000-01-23 + shippedDate: 2000-01-23 + estimatedDeliveryDate: 2000-01-23 + shipFromWarehouseId: shipFromWarehouseId + carrierDetails: + carrierName: carrierName + carrierCode: carrierCode + trackingDetails: + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + SerialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + cartonNumber: cartonNumber + trackingNumber: trackingNumber + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + SerialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + cartonNumber: cartonNumber + trackingNumber: trackingNumber + shipFromLocation: shipFromLocation + promisedDeliveryDate: 2000-01-23 + subOrderNumber: subOrderNumber + partDescription: partDescription + quantityConfirmed: 4 + requestedDeliveryDate: 2000-01-23 + weightUom: weightUom + taxAmount: 3.616076749251911 + currencyCode: currencyCode + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + currencyCode: currencyCode + freightCharges: 1.4658129805029452 + paymentTerms: paymentTerms + ingramOrderDate: ingramOrderDate + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + properties: + ingramOrderNumber: + description: The IngramMicro sales order number. + type: string + ingramOrderDate: + description: The date and time in UTC format that the order was created. + type: string + orderType: + description: "The order type. One of B = Branch Transfer, C = COD, D = Direct\ + \ Ship, F = Future Order, P = Special Order, M = Memo, Q = Quote, S =\ + \ Sales Order." + type: string + customerOrderNumber: + description: The reseller's order number for reference in their system. + type: string + endCustomerOrderNumber: + description: The end user/customer's order number for reference in their + system. + type: string + vendorSalesOrderNumber: + description: The vendor's order number for reference in their system. + type: string + orderStatus: + description: "The header-level status of the order. One of- Shipped, Canceled,\ + \ Backordered, Processing, On Hold, Delivered." + type: string + orderTotal: + description: "The total cost for the order, includes subtotal, freight charges,\ + \ and tax." + format: decimal + type: number + orderSubTotal: + description: "The sub total cost for the order, not including tax and freight." + format: decimal + type: number + freightCharges: + description: The freight charges for the order. + format: decimal + type: number + currencyCode: + description: The country-specific three digit ISO 4217 currency code for + the order. + type: string + totalWeight: + description: "The total weight of the order. Pounds in North America, KG\ + \ in all other countries." + format: decimal + type: number + totalTax: + description: The total tax for the order. + format: decimal + type: number + paymentTerms: + description: The payment terms of the order. (Ex- Net 30 days). + type: string + notes: + description: The header-level notes for the order. + type: string + billToInfo: + $ref: '#/components/schemas/OrderDetailResponse_billToInfo' + shipToInfo: + $ref: '#/components/schemas/OrderDetailResponse_shipToInfo' + endUserInfo: + $ref: '#/components/schemas/OrderDetailResponse_endUserInfo' + lines: + items: + $ref: '#/components/schemas/OrderDetailResponse_lines_inner' + type: array + miscellaneousCharges: + items: + $ref: '#/components/schemas/OrderDetailResponse_miscellaneousCharges_inner' + type: array + additionalAttributes: + items: + $ref: '#/components/schemas/OrderDetailResponse_lines_inner_additionalAttributes_inner' + type: array + type: object + x-tags: + - Orders + OrderSearch_Response: + example: + pageNumber: 1 + previousPage: previousPage + nextPage: nextPage + pageSize: 6 + recordsFound: 0 + orders: + - ingramOrderNumber: ingramOrderNumber + vendorSalesOrderNumber: vendorSalesOrderNumber + orderStatus: orderStatus + endUserCompanyName: endUserCompanyName + links: + topic: topic + href: href + type: type + subOrders: + - subOrderNumber: subOrderNumber + subOrderTotal: 5.637376656633329 + subOrderStatus: subOrderStatus + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + - subOrderNumber: subOrderNumber + subOrderTotal: 5.637376656633329 + subOrderStatus: subOrderStatus + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + vendorName: vendorName + customerOrderNumber: customerOrderNumber + orderTotal: 5.962133916683182 + ingramOrderDate: ingramOrderDate + - ingramOrderNumber: ingramOrderNumber + vendorSalesOrderNumber: vendorSalesOrderNumber + orderStatus: orderStatus + endUserCompanyName: endUserCompanyName + links: + topic: topic + href: href + type: type + subOrders: + - subOrderNumber: subOrderNumber + subOrderTotal: 5.637376656633329 + subOrderStatus: subOrderStatus + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + - subOrderNumber: subOrderNumber + subOrderTotal: 5.637376656633329 + subOrderStatus: subOrderStatus + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + vendorName: vendorName + customerOrderNumber: customerOrderNumber + orderTotal: 5.962133916683182 + ingramOrderDate: ingramOrderDate + properties: + recordsFound: + description: No of recourds found for the search. + type: integer + pageSize: + description: No of results per page.(default is 25) + type: integer + pageNumber: + description: Current page number.(default is 1) + type: integer + orders: + description: The details for the order. + items: + $ref: '#/components/schemas/OrderSearch_Response_orders_inner' + type: array + nextPage: + description: link/URL for accessing next page. + type: string + previousPage: + description: link/URL for accessing previous page. + type: string + type: object + PriceAndAvailabilityRequest: + example: + showAvailableDiscounts: true + specialBidNumber: specialBidNumber + availabilityByWarehouse: + - availabilityForAllLocation: true + availabilityByWarehouseId: availabilityByWarehouseId + - availabilityForAllLocation: true + availabilityByWarehouseId: availabilityByWarehouseId + showReserveInventoryDetails: true + products: + - ingramPartNumber: ingramPartNumber + customerPartNumber: customerPartNumber + quantityRequested: quantityRequested + upc: upc + vendorPartNumber: vendorPartNumber + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + - ingramPartNumber: ingramPartNumber + customerPartNumber: customerPartNumber + quantityRequested: quantityRequested + upc: upc + vendorPartNumber: vendorPartNumber + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + properties: + showAvailableDiscounts: + description: Boolean value that will display Discount details in the response + when true. + type: boolean + showReserveInventoryDetails: + description: Boolean value that will display reserve inventory details in + the response when true. + type: boolean + specialBidNumber: + description: Pre-approved special pricing/bid number provided to the reseller + by the vendor for special pricing and discounts. Used to track the bid + number where different line items have different bid numbers. + type: string + availabilityByWarehouse: + items: + $ref: '#/components/schemas/PriceAndAvailabilityRequest_availabilityByWarehouse_inner' + type: array + products: + items: + $ref: '#/components/schemas/PriceAndAvailabilityRequest_products_inner' + type: array + additionalAttributes: + items: + $ref: '#/components/schemas/PriceAndAvailabilityRequest_additionalAttributes_inner' + type: array + type: object + PriceAndAvailabilityResponse: + items: + $ref: '#/components/schemas/PriceAndAvailabilityResponse_inner' + type: array + ProductSearch_Response: + example: + pageNumber: 1 + previousPage: previousPage + catalog: + - ingramPartNumber: ingramPartNumber + extraDescription: extraDescription + subCategory: subCategory + replacementSku: replacementSku + endUserRequired: endUserRequired + authorizedToPurchase: authorizedToPurchase + description: description + discontinued: discontinued + vendorName: vendorName + type: type + newProduct: newProduct + hasWarranty: hasWarranty + hasDiscounts: hasDiscounts + directShip: directShip + vendorPartNumber: vendorPartNumber + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + category: category + productType: productType + upcCode: upcCode + - ingramPartNumber: ingramPartNumber + extraDescription: extraDescription + subCategory: subCategory + replacementSku: replacementSku + endUserRequired: endUserRequired + authorizedToPurchase: authorizedToPurchase + description: description + discontinued: discontinued + vendorName: vendorName + type: type + newProduct: newProduct + hasWarranty: hasWarranty + hasDiscounts: hasDiscounts + directShip: directShip + vendorPartNumber: vendorPartNumber + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + category: category + productType: productType + upcCode: upcCode + nextPage: nextPage + pageSize: 6 + recordsFound: 0 + properties: + recordsFound: + description: The number of recourds found for the search. + type: integer + pageSize: + description: The number of results per page. Default is 25. + type: integer + pageNumber: + description: current page number default is 1 + type: integer + catalog: + items: + $ref: '#/components/schemas/ProductSearch_Response_catalog_inner' + type: array + nextPage: + description: link/URL for accessing next page. + type: string + previousPage: + description: link/URL for accessing previous page. + type: string + type: object + ProductDetailResponse: + example: + ingramPartNumber: ingramPartNumber + additionalInformation: + netWeight: netWeight + width: width + length: length + dimensionUnit: dimensionUnit + productWeight: + - plantId: plantId + weight: 0.8008281904610115 + weightUnit: weightUnit + - plantId: plantId + weight: 0.8008281904610115 + weightUnit: weightUnit + isBulkFreight: true + height: height + productClass: productClass + customerPartNumber: customerPartNumber + description: description + upc: upc + warrantyInformation: + - "{}" + - "{}" + productAuthorized: true + vendorName: vendorName + indicators: + - isHeavyWeight: true + isEnduserRequired: true + hasStdWebDiscount: true + hasStdSpecialPrice: true + isPreorderProduct: true + hasWarranty: true + isDirectshipOrderable: true + isNewProduct: true + isDownloadable: true + isClearanceProduct: true + isOversizeProduct: true + isShippedFromPartner: true + isIngramShip: true + hasAcopQuantityBreak: true + IsBackOrderAllowed: true + isReplacementProduct: true + hasSpecialBid: true + isReturnableProduct: true + isConfigurable: true + isExportableToCountry: true + isDigitalType: true + hasAcopSpecialPrice: true + isRefurbishedProduct: true + isLicenseProduct: true + HasReturnLimits: true + skuType: skuType + isDiscontinuedProduct: true + hasLtl: true + isServiceSku: true + hasBundle: true + isDirectship: true + - isHeavyWeight: true + isEnduserRequired: true + hasStdWebDiscount: true + hasStdSpecialPrice: true + isPreorderProduct: true + hasWarranty: true + isDirectshipOrderable: true + isNewProduct: true + isDownloadable: true + isClearanceProduct: true + isOversizeProduct: true + isShippedFromPartner: true + isIngramShip: true + hasAcopQuantityBreak: true + IsBackOrderAllowed: true + isReplacementProduct: true + hasSpecialBid: true + isReturnableProduct: true + isConfigurable: true + isExportableToCountry: true + isDigitalType: true + hasAcopSpecialPrice: true + isRefurbishedProduct: true + isLicenseProduct: true + HasReturnLimits: true + skuType: skuType + isDiscontinuedProduct: true + hasLtl: true + isServiceSku: true + hasBundle: true + isDirectship: true + productCategory: productCategory + productSubcategory: productSubcategory + ciscoFields: + - itemType: itemType + productSubGroup: productSubGroup + configurationIndicator: configurationIndicator + internalBusinessEntity: internalBusinessEntity + serviceProgramName: serviceProgramName + globalListPrice: globalListPrice + itemCatalogCategory: itemCatalogCategory + - itemType: itemType + productSubGroup: productSubGroup + configurationIndicator: configurationIndicator + internalBusinessEntity: internalBusinessEntity + serviceProgramName: serviceProgramName + globalListPrice: globalListPrice + itemCatalogCategory: itemCatalogCategory + technicalSpecifications: + - headername: headername + attributevalue: attributevalue + attributedisplay: attributedisplay + attributename: attributename + - headername: headername + attributevalue: attributevalue + attributedisplay: attributedisplay + attributename: attributename + productDetailDescription: productDetailDescription + vendorPartNumber: vendorPartNumber + productStatusCode: productStatusCode + vendorNumber: vendorNumber + properties: + ingramPartNumber: + description: Ingram Micro unique part number for the product. + type: string + vendorPartNumber: + description: Vendor’s part number for the product. + type: string + productAuthorized: + description: Boolean that indicates whether a product is authorized. + type: boolean + description: + description: The description given for the product. + type: string + productDetailDescription: + description: The detailed description given for the product. + type: string + upc: + description: The UPC code for the product. Consists of 12 numeric digits + that are uniquely assigned to each trade item. + type: string + productCategory: + description: The category of the product. + type: string + productSubcategory: + description: The sub-category of the product. + type: string + vendorName: + description: Vendor name for the order. + type: string + vendorNumber: + description: Vendor number that identifies the product. + type: string + productStatusCode: + description: Status code of the product. + type: string + productClass: + description: "Indicates whether the product is directly shipped from the\ + \ vendor’s warehouse or if the product ships from Ingram Micro’s warehouse.\ + \ Class Codes are Ingram classifications on how skus are stocked A = Product\ + \ that is stocked usually in all IM warehouses and replenished on a regular\ + \ basis. B = Product that is stocked in limited IM warehouses and replenished\ + \ on a regular basis C = Product that is stocked in fewer IM warehouses\ + \ and replenished on a regular basis. D = Product that Ingram Micro has\ + \ elected to discontinue. E = Product that will be phased out later, according\ + \ to the vendor. You may not want to replenish this product, but instead\ + \ sell down what is in stock. F = Product that we carry for a specific\ + \ customer or supplier under a contractual agreement. N = New Sku. Classification\ + \ before first receipt O = Discontinued product to be liquidated S= Order\ + \ for Specialized Demand (Order to backorder) X= direct ship from Vendor\ + \ V = product that vendor has elected to discontinue." + type: string + customerPartNumber: + description: Reseller / end-user’s part number for the product. + type: string + indicators: + description: Indicators of the Product + items: + $ref: '#/components/schemas/ProductDetailResponse_indicators_inner' + type: array + ciscoFields: + description: Cisco product related information. + items: + $ref: '#/components/schemas/ProductDetailResponse_ciscoFields_inner' + type: array + technicalSpecifications: + description: Technical specifications of the product. + items: + $ref: '#/components/schemas/ProductDetailResponse_technicalSpecifications_inner' + type: array + warrantyInformation: + description: Warranty information related to the product. + items: + type: object + type: array + additionalInformation: + $ref: '#/components/schemas/ProductDetailResponse_additionalInformation' + type: object + renewalsSearchRequest: + properties: + status: + $ref: '#/components/schemas/renewalsSearchRequest_status' + dataType: + $ref: '#/components/schemas/renewalsSearchRequest_dataType' + vendor: + description: The name of the Vendor. + type: string + endUser: + description: 'The name of the enduser. ' + type: string + type: object + renewalsSearchResponse: + example: + pageNumber: 1 + previousPage: previousPage + nextPage: nextPage + pageSize: 6 + recordsFound: 0 + renewals: + - renewalId: renewalId + endUser: endUser + referenceNumber: referenceNumber + vendor: vendor + renewalValue: renewalValue + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + customerOrderNumber: customerOrderNumber + expirationDate: expirationDate + status: status + - renewalId: renewalId + endUser: endUser + referenceNumber: referenceNumber + vendor: vendor + renewalValue: renewalValue + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + customerOrderNumber: customerOrderNumber + expirationDate: expirationDate + status: status + properties: + recordsFound: + description: Number of records found. + type: integer + pageSize: + description: Number of records in a page. + type: integer + pageNumber: + description: Number of page. + type: integer + renewals: + items: + $ref: '#/components/schemas/renewalsSearchResponse_renewals_inner' + type: array + nextPage: + description: URL for the next page. + type: string + previousPage: + description: URL for the previous page. + type: string + type: object + renewalsDetailsResponse: + example: + renewalId: renewalId + endUserInfo: + - city: city + companyName: companyName + postalCode: postalCode + phoneNumber: phoneNumber + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + name2: name2 + addressLine4: addressLine4 + name1: name1 + email: email + - city: city + companyName: companyName + postalCode: postalCode + phoneNumber: phoneNumber + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + name2: name2 + addressLine4: addressLine4 + name1: name1 + email: email + endCustomerOrderNumber: endCustomerOrderNumber + customerOrderNumber: customerOrderNumber + products: + - ingramPartNumber: ingramPartNumber + unitPrice: 6.027456183070403 + manufacturerPartNumber: manufacturerPartNumber + isConsolidated: isConsolidated + quantity: quantity + ingramLineNumber: ingramLineNumber + vendorPartNumber: vendorPartNumber + productDescription: productDescription + - ingramPartNumber: ingramPartNumber + unitPrice: 6.027456183070403 + manufacturerPartNumber: manufacturerPartNumber + isConsolidated: isConsolidated + quantity: quantity + ingramLineNumber: ingramLineNumber + vendorPartNumber: vendorPartNumber + productDescription: productDescription + ingramOrderNumber: ingramOrderNumber + endUser: endUser + ingramPurchaseOrderNumber: ingramPurchaseOrderNumber + referenceNumber: + - notificationId: notificationId + quoteNumber: quoteNumber + - notificationId: notificationId + quoteNumber: quoteNumber + vendor: vendor + renewalValue: 0.8008281904610115 + ingramOrderDate: 2000-01-23 + expirationDate: 2000-01-23 + status: status + additionalAttributes: + - isConsolidated: isConsolidated + attributeValue: attributeValue + attributeDescription: attributeDescription + startDate: 2000-01-23 + expirationDate: 2000-01-23 + - isConsolidated: isConsolidated + attributeValue: attributeValue + attributeDescription: attributeDescription + startDate: 2000-01-23 + expirationDate: 2000-01-23 + properties: + renewalId: + description: Unique Ingram renewal ID. + type: string + ingramOrderNumber: + description: The IngramMicro sales order number. + type: string + ingramOrderDate: + description: The IngramMicro sales order date. + format: date + type: string + expirationDate: + description: Renewal expiration date. + format: date + type: string + ingramPurchaseOrderNumber: + description: Ingram purchase order number. + type: string + customerOrderNumber: + description: The reseller's order number for reference in their system. + type: string + endCustomerOrderNumber: + description: The end customer's order number for reference in their system. + type: string + renewalValue: + description: The value of the renewal. + format: decimal + type: number + endUser: + description: The company name for the end user/customer. + type: string + vendor: + description: The name of the vendor. + type: string + status: + description: The status of the renewal. + type: string + endUserInfo: + items: + $ref: '#/components/schemas/renewalsDetailsResponse_endUserInfo_inner' + type: array + referenceNumber: + items: + $ref: '#/components/schemas/renewalsDetailsResponse_referenceNumber_inner' + type: array + products: + items: + $ref: '#/components/schemas/renewalsDetailsResponse_products_inner' + type: array + additionalAttributes: + items: + $ref: '#/components/schemas/renewalsDetailsResponse_additionalAttributes_inner' + type: array + type: object + dealsSearchResponse: + example: + pageNumber: 1 + previousPage: previousPage + nextPage: nextPage + deals: + - endUser: endUser + dealId: dealId + vendor: vendor + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + version: version + dealExpiryDate: 2000-01-23 + - endUser: endUser + dealId: dealId + vendor: vendor + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + version: version + dealExpiryDate: 2000-01-23 + pageSize: 6 + recordsFound: 0 + properties: + recordsFound: + description: Number of records found. + type: integer + pageSize: + description: Number of records in a page. + type: integer + pageNumber: + description: Number of page. + type: integer + deals: + items: + $ref: '#/components/schemas/dealsSearchResponse_deals_inner' + type: array + nextPage: + description: URL for the next page. + type: string + previousPage: + description: URL for the previous page. + type: string + type: object + dealsDetailsResponse: + example: + endUser: endUser + priceProtectionEndDate: 2000-01-23 + endUserInfo: + - city: city + companyName: companyName + postalCode: postalCode + phoneNumber: phoneNumber + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + name2: name2 + addressLine4: addressLine4 + name1: name1 + email: email + - city: city + companyName: companyName + postalCode: postalCode + phoneNumber: phoneNumber + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + name2: name2 + addressLine4: addressLine4 + name1: name1 + email: email + dealId: dealId + vendor: vendor + dealReceivedOn: 2000-01-23 + version: version + extendedMsrp: 0.8008281904610115 + currencyCode: currencyCode + dealExpiryDate: 2000-01-23 + products: + - ingramPartNumber: ingramPartNumber + remainingQuantity: 2 + daysRemaining: 7 + comments: comments + specialConditions: specialConditions + upc: upc + standardPrice: 5.962133916683182 + approvedQuantity: 5 + msrp: 6.027456183070403 + vendorPartNumber: vendorPartNumber + extendedMSRP: 1.4658129805029452 + productDescription: productDescription + startDate: 2000-01-23 + expirationDate: 2000-01-23 + - ingramPartNumber: ingramPartNumber + remainingQuantity: 2 + daysRemaining: 7 + comments: comments + specialConditions: specialConditions + upc: upc + standardPrice: 5.962133916683182 + approvedQuantity: 5 + msrp: 6.027456183070403 + vendorPartNumber: vendorPartNumber + extendedMSRP: 1.4658129805029452 + productDescription: productDescription + startDate: 2000-01-23 + expirationDate: 2000-01-23 + properties: + dealId: + description: Deal/Special bid number. + type: string + version: + description: Most recent version number of the deal. + type: string + endUser: + description: The end user/customer's name. + type: string + extendedMsrp: + description: Extended MSRP - Manufacturer Suggested Retail Price X Quantity. + format: decimal + type: number + vendor: + description: The vendor's name. + type: string + dealReceivedOn: + description: The date on which the deal starts. + format: date + type: string + dealExpiryDate: + description: Expiration date of the deal/Special bid. + format: date + type: string + priceProtectionEndDate: + description: The date on which the price protection will end. + format: date + type: string + currencyCode: + description: Country specific currency code. + type: string + endUserInfo: + items: + $ref: '#/components/schemas/renewalsDetailsResponse_endUserInfo_inner' + type: array + products: + items: + $ref: '#/components/schemas/dealsDetailsResponse_products_inner' + type: array + type: object + returnsSearchResponse: + example: + pageNumber: 1 + previousPage: previousPage + returnsClaims: + - modifiedOn: modifiedOn + estimatedTotalValue: 2000-01-23 + referenceNumber: referenceNumber + returnReason: returnReason + returnClaimId: returnClaimId + caseRequestNumber: caseRequestNumber + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + type: type + credit: 5.962133916683182 + createdOn: 2000-01-23 + status: status + - modifiedOn: modifiedOn + estimatedTotalValue: 2000-01-23 + referenceNumber: referenceNumber + returnReason: returnReason + returnClaimId: returnClaimId + caseRequestNumber: caseRequestNumber + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + type: type + credit: 5.962133916683182 + createdOn: 2000-01-23 + status: status + nextPage: nextPage + pageSize: 6 + recordsFound: 0 + properties: + recordsFound: + description: Number of records found. + type: integer + pageSize: + description: Number of records in a page. + type: integer + pageNumber: + description: Number of page. + type: integer + returnsClaims: + items: + $ref: '#/components/schemas/returnsSearchResponse_returnsClaims_inner' + type: array + nextPage: + description: URL for the next page. + type: string + previousPage: + description: URL for the previous page. + type: string + type: object + returnsDetailsResponse: + example: + returnWarehouseAddress: returnWarehouseAddress + tax: 3.616076749251911 + subTotal: 9.301444243932576 + createdOn: 2000-01-23 + rmaClaimId: rmaClaimId + products: + - ingramPartNumber: ingramPartNumber + unitPrice: 5.962133916683182 + quantity: 1 + requestDetails: 6 + description: description + upc: upc + ingramLineNumber: ingramLineNumber + invoiceDate: 2000-01-23 + customerOrderNumber: 0 + extendedPrice: 5.637376656633329 + invoiceNumber: invoiceNumber + returnBranch: 2 + vendorPartNumber: vendorPartNumber + shipFromBranch: 7 + status: status + - ingramPartNumber: ingramPartNumber + unitPrice: 5.962133916683182 + quantity: 1 + requestDetails: 6 + description: description + upc: upc + ingramLineNumber: ingramLineNumber + invoiceDate: 2000-01-23 + customerOrderNumber: 0 + extendedPrice: 5.637376656633329 + invoiceNumber: invoiceNumber + returnBranch: 2 + vendorPartNumber: vendorPartNumber + shipFromBranch: 7 + status: status + typeOfDetails: typeOfDetails + referenceNumber: referenceNumber + returnReason: returnReason + caseRequestNumber: caseRequestNumber + estimatedTotal: 4.145608029883936 + status: status + additionalFees: 2.027123023002322 + properties: + typeOfDetails: + description: The type of the details. Return or Claim. + type: string + rmaClaimId: + description: The rmaClaimId claim id. + type: string + caseRequestNumber: + description: A unique return request number. + type: string + createdOn: + description: The date on which the return request was created. + format: date + type: string + returnReason: + description: The reason for the return. + type: string + referenceNumber: + description: The reference number for the return. + type: string + status: + description: The status of the request. + type: string + returnWarehouseAddress: + description: The address of the return warehouse. + type: string + products: + items: + $ref: '#/components/schemas/returnsDetailsResponse_products_inner' + type: array + subTotal: + description: Sub total amount of the return request. + format: decimal + type: number + tax: + description: The tax amount of the return request. + format: decimal + type: number + additionalFees: + description: The additional fees for the return request. + format: decimal + type: number + estimatedTotal: + description: The total estimated amount for the return request. + format: decimal + type: number + type: object + returnsCreateRequest: + properties: + list: + items: + $ref: '#/components/schemas/returnsCreateRequest_list_inner' + type: array + type: object + returnsCreateResponse: + example: + returnsClaims: + - ingramPartNumber: ingramPartNumber + quantity: 0 + notes: notes + estimatedTotalValue: 6.027456183070403 + type: type + createdOn: 2000-01-23 + rmaClaimId: rmaClaimId + referenceNumber: referenceNumber + returnReason: returnReason + caseRequestNumber: caseRequestNumber + vendorPartNumber: vendorPartNumber + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + credit: 1.4658129805029452 + status: status + - ingramPartNumber: ingramPartNumber + quantity: 0 + notes: notes + estimatedTotalValue: 6.027456183070403 + type: type + createdOn: 2000-01-23 + rmaClaimId: rmaClaimId + referenceNumber: referenceNumber + returnReason: returnReason + caseRequestNumber: caseRequestNumber + vendorPartNumber: vendorPartNumber + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + credit: 1.4658129805029452 + status: status + properties: + returnsClaims: + items: + $ref: '#/components/schemas/returnsCreateResponse_returnsClaims_inner' + type: array + type: object + freightRequest: + properties: + billToAddressId: + description: Suffix used to identify billing address. Created during onboarding. + Resellers are provided with one or more address IDs depending on how many + bill to addresses they need for various flooring companies they are using + for credit. + type: string + shipToAddressId: + description: The ID references the reseller's address in Ingram Micro's + system for shipping. Provided to resellers during the onboarding process. + type: string + shipToAddress: + description: The shipping information. + items: + $ref: '#/components/schemas/freightRequest_shipToAddress_inner' + type: array + lines: + items: + $ref: '#/components/schemas/freightRequest_lines_inner' + type: array + type: object + freightResponse: + example: + freightEstimateResponse: + totalFees: 1.4658129805029452 + totalNetAmount: 5.962133916683182 + totalFreightAmount: 0.8008281904610115 + grossAmount: 5.637376656633329 + totalTaxAmount: 6.027456183070403 + distribution: + - carrierList: + - daysInTransit: 2 + shipVia: shipVia + carrierCode: carrierCode + estimatedFreightCharge: 3.616076749251911 + carrierMode: carrierMode + - daysInTransit: 2 + shipVia: shipVia + carrierCode: carrierCode + estimatedFreightCharge: 3.616076749251911 + carrierMode: carrierMode + freightRate: 2.3021358869347655 + shipVia: shipVia + carrierCode: carrierCode + totalWeight: 7.061401241503109 + shipFromBranchNumber: shipFromBranchNumber + transitDays: 9 + - carrierList: + - daysInTransit: 2 + shipVia: shipVia + carrierCode: carrierCode + estimatedFreightCharge: 3.616076749251911 + carrierMode: carrierMode + - daysInTransit: 2 + shipVia: shipVia + carrierCode: carrierCode + estimatedFreightCharge: 3.616076749251911 + carrierMode: carrierMode + freightRate: 2.3021358869347655 + shipVia: shipVia + carrierCode: carrierCode + totalWeight: 7.061401241503109 + shipFromBranchNumber: shipFromBranchNumber + transitDays: 9 + lines: + - ingramPartNumber: ingramPartNumber + unitPrice: 7.386281948385884 + quantity: 4 + warehouseId: warehouseId + netAmount: 1.2315135367772556 + vendorPartNumber: vendorPartNumber + - ingramPartNumber: ingramPartNumber + unitPrice: 7.386281948385884 + quantity: 4 + warehouseId: warehouseId + netAmount: 1.2315135367772556 + vendorPartNumber: vendorPartNumber + currencyCode: currencyCode + properties: + freightEstimateResponse: + $ref: '#/components/schemas/freightResponse_freightEstimateResponse' + type: object + QuoteSearchResponse: + example: + pageNumber: 1 + pageSize: 6 + recordsFound: 0 + quotes: + - specialBidNumber: specialBidNumber + lastModifiedDate: lastModifiedDate + createdBy: createdBy + vendor: vendor + ingramQuoteExpiryDate: ingramQuoteExpiryDate + quoteTotal: 5.962133916683182 + quoteNumber: quoteNumber + endUserContact: endUserContact + quoteStatus: quoteStatus + quoteName: quoteName + revision: revision + ingramQuoteDate: ingramQuoteDate + - specialBidNumber: specialBidNumber + lastModifiedDate: lastModifiedDate + createdBy: createdBy + vendor: vendor + ingramQuoteExpiryDate: ingramQuoteExpiryDate + quoteTotal: 5.962133916683182 + quoteNumber: quoteNumber + endUserContact: endUserContact + quoteStatus: quoteStatus + quoteName: quoteName + revision: revision + ingramQuoteDate: ingramQuoteDate + properties: + recordsFound: + description: Total count of quotes retrieved in the request response. + type: integer + pageSize: + description: Number of records (quotes) displayed per page in the quote + list. + type: integer + pageNumber: + description: Page index or page number for the list of quotes being returned. + type: integer + quotes: + description: The quote details for the requested criteria. + items: + $ref: '#/components/schemas/QuoteSearchResponse_quotes_inner' + type: array + type: object + QuoteDetailsResponse: + example: + quantityTotal: 2 + leaseInfo: leaseInfo + products: + - ingramPartNumber: ingramPartNumber + CoO: CoO + vpnCategory: vpnCategory + quantity: 0 + notes: notes + description: description + weight: 6 + vendorName: vendorName + EAN: EAN + terms: terms + price: + quotePrice: 1 + msrp: 5 + extendedQuotePrice: 2 + extendedMsrp: 5 + discountOffList: 7.061401241503109 + quoteProductGuid: quoteProductGuid + vendorPartNumber: vendorPartNumber + lineNumber: lineNumber + weightUom: weightUom + quoteProductsSupplierPartAuxiliaryId: quoteProductsSupplierPartAuxiliaryId + isSuggestionProduct: true + - ingramPartNumber: ingramPartNumber + CoO: CoO + vpnCategory: vpnCategory + quantity: 0 + notes: notes + description: description + weight: 6 + vendorName: vendorName + EAN: EAN + terms: terms + price: + quotePrice: 1 + msrp: 5 + extendedQuotePrice: 2 + extendedMsrp: 5 + discountOffList: 7.061401241503109 + quoteProductGuid: quoteProductGuid + vendorPartNumber: vendorPartNumber + lineNumber: lineNumber + weightUom: weightUom + quoteProductsSupplierPartAuxiliaryId: quoteProductsSupplierPartAuxiliaryId + isSuggestionProduct: true + leasingInstructions: leasingInstructions + productsCount: 9 + specialBidEffectiveDate: specialBidEffectiveDate + endUserInfo: + phoneNumber: phoneNumber + city: city + contact: contact + companyName: companyName + postalCode: postalCode + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + email: email + marketSegment: marketSegment + introPreamble: introPreamble + extendedMsrpTotal: 3 + lastModifiedDate: lastModifiedDate + legalTerms: legalTerms + specialBidExpirationDate: specialBidExpirationDate + quoteNumber: quoteNumber + revision: revision + extendedQuotePriceTotal: 4 + customerNeed: customerNeed + resellerInfo: + phoneNumber: phoneNumber + contact: contact + companyName: companyName + customerNumber: customerNumber + email: email + ingramQuoteExpiryDate: ingramQuoteExpiryDate + purchaseInstructions: purchaseInstructions + proposedSolution: proposedSolution + currencyCode: currencyCode + specialBidId: specialBidId + quoteName: quoteName + ingramQuoteDate: ingramQuoteDate + status: status + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + properties: + quoteName: + description: Quote Name given to quote by sales team or system generated. Generally + used as a reference to identify the quote. + type: string + quoteNumber: + description: "Unique identifier generated by Ingram Micro's CRM specific\ + \ to each quote. When applying a filter to the quoteNumber and including\ + \ a partial quote number in the filter, all quotes containing any information\ + \ included in the filter can be retrieved as a subset of all available\ + \ customer quotes." + type: string + revision: + description: "When a quote has been revised and updated, the quote number\ + \ remains the same throughout the lifecycle of the quote, however, a Revision\ + \ number is updated for each revision of the quote. The revision numbers\ + \ is associated with the Unique Quote Number." + type: string + ingramQuoteDate: + description: Date the Quote was initially Created. + type: string + lastModifiedDate: + description: Date the Quote was last updated or modified. + type: string + ingramQuoteExpiryDate: + description: Quote expiration date. + type: string + currencyCode: + description: Three letter currency code. + type: string + specialBidId: + description: Price discount identifyer to specify a pricing discount that + has been applied to the quote. If present - the priceDeviationStartDate + and priceDeviationExpiryDate must be presented. Cisco refers to this as + a Dart + type: string + specialBidEffectiveDate: + description: If price discount has been applied to the quote - the starting + date the discount begins. + type: string + specialBidExpirationDate: + description: If a price discount has been applied to the quote - The date + the discount expires and will no longer be applicable. + type: string + status: + description: This refers to the primary status of the quote. API responses + will return + type: string + customerNeed: + description: Details related to the customer's request for the quote entered + by the sales representative or system generated. + type: string + proposedSolution: + description: Ingram Micro proposed solution and summary of quote. + type: string + introPreamble: + description: Introductory paragraph included in each quote. Legally required + - must be included when presenting the quote details. + type: string + purchaseInstructions: + description: Purchase instructions. Legally required - must be included + when presenting the quote details. + type: string + legalTerms: + description: Legal terms - Legally required - must be included when presenting + the quote details. + type: string + leaseInfo: + description: Lease information. + type: string + leasingInstructions: + description: Leasing information + type: string + resellerInfo: + $ref: '#/components/schemas/QuoteDetailsResponse_resellerInfo' + endUserInfo: + $ref: '#/components/schemas/QuoteDetailsResponse_endUserInfo' + products: + items: + $ref: '#/components/schemas/QuoteDetailsResponse_products_inner' + type: array + productsCount: + description: Total number of products included in the quote + type: integer + extendedMsrpTotal: + description: Total extended MSRP for all products included in the quote + type: integer + quantityTotal: + description: Total quantity of all items in the quote. + type: integer + extendedQuotePriceTotal: + description: Total amount of quoted price for all products in the quote + including both solution products and suggested products. + type: integer + additionalAttributes: + items: + $ref: '#/components/schemas/QuoteDetailsResponse_additionalAttributes_inner' + type: array + type: object + AvailabilityAsyncNotificationRequest: + example: + eventId: eventId + resource: + - ingramPartNumber: ingramPartNumber + totalAvailability: totalAvailability + backOrderFlag: backOrderFlag + skuStatus: skuStatus + vendorPartNumber: vendorPartNumber + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + eventType: eventType + vendorName: vendorName + upcCode: upcCode + - ingramPartNumber: ingramPartNumber + totalAvailability: totalAvailability + backOrderFlag: backOrderFlag + skuStatus: skuStatus + vendorPartNumber: vendorPartNumber + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + eventType: eventType + vendorName: vendorName + upcCode: upcCode + topic: topic + event: event + eventTimeStamp: eventTimeStamp + properties: + topic: + description: "Field for identifying whether it is a reseller or vendor event.\ + \ For eg, resellers/orders" + type: string + event: + description: "The event sent in the request. For eg, im::create." + type: string + eventTimeStamp: + description: The timestamp at which the event was sent. + type: string + eventId: + description: A unique id used as identifier for the sepcific event and used + for generating the x-hub signature. + type: string + resource: + items: + $ref: '#/components/schemas/AvailabilityAsyncNotificationRequest_resource_inner' + type: array + required: + - customerOrderNumber + type: object + OrderStatusAsyncNotificationRequest: + example: + eventId: eventId + resource: + - orderNumber: orderNumber + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + eventType: eventType + lines: + - lineStatus: lineStatus + ingramPartNumber: ingramPartNumber + backorderedQuantity: backorderedQuantity + shipmentDetails: + - packageDetails: + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + carrierName: carrierName + carrierCode: carrierCode + shipmentDate: shipmentDate + warehouseName: warehouseName + shipFromWarehouseId: shipFromWarehouseId + - packageDetails: + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + carrierName: carrierName + carrierCode: carrierCode + shipmentDate: shipmentDate + warehouseName: warehouseName + shipFromWarehouseId: shipFromWarehouseId + serialNumberDetails: + - serialNumber: serialNumber + - serialNumber: serialNumber + subOrderNumber: subOrderNumber + shippedQuantity: shippedQuantity + requestedQuantity: requestedQuantity + vendorPartNumber: vendorPartNumber + LineNumber: LineNumber + - lineStatus: lineStatus + ingramPartNumber: ingramPartNumber + backorderedQuantity: backorderedQuantity + shipmentDetails: + - packageDetails: + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + carrierName: carrierName + carrierCode: carrierCode + shipmentDate: shipmentDate + warehouseName: warehouseName + shipFromWarehouseId: shipFromWarehouseId + - packageDetails: + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + carrierName: carrierName + carrierCode: carrierCode + shipmentDate: shipmentDate + warehouseName: warehouseName + shipFromWarehouseId: shipFromWarehouseId + serialNumberDetails: + - serialNumber: serialNumber + - serialNumber: serialNumber + subOrderNumber: subOrderNumber + shippedQuantity: shippedQuantity + requestedQuantity: requestedQuantity + vendorPartNumber: vendorPartNumber + LineNumber: LineNumber + customerOrderNumber: customerOrderNumber + orderEntryTimeStamp: orderEntryTimeStamp + - orderNumber: orderNumber + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + eventType: eventType + lines: + - lineStatus: lineStatus + ingramPartNumber: ingramPartNumber + backorderedQuantity: backorderedQuantity + shipmentDetails: + - packageDetails: + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + carrierName: carrierName + carrierCode: carrierCode + shipmentDate: shipmentDate + warehouseName: warehouseName + shipFromWarehouseId: shipFromWarehouseId + - packageDetails: + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + carrierName: carrierName + carrierCode: carrierCode + shipmentDate: shipmentDate + warehouseName: warehouseName + shipFromWarehouseId: shipFromWarehouseId + serialNumberDetails: + - serialNumber: serialNumber + - serialNumber: serialNumber + subOrderNumber: subOrderNumber + shippedQuantity: shippedQuantity + requestedQuantity: requestedQuantity + vendorPartNumber: vendorPartNumber + LineNumber: LineNumber + - lineStatus: lineStatus + ingramPartNumber: ingramPartNumber + backorderedQuantity: backorderedQuantity + shipmentDetails: + - packageDetails: + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + carrierName: carrierName + carrierCode: carrierCode + shipmentDate: shipmentDate + warehouseName: warehouseName + shipFromWarehouseId: shipFromWarehouseId + - packageDetails: + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + carrierName: carrierName + carrierCode: carrierCode + shipmentDate: shipmentDate + warehouseName: warehouseName + shipFromWarehouseId: shipFromWarehouseId + serialNumberDetails: + - serialNumber: serialNumber + - serialNumber: serialNumber + subOrderNumber: subOrderNumber + shippedQuantity: shippedQuantity + requestedQuantity: requestedQuantity + vendorPartNumber: vendorPartNumber + LineNumber: LineNumber + customerOrderNumber: customerOrderNumber + orderEntryTimeStamp: orderEntryTimeStamp + topic: topic + event: event + eventTimeStamp: eventTimeStamp + properties: + topic: + description: "Field for identifying whether it is a reseller or vendor event.\ + \ For eg, resellers/orders" + type: string + event: + description: "The event sent in the request. For eg, im::create." + type: string + eventTimeStamp: + description: The timestamp at which the event was sent. + type: string + eventId: + description: A unique id used as identifier for the sepcific event and used + for generating the x-hub signature. + type: string + resource: + items: + $ref: '#/components/schemas/OrderStatusAsyncNotificationRequest_resource_inner' + type: array + required: + - customerOrderNumber + type: object + InvoiceSearchResponse: + example: + pageNumber: 1 + invoices: + - orderCreateDate: orderCreateDate + paymentTermsDueDate: paymentTermsDueDate + invoicedAmountDue: invoicedAmountDue + endCustomerOrderNumber: endCustomerOrderNumber + invoiceAmountInclTax: invoiceAmountInclTax + invoiceNumber: invoiceNumber + erpOrderNumber: erpOrderNumber + invoiceStatus: invoiceStatus + invoiceDate: invoiceDate + customerOrderNumber: customerOrderNumber + invoiceDueDate: invoiceDueDate + - orderCreateDate: orderCreateDate + paymentTermsDueDate: paymentTermsDueDate + invoicedAmountDue: invoicedAmountDue + endCustomerOrderNumber: endCustomerOrderNumber + invoiceAmountInclTax: invoiceAmountInclTax + invoiceNumber: invoiceNumber + erpOrderNumber: erpOrderNumber + invoiceStatus: invoiceStatus + invoiceDate: invoiceDate + customerOrderNumber: customerOrderNumber + invoiceDueDate: invoiceDueDate + nextPage: nextPage + pageSize: 6 + recordsFound: 0 + properties: + recordsFound: + description: Total count of quotes retrieved in the request response. + type: integer + pageSize: + description: Number of records (quotes) displayed per page in the quote + list. + type: integer + pageNumber: + description: Page index or page number for the list of quotes being returned. + type: integer + invoices: + description: The Invoices details for the requested criteria. + items: + $ref: '#/components/schemas/InvoiceSearchResponse_invoices_inner' + type: array + nextPage: + description: Next page of the pagination. + type: string + type: object + InvoiceDetailResponse: + example: + serviceresponse: + invoicedetailresponse: + creditmemoreasoncode: creditmemoreasoncode + paymentterms: paymentterms + soldto: + city: city + countrycode: countrycode + phonenumber: phonenumber + postalcode: postalcode + addressline3: addressline3 + attention: attention + addressline2: addressline2 + addressline1: addressline1 + state: state + name2: name2 + fax: fax + name1: name1 + email: email + orderstatus: orderstatus + totalotherfees: 6.027456183070403 + shippableswitch: shippableswitch + currencyrate: currencyrate + invoicetype: invoicetype + orderdate: 2000-01-23 + currencycode: currencycode + globalorderid: globalorderid + totalsales: totalsales + extendedspecs: + - attributevalue: attributevalue + attributename: attributename + - attributevalue: attributevalue + attributename: attributename + taxtype: taxtype + totaltaxamount: totaltaxamount + discountamount: 0.8008281904610115 + originalshipcode: originalshipcode + customerordernumber: customerordernumber + lines: + - linenumber: linenumber + vendorpartnumber: vendorpartnumber + backorderquantity: backorderquantity + linetype: linetype + trackingnumberdetails: + - trackingnumber: trackingnumber + - trackingnumber: trackingnumber + specialbidnumber: specialbidnumber + ordersuffix: ordersuffix + unitprice: unitprice + productextendedspecs: + - attributevalue: attributevalue + attributename: attributename + - attributevalue: attributevalue + attributename: attributename + marginpercent: marginpercent + isacopapplied: isacopapplied + shippedquantity: shippedquantity + shipfrombranch: shipfrombranch + orderedquantity: orderedquantity + extendedprice: extendedprice + serialnumberdetails: + - deliverynumber: deliverynumber + serialnumber: serialnumber + - deliverynumber: deliverynumber + serialnumber: serialnumber + partdescription: partdescription + partnumber: partnumber + backorderetadate: 2000-01-23 + unitofmeasure: unitofmeasure + - linenumber: linenumber + vendorpartnumber: vendorpartnumber + backorderquantity: backorderquantity + linetype: linetype + trackingnumberdetails: + - trackingnumber: trackingnumber + - trackingnumber: trackingnumber + specialbidnumber: specialbidnumber + ordersuffix: ordersuffix + unitprice: unitprice + productextendedspecs: + - attributevalue: attributevalue + attributename: attributename + - attributevalue: attributevalue + attributename: attributename + marginpercent: marginpercent + isacopapplied: isacopapplied + shippedquantity: shippedquantity + shipfrombranch: shipfrombranch + orderedquantity: orderedquantity + extendedprice: extendedprice + serialnumberdetails: + - deliverynumber: deliverynumber + serialnumber: serialnumber + - deliverynumber: deliverynumber + serialnumber: serialnumber + partdescription: partdescription + partnumber: partnumber + backorderetadate: 2000-01-23 + unitofmeasure: unitofmeasure + invoicenumber: invoicenumber + shipdate: 2000-01-23 + customernumber: customernumber + freightamount: freightamount + miscfeeline: + - code: code + description: description + chargeamount: chargeamount + - code: code + description: description + chargeamount: chargeamount + carrierdescription: carrierdescription + weight: weight + freightforwardercode: freightforwardercode + shoptoaddress: + city: city + countrycode: countrycode + phonenumber: phonenumber + postalcode: postalcode + addressline3: addressline3 + attention: attention + addressline2: addressline2 + addressline1: addressline1 + state: state + name2: name2 + fax: fax + name1: name1 + email: email + customerfreightamount: customerfreightamount + companycurrency: companycurrency + billtosuffix: billtosuffix + carrier: carrier + enduserponumber: enduserponumber + totalamount: totalamount + holdreason: holdreason + shiptosuffix: shiptosuffix + fulfillmentflag: fulfillmentflag + billto: + city: city + countrycode: countrycode + phonenumber: phonenumber + postalcode: postalcode + addressline3: addressline3 + attention: attention + addressline2: addressline2 + addressline1: addressline1 + state: state + name2: name2 + fax: fax + name1: name1 + email: email + invoicedate: 2000-01-23 + shipcomplete: shipcomplete + customerforeignfrightamt: customerforeignfrightamt + ordertype: ordertype + responsepreamble: + statuscode: statuscode + responsemessage: responsemessage + responsestatus: responsestatus + properties: + serviceresponse: + $ref: '#/components/schemas/InvoiceDetailResponse_serviceresponse' + title: invoiceDetails.Response + type: object + x-tags: + - invoices + InvoiceDetailsv6.1Response: + example: + summary: + miscCharges: + - chargeLineReference: chargeLineReference + isNonMisc: isNonMisc + miscChargeLineTotal: 1.2315135367772556 + miscChargeLineCount: 7 + chargeDescription: chargeDescription + - chargeLineReference: chargeLineReference + isNonMisc: isNonMisc + miscChargeLineTotal: 1.2315135367772556 + miscChargeLineCount: 7 + chargeDescription: chargeDescription + totals: + netInvoiceAmount: 1.0246457001441578 + freightAmount: 1.1730742509559433 + invoicedAmountDue: 7.457744773683766 + discountAmount: 1.4894159098541704 + discountType: discountType + totalTaxAmount: 6.84685269835264 + foreignFxTotals: + foreignCurrencyCode: foreignCurrencyCode + foreignCurrencyFxRate: 4.965218492984954 + foreignTotalTaxAmount: 5.025004791520295 + foreignInvoiceAmountDue: foreignInvoiceAmountDue + foreignTotalTaxableAmount: foreignTotalTaxableAmount + lines: + productLineCount: 2 + productLineTotalQuantity: 4 + notes: notes + endCustomerOrderNumber: endCustomerOrderNumber + invoiceDate: 2000-01-23 + customerNumber: customerNumber + customerOrderNumber: customerOrderNumber + invoiceDueDate: invoiceDueDate + OrderDate: 2000-01-23 + customerCountryCode: customerCountryCode + ingramOrderNumber: ingramOrderNumber + paymentTermsInfo: + paymentTermsDescription: paymentTermsDescription + paymentTermsDueDate: paymentTermsDueDate + paymentTermsCode: paymentTermsCode + shipToInfo: + phoneNumber: phoneNumber + city: city + countryCode: countryCode + contact: contact + companyName: companyName + postalCode: postalCode + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + email: email + billToInfo: + phoneNumber: phoneNumber + city: city + countryCode: countryCode + contact: contact + companyName: companyName + postalCode: postalCode + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + email: email + invoiceNumber: invoiceNumber + fxRateInfo: + companyCurrency: companyCurrency + currencyFxRate: 3.616076749251911 + currencyCode: currencyCode + invoiceCurrency: invoiceCurrency + invoiceType: invoiceType + billToID: billToID + invoiceStatus: invoiceStatus + lines: + - ingramPartNumber: ingramPartNumber + unitWeight: unitWeight + unitPrice: 6.027456183070403 + customerPartNumber: customerPartNumber + quantity: 0 + unitOfMeasure: unitOfMeasure + taxPercentage: 5.962133916683182 + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + ingramLineNumber: ingramLineNumber + quantityOrdered: 7 + vendorName: vendorName + customerLineNumber: "0" + taxRate: 5.637376656633329 + quantityShipped: 9 + extendedPrice: 1.4658129805029452 + vendorPartNumber: vendorPartNumber + taxAmount: 2.3021358869347655 + currencyCode: currencyCode + productDescription: productDescription + - ingramPartNumber: ingramPartNumber + unitWeight: unitWeight + unitPrice: 6.027456183070403 + customerPartNumber: customerPartNumber + quantity: 0 + unitOfMeasure: unitOfMeasure + taxPercentage: 5.962133916683182 + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + ingramLineNumber: ingramLineNumber + quantityOrdered: 7 + vendorName: vendorName + customerLineNumber: "0" + taxRate: 5.637376656633329 + quantityShipped: 9 + extendedPrice: 1.4658129805029452 + vendorPartNumber: vendorPartNumber + taxAmount: 2.3021358869347655 + currencyCode: currencyCode + productDescription: productDescription + properties: + invoiceNumber: + description: The Invoice number for the order. + type: string + invoiceStatus: + description: Status of the invoice. + type: string + invoiceDate: + description: Date of an Invoice. + format: date + type: string + customerOrderNumber: + description: The reseller's order number for reference in their system. + type: string + endCustomerOrderNumber: + description: The end customer's order number for reference in their system. + type: string + OrderDate: + description: The date and time in UTC format that the order was created. + format: date + type: string + billToID: + description: Bill to party + type: string + invoiceType: + description: Type of the Invoice + type: string + invoiceDueDate: + description: Date when the invoice is due. + type: string + customerCountryCode: + description: Customer country code. + type: string + customerNumber: + description: Unique customer number in Ingram's system. + type: string + ingramOrderNumber: + description: The IngramMicro sales order number. + type: string + notes: + description: Notes for the invoice. + type: string + paymentTermsInfo: + $ref: '#/components/schemas/InvoiceDetailsv6_1Response_paymentTermsInfo' + billToInfo: + $ref: '#/components/schemas/InvoiceDetailsv6_1Response_billToInfo' + shipToInfo: + $ref: '#/components/schemas/InvoiceDetailsv6_1Response_shipToInfo' + lines: + items: + $ref: '#/components/schemas/InvoiceDetailsv6_1Response_lines_inner' + type: array + fxRateInfo: + $ref: '#/components/schemas/InvoiceDetailsv6_1Response_fxRateInfo' + summary: + $ref: '#/components/schemas/InvoiceDetailsv6_1Response_summary' + title: invoiceDetailsv6.1Response + type: object + x-tags: + - invoices + invoiceDetails: + example: + serviceresponse: + invoicedetailresponse: + creditmemoreasoncode: creditmemoreasoncode + paymentterms: paymentterms + soldto: + city: city + countrycode: countrycode + phonenumber: phonenumber + postalcode: postalcode + addressline3: addressline3 + attention: attention + addressline2: addressline2 + addressline1: addressline1 + state: state + name2: name2 + fax: fax + name1: name1 + email: email + orderstatus: orderstatus + totalotherfees: 6.027456183070403 + shippableswitch: shippableswitch + currencyrate: currencyrate + invoicetype: invoicetype + orderdate: 2000-01-23 + currencycode: currencycode + globalorderid: globalorderid + totalsales: totalsales + extendedspecs: + - attributevalue: attributevalue + attributename: attributename + - attributevalue: attributevalue + attributename: attributename + taxtype: taxtype + totaltaxamount: totaltaxamount + discountamount: 0.8008281904610115 + originalshipcode: originalshipcode + customerordernumber: customerordernumber + lines: + - linenumber: linenumber + vendorpartnumber: vendorpartnumber + backorderquantity: backorderquantity + linetype: linetype + trackingnumberdetails: + - trackingnumber: trackingnumber + - trackingnumber: trackingnumber + specialbidnumber: specialbidnumber + ordersuffix: ordersuffix + unitprice: unitprice + productextendedspecs: + - attributevalue: attributevalue + attributename: attributename + - attributevalue: attributevalue + attributename: attributename + marginpercent: marginpercent + isacopapplied: isacopapplied + shippedquantity: shippedquantity + shipfrombranch: shipfrombranch + orderedquantity: orderedquantity + extendedprice: extendedprice + serialnumberdetails: + - deliverynumber: deliverynumber + serialnumber: serialnumber + - deliverynumber: deliverynumber + serialnumber: serialnumber + partdescription: partdescription + partnumber: partnumber + backorderetadate: 2000-01-23 + unitofmeasure: unitofmeasure + - linenumber: linenumber + vendorpartnumber: vendorpartnumber + backorderquantity: backorderquantity + linetype: linetype + trackingnumberdetails: + - trackingnumber: trackingnumber + - trackingnumber: trackingnumber + specialbidnumber: specialbidnumber + ordersuffix: ordersuffix + unitprice: unitprice + productextendedspecs: + - attributevalue: attributevalue + attributename: attributename + - attributevalue: attributevalue + attributename: attributename + marginpercent: marginpercent + isacopapplied: isacopapplied + shippedquantity: shippedquantity + shipfrombranch: shipfrombranch + orderedquantity: orderedquantity + extendedprice: extendedprice + serialnumberdetails: + - deliverynumber: deliverynumber + serialnumber: serialnumber + - deliverynumber: deliverynumber + serialnumber: serialnumber + partdescription: partdescription + partnumber: partnumber + backorderetadate: 2000-01-23 + unitofmeasure: unitofmeasure + invoicenumber: invoicenumber + shipdate: 2000-01-23 + customernumber: customernumber + freightamount: freightamount + miscfeeline: + - code: code + description: description + chargeamount: chargeamount + - code: code + description: description + chargeamount: chargeamount + carrierdescription: carrierdescription + weight: weight + freightforwardercode: freightforwardercode + shoptoaddress: + city: city + countrycode: countrycode + phonenumber: phonenumber + postalcode: postalcode + addressline3: addressline3 + attention: attention + addressline2: addressline2 + addressline1: addressline1 + state: state + name2: name2 + fax: fax + name1: name1 + email: email + customerfreightamount: customerfreightamount + companycurrency: companycurrency + billtosuffix: billtosuffix + carrier: carrier + enduserponumber: enduserponumber + totalamount: totalamount + holdreason: holdreason + shiptosuffix: shiptosuffix + fulfillmentflag: fulfillmentflag + billto: + city: city + countrycode: countrycode + phonenumber: phonenumber + postalcode: postalcode + addressline3: addressline3 + attention: attention + addressline2: addressline2 + addressline1: addressline1 + state: state + name2: name2 + fax: fax + name1: name1 + email: email + invoicedate: 2000-01-23 + shipcomplete: shipcomplete + customerforeignfrightamt: customerforeignfrightamt + ordertype: ordertype + responsepreamble: + statuscode: statuscode + responsemessage: responsemessage + responsestatus: responsestatus + properties: + serviceresponse: + $ref: '#/components/schemas/InvoiceDetailResponse_serviceresponse' + title: invoiceDetails.Response + type: object + x-tags: + - invoices + addressType: + description: Address type object + example: + city: city + countrycode: countrycode + phonenumber: phonenumber + postalcode: postalcode + addressline3: addressline3 + attention: attention + addressline2: addressline2 + addressline1: addressline1 + state: state + name2: name2 + fax: fax + name1: name1 + email: email + properties: + attention: + type: string + name1: + type: string + name2: + type: string + addressline1: + type: string + addressline2: + type: string + addressline3: + type: string + city: + type: string + state: + type: string + postalcode: + type: string + countrycode: + type: string + fax: + type: string + phonenumber: + type: string + email: + type: string + title: invoiceDetails.addressType.Response + type: object + x-tags: + - invoices + productLineType: + description: Product line items object under each invoice + example: + linenumber: linenumber + vendorpartnumber: vendorpartnumber + backorderquantity: backorderquantity + linetype: linetype + trackingnumberdetails: + - trackingnumber: trackingnumber + - trackingnumber: trackingnumber + specialbidnumber: specialbidnumber + ordersuffix: ordersuffix + unitprice: unitprice + productextendedspecs: + - attributevalue: attributevalue + attributename: attributename + - attributevalue: attributevalue + attributename: attributename + marginpercent: marginpercent + isacopapplied: isacopapplied + shippedquantity: shippedquantity + shipfrombranch: shipfrombranch + orderedquantity: orderedquantity + extendedprice: extendedprice + serialnumberdetails: + - deliverynumber: deliverynumber + serialnumber: serialnumber + - deliverynumber: deliverynumber + serialnumber: serialnumber + partdescription: partdescription + partnumber: partnumber + backorderetadate: 2000-01-23 + unitofmeasure: unitofmeasure + properties: + linenumber: + type: string + linetype: + type: string + partnumber: + type: string + vendorpartnumber: + type: string + partdescription: + type: string + shipfrombranch: + type: string + shippedquantity: + type: string + orderedquantity: + type: string + marginpercent: + type: string + backorderquantity: + type: string + backorderetadate: + format: date + type: string + extendedprice: + type: string + specialbidnumber: + type: string + ordersuffix: + type: string + isacopapplied: + type: string + unitprice: + type: string + unitofmeasure: + type: string + serialnumberdetails: + items: + $ref: '#/components/schemas/productLineType_serialnumberdetails_inner' + type: array + trackingnumberdetails: + items: + $ref: '#/components/schemas/productLineType_trackingnumberdetails_inner' + type: array + productextendedspecs: + items: + $ref: '#/components/schemas/InvoiceDetailResponse_serviceresponse_invoicedetailresponse_extendedspecs_inner' + type: array + title: invoiceDetails.productLineType.Response + type: object + x-tags: + - invoices + ErrorResponse: + properties: + errors: + items: + $ref: '#/components/schemas/ErrorResponse_errors_inner' + type: array + type: object + orderCreateRequest: + description: Request schema for order create endpoint + properties: + ordercreaterequest: + $ref: '#/components/schemas/orderCreateRequest_ordercreaterequest' + title: orderCreate.Request + type: object + x-examples: {} + x-tags: + - orders + orderCreateResponse: + description: Response schema for order create endpoint + example: + serviceresponse: + ordersummary: + totalorderamount: totalorderamount + totalordercreated: totalordercreated + customerponumber: customerponumber + shiptoaddress: + city: city + postalcode: postalcode + countrycode: countrycode + name: name + addressline3: addressline3 + attention: attention + addressline2: addressline2 + addressline1: addressline1 + state: state + ordercreateresponse: + - freightamount: 6.027456183070403 + numberoflineswitherror: numberoflineswitherror + numberoflineswithwarning: numberoflineswithwarning + orderamount: 1.4658129805029452 + ordertimestamp: ordertimestamp + taxamount: 0.8008281904610115 + globalorderid: globalorderid + invoicingsystemorderid: invoicingsystemorderid + numberoflineswithsuccess: numberoflineswithsuccess + ordertype: S + Lines: + - linenumber: linenumber + requestedunitprice: 5.962133916683182 + carriercode: carriercode + linetype: linetype + confirmedquantity: 2 + carrierdescription: carrierdescription + ordersuffix: ordersuffix + unitproductprice: 9.301444243932576 + warehouseid: warehouseid + globalskuid: globalskuid + backorderedquantity: 7 + globallinenumber: globallinenumber + requestedquantity: 5 + partnumber: partnumber + netamount: 3.616076749251911 + - linenumber: linenumber + requestedunitprice: 5.962133916683182 + carriercode: carriercode + linetype: linetype + confirmedquantity: 2 + carrierdescription: carrierdescription + ordersuffix: ordersuffix + unitproductprice: 9.301444243932576 + warehouseid: warehouseid + globalskuid: globalskuid + backorderedquantity: 7 + globallinenumber: globallinenumber + requestedquantity: 5 + partnumber: partnumber + netamount: 3.616076749251911 + - freightamount: 6.027456183070403 + numberoflineswitherror: numberoflineswitherror + numberoflineswithwarning: numberoflineswithwarning + orderamount: 1.4658129805029452 + ordertimestamp: ordertimestamp + taxamount: 0.8008281904610115 + globalorderid: globalorderid + invoicingsystemorderid: invoicingsystemorderid + numberoflineswithsuccess: numberoflineswithsuccess + ordertype: S + Lines: + - linenumber: linenumber + requestedunitprice: 5.962133916683182 + carriercode: carriercode + linetype: linetype + confirmedquantity: 2 + carrierdescription: carrierdescription + ordersuffix: ordersuffix + unitproductprice: 9.301444243932576 + warehouseid: warehouseid + globalskuid: globalskuid + backorderedquantity: 7 + globallinenumber: globallinenumber + requestedquantity: 5 + partnumber: partnumber + netamount: 3.616076749251911 + - linenumber: linenumber + requestedunitprice: 5.962133916683182 + carriercode: carriercode + linetype: linetype + confirmedquantity: 2 + carrierdescription: carrierdescription + ordersuffix: ordersuffix + unitproductprice: 9.301444243932576 + warehouseid: warehouseid + globalskuid: globalskuid + backorderedquantity: 7 + globallinenumber: globallinenumber + requestedquantity: 5 + partnumber: partnumber + netamount: 3.616076749251911 + responsepreamble: + statuscode: statuscode + responsemessage: responsemessage + responsestatus: responsestatus + properties: + serviceresponse: + $ref: '#/components/schemas/orderCreateResponse_serviceresponse' + title: orderCreate.Response + type: object + x-tags: + - orders + x-examples: {} + orderDetailResponse: + description: Response schema for order details endpoint + example: + serviceresponse: + orderdetailresponse: + freightamount: freightamount + totalweight: totalweight + orderstatus: orderstatus + miscfeeline: + - description: description + chargeamount: chargeamount + - description: description + chargeamount: chargeamount + entrytimestamp: entrytimestamp + ordertotalvalue: 0.8008281904610115 + billtoaddress: + city: city + postalcode: postalcode + countrycode: countrycode + name: name + addressline3: addressline3 + attention: attention + addressline2: addressline2 + addressline1: addressline1 + state: state + suffix: suffix + currencycode: currencycode + extendedspecs: + - attributevalue: attributevalue + attributename: attributename + - attributevalue: attributevalue + attributename: attributename + shiptoaddress: + city: city + postalcode: postalcode + countrycode: countrycode + name: name + addressline3: addressline3 + attention: attention + addressline2: addressline2 + addressline1: addressline1 + state: state + suffix: suffix + totaltax: totaltax + enduserponumber: enduserponumber + ordersubtotal: 6.027456183070403 + ordernumber: ordernumber + customerordernumber: customerordernumber + lines: + - linenumber: linenumber + backorderquantity: backorderquantity + confirmedquantity: confirmedquantity + manufacturerpartnumber: manufacturerpartnumber + ordersuffix: ordersuffix + unitweight: unitweight + shipmentdetails: + - shipfromwarehouseid: shipfromwarehouseid + quantity: 2.3021358869347655 + statusdescription: statusdescription + carriercode: carriercode + carriername: carriername + shipmentdate: shipmentdate + shippeddate: shippeddate + pronumber: pronumber + ponumber: ponumber + holdreasoncodedescription: holdreasoncodedescription + carriertype: carriertype + invoicedate: invoicedate + warehousename: warehousename + invoicenumber: invoicenumber + status: status + packagedetails: + cartonnumber: cartonnumber + trackingnumber: trackingnumber + quantityinbox: quantityinbox + packageweight: packageweight + - shipfromwarehouseid: shipfromwarehouseid + quantity: 2.3021358869347655 + statusdescription: statusdescription + carriercode: carriercode + carriername: carriername + shipmentdate: shipmentdate + shippeddate: shippeddate + pronumber: pronumber + ponumber: ponumber + holdreasoncodedescription: holdreasoncodedescription + carriertype: carriertype + invoicedate: invoicedate + warehousename: warehousename + invoicenumber: invoicenumber + status: status + packagedetails: + cartonnumber: cartonnumber + trackingnumber: trackingnumber + quantityinbox: quantityinbox + packageweight: packageweight + unitprice: 1.4658129805029452 + productextendedspecs: + - attributevalue: attributevalue + attributename: attributename + - attributevalue: attributevalue + attributename: attributename + erpordernumber: erpordernumber + linestatus: linestatus + extendedprice: 5.962133916683182 + trackingnumber: + - trackingnumber + - trackingnumber + taxamount: 5.637376656633329 + partdescription1: partdescription1 + globallinenumber: globallinenumber + partdescription2: partdescription2 + serialnumberdetails: + - serialnumber: serialnumber + - serialnumber: serialnumber + vendorcode: vendorcode + requestedquantity: requestedquantity + partnumber: partnumber + vendorname: vendorname + backorderetadate: backorderetadate + - linenumber: linenumber + backorderquantity: backorderquantity + confirmedquantity: confirmedquantity + manufacturerpartnumber: manufacturerpartnumber + ordersuffix: ordersuffix + unitweight: unitweight + shipmentdetails: + - shipfromwarehouseid: shipfromwarehouseid + quantity: 2.3021358869347655 + statusdescription: statusdescription + carriercode: carriercode + carriername: carriername + shipmentdate: shipmentdate + shippeddate: shippeddate + pronumber: pronumber + ponumber: ponumber + holdreasoncodedescription: holdreasoncodedescription + carriertype: carriertype + invoicedate: invoicedate + warehousename: warehousename + invoicenumber: invoicenumber + status: status + packagedetails: + cartonnumber: cartonnumber + trackingnumber: trackingnumber + quantityinbox: quantityinbox + packageweight: packageweight + - shipfromwarehouseid: shipfromwarehouseid + quantity: 2.3021358869347655 + statusdescription: statusdescription + carriercode: carriercode + carriername: carriername + shipmentdate: shipmentdate + shippeddate: shippeddate + pronumber: pronumber + ponumber: ponumber + holdreasoncodedescription: holdreasoncodedescription + carriertype: carriertype + invoicedate: invoicedate + warehousename: warehousename + invoicenumber: invoicenumber + status: status + packagedetails: + cartonnumber: cartonnumber + trackingnumber: trackingnumber + quantityinbox: quantityinbox + packageweight: packageweight + unitprice: 1.4658129805029452 + productextendedspecs: + - attributevalue: attributevalue + attributename: attributename + - attributevalue: attributevalue + attributename: attributename + erpordernumber: erpordernumber + linestatus: linestatus + extendedprice: 5.962133916683182 + trackingnumber: + - trackingnumber + - trackingnumber + taxamount: 5.637376656633329 + partdescription1: partdescription1 + globallinenumber: globallinenumber + partdescription2: partdescription2 + serialnumberdetails: + - serialnumber: serialnumber + - serialnumber: serialnumber + vendorcode: vendorcode + requestedquantity: requestedquantity + partnumber: partnumber + vendorname: vendorname + backorderetadate: backorderetadate + entrymethoddescription: entrymethoddescription + commentlines: + - commenttext1: commenttext1 + commenttext2: commenttext2 + - commenttext1: commenttext1 + commenttext2: commenttext2 + ordertype: ordertype + enduserinfo: + enduserid: enduserid + responsepreamble: + statuscode: statuscode + responsemessage: responsemessage + responsestatus: responsestatus + properties: + serviceresponse: + $ref: '#/components/schemas/orderDetailResponse_serviceresponse' + title: orderDetail.Response + type: object + x-tags: + - orders + x-examples: + Example: + serviceresponse: + responsepreamble: + responsestatus: SUCCESS + orderdetailresponse: + ordernumber: 10-12345 + customerordernumber: test order + enduserponumber: ABC + orderstatus: INVOICED + entrytimestamp: 2018-07-15T04:31:42-07:00 + entrymethoddescription: XML/PCG + fulfilmentordercode: "Y" + ordertotalvalue: 3907.38 + ordersubtotal: 3907.38 + freightamount: 141.34 + currencycode: USD + totalweight: "86" + totaltax: "0" + billtoaddress: + suffix: "000" + name: Ingram Micro + addressline1: 123 Ingram Way + city: Irvine + state: CA + postalcode: "12345000" + countrycode: US + shiptoaddress: + name: Mr Customer + addressline1: 123 Main St + city: Anywhere + state: CA + postalcode: "12345000" + countrycode: US + lines: + - globallinenumber: "001" + ordersuffix: "11" + linestatus: INVOICED + partnumber: 3AM612 + manufacturerpartnumber: QN75Q8FNBFXZA + vendorname: SAMSUNG - CONSUMER TV + partdescription1: 75IN Q8 FLAT 4K UHD HDR SMARTTV + partdescription2: FULL ARRAY BACKLIGHTIN CLEAN CABLE + freeitempromoflag: "false" + unitweight: "75" + unitprice: 50000.48 + foreignunitprice: 0 + extendedprice: 5000.48 + foreignextendedprice: 0 + taxamount: 0 + requestedquantity: "1" + confirmedquantity: "1" + backorderquantity: "0" + promisedate: 2018-07-15 + shipmentdetails: + - quantity: 1 + shipmentdate: 2018-07-16 + shipfromwarehouseid: "40" + warehousename: "Carol Stream, IL" + invoicenumber: "1234511" + invoicedate: 2018-07-16 + status: I + statusdescription: INVOICED + shippeddate: 2018-07-16 + carriercode: AY + carriername: ORD4708752 + packagedetails: + trackingnumber: 6838019 + packageweight: 80 + cartonnumber: "001" + quantityinbox: "0000001" + erpordernumber: 10-12345-11 + vendorcode: Q012 + isacopapplied: "N" + adjustedcost: "5000.09" + serialnumberdetails: + serialnumber: 07AS3CAK500682 + productextendedspecs: + attributename: commenttext + attributevalue: FULL ARRAY BACKLIGHTIN CLEAN CABLE + - globallinenumber: "002" + ordersuffix: "21" + linestatus: INVOICED + partnumber: 2GH590 + manufacturerpartnumber: F-ADT-STR-KT-1 + vendorname: SAMSUNG - SMART THINGS + partdescription1: ADT HOME SECURITY STARTER KIT + partdescription2: SECURITY STARTER KIT + freeitempromoflag: "false" + unitweight: "5.15" + unitprice: 500.9 + foreignunitprice: 0 + extendedprice: 500.9 + foreignextendedprice: 0 + taxamount: 0 + requestedquantity: "1" + confirmedquantity: "1" + backorderquantity: "0" + promisedate: 2018-07-15 + shipmentdetails: + - quantity: 1 + shipmentdate: 2018-07-17 + shipfromwarehouseid: "80" + warehousename: "Jonestown, PA" + invoicenumber: "1234521" + invoicedate: 2018-07-16 + status: I + statusdescription: INVOICED + shippeddate: 2018-07-17 + carriercode: RG + carriername: FEDEX GROUND + packagedetails: + trackingnumber: "017136225260674" + packageweight: "000000006" + cartonnumber: "001" + quantityinbox: "0000001" + erpordernumber: 10-12345-21 + vendorcode: QG64 + isacopapplied: "N" + adjustedcost: "400.99" + productextendedspecs: + attributename: commenttext + attributevalue: SECURITY STARTER KIT + extendedspecs: + - attributename: termscode + attributevalue: "300" + - attributename: termsdescription + attributevalue: NET 30 DAYS + - attributename: commenttext + attributevalue: PHONE:7148675309 + - attributename: commenttext + attributevalue: PHONE:7148675309 + ordertype: S + orderCancelResponse: + description: Response schema for order delete endpoint + example: + serviceresponse: + responsepreamble: + returnCode: returnCode + returnMessage: returnMessage + requestStatus: requestStatus + properties: + serviceresponse: + $ref: '#/components/schemas/orderCancelResponse_serviceresponse' + title: orderCancel.Response + type: object + x-tags: + - orders + x-examples: {} + orderSearchResponse: + description: Response schema for order search endpoint + example: + serviceResponse: + responsepreamble: + returnmessage: returnmessage + requeststatus: requeststatus + ordersearchresponse: + ordersfound: ordersfound + pagesize: pagesize + orders: + - entrytimestamp: entrytimestamp + ordernumber: ordernumber + links: + topic: orders + href: https://openapi-generator.tech + type: GET + customerordernumber: customerordernumber + suborders: + - statuscode: statuscode + subordernumber: subordernumber + holdreason: holdreason + holdreasoncode: holdreasoncode + links: + - topic: orders + href: https://openapi-generator.tech + type: GET + - topic: orders + href: https://openapi-generator.tech + type: GET + status: status + - statuscode: statuscode + subordernumber: subordernumber + holdreason: holdreason + holdreasoncode: holdreasoncode + links: + - topic: orders + href: https://openapi-generator.tech + type: GET + - topic: orders + href: https://openapi-generator.tech + type: GET + status: status + - entrytimestamp: entrytimestamp + ordernumber: ordernumber + links: + topic: orders + href: https://openapi-generator.tech + type: GET + customerordernumber: customerordernumber + suborders: + - statuscode: statuscode + subordernumber: subordernumber + holdreason: holdreason + holdreasoncode: holdreasoncode + links: + - topic: orders + href: https://openapi-generator.tech + type: GET + - topic: orders + href: https://openapi-generator.tech + type: GET + status: status + - statuscode: statuscode + subordernumber: subordernumber + holdreason: holdreason + holdreasoncode: holdreasoncode + links: + - topic: orders + href: https://openapi-generator.tech + type: GET + - topic: orders + href: https://openapi-generator.tech + type: GET + status: status + pagenumber: pagenumber + properties: + serviceResponse: + $ref: '#/components/schemas/orderSearchResponse_serviceResponse' + title: orderSearch.Response + type: object + x-tags: + - orders + productSearchResponse: + description: Response object model for the product search endpoint + example: + serviceresponse: + responsepreamble: + returnmessage: returnmessage + returncode: returncode + requeststatus: requeststatus + productsearchresponse: + - partnumbers: + - productdescription: productdescription + manufacturerpartnumber: manufacturerpartnumber + ingrampartnumber: ingrampartnumber + haswarranty: haswarranty + currency: currency + upccode: upccode + - productdescription: productdescription + manufacturerpartnumber: manufacturerpartnumber + ingrampartnumber: ingrampartnumber + haswarranty: haswarranty + currency: currency + upccode: upccode + responseflag: responseflag + - partnumbers: + - productdescription: productdescription + manufacturerpartnumber: manufacturerpartnumber + ingrampartnumber: ingrampartnumber + haswarranty: haswarranty + currency: currency + upccode: upccode + - productdescription: productdescription + manufacturerpartnumber: manufacturerpartnumber + ingrampartnumber: ingrampartnumber + haswarranty: haswarranty + currency: currency + upccode: upccode + responseflag: responseflag + properties: + serviceresponse: + $ref: '#/components/schemas/productSearchResponse_serviceresponse' + title: productSearch.Response + type: object + x-tags: + - product catalog + priceAndAvailabilityRequest: + description: Request object model for the multi sku price and stock API endpoint + properties: + servicerequest: + $ref: '#/components/schemas/priceAndAvailabilityRequest_servicerequest' + title: priceAndAvailability.Request + type: object + x-examples: + Example: + servicerequest: + requestpreamble: + customernumber: 20-222222 + isocountrycode: US + priceandstockrequest: + showwarehouseavailability: "True" + extravailabilityflag: "Y" + item: + - ingrampartnumber: M93592 + quantity: 1 + includeallsystems: false + x-tags: + - product catalog + priceAndAvailabilityResponse: + description: Response object model for the multi sku price and stock API endpoint + example: + serviceresponse: + priceandstockresponse: + details: + - customerprice: 0.8008281904610115 + vendorpartnumber: vendorpartnumber + warehousedetails: + - onholdquantity: 5 + warehouseid: warehouseid + warehousedescription: warehousedescription + onorderquantity: 5 + etadate: etadate + availablequantity: 1 + - onholdquantity: 5 + warehouseid: warehouseid + warehousedescription: warehousedescription + onorderquantity: 5 + etadate: etadate + availablequantity: 1 + itemstatus: SUCCESS + extendedvendorpartnumber: extendedvendorpartnumber + mediacpu: mediacpu + skustatus: ACTIVE + cpucode: cpucode + newmedia: newmedia + categorysubcategory: categorysubcategory + skuauthorized: skuauthorized + statusmessage: statusmessage + globalskuid: globalskuid + retailprice: 6.027456183070403 + enduserrequired: "Y" + ingrampartnumber: ingrampartnumber + vendornumber: vendornumber + partdescription1: partdescription1 + partdescription2: partdescription2 + vendorname: vendorname + class: A + backorderflag: "Y" + - customerprice: 0.8008281904610115 + vendorpartnumber: vendorpartnumber + warehousedetails: + - onholdquantity: 5 + warehouseid: warehouseid + warehousedescription: warehousedescription + onorderquantity: 5 + etadate: etadate + availablequantity: 1 + - onholdquantity: 5 + warehouseid: warehouseid + warehousedescription: warehousedescription + onorderquantity: 5 + etadate: etadate + availablequantity: 1 + itemstatus: SUCCESS + extendedvendorpartnumber: extendedvendorpartnumber + mediacpu: mediacpu + skustatus: ACTIVE + cpucode: cpucode + newmedia: newmedia + categorysubcategory: categorysubcategory + skuauthorized: skuauthorized + statusmessage: statusmessage + globalskuid: globalskuid + retailprice: 6.027456183070403 + enduserrequired: "Y" + ingrampartnumber: ingrampartnumber + vendornumber: vendornumber + partdescription1: partdescription1 + partdescription2: partdescription2 + vendorname: vendorname + class: A + backorderflag: "Y" + responsepreamble: + statuscode: statuscode + responsemessage: responsemessage + responsestatus: responsestatus + properties: + serviceresponse: + $ref: '#/components/schemas/priceAndAvailabilityResponse_serviceresponse' + title: priceAndAvailability.Response + type: object + x-examples: + Success: + serviceresponse: + responsepreamble: + responsestatus: SUCCESS + statuscode: "200" + responsemessage: Data Found + priceandstockresponse: + details: + - itemstatus: SUCCESS + statusmessage: A-No qty breaks availa + ingrampartnumber: TB6489 + vendorpartnumber: H1180HD + globalskuid: A300-TB6489 + customerprice: 850.54 + currency: USD + partdescription1: H1180HD DLP 3D PROJ 2000L 1080PPROJ + partdescription2: 10000:1 VGA HDMI RCA + vendornumber: Q680 + vendorname: VIVITEK + cpucode: DLP-PR + class: X + skustatus: ACTIVE + mediacpu: PROJ DLP-PR + categorysubcategory: 04 25 + retailprice: 899 + newmedia: PROJ + backorderflag: "N" + skuauthorized: "Y" + warehousedetails: + - warehouseid: "80" + warehousedescription: "Jonestown, PA" + availablequantity: 0 + onorderquantity: 0 + - warehouseid: "10" + warehousedescription: "Mira Loma, CA" + availablequantity: 0 + onorderquantity: 0 + Invalid Customer: + serviceresponse: + responsepreamble: + responsestatus: FAILED + statuscode: "500" + responsemessage: Data Not Found + priceandstockresponse: + details: + - itemstatus: FAILED + statusmessage: E-INVALID CUSTOMER NUMBER + - itemstatus: FAILED + statusmessage: E-INVALID CUSTOMER NUMBER + - itemstatus: FAILED + statusmessage: E-INVALID CUSTOMER NUMBER + 'Invalid Country ': + serviceresponse: + responsepreamble: + responsestatus: SUCCESSWITHERROR + statuscode: "046" + responsemessage: Partial Data Found + priceandstockresponse: + details: + - itemstatus: SUCCESS + statusmessage: edv 2 + ingrampartnumber: NaN + globalskuid: A001-NaN + customernumber: 41-231791 + quantity: 0 + customerprice: 0 + vendornumber: NaN + retailprice: 0 + enduserrequired: "false" + specialpromoflag: "false" + isavailable: false + isstocakable: false + isbom: false + hasquantitybreaks: false + haswebdiscounts: false + issboprice: false + extendednetamount: 0 + taxamount: 0 + totalfeeamount: 0 + totalpromotionamount: 0 + totalenvironmentalfees: 0 + x-tags: + - product catalog + warehouseListType: + example: + onholdquantity: 5 + warehouseid: warehouseid + warehousedescription: warehousedescription + onorderquantity: 5 + etadate: etadate + availablequantity: 1 + properties: + warehouseid: + description: "" + type: string + warehousedescription: + description: City of the Ingram Micro warehouse location + type: string + availablequantity: + description: On hand available quantity + type: integer + onorderquantity: + description: On Order quantity + type: integer + onholdquantity: + description: On hold quantity + type: integer + etadate: + type: string + title: priceAndAvailability.warehouseListType.Response + type: object + quoteListRequest: + description: Request schema for get quote list endpoint + properties: + quoteSearchRequest: + $ref: '#/components/schemas/quoteListRequest_quoteSearchRequest' + title: quoteList.Request + type: object + x-examples: + Example: + quoteSearchRequest: + requestPreamble: + customerNumber: "40006990" + customerContact: user.name@ingrampartner.com + isoCountryCode: US + retrieveQuoteRequest: + quoteNumber: QUO-02973-V6H8R6 + bidNumber: MDMF-1199371-1811 + endUserName: CARESOURCE MANAGEMENT GROUP CO. + quoteStatus: "3" + fromDate: 2019-09-01 + toDate: 2019-09-11 + pageIndex: 1 + recordsPerPage: 25 + sorting: desc + sortingColumnName: createdon + thirdPartySource: 3RDPIDCONWISE + x-tags: + - quotes + quoteListResponse: + description: Response schema for get quote list endpoint + example: + quoteSearchResponse: + responsePreamble: + responseStatusCode: responseStatusCode + responseStatus: responseStatus + responseMessage: responseMessage + totalCount: 6 + quoteList: + - totalAmount: totalAmount + createdDate: 2019-10-08T00:00:00.000+00:00 + revisionNumber: 0 + lastModifiedDate: 2019-10-08T00:00:00.000+00:00 + endUserName: endUserName + bidNumber: bidNumber + quoteNumber: quoteNumber + quoteStatus: quoteStatus + quoteExpiryDate: 2019-10-08T00:00:00.000+00:00 + quoteName: quoteName + - totalAmount: totalAmount + createdDate: 2019-10-08T00:00:00.000+00:00 + revisionNumber: 0 + lastModifiedDate: 2019-10-08T00:00:00.000+00:00 + endUserName: endUserName + bidNumber: bidNumber + quoteNumber: quoteNumber + quoteStatus: quoteStatus + quoteExpiryDate: 2019-10-08T00:00:00.000+00:00 + quoteName: quoteName + properties: + quoteSearchResponse: + $ref: '#/components/schemas/quoteListResponse_quoteSearchResponse' + title: quoteList.Response + type: object + x-examples: + Success: + quoteSearchResponse: + responsePreamble: + responseStatus: Passed + responseStatusCode: "200" + responseMessage: Records Found + quotelist: + - quoteGuid: dbabb2a5-02ea-e911-a97b-000d3a30e34c + quoteName: TEST-9771006-1920_CW EndUser11 + quoteNumber: QUO-11048-S9P1R3 + revisionNumber: 0 + endUserName: CW EndUser11 + bidNumber: TEST-9771006-1920 + totalAmount: "60766.2" + quoteStatus: Active + createdDate: 2019-10-08 + lastModifiedDate: 2019-10-08 + quoteExpiryDate: 0001-01-01 + - quoteGuid: ec14fd96-02ea-e911-a98d-000d3a30e941 + quoteName: TEST-9771006-1920_CW EndUser12 + quoteNumber: QUO-11047-M1K1Z6 + revisionNumber: 0 + endUserName: CW EndUser12 + bidNumber: TEST-9771006-1920 + totalAmount: "60766.2" + quoteStatus: Active + createdDate: 2019-10-08 + lastModifiedDate: 2019-10-08 + quoteExpiryDate: 0001-01-01 + - quoteGuid: f3d7d186-02ea-e911-a98d-000d3a30e941 + quoteName: TEST-9771006-1920_CW EndUser10 + quoteNumber: QUO-11045-G1X9S8 + revisionNumber: 0 + endUserName: CW EndUser10 + bidNumber: TEST-9771006-1920 + totalAmount: "60766.2" + quoteStatus: Active + createdDate: 2019-10-08 + lastModifiedDate: 2019-10-08 + quoteExpiryDate: 0001-01-01 + - quoteGuid: 43ae3e7f-02ea-e911-a97a-000d3a30eb04 + quoteName: TEST-9771006-1920_CW EndUser9 + quoteNumber: QUO-11044-V2F8F9 + revisionNumber: 0 + endUserName: CW EndUser9 + bidNumber: TEST-9771006-1920 + totalAmount: "60766.2" + quoteStatus: Active + createdDate: 2019-10-08 + lastModifiedDate: 2019-10-08 + quoteExpiryDate: 0001-01-01 + - quoteGuid: 88062b6f-02ea-e911-a97a-000d3a30eb04 + quoteName: TEST-9771006-1920_CW EndUser8 + quoteNumber: QUO-11043-W2X1T5 + revisionNumber: 0 + endUserName: CW EndUser8 + bidNumber: TEST-9771006-1920 + totalAmount: "60766.2" + quoteStatus: Active + createdDate: 2019-10-08 + lastModifiedDate: 2019-10-08 + quoteExpiryDate: 0001-01-01 + totalCount: 5 + Customer Not Found: + quoteSearchResponse: + responsePreamble: + responseStatus: Failed + responseStatusCode: "400" + responseMessage: Customer Not Found + totalCount: 0 + Wrong sort column: + quoteSearchResponse: + responsePreamble: + responseStatus: Failed + responseStatusCode: "400" + responseMessage: Provide valid sort column name + totalCount: 0 + x-tags: + - quotes + quoteDetailsRequest: + description: Request schema for get quote details endpoint + properties: + quoteProductsRequest: + $ref: '#/components/schemas/quoteDetailsRequest_quoteProductsRequest' + title: quoteDetails.Request + type: object + x-examples: + Example: + quoteProductsRequest: + requestPreamble: + customerNumber: "21222222" + isoCountryCode: US + retrieveQuoteProductsRequest: + quoteNumber: QUO-04959-C3V6L4 + thirdPartySource: 3RDPIDCONWISE + x-tags: + - quotes + quoteDetails: + description: Response schema for quote details + example: + quoteDetailResponse: + totalExtendedMsrp: totalExtendedMsrp + totalQuantity: 5 + totalExtendedQuotePrice: totalExtendedQuotePrice + retrieveQuoteResponse: + accountInfo: + accountName: accountName + phone: phone + bcn: bcn + introPreamble: introPreamble + contactInfo: + contactEmail: contactEmail + contactName: contactName + revisionNumber: revisionNumber + legalTerms: legalTerms + created: 2019-10-04T00:00:00.000+00:00 + priceDeviationExpiryDate: 2000-01-23 + solutionProposed: solutionProposed + quoteNumber: quoteNumber + quoteGuid: quoteGuid + priceDeviationStartDate: 2000-01-23 + leasingCalculations: leasingCalculations + endUser: + endUserContactName: endUserContactName + endUserZipCode: endUserZipCode + endUserMarketSegment: endUserMarketSegment + endUserCity: endUserCity + endUserName: endUserName + endUserAddress3: endUserAddress3 + endUserAddress2: endUserAddress2 + endUserPhone: endUserPhone + endUserAddress: endUserAddress + endUserState: endUserState + endUserEmail: endUserEmail + customerNeed: customerNeed + modified: 2019-10-04T00:00:00.000+00:00 + vendorAttributes: + vendorSettingMessage: vendorSettingMessage + dealId: dealId + estimateId: estimateId + vendorName: vendorName + purchaseInstructions: purchaseInstructions + priceDeviationId: priceDeviationId + leasingInstructions: leasingInstructions + currencyCode: currencyCode + quoteExpiryDate: 2020-01-01T00:00:00.000+00:00 + quoteName: quoteName + status: status + responsePreamble: + responseStatus: responseStatus + responseMessage: responseMessage + statusCode: statusCode + quoteProductList: + - bidExpiryDate: bidExpiryDate + vpnCategory: vpnCategory + quantity: quantity + comments: comments + description: description + weight: weight + bidStartDate: bidStartDate + price: + quotePrice: 0.8008281904610115 + msrp: 6.027456183070403 + extendedQuotePrice: 5.962133916683182 + extendedMsrp: 1.4658129805029452 + quoteProductGuid: quoteProductGuid + vendorPartNumber: vendorPartNumber + sku: sku + lineNumber: lineNumber + quoteProductsSupplierPartAuxiliaryId: quoteProductsSupplierPartAuxiliaryId + quoteProductsVendor: quoteProductsVendor + isSuggestionProduct: isSuggestionProduct + - bidExpiryDate: bidExpiryDate + vpnCategory: vpnCategory + quantity: quantity + comments: comments + description: description + weight: weight + bidStartDate: bidStartDate + price: + quotePrice: 0.8008281904610115 + msrp: 6.027456183070403 + extendedQuotePrice: 5.962133916683182 + extendedMsrp: 1.4658129805029452 + quoteProductGuid: quoteProductGuid + vendorPartNumber: vendorPartNumber + sku: sku + lineNumber: lineNumber + quoteProductsSupplierPartAuxiliaryId: quoteProductsSupplierPartAuxiliaryId + quoteProductsVendor: quoteProductsVendor + isSuggestionProduct: isSuggestionProduct + totalQuoteProductCount: totalQuoteProductCount + properties: + quoteDetailResponse: + $ref: '#/components/schemas/quoteDetails_quoteDetailResponse' + title: quoteDetails.Response + type: object + x-tags: + - quotes + quoteProductList: + description: "" + example: + bidExpiryDate: bidExpiryDate + vpnCategory: vpnCategory + quantity: quantity + comments: comments + description: description + weight: weight + bidStartDate: bidStartDate + price: + quotePrice: 0.8008281904610115 + msrp: 6.027456183070403 + extendedQuotePrice: 5.962133916683182 + extendedMsrp: 1.4658129805029452 + quoteProductGuid: quoteProductGuid + vendorPartNumber: vendorPartNumber + sku: sku + lineNumber: lineNumber + quoteProductsSupplierPartAuxiliaryId: quoteProductsSupplierPartAuxiliaryId + quoteProductsVendor: quoteProductsVendor + isSuggestionProduct: isSuggestionProduct + properties: + quoteProductGuid: + type: string + quantity: + type: string + comments: + type: string + bidStartDate: + type: string + bidExpiryDate: + type: string + sku: + type: string + lineNumber: + type: string + description: + type: string + vendorPartNumber: + type: string + weight: + type: string + isSuggestionProduct: + type: string + vpnCategory: + type: string + quoteProductsSupplierPartAuxiliaryId: + type: string + quoteProductsVendor: + type: string + price: + $ref: '#/components/schemas/quoteProductList_price' + title: quoteDetails.quoteProductList.Response + type: object + x-tags: + - quotes + productSearchRequest: + description: Request object model for the product search endpoint + properties: + servicerequest: + $ref: '#/components/schemas/productSearchRequest_servicerequest' + title: productSearchRequest + type: object + x-examples: + 'Using Vendor Part #': + servicerequest: + requestpreamble: + customernumber: 20-222222 + isocountrycode: US + productsearchrequest: + searchcriteria: + vendorpartnumber: TESTE IS + x-tags: + - product catalog + multiSKUPriceAndStockResponse: + description: Response object model for the multi sku price and stock API endpoint + example: + serviceresponse: + priceandstockresponse: + details: + - customerprice: customerprice + vendorpartnumber: vendorpartnumber + warehousedetails: + - onholdquantity: onholdquantity + warehouseid: 10-Mira Loma CA + warehousedescription: warehousedescription + onorderquantity: 1 + etadate: etadate + availablequantity: 6 + - onholdquantity: onholdquantity + warehouseid: 10-Mira Loma CA + warehousedescription: warehousedescription + onorderquantity: 1 + etadate: etadate + availablequantity: 6 + itemstatus: itemstatus + extendedvendorpartnumber: extendedvendorpartnumber + mediacpu: mediacpu + skustatus: skustatus + cpucode: cpucode + newmedia: newmedia + categorysubcategory: categorysubcategory + skuauthorized: skuauthorized + statusmessage: statusmessage + globalskuid: globalskuid + retailprice: 0.8008281904610115 + enduserrequired: Y-End user data required + ingrampartnumber: ingrampartnumber + vendornumber: vendornumber + partdescription1: partdescription1 + partdescription2: partdescription2 + vendorname: vendorname + class: A-Stocked product in all IM warehouses + backorderflag: Y- Can be backordered + - customerprice: customerprice + vendorpartnumber: vendorpartnumber + warehousedetails: + - onholdquantity: onholdquantity + warehouseid: 10-Mira Loma CA + warehousedescription: warehousedescription + onorderquantity: 1 + etadate: etadate + availablequantity: 6 + - onholdquantity: onholdquantity + warehouseid: 10-Mira Loma CA + warehousedescription: warehousedescription + onorderquantity: 1 + etadate: etadate + availablequantity: 6 + itemstatus: itemstatus + extendedvendorpartnumber: extendedvendorpartnumber + mediacpu: mediacpu + skustatus: skustatus + cpucode: cpucode + newmedia: newmedia + categorysubcategory: categorysubcategory + skuauthorized: skuauthorized + statusmessage: statusmessage + globalskuid: globalskuid + retailprice: 0.8008281904610115 + enduserrequired: Y-End user data required + ingrampartnumber: ingrampartnumber + vendornumber: vendornumber + partdescription1: partdescription1 + partdescription2: partdescription2 + vendorname: vendorname + class: A-Stocked product in all IM warehouses + backorderflag: Y- Can be backordered + responsepreamble: + statuscode: statuscode + responsemessage: responsemessage + responsestatus: responsestatus + properties: + serviceresponse: + $ref: '#/components/schemas/multiSKUPriceAndStockResponse_serviceresponse' + title: multiSKUPriceAndStockResponse + type: object + x-examples: + Success: + serviceresponse: + responsepreamble: + responsestatus: SUCCESS + statuscode: "200" + responsemessage: Data Found + priceandstockresponse: + details: + - itemstatus: SUCCESS + statusmessage: A-No qty breaks availa + ingrampartnumber: TB6489 + vendorpartnumber: H1180HD + globalskuid: A300-TB6489 + customerprice: 850.54 + currency: USD + partdescription1: H1180HD DLP 3D PROJ 2000L 1080PPROJ + partdescription2: 10000:1 VGA HDMI RCA + vendornumber: Q680 + vendorname: VIVITEK + cpucode: DLP-PR + class: X + skustatus: ACTIVE + mediacpu: PROJ DLP-PR + categorysubcategory: 04 25 + retailprice: 899 + newmedia: PROJ + backorderflag: "N" + skuauthorized: "Y" + warehousedetails: + - warehouseid: "80" + warehousedescription: "Jonestown, PA" + availablequantity: 0 + onorderquantity: 0 + - warehouseid: "10" + warehousedescription: "Mira Loma, CA" + availablequantity: 0 + onorderquantity: 0 + Invalid Customer: + serviceresponse: + responsepreamble: + responsestatus: FAILED + statuscode: "500" + responsemessage: Data Not Found + priceandstockresponse: + details: + - itemstatus: FAILED + statusmessage: E-INVALID CUSTOMER NUMBER + - itemstatus: FAILED + statusmessage: E-INVALID CUSTOMER NUMBER + - itemstatus: FAILED + statusmessage: E-INVALID CUSTOMER NUMBER + 'Invalid Country ': + serviceresponse: + responsepreamble: + responsestatus: SUCCESSWITHERROR + statuscode: "046" + responsemessage: Partial Data Found + priceandstockresponse: + details: + - itemstatus: SUCCESS + statusmessage: edv 2 + ingrampartnumber: NaN + globalskuid: A001-NaN + customernumber: 20-222222 + quantity: 0 + customerprice: 0 + vendornumber: NaN + retailprice: 0 + enduserrequired: "false" + specialpromoflag: "false" + isavailable: false + isstocakable: false + isbom: false + hasquantitybreaks: false + haswebdiscounts: false + issboprice: false + extendednetamount: 0 + taxamount: 0 + totalfeeamount: 0 + totalpromotionamount: 0 + totalenvironmentalfees: 0 + x-tags: + - product catalog + multiSKUPriceAndStockRequest: + description: Request object model for the multi sku price and stock API endpoint + properties: + servicerequest: + $ref: '#/components/schemas/multiSKUPriceAndStockRequest_servicerequest' + title: multiSKUPriceAndStockRequest + type: object + x-examples: + Example: + servicerequest: + requestpreamble: + customernumber: 20-222222 + isocountrycode: US + priceandstockrequest: + showwarehouseavailability: "True" + extravailabilityflag: "Y" + item: + - ingrampartnumber: M93592 + quantity: 1 + includeallsystems: false + x-tags: + - product catalog + invoiceDetailRequest: + properties: + servicerequest: + $ref: '#/components/schemas/invoiceDetailRequest_servicerequest' + title: invoiceDetailRequest + type: object + x-tags: + - invoices + x-examples: + Example: + servicerequest: + requestpreamble: + isocountrycode: US + customernumber: 20-222222 + invoicedetailrequest: + invoicenumber: 60ABCDE11 + invoiceDetailResponse: + example: + serviceresponse: + invoicedetailresponse: + customernumber: customernumber + freightamount: 5.637376656633329 + creditmemoreasoncode: creditmemoreasoncode + paymentterms: paymentterms + carrierdescription: carrierdescription + invoicetype: invoicetype + orderdate: orderdate + freightforwardercode: freightforwardercode + customerfreightamount: 0.8008281904610115 + taxtype: taxtype + billtosuffix: billtosuffix + carrier: carrier + enduserponumber: enduserponumber + totaltaxamount: 1.4658129805029452 + totalamount: 5.962133916683182 + discountamount: 2.3021358869347655 + shiptosuffix: shiptosuffix + customerordernumber: customerordernumber + invoicedate: 2000-01-23 + invoicenumber: invoicenumber + customerforeignfrightamt: 6.0274563 + responsepreamble: + statuscode: statuscode + responsemessage: responsemessage + responsestatus: responsestatus + properties: + serviceresponse: + $ref: '#/components/schemas/invoiceDetailResponse_serviceresponse' + title: invoiceDetailResponse + type: object + x-tags: + - invoices + orderModifyResponse: + description: Response schema for order modify endpoint + example: + serviceresponse: + responsepreamble: + responsemessage: responsemessage + responsestatus: responsestatus + ordermodifyresponse: + errortype: errortype + headerresponse: headerresponse + acktriggered: acktriggered + responseflag: responseflag + warncode: warncode + properties: + serviceresponse: + $ref: '#/components/schemas/orderModifyResponse_serviceresponse' + title: orderModifyResponse + type: object + x-tags: + - orders + orderModifyRequest: + description: Request schema for order modify endpoint + properties: + servicerequest: + $ref: '#/components/schemas/orderModifyRequest_servicerequest' + title: orderModifyRequest + type: object + x-tags: + - orders + orderSearchRequest: + description: Request schema for order search endpoint + properties: + servicerequest: + $ref: '#/components/schemas/orderSearchRequest_servicerequest' + title: orderSearchRequest + type: object + x-examples: + Example: + servicerequest: + requestpreamble: + isocountrycode: US + customernumber: 20-222222 + orderlookuprequest: + status: + fromdate: 2020-01-07 + todate: 2020-01-14 + x-tags: + - orders + orderDeleteResponse: + description: Response schema for order delete endpoint + example: + serviceresponse: + responsepreamble: + returnCode: returnCode + returnMessage: returnMessage + requestStatus: requestStatus + properties: + serviceresponse: + $ref: '#/components/schemas/orderCancelResponse_serviceresponse' + title: orderDeleteResponse + type: object + x-tags: + - orders + x-examples: + Example: + serviceresponse: + responsepreamble: + requestStatus: SUCCESS + returnCode: "00" + returnMessage: Order Deleted Successfully + orderDeleteRequest: + description: Request schema for order delete endpoint + properties: + servicerequest: + $ref: '#/components/schemas/orderDeleteRequest_servicerequest' + title: orderDeleteRequest + type: object + x-tags: + - orders + x-examples: + Example: + servicerequest: + requestpreamble: + isocountrycode: US + customerumber: 20-222222 + OrderDeleteRequestDetails: + entryDate: 2019-01-22 + orderBranch: "20" + orderNumber: RC62Z + orderDetailRequest: + description: Request schema for order details endpoint + properties: + servicerequest: + $ref: '#/components/schemas/orderDetailRequest_servicerequest' + title: orderDetailRequest + type: object + x-tags: + - orders + x-examples: + Example: + servicerequest: + requestpreamble: + isocountrycode: US + customernumber: 20-222222 + orderdetailrequest: + ordernumber: 10-H07XB + orderdate: 2018-07-15 + systemid: A300 + quoteDetailsResponse: + example: + quoteDetailResponse: + retrieveQuoteResponse: + totalExtendedQuotePrice: totalExtendedQuotePrice + contactInfo: + contactEmail: contactEmail + contactName: contactName + revisionNumber: revisionNumber + priceDeviationExpiryDate: priceDeviationExpiryDate + priceDeviationStartDate: priceDeviationStartDate + leasingCalculations: leasingCalculations + totalQuantity: totalQuantity + quoteProductList: + - bidExpiryDate: bidExpiryDate + vpnCategory: vpnCategory + quantity: quantity + comments: comments + description: description + weight: weight + bidStartDate: bidStartDate + price: + quotePrice: 0.8008281904610115 + msrp: 6.027456183070403 + extendedQuotePrice: 5.962133916683182 + extendedMsrp: 1.4658129805029452 + quoteProductGuid: quoteProductGuid + vendorPartNumber: vendorPartNumber + sku: sku + lineNumber: lineNumber + quoteProductsSupplierPartAuxiliaryId: quoteProductsSupplierPartAuxiliaryId + quoteProductsVendor: quoteProductsVendor + isSuggestionProduct: isSuggestionProduct + - bidExpiryDate: bidExpiryDate + vpnCategory: vpnCategory + quantity: quantity + comments: comments + description: description + weight: weight + bidStartDate: bidStartDate + price: + quotePrice: 0.8008281904610115 + msrp: 6.027456183070403 + extendedQuotePrice: 5.962133916683182 + extendedMsrp: 1.4658129805029452 + quoteProductGuid: quoteProductGuid + vendorPartNumber: vendorPartNumber + sku: sku + lineNumber: lineNumber + quoteProductsSupplierPartAuxiliaryId: quoteProductsSupplierPartAuxiliaryId + quoteProductsVendor: quoteProductsVendor + isSuggestionProduct: isSuggestionProduct + totalQuoteProductCount: totalQuoteProductCount + modified: modified + vendorAttributes: + vendorSettingMessage: vendorSettingMessage + dealId: dealId + estimateId: estimateId + vendorName: vendorName + leasingInstructions: leasingInstructions + accountInfo: + accountName: accountName + phone: phone + bcn: bcn + totalExtendedMsrp: totalExtendedMsrp + introPreamble: introPreamble + legalTerms: legalTerms + created: created + solutionProposed: solutionProposed + quoteNumber: quoteNumber + quoteGuid: quoteGuid + endUser: + endUserContactName: endUserContactName + endUserZipCode: endUserZipCode + endUserMarketSegment: endUserMarketSegment + endUserCity: endUserCity + endUserName: endUserName + endUserAddress3: endUserAddress3 + endUserAddress2: endUserAddress2 + endUserPhone: endUserPhone + endUserAddress: endUserAddress + endUserState: endUserState + endUserEmail: endUserEmail + customerNeed: customerNeed + purchaseInstructions: purchaseInstructions + priceDeviationId: priceDeviationId + currencyCode: currencyCode + quoteExpiryDate: quoteExpiryDate + quoteName: quoteName + status: status + responsePreamble: + responseStatus: responseStatus + responseMessage: responseMessage + statusCode: statusCode + properties: + quoteDetailResponse: + $ref: '#/components/schemas/quoteDetailsResponse_quoteDetailResponse' + title: quoteDetailsResponse + type: object + x-tags: + - quotes + ValidateQuoteResponse: + example: + vmfAdditionalAttributes: + - attributeValue: ABC1234 + attributeName: VEND_AUTH_NBR_FLG + attributeDescription: Authorization Number + - attributeValue: ABC1234 + attributeName: VEND_AUTH_NBR_FLG + attributeDescription: Authorization Number + vendorName: Cisco + lines: + - ingramPartNumber: YN6551 + vmfAdditionalAttributesLines: + - attributeValue: attributeValue + attributeName: attributeName + attributeDescription: attributeDescription + - attributeValue: attributeValue + attributeName: attributeName + attributeDescription: attributeDescription + quantity: "1" + customerLineNumber: "11" + - ingramPartNumber: YN6551 + vmfAdditionalAttributesLines: + - attributeValue: attributeValue + attributeName: attributeName + attributeDescription: attributeDescription + - attributeValue: attributeValue + attributeName: attributeName + attributeDescription: attributeDescription + quantity: "1" + customerLineNumber: "11" + quoteNumber: QUO-14551943-D2Y9L9 + properties: + quoteNumber: + description: A unique identifier generated by Ingram Micro's CRM specific + to each quote. + example: QUO-14551943-D2Y9L9 + type: string + vendorName: + description: The name of the vendor. + example: Cisco + type: string + vmfAdditionalAttributes: + description: The object containing the list of fields required at a header + level by the vendor. + items: + $ref: '#/components/schemas/ValidateQuoteResponse_vmfAdditionalAttributes_inner' + type: array + lines: + description: The object containing the lines from the quote. + items: + $ref: '#/components/schemas/ValidateQuoteResponse_lines_inner' + type: array + type: object + QuoteToOrderDetailsDTO: + additionalProperties: false + example: + endUserInfo: + - phoneNumber: phoneNumber + city: city + countryCode: countryCode + companyName: companyName + contact: contact + postalCode: postalCode + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + email: email + - phoneNumber: phoneNumber + city: city + countryCode: countryCode + companyName: companyName + contact: contact + postalCode: postalCode + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + email: email + shipToInfo: + - city: city + countryCode: countryCode + companyName: companyName + contact: contact + postalCode: postalCode + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + email: email + addressId: addressId + - city: city + countryCode: countryCode + companyName: companyName + contact: contact + postalCode: postalCode + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + email: email + addressId: addressId + billToAddressId: billToAddressId + enduserOrderNumber: enduserOrderNumber + lines: + - ingramPartNumber: ingramPartNumber + vmfAdditionalAttributesLines: + - attributeValue: attributeValue + attributeName: attributeName + attributeDescription: attributeDescription + - attributeValue: attributeValue + attributeName: attributeName + attributeDescription: attributeDescription + quantity: quantity + customerLineNumber: customerLineNumber + - ingramPartNumber: ingramPartNumber + vmfAdditionalAttributesLines: + - attributeValue: attributeValue + attributeName: attributeName + attributeDescription: attributeDescription + - attributeValue: attributeValue + attributeName: attributeName + attributeDescription: attributeDescription + quantity: quantity + customerLineNumber: customerLineNumber + customerOrderNumber: customerOrderNumber + vmfadditionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + attributeDescription: attributeDescription + - attributeValue: attributeValue + attributeName: attributeName + attributeDescription: attributeDescription + quoteNumber: quoteNumber + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + properties: + quoteNumber: + description: A unique identifier generated by Ingram Micro's CRM specific + to each quote. + maxLength: 35 + nullable: true + type: string + customerOrderNumber: + description: The reseller's order number for reference in their system. + maxLength: 35 + nullable: true + type: string + enduserOrderNumber: + description: The end customer's order number for reference in their system. + maxLength: 35 + nullable: true + type: string + billToAddressId: + description: Suffix used to identify billing address. Created during onboarding. + Resellers are provided with one or more address IDs depending on how many + bill to addresses they need for various flooring companies they are using + for credit. + nullable: true + type: string + endUserInfo: + description: The contact information for the end user/customer provided + by the reseller. Used to determine pricing and discounts. + items: + $ref: '#/components/schemas/QuoteToOrderDetailsDTO_endUserInfo_inner' + type: array + shipToInfo: + description: The shipping information provided by the reseller for order + delivery. + items: + $ref: '#/components/schemas/QuoteToOrderDetailsDTO_shipToInfo_inner' + type: array + additionalAttributes: + description: Additional order create attributes. + items: + $ref: '#/components/schemas/QuoteToOrderDetailsDTO_additionalAttributes_inner' + type: array + vmfadditionalAttributes: + description: The object containing the list of fields required at a header + level by the vendor. + items: + $ref: '#/components/schemas/QuoteToOrderDetailsDTO_vmfadditionalAttributes_inner' + type: array + lines: + description: The object containing the lines that require vendor mandatory + fields. + items: + $ref: '#/components/schemas/QuoteToOrderDetailsDTO_lines_inner' + type: array + type: object + QuoteToOrderResponse: + example: + confirmationNumber: 987654322 + message: message + quoteNumber: QUO-14551943-D2Y9L9 + properties: + quoteNumber: + description: Unique identifier generated by Ingram Micro's CRM specific + to each quote. + example: QUO-14551943-D2Y9L9 + type: string + confirmationNumber: + description: A unique confirmation number for tracking purposes. + example: 987654322 + type: number + message: + description: A confirmation message. + type: string + type: object + Error: + additionalProperties: false + properties: + id: + nullable: true + type: string + type: + nullable: true + type: string + message: + nullable: true + type: string + fields: + items: + $ref: '#/components/schemas/Fields' + nullable: true + type: array + type: object + ErrorResponseDTO: + additionalProperties: false + properties: + errors: + items: + $ref: '#/components/schemas/Error' + nullable: true + type: array + type: object + Fields: + additionalProperties: false + properties: + field: + nullable: true + type: string + message: + nullable: true + type: string + value: + nullable: true + type: string + type: object + OrderDetailB2B: + additionalProperties: false + example: + orderType: orderType + miscellaneousCharges: + - chargeLineReference: chargeLineReference + subOrderNumber: subOrderNumber + chargeAmount: chargeAmount + chargeDescription: chargeDescription + - chargeLineReference: chargeLineReference + subOrderNumber: subOrderNumber + chargeAmount: chargeAmount + chargeDescription: chargeDescription + notes: notes + endUserInfo: + phoneNumber: phoneNumber + city: city + countryCode: countryCode + contact: contact + companyName: companyName + postalCode: postalCode + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + email: email + endCustomerOrderNumber: endCustomerOrderNumber + vendorSalesOrderNumber: vendorSalesOrderNumber + webOrderId: webOrderId + orderStatus: orderStatus + customerOrderNumber: customerOrderNumber + orderTotal: 0.8008281904610115 + orderSubTotal: 6.027456183070403 + ingramOrderNumber: ingramOrderNumber + totalTax: 5.637376656633329 + shipToInfo: + phoneNumber: phoneNumber + city: city + countryCode: countryCode + contact: contact + companyName: companyName + postalCode: postalCode + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + email: email + billToInfo: + phoneNumber: phoneNumber + city: city + countryCode: countryCode + contact: contact + companyName: companyName + postalCode: postalCode + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + email: email + ingramPurchaseOrderNumber: ingramPurchaseOrderNumber + totalWeight: 5.962133916683182 + lines: + - unitWeight: 2.3021358869347655 + vendorSalesOrderLineNumber: vendorSalesOrderLineNumber + requestedDeliverydate: requestedDeliverydate + multipleShipments: + - date: date + dateRange: + endDate: endDate + startDate: startDate + dataType: dataType + requestedQuantity: requestedQuantity + description: description + source: source + lineNumber: lineNumber + deliveryDate: deliveryDate + confirmedQuantity: confirmedQuantity + - date: date + dateRange: + endDate: endDate + startDate: startDate + dataType: dataType + requestedQuantity: requestedQuantity + description: description + source: source + lineNumber: lineNumber + deliveryDate: deliveryDate + confirmedQuantity: confirmedQuantity + quantityOrdered: 2 + customerLineNumber: customerLineNumber + lineStatus: lineStatus + extendedPrice: 9.301444243932576 + scheduleLines: + - goodsIssueDate: goodsIssueDate + scheduleLineDate: scheduleLineDate + requestedQuantity: requestedQuantity + lineNumber: lineNumber + confirmedQuantity: confirmedQuantity + - goodsIssueDate: goodsIssueDate + scheduleLineDate: scheduleLineDate + requestedQuantity: requestedQuantity + lineNumber: lineNumber + confirmedQuantity: confirmedQuantity + vendorPartNumber: vendorPartNumber + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + upcCode: upcCode + ingramPartNumber: ingramPartNumber + unitPrice: 7.061401241503109 + ingramOrderLineNumber: ingramOrderLineNumber + estimatedDates: + - delivery: + deliveredDate: deliveredDate + deliveryDescription: deliveryDescription + deliveryDateType: deliveryDateType + deliverySource: deliverySource + deliveryDateRange: + endDate: endDate + startDate: startDate + ship: + shipDateRange: + endDate: endDate + startDate: startDate + shipSource: shipSource + shipDate: shipDate + shipDateType: shipDateType + shipDescription: shipDescription + - delivery: + deliveredDate: deliveredDate + deliveryDescription: deliveryDescription + deliveryDateType: deliveryDateType + deliverySource: deliverySource + deliveryDateRange: + endDate: endDate + startDate: startDate + ship: + shipDateRange: + endDate: endDate + startDate: startDate + shipSource: shipSource + shipDate: shipDate + shipDateType: shipDateType + shipDescription: shipDescription + serviceContractInfo: + subscriptions: + renewalTerm: renewalTerm + subcriptionEndDate: subcriptionEndDate + billingModel: billingModel + subscriptionTerm: subscriptionTerm + subscriptionId: subscriptionId + subcriptionStartDate: subcriptionStartDate + contractInfo: + contractStatus: contractStatus + contractDuration: contractDuration + contractStartDate: contractStartDate + contractEndDate: contractEndDate + contractDescription: contractDescription + contractNumber: contractNumber + licenseInfo: + quantity: quantity + licenseStartDate: licenseStartDate + description: description + licenseNumber: + - licenseNumber + - licenseNumber + licenseEndDate: licenseEndDate + vendorName: vendorName + lineNotes: lineNotes + quantityBackOrdered: 7 + specialBidNumber: specialBidNumber + shipmentDetails: + - quantity: 1 + invoiceNumber: invoiceNumber + estimatedShipDate: estimatedShipDate + invoiceDate: invoiceDate + deliveryNumber: deliveryNumber + shipFromWarehouseId: shipFromWarehouseId + carrierDetails: + - deliveredDate: deliveredDate + carrierPickupDate: carrierPickupDate + quantity: 1 + carrierName: carrierName + carrierCode: carrierCode + trackingDetails: + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + shippedDate: shippedDate + estimatedDeliveryDate: estimatedDeliveryDate + - deliveredDate: deliveredDate + carrierPickupDate: carrierPickupDate + quantity: 1 + carrierName: carrierName + carrierCode: carrierCode + trackingDetails: + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + shippedDate: shippedDate + estimatedDeliveryDate: estimatedDeliveryDate + shipFromLocation: shipFromLocation + - quantity: 1 + invoiceNumber: invoiceNumber + estimatedShipDate: estimatedShipDate + invoiceDate: invoiceDate + deliveryNumber: deliveryNumber + shipFromWarehouseId: shipFromWarehouseId + carrierDetails: + - deliveredDate: deliveredDate + carrierPickupDate: carrierPickupDate + quantity: 1 + carrierName: carrierName + carrierCode: carrierCode + trackingDetails: + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + shippedDate: shippedDate + estimatedDeliveryDate: estimatedDeliveryDate + - deliveredDate: deliveredDate + carrierPickupDate: carrierPickupDate + quantity: 1 + carrierName: carrierName + carrierCode: carrierCode + trackingDetails: + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + shippedDate: shippedDate + estimatedDeliveryDate: estimatedDeliveryDate + shipFromLocation: shipFromLocation + promisedDeliveryDate: promisedDeliveryDate + subOrderNumber: subOrderNumber + partDescription: partDescription + quantityConfirmed: 4 + weightUom: weightUom + taxAmount: 3.616076749251911 + currencyCode: currencyCode + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + - unitWeight: 2.3021358869347655 + vendorSalesOrderLineNumber: vendorSalesOrderLineNumber + requestedDeliverydate: requestedDeliverydate + multipleShipments: + - date: date + dateRange: + endDate: endDate + startDate: startDate + dataType: dataType + requestedQuantity: requestedQuantity + description: description + source: source + lineNumber: lineNumber + deliveryDate: deliveryDate + confirmedQuantity: confirmedQuantity + - date: date + dateRange: + endDate: endDate + startDate: startDate + dataType: dataType + requestedQuantity: requestedQuantity + description: description + source: source + lineNumber: lineNumber + deliveryDate: deliveryDate + confirmedQuantity: confirmedQuantity + quantityOrdered: 2 + customerLineNumber: customerLineNumber + lineStatus: lineStatus + extendedPrice: 9.301444243932576 + scheduleLines: + - goodsIssueDate: goodsIssueDate + scheduleLineDate: scheduleLineDate + requestedQuantity: requestedQuantity + lineNumber: lineNumber + confirmedQuantity: confirmedQuantity + - goodsIssueDate: goodsIssueDate + scheduleLineDate: scheduleLineDate + requestedQuantity: requestedQuantity + lineNumber: lineNumber + confirmedQuantity: confirmedQuantity + vendorPartNumber: vendorPartNumber + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + upcCode: upcCode + ingramPartNumber: ingramPartNumber + unitPrice: 7.061401241503109 + ingramOrderLineNumber: ingramOrderLineNumber + estimatedDates: + - delivery: + deliveredDate: deliveredDate + deliveryDescription: deliveryDescription + deliveryDateType: deliveryDateType + deliverySource: deliverySource + deliveryDateRange: + endDate: endDate + startDate: startDate + ship: + shipDateRange: + endDate: endDate + startDate: startDate + shipSource: shipSource + shipDate: shipDate + shipDateType: shipDateType + shipDescription: shipDescription + - delivery: + deliveredDate: deliveredDate + deliveryDescription: deliveryDescription + deliveryDateType: deliveryDateType + deliverySource: deliverySource + deliveryDateRange: + endDate: endDate + startDate: startDate + ship: + shipDateRange: + endDate: endDate + startDate: startDate + shipSource: shipSource + shipDate: shipDate + shipDateType: shipDateType + shipDescription: shipDescription + serviceContractInfo: + subscriptions: + renewalTerm: renewalTerm + subcriptionEndDate: subcriptionEndDate + billingModel: billingModel + subscriptionTerm: subscriptionTerm + subscriptionId: subscriptionId + subcriptionStartDate: subcriptionStartDate + contractInfo: + contractStatus: contractStatus + contractDuration: contractDuration + contractStartDate: contractStartDate + contractEndDate: contractEndDate + contractDescription: contractDescription + contractNumber: contractNumber + licenseInfo: + quantity: quantity + licenseStartDate: licenseStartDate + description: description + licenseNumber: + - licenseNumber + - licenseNumber + licenseEndDate: licenseEndDate + vendorName: vendorName + lineNotes: lineNotes + quantityBackOrdered: 7 + specialBidNumber: specialBidNumber + shipmentDetails: + - quantity: 1 + invoiceNumber: invoiceNumber + estimatedShipDate: estimatedShipDate + invoiceDate: invoiceDate + deliveryNumber: deliveryNumber + shipFromWarehouseId: shipFromWarehouseId + carrierDetails: + - deliveredDate: deliveredDate + carrierPickupDate: carrierPickupDate + quantity: 1 + carrierName: carrierName + carrierCode: carrierCode + trackingDetails: + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + shippedDate: shippedDate + estimatedDeliveryDate: estimatedDeliveryDate + - deliveredDate: deliveredDate + carrierPickupDate: carrierPickupDate + quantity: 1 + carrierName: carrierName + carrierCode: carrierCode + trackingDetails: + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + shippedDate: shippedDate + estimatedDeliveryDate: estimatedDeliveryDate + shipFromLocation: shipFromLocation + - quantity: 1 + invoiceNumber: invoiceNumber + estimatedShipDate: estimatedShipDate + invoiceDate: invoiceDate + deliveryNumber: deliveryNumber + shipFromWarehouseId: shipFromWarehouseId + carrierDetails: + - deliveredDate: deliveredDate + carrierPickupDate: carrierPickupDate + quantity: 1 + carrierName: carrierName + carrierCode: carrierCode + trackingDetails: + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + shippedDate: shippedDate + estimatedDeliveryDate: estimatedDeliveryDate + - deliveredDate: deliveredDate + carrierPickupDate: carrierPickupDate + quantity: 1 + carrierName: carrierName + carrierCode: carrierCode + trackingDetails: + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + shippedDate: shippedDate + estimatedDeliveryDate: estimatedDeliveryDate + shipFromLocation: shipFromLocation + promisedDeliveryDate: promisedDeliveryDate + subOrderNumber: subOrderNumber + partDescription: partDescription + quantityConfirmed: 4 + weightUom: weightUom + taxAmount: 3.616076749251911 + currencyCode: currencyCode + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + currencyCode: currencyCode + freightCharges: 1.4658129805029452 + paymentTerms: paymentTerms + ingramOrderDate: 2000-01-23T04:56:07.000+00:00 + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + properties: + ingramOrderNumber: + description: The IngramMicro sales order number. + type: string + ingramOrderDate: + description: The IngramMicro sales order date. + format: date-time + type: string + orderType: + description: The IngramMicro sales order type. + type: string + customerOrderNumber: + description: The reseller's order number for reference in their system. + type: string + endCustomerOrderNumber: + description: The end customer's order number for reference in their system. + type: string + webOrderId: + description: The web order id of the order. + type: string + vendorSalesOrderNumber: + description: The vendor's order number for reference in their system + type: string + ingramPurchaseOrderNumber: + description: Ingram purchase order number. + type: string + orderStatus: + description: "The header-level status of the order. One of- Shipped, Canceled,\ + \ Backordered, Processing, On Hold, Delivered." + type: string + orderTotal: + description: "The total cost for the order, includes subtotal, freight charges,\ + \ and tax." + format: double + type: number + orderSubTotal: + description: "The sub total cost for the order, not including tax and freight." + format: double + type: number + freightCharges: + description: The freight charges for the order. + format: double + type: number + currencyCode: + description: The country-specific three digit ISO 4217 currency code for + the order. + type: string + totalWeight: + description: "Total order weight. unit -- North america - Pounds , other\ + \ countries will be KG." + format: double + type: number + totalTax: + description: Total tax on the orders placed. + format: double + type: number + paymentTerms: + description: The payment terms of the order. (Ex- Net 30 days). + type: string + notes: + description: The header-level notes for the order. + type: string + billToInfo: + $ref: '#/components/schemas/OrderDetailB2B_billToInfo' + shipToInfo: + $ref: '#/components/schemas/OrderDetailB2B_shipToInfo' + endUserInfo: + $ref: '#/components/schemas/OrderDetailB2B_endUserInfo' + lines: + items: + $ref: '#/components/schemas/OrderDetailB2B_lines_inner' + nullable: true + type: array + miscellaneousCharges: + items: + $ref: '#/components/schemas/OrderDetailB2B_miscellaneousCharges_inner' + nullable: true + type: array + additionalAttributes: + items: + $ref: '#/components/schemas/OrderDetailB2B_additionalAttributes_inner' + nullable: true + type: array + type: object + get_reseller_v6_validateQuote_400_response_fields_inner: + properties: + field: + description: Contains the name of the field. + type: string + message: + description: Gives the description of the field message. + type: string + value: + description: Value sent in the input for the specific field. + type: string + type: object + get_reseller_v6_validateQuote_400_response: + properties: + traceid: + description: Unique Id to identify error. + type: string + type: + description: Describes the type of the error. + type: string + message: + description: A detailed error message. + type: string + fields: + items: + $ref: '#/components/schemas/get_reseller_v6_validateQuote_400_response_fields_inner' + type: array + type: object + get_reseller_v6_validateQuote_500_response: + properties: + traceid: + description: Unique Id to identify error. + type: string + type: + description: Describes the type of the error. + type: string + message: + description: Describes the error message. + type: string + fields: + items: + type: object + type: array + type: object + post_QuoteToOrder_v6_400_response_fields_inner: + properties: + field: + description: Name of the field. + type: string + message: + description: A filed level error message. + type: string + value: + description: Value of the message. + type: string + type: object + post_QuoteToOrder_v6_400_response: + properties: + traceid: + description: A unique trace id to identify the issue. + type: string + type: + description: Type of the error message. + type: string + message: + description: A detailed error message. + type: string + fields: + items: + $ref: '#/components/schemas/post_QuoteToOrder_v6_400_response_fields_inner' + type: array + type: object + post_renewalssearch_400_response: + properties: + traceid: + description: Unique Id to identify error. + type: string + type: + description: Describes the type of the error. + type: string + fields: + items: + $ref: '#/components/schemas/get_reseller_v6_validateQuote_400_response_fields_inner' + type: array + type: object + OrderCreateRequest_resellerInfo: + description: The address and contact information provided by the reseller. + example: + resellerId: resellerId + phoneNumber: 0 + city: city + countryCode: countryCode + companyName: companyName + contact: contact + postalCode: postalCode + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + email: email + properties: + resellerId: + description: The reseller's Id. + type: string + companyName: + description: The reseller's company name. + maxLength: 40 + type: string + contact: + description: The reseller's contact name. + type: string + addressLine1: + description: The reseller's street address. + maxLength: 70 + type: string + addressLine2: + description: The reseller's building or apartment number. + maxLength: 70 + type: string + addressLine3: + description: The reseller's address line 3. + maxLength: 70 + type: string + city: + description: The reseller's city. + maxLength: 25 + type: string + state: + description: The reseller's state. + maxLength: 3 + type: string + postalCode: + description: The reseller's zip or postal code. + maxLength: 10 + type: string + countryCode: + description: The reseller's two-character ISO country code. + maxLength: 10 + type: string + phoneNumber: + description: The reseller's phone number. + type: integer + email: + description: The reseller's email address. + type: string + type: object + OrderCreateRequest_vmf: + description: "Vendor mandatory fields, this is required in case of warranty\ + \ orders." + example: + vendAuthNumber: vendAuthNumber + properties: + vendAuthNumber: + description: "Authorization number provided by vendor to Ingram's reseller.\ + \ Orders will be placed on hold without this value, vendor specific mandatory\ + \ field - please reach out Ingram Sales team for list of vendor for whom\ + \ this is mandatory." + type: string + type: object + OrderCreateRequest_shipToInfo: + description: The shipping information provided by the reseller. + example: + city: city + companyName: companyName + postalCode: postalCode + addressId: addressId + phoneNumber: phoneNumber + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + name2: name2 + addressLine4: addressLine4 + name1: name1 + email: email + properties: + addressId: + description: The ID references the resellers address in Ingram Micro's system + for shipping. Provided to resellers during the onboarding process. + maxLength: 10 + type: string + contact: + description: The company contact provided by the reseller. + maxLength: 70 + type: string + companyName: + description: The name of the company the order will be shipped to. + maxLength: 40 + type: string + name1: + description: name1 + type: string + name2: + description: name2 + type: string + addressLine1: + description: The street address and building or house number the order will + be shipped to. + maxLength: 70 + type: string + addressLine2: + description: The apartment number the order will be shipped to. + maxLength: 70 + type: string + addressLine3: + description: Line 3 of the address the order will be shipped to. + maxLength: 70 + type: string + addressLine4: + description: Street address4 + type: string + city: + description: The city the order will be shipped to. + maxLength: 25 + type: string + state: + description: The state the order will be shipped to. + maxLength: 3 + type: string + postalCode: + description: The zip or postal code the order will be shipped to. + maxLength: 10 + type: string + countryCode: + description: The two-character ISO country code the order will be shipped + to. + maxLength: 10 + type: string + phoneNumber: + description: The company contact phone number. + type: string + email: + description: The company contact email address. + type: string + type: object + OrderCreateRequest_endUserInfo: + description: The contact information for the end user/customer provided by the + reseller. Used to determine pricing and discounts. + example: + endUserId: endUserId + city: city + companyName: companyName + postalCode: postalCode + phoneNumber: 6 + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + name2: name2 + addressLine4: addressLine4 + name1: name1 + email: email + properties: + endUserId: + description: ID for the end user/customer in Ingram Micro's system. + type: string + contact: + description: The contact name for the end user/customer. + maxLength: 70 + type: string + companyName: + description: The company name for the end user/customer. Required for Impulse + countries. + maxLength: 40 + type: string + name1: + description: name1 + type: string + name2: + description: name2 + type: string + addressLine1: + description: The end user/customer's street address and building or house + number. Required for Impulse countries. + maxLength: 70 + type: string + addressLine2: + description: The end user/customer's apartment number. + maxLength: 70 + type: string + addressLine3: + description: Line 3 of the address for the end user/customer. + maxLength: 70 + type: string + addressLine4: + description: Street address4 + type: string + city: + description: The end user/customer's city. Required for Impulse countries. + maxLength: 25 + type: string + state: + description: The end user/customer's state. Required for Impulse countries + but optional for EMEA countries. + maxLength: 3 + type: string + postalCode: + description: The end user/customer's zip or postal code. Required for Impulse + countries. + maxLength: 10 + type: string + countryCode: + description: The end user/customer's two-character ISO country code. + maxLength: 10 + type: string + phoneNumber: + description: The end user/customer's phone number. + type: integer + email: + description: The end user/customer's email. + type: string + type: object + OrderCreateRequest_lines_inner_additionalAttributes_inner: + example: + attributeValue: attributeValue + attributeName: attributeName + properties: + attributeName: + description: SAP requested and country-specific line level details. + type: string + attributeValue: + description: Line-level additional attributes. + type: string + OrderCreateRequest_lines_inner_warrantyInfo_inner_serialInfo_inner: + example: + dateofPurchase: 2000-01-23 + primarySerialNumber: primarySerialNumber + secondarySerialNumber: secondarySerialNumber + shipDate: 2000-01-23 + properties: + dateofPurchase: + description: Date of purchase of the hardware. + format: date + type: string + shipDate: + description: "Vendor specific mandatory field, date of hardware/product\ + \ shipment from vendor." + format: date + type: string + primarySerialNumber: + description: Serial number of the hardware/product. + type: string + secondarySerialNumber: + description: Serial number of accessory associated with the above hardware/product. + type: string + OrderCreateRequest_lines_inner_warrantyInfo_inner: + example: + hardwareLineLink: hardwareLineLink + directLineLink: directLineLink + warrantyLineLink: warrantyLineLink + serialInfo: + - dateofPurchase: 2000-01-23 + primarySerialNumber: primarySerialNumber + secondarySerialNumber: secondarySerialNumber + shipDate: 2000-01-23 + - dateofPurchase: 2000-01-23 + primarySerialNumber: primarySerialNumber + secondarySerialNumber: secondarySerialNumber + shipDate: 2000-01-23 + properties: + directLineLink: + description: Unique value to link hardware and warranty lines. Should be + used only when products are purchased from both Ingram and/or vendor but + the warranty is purchased through Ingram for them. + maxLength: 25 + type: string + warrantyLineLink: + description: "Customer line number of the hardware product in this request\ + \ for linkage, either hardwareLineLink or warrantyLineLink can be used\ + \ in a line." + type: string + hardwareLineLink: + description: "Customer line number of the warranty product in this request\ + \ for linkage, either hardwareLineLink or warrantyLineLink can be used\ + \ in a line " + type: string + serialInfo: + description: "Serial information of the hardware to be associated with the\ + \ warranty, applicable on post sale orders." + items: + $ref: '#/components/schemas/OrderCreateRequest_lines_inner_warrantyInfo_inner_serialInfo_inner' + type: array + type: object + OrderCreateRequest_lines_inner_endUserInfo_inner: + example: + endUserId: endUserId + city: city + companyName: companyName + postalCode: postalCode + phoneNumber: 2.3021358869347655 + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + endUserType: endUserType + name2: name2 + addressLine4: addressLine4 + name1: name1 + email: email + properties: + endUserType: + description: Specifies the type of endUser. It can be endUser or endUserContact + for SAP flow. + type: string + endUserId: + description: ID for the end user/customer in Ingram Micro's system. + maxLength: 10 + type: string + contact: + description: The contact name for the end user/customer. + type: string + companyName: + description: The company name for the end user/customer. + type: string + name1: + description: name1 + maxLength: 35 + type: string + name2: + description: name2 + type: string + addressLine1: + description: The end user/customer's street address and building or house + number. + type: string + addressLine2: + description: The end user/customer's apartment number. + type: string + addressLine3: + description: Line 3 of the address for the end user/customer. + type: string + addressLine4: + description: Street address4 + type: string + city: + description: The end user/customer's city. + type: string + state: + description: The end user/customer's state. + type: string + postalCode: + description: The end user/customer's zip or postal code. + type: string + countryCode: + description: The end user/customer's two-character ISO country code. + maxLength: 3 + type: string + phoneNumber: + description: The end user/customer's phone number. + maxLength: 30 + type: number + email: + description: The end user/customer's email. + maxLength: 241 + type: string + OrderCreateRequest_lines_inner: + example: + ingramPartNumber: ingramPartNumber + unitPrice: 5.962133916683182 + quantity: 1 + specialBidNumber: specialBidNumber + notes: notes + endUserInfo: + - endUserId: endUserId + city: city + companyName: companyName + postalCode: postalCode + phoneNumber: 2.3021358869347655 + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + endUserType: endUserType + name2: name2 + addressLine4: addressLine4 + name1: name1 + email: email + - endUserId: endUserId + city: city + companyName: companyName + postalCode: postalCode + phoneNumber: 2.3021358869347655 + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + endUserType: endUserType + name2: name2 + addressLine4: addressLine4 + name1: name1 + email: email + endUserPrice: 5.637376656633329 + warrantyInfo: + - hardwareLineLink: hardwareLineLink + directLineLink: directLineLink + warrantyLineLink: warrantyLineLink + serialInfo: + - dateofPurchase: 2000-01-23 + primarySerialNumber: primarySerialNumber + secondarySerialNumber: secondarySerialNumber + shipDate: 2000-01-23 + - dateofPurchase: 2000-01-23 + primarySerialNumber: primarySerialNumber + secondarySerialNumber: secondarySerialNumber + shipDate: 2000-01-23 + - hardwareLineLink: hardwareLineLink + directLineLink: directLineLink + warrantyLineLink: warrantyLineLink + serialInfo: + - dateofPurchase: 2000-01-23 + primarySerialNumber: primarySerialNumber + secondarySerialNumber: secondarySerialNumber + shipDate: 2000-01-23 + - dateofPurchase: 2000-01-23 + primarySerialNumber: primarySerialNumber + secondarySerialNumber: secondarySerialNumber + shipDate: 2000-01-23 + customerLineNumber: customerLineNumber + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + properties: + customerLineNumber: + description: "The reseller's line item number for reference in their system.\ + \ The customer line number needs to be a unique numeric value between\ + \ 1 and 884. In the event we receive duplicate values or alphanumeric\ + \ values in the customer line number, we will re-sequence the customer\ + \ line number. To prevent re-sequencing, please use a unique numeric value\ + \ between 1 and 884 in the customer line number." + maxLength: 3 + type: string + ingramPartNumber: + description: The unique IngramMicro part number. + maxLength: 18 + type: string + quantity: + description: The requested quantity of the line item. + type: integer + specialBidNumber: + description: The line-level bid number provided to the reseller by the vendor + for special pricing and discounts. Used to track the bid number in the + case of split orders or where different line items have different bid + numbers. Line-level bid number take precedence over header-level bid numbers. + maxLength: 36 + type: string + notes: + description: Line-level notes. + type: string + unitPrice: + description: The reseller-requested unit price for the line item. The unit + price is not guaranteed. + format: decimal + type: number + endUserPrice: + description: The end user price. + format: decimal + type: number + additionalAttributes: + items: + $ref: '#/components/schemas/OrderCreateRequest_lines_inner_additionalAttributes_inner' + type: array + warrantyInfo: + description: Warranty details for the line. This is required in case of + warranty orders. + items: + $ref: '#/components/schemas/OrderCreateRequest_lines_inner_warrantyInfo_inner' + type: array + endUserInfo: + items: + $ref: '#/components/schemas/OrderCreateRequest_lines_inner_endUserInfo_inner' + type: array + type: object + OrderCreateRequest_shipmentDetails: + description: Shipping details for the order provided by the customer. + example: + shipComplete: shipComplete + freightAccountNumber: freightAccountNumber + shippingInstructions: shippingInstructions + carrierCode: carrierCode + signatureRequired: true + requestedDeliveryDate: 2000-01-23 + properties: + carrierCode: + description: The code for the shipping carrier for the line item. + maxLength: 10 + type: string + freightAccountNumber: + description: The reseller 's shipping account number with carrier. Used + to bill the shipping carrier directly from the reseller's account with + the carrier. + type: string + shipComplete: + description: "Specifies whether the shipment will be shipped only when all\ + \ products are fulfilled. The value of this field along with acceptBackOrder\ + \ field decides the value of backorderflag. If this field is set, acceptBackOrder\ + \ field is ignored. Possible values for this field are true, C, P, E.\ + \ \n\n With value as true or C, backorderflag will be set as C. \n\n With\ + \ value as P, or E, backorderflag will be set as P or E respectively.\ + \ \n\n C = Ship complete at distribution level. \n\n P = ship complete\ + \ at line level. \n\n E = ship complete across all distributions. " + maxLength: 1 + type: string + requestedDeliveryDate: + description: The reseller-requested delivery date in UTC format. Delivery + date is not guaranteed. + format: date + type: string + signatureRequired: + description: Specifies whether a signature is required for delivery. Default + is False. + type: boolean + shippingInstructions: + maxLength: 132 + type: string + type: object + OrderCreateRequest_additionalAttributes_inner: + example: + attributeValue: attributeValue + attributeName: attributeName + properties: + attributeName: + description: "allowPartialOrder: Allow orders with failed lines. (SAP) Depends\ + \ on backorder settings. \n\n\nDpasRating: DX rating by Department of\ + \ Defense is the highest rating by the highest offices and meant to be\ + \ top priority. DO any other gov offices at the federal level to priotize.\ + \ \n\n DpasProgramId: Identifies the actual agency that signed off on\ + \ the DPAS priority. \n\n allowDuplicateCustomerOrderNumber: Allow orders\ + \ with duplicate customer PO numbers. Enables resellers to have the same\ + \ PO number for multiple orders. \n \n channelCode: Determine storage\ + \ location for Markeplace(SAP) for different orderTypes.\n \n customerPOType:\ + \ Used for pricing, similar to orderType. Possible SAP values- ZXML and\ + \ ZWEB.\n \n storageLocation: Determine the location of the product stock\ + \ in SAP for Marketplaces.\n \n soldTo: To be used in cases when Sold-To\ + \ is different than Customer ID.\n \n orderType: Order Type[SAP]- ZOR\ + \ and ZLCN.\n \n endUserSearchTerm: Search ID for a end user contact is\ + \ used in SAP to determine the contact name.\n \n Z101: Used for end customer\ + \ details such as name, address, phone, etc. This information flows to\ + \ SAP and is used by warehouse.\n \n euDepId: DEP ID would be the 'End\ + \ User DEP/ABM Organization ID' up to 32 characters and is assigned by\ + \ Apple.\n \n depOrderNbr: depordernbr is 'End User PO to reseller' Can\ + \ appear in message lines or dedicated end user po#.\n \n govtProgramType:\ + \ Program type, “PA” for government orders, “ED” for education order.\n\ + \ \n govtEndUserType: Type of end user of the program. F = Federal, S\ + \ = State, E = Local, K = K-12 school, and H = Higher Education\n \n govtSolicitationNumber:\ + \ Education order’s contract number\n \n govtPublicPrivateCode: Determines\ + \ TAX / NO TAX. 'P' PUBLIC SECTOR, 'R' PRIVATE SECTOR. Value needs\ + \ only to be provided for EDUCATION order.\n \n govtEndUserData: Name\ + \ of the End user of the program. For example, STATE OF OHIO, CHICAGO\ + \ SCHOOLDISTRICT etc.\n \n govtEndUserPostalCode: 9 CHAR FIELD / Zip Code\ + \ of the End user of the order.\n \n dynamicMessageLine1: Custom Dynamic\ + \ Message line 1.\n \n allowOrderOnCustomerHold: Boolean value flag which\ + \ allows a customer to create an order with the hold status." + type: string + attributeValue: + description: attributefield data + type: string + type: object + OrderCreateResponse_shipToInfo: + description: The shipping information provided by the reseller. + example: + city: city + companyName: companyName + postalCode: postalCode + addressId: addressId + phoneNumber: phoneNumber + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + name2: name2 + addressLine4: addressLine4 + name1: name1 + email: email + properties: + addressId: + description: The ID references the resellers address in Ingram Micro's system + for shipping. Provided to resellers during the onboarding process. + type: string + contact: + description: The company contact provided by the reseller. + type: string + companyName: + description: The name of the company the order will be shipped to. + type: string + name1: + description: name1 + type: string + name2: + description: name2 + type: string + addressLine1: + description: The street address and building or house number the order will + be shipped to. + type: string + addressLine2: + description: The apartment number the order will be shipped to. + type: string + addressLine3: + description: Line 3 of the address the order will be shipped to. + type: string + addressLine4: + description: Street address4 + type: string + city: + description: The city the order will be shipped to. + type: string + state: + description: The state the order will be shipped to. + type: string + postalCode: + description: The zip or postal code the order will be shipped to. + type: string + countryCode: + description: The two-character ISO country code the order will be shipped + to. + type: string + phoneNumber: + description: The company contact phone number. + type: string + email: + description: The company contact email address. + type: string + type: object + OrderCreateResponse_endUserInfo: + description: The contact information for the end user/customer provided by the + reseller. Used to determine pricing and discounts. + example: + endUserId: endUserId + city: city + companyName: companyName + postalCode: postalCode + phoneNumber: phoneNumber + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + name2: name2 + addressLine4: addressLine4 + name1: name1 + email: email + properties: + endUserId: + description: The unique ID provided by the reseller for the end user/customer. + type: string + contact: + description: The contact name for the end user/customer. + type: string + companyName: + description: The company name for the end user/customer. + type: string + name1: + description: name1 + type: string + name2: + description: name2 + type: string + addressLine1: + description: The street adress and building or house number for the end + user/customer. + type: string + addressLine2: + description: The apartment number for the end user/customer. + type: string + addressLine3: + description: Line 3 of the address for the end user/customer. + type: string + addressLine4: + description: Street address4 + type: string + city: + description: The end user/customer's city. + type: string + state: + description: The end user/customer's state. + type: string + postalCode: + description: The end user/customer's zip or postal code. + type: string + countryCode: + description: The end user/customer's two-character ISO country code. + type: string + phoneNumber: + description: The end user/customer's phone number. + type: string + email: + description: The end user/customer's email. + type: string + type: object + OrderCreateResponse_orders_inner_lines_inner_shipmentDetails_inner: + example: + freightAccountNumber: freightAccountNumber + carrierName: carrierName + shippingInstructions: shippingInstructions + carrierCode: carrierCode + signatureRequired: signatureRequired + shipFromWarehouseId: shipFromWarehouseId + shipFromLocation: shipFromLocation + properties: + carrierCode: + description: The code for the shipping carrier for the line item. + type: string + carrierName: + description: The name of the shipping carrier for the line item. + type: string + shipFromWarehouseId: + description: The ID of the warehouse the line item will ship from. + type: string + shipFromLocation: + description: Location from which order is shipped. + type: string + freightAccountNumber: + description: The reseller's shipping account number with carrier. Used to + bill the shipping carrier directly from the reseller's account with the + carrier. + type: string + signatureRequired: + description: Specifies whether a signature is required for delivery. Default + is False. + type: string + shippingInstructions: + description: The shipping instructions for the order. + type: string + type: object + OrderCreateResponse_orders_inner_lines_inner_additionalAttributes_inner: + example: + attributeValue: attributeValue + attributeName: attributeName + properties: + attributeName: + type: string + attributeValue: + type: string + type: object + OrderCreateResponse_orders_inner_lines_inner: + example: + ingramPartNumber: ingramPartNumber + unitPrice: 9.301444243932576 + notes: notes + extendedUnitPrice: 3.616076749251911 + ingramLineNumber: ingramLineNumber + quantityOrdered: 2 + customerLineNumber: customerLineNumber + lineStatus: lineStatus + quantityBackOrdered: 7 + specialBidNumber: specialBidNumber + shipmentDetails: + - freightAccountNumber: freightAccountNumber + carrierName: carrierName + shippingInstructions: shippingInstructions + carrierCode: carrierCode + signatureRequired: signatureRequired + shipFromWarehouseId: shipFromWarehouseId + shipFromLocation: shipFromLocation + - freightAccountNumber: freightAccountNumber + carrierName: carrierName + shippingInstructions: shippingInstructions + carrierCode: carrierCode + signatureRequired: signatureRequired + shipFromWarehouseId: shipFromWarehouseId + shipFromLocation: shipFromLocation + subOrderNumber: subOrderNumber + quantityConfirmed: 4 + vendorPartNumber: vendorPartNumber + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + properties: + subOrderNumber: + description: The sub order number. The two-digit prefix is the warehouse + code of the warehouse nearest the reseller. The middle number is the order + number. The two-digit suffix is the sub order number. + type: string + ingramLineNumber: + description: The Ingram Micro line number for the product. + type: string + customerLineNumber: + description: The reseller's line number for reference in their system. + type: string + lineStatus: + description: "The status for the line item in the order. One of: Backordered,\ + \ Open" + type: string + ingramPartNumber: + description: The Ingram Micro part number for the line item. + type: string + vendorPartNumber: + description: The vendor part number for the line item. + type: string + unitPrice: + description: The unit price for the line item. + format: decimal + type: number + extendedUnitPrice: + description: The extended list price (unit price X quantity) for the line + item. + format: decimal + type: number + quantityOrdered: + description: The quantity of the line item ordered. + type: integer + quantityConfirmed: + description: The quantity of the line item that has been confirmed. + type: integer + quantityBackOrdered: + description: The quantity of the line item that is backordered. + type: integer + specialBidNumber: + description: The bid number for the line item provided to the reseller by + the vendor for special pricing and discounts. Line-level bid numbers take + precedence over header-level bid numbers. + type: string + notes: + description: Line-level notes. + type: string + shipmentDetails: + description: The shipment details for the line item. + items: + $ref: '#/components/schemas/OrderCreateResponse_orders_inner_lines_inner_shipmentDetails_inner' + type: array + additionalAttributes: + description: SAP requested and country-specific line level details. + items: + $ref: '#/components/schemas/OrderCreateResponse_orders_inner_lines_inner_additionalAttributes_inner' + type: array + type: object + OrderCreateResponse_orders_inner_miscellaneousCharges_inner: + example: + chargeLineReference: chargeLineReference + subOrderNumber: subOrderNumber + chargeAmount: 1.2315135367772556 + chargeDescription: chargeDescription + properties: + subOrderNumber: + description: The sub order number. The two-digit prefix is the warehouse + code of the warehouse nearest the reseller. The middle number is the order + number. The two-digit suffix is the sub order number. + type: string + chargeLineReference: + description: Impulse line number for the miscellaneous charge. + type: string + chargeDescription: + description: Description of the miscellaneous charges for the order. + type: string + chargeAmount: + description: The total amount of miscellaneous charges for the order. + format: decimal + type: number + type: object + OrderCreateResponse_orders_inner_links_inner: + example: + topic: topic + href: href + type: type + properties: + topic: + description: Provides the details of the orders. + type: string + href: + description: The URL endpoint for accessing the relevant data. + type: string + type: + description: "The type of call that can be made to the href link (GET, POST,\ + \ Etc.)." + type: string + type: object + OrderCreateResponse_orders_inner_rejectedLineItems_inner: + example: + ingramPartNumber: ingramPartNumber + rejectReason: rejectReason + rejectCode: rejectCode + vendorPartNumber: vendorPartNumber + quantityOrdered: 1 + customerLinenumber: customerLinenumber + properties: + customerLinenumber: + description: The reseller's line item number of the rejected item for their + reference. Number + type: string + ingramPartNumber: + description: The Ingram Micro part number for the rejected line item. + type: string + vendorPartNumber: + description: The vendor part number for the rejected line item. + type: string + quantityOrdered: + description: The quantity ordered of the rejected line item. + type: integer + rejectCode: + description: "The rejection code for the rejected line item. Ex: 'EN' " + type: string + rejectReason: + description: "The rejection reason for the rejected line item. Ex: 'SKU-NOTFOUND\ + \ DF41281' " + type: string + type: object + OrderCreateResponse_orders_inner_additionalAttributes_inner: + example: + attributeValue: attributeValue + attributeName: attributeName + properties: + attributeName: + description: " allowPartialOrder: Allow orders with failed lines. (SAP)\ + \ Depends on backorder settings.\n\n\ndpasRating: DX rating by Department\ + \ of Defense is the highest rating by the highest offices and meant to\ + \ be top priority. DO any other gov offices at the federal level to priotize.\n\ + \n\ndpasProgramId: Identifies the actual agency that signed off on the\ + \ DPAS priority. \n\nstorageLocation: Determine the location of the product\ + \ stock in SAP for Marketplaces.\n\nsoldTo: To be used in cases when Sold-To\ + \ is different than Customer ID.\n\nZ101: Used for end customer details\ + \ such as name, address, phone, etc. This information flows to SAP and\ + \ is used by warehouse.\n\neuDepId: DEP ID would be the 'End User DEP/ABM\ + \ Organization ID' up to 32 characters and is assigned by Apple.\n\ndepOrderNbr:\ + \ depordernbr is 'End User PO to reseller' Can appear in message lines\ + \ or dedicated end user po#.\n " + type: string + attributeValue: + description: Attribute value + type: string + type: object + OrderCreateResponse_orders_inner: + example: + orderType: orderType + rejectedLineItems: + - ingramPartNumber: ingramPartNumber + rejectReason: rejectReason + rejectCode: rejectCode + vendorPartNumber: vendorPartNumber + quantityOrdered: 1 + customerLinenumber: customerLinenumber + - ingramPartNumber: ingramPartNumber + rejectReason: rejectReason + rejectCode: rejectCode + vendorPartNumber: vendorPartNumber + quantityOrdered: 1 + customerLinenumber: customerLinenumber + miscellaneousCharges: + - chargeLineReference: chargeLineReference + subOrderNumber: subOrderNumber + chargeAmount: 1.2315135367772556 + chargeDescription: chargeDescription + - chargeLineReference: chargeLineReference + subOrderNumber: subOrderNumber + chargeAmount: 1.2315135367772556 + chargeDescription: chargeDescription + notes: notes + numberOfLinesWithSuccess: 6 + numberOfLinesWithError: 1 + orderTotal: 5.637376656633329 + ingramOrderNumber: ingramOrderNumber + totalTax: 7.061401241503109 + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + numberOfLinesWithWarning: 5 + lines: + - ingramPartNumber: ingramPartNumber + unitPrice: 9.301444243932576 + notes: notes + extendedUnitPrice: 3.616076749251911 + ingramLineNumber: ingramLineNumber + quantityOrdered: 2 + customerLineNumber: customerLineNumber + lineStatus: lineStatus + quantityBackOrdered: 7 + specialBidNumber: specialBidNumber + shipmentDetails: + - freightAccountNumber: freightAccountNumber + carrierName: carrierName + shippingInstructions: shippingInstructions + carrierCode: carrierCode + signatureRequired: signatureRequired + shipFromWarehouseId: shipFromWarehouseId + shipFromLocation: shipFromLocation + - freightAccountNumber: freightAccountNumber + carrierName: carrierName + shippingInstructions: shippingInstructions + carrierCode: carrierCode + signatureRequired: signatureRequired + shipFromWarehouseId: shipFromWarehouseId + shipFromLocation: shipFromLocation + subOrderNumber: subOrderNumber + quantityConfirmed: 4 + vendorPartNumber: vendorPartNumber + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + - ingramPartNumber: ingramPartNumber + unitPrice: 9.301444243932576 + notes: notes + extendedUnitPrice: 3.616076749251911 + ingramLineNumber: ingramLineNumber + quantityOrdered: 2 + customerLineNumber: customerLineNumber + lineStatus: lineStatus + quantityBackOrdered: 7 + specialBidNumber: specialBidNumber + shipmentDetails: + - freightAccountNumber: freightAccountNumber + carrierName: carrierName + shippingInstructions: shippingInstructions + carrierCode: carrierCode + signatureRequired: signatureRequired + shipFromWarehouseId: shipFromWarehouseId + shipFromLocation: shipFromLocation + - freightAccountNumber: freightAccountNumber + carrierName: carrierName + shippingInstructions: shippingInstructions + carrierCode: carrierCode + signatureRequired: signatureRequired + shipFromWarehouseId: shipFromWarehouseId + shipFromLocation: shipFromLocation + subOrderNumber: subOrderNumber + quantityConfirmed: 4 + vendorPartNumber: vendorPartNumber + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + currencyCode: currencyCode + freightCharges: 2.3021358869347655 + ingramOrderDate: ingramOrderDate + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + properties: + numberOfLinesWithSuccess: + description: The number of lines in the order that were successful. + type: integer + numberOfLinesWithError: + description: The number of lines in the order that have errors. + type: integer + numberOfLinesWithWarning: + description: The number of lines in the order that have a warning. + type: integer + ingramOrderNumber: + description: The Ingram Micro order number. + type: string + ingramOrderDate: + description: The date in UTC format that the order was created in Ingram + Micro's system. + type: string + notes: + description: Order-level notes. + type: string + orderType: + description: "The order typer. One of: S=Stocked PO D=Direct Ship PO" + type: string + orderTotal: + description: The total price for the order. + format: decimal + type: number + freightCharges: + description: The total freight charges for the order. + format: decimal + type: number + totalTax: + description: The total tax for the order. + format: decimal + type: number + currencyCode: + description: The country-specific three character ISO 4217 currency code + used for the order. + type: string + lines: + description: The line-level details for the order. + items: + $ref: '#/components/schemas/OrderCreateResponse_orders_inner_lines_inner' + type: array + miscellaneousCharges: + items: + $ref: '#/components/schemas/OrderCreateResponse_orders_inner_miscellaneousCharges_inner' + type: array + links: + description: Link to Order Details for the order(s). + items: + $ref: '#/components/schemas/OrderCreateResponse_orders_inner_links_inner' + type: array + rejectedLineItems: + description: A list of rejected line items. + items: + $ref: '#/components/schemas/OrderCreateResponse_orders_inner_rejectedLineItems_inner' + type: array + additionalAttributes: + items: + $ref: '#/components/schemas/OrderCreateResponse_orders_inner_additionalAttributes_inner' + type: array + type: object + OrderModifyRequest_shipToInfo: + description: The shipping information provided by the reseller. + example: + city: city + companyName: companyName + postalCode: postalCode + addressId: addressId + phoneNumber: phoneNumber + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + name2: name2 + name1: name1 + email: email + properties: + addressId: + description: Suffix used to identify billing address. Created during onboarding. + Resellers are provided with one or more address IDs depending on how many + bill to addresses they need for various flooring companies they are using + for credit. + maxLength: 10 + type: string + contact: + description: The company contact provided by the reseller. + maxLength: 40 + type: string + companyName: + description: The name of the company the order will be shipped to. + maxLength: 40 + type: string + name1: + description: name1. + maxLength: 40 + type: string + name2: + description: name2. + maxLength: 40 + type: string + addressLine1: + description: The street address and building or house number the order will + be shipped to. + maxLength: 60 + type: string + addressLine2: + description: The apartment number the order will be shipped to. + maxLength: 40 + type: string + addressLine3: + description: Line 3 of the address the order will be shipped to. + maxLength: 40 + type: string + city: + description: The city the order will be shipped to. + maxLength: 25 + type: string + state: + description: The state the order will be shipped to. + maxLength: 3 + type: string + postalCode: + description: The zip or postal code the order will be shipped to. + maxLength: 10 + type: string + countryCode: + description: The two-character ISO country code the order will be shipped + to. + maxLength: 3 + type: string + phoneNumber: + description: The company contact phone number. + maxLength: 30 + type: string + email: + description: The company contact email address. + maxLength: 241 + type: string + type: object + OrderModifyRequest_lines_inner: + example: + ingramPartNumber: ingramPartNumber + quantity: 0 + notes: notes + addUpdateDeleteLine: UPDATE + ingramLineNumber: ingramLineNumber + customerLineNumber: customerLineNumber + properties: + ingramPartNumber: + description: The unique IngramMicro part number. + maxLength: 18 + type: string + ingramLineNumber: + description: The IngramMicro line number. + maxLength: 6 + type: string + customerLineNumber: + description: The reseller's line number for reference in their system. + maxLength: 6 + type: string + addUpdateDeleteLine: + description: "The line number that was added, updated, or deleted." + enum: + - UPDATE + - DELETE + - ADD + type: string + quantity: + description: The quantity of the line item. + type: integer + notes: + description: The line-level notes. + maxLength: 132 + type: string + type: object + OrderModifyRequest_additionalAttributes_inner: + example: + attributeValue: attributeValue + attributeName: attributeName + properties: + attributeName: + description: "Example values are 'entryMethod', 'enableCommentsAsLines',\ + \ 'regionCode'" + type: string + attributeValue: + description: Attribute Value + type: string + type: object + OrderModifyResponse_shipToInfo: + description: The shipping information for the order provided by the reseller. + example: + phoneNumber: phoneNumber + city: city + countryCode: countryCode + contact: contact + companyName: companyName + postalCode: postalCode + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + email: email + addressId: addressId + properties: + addressId: + description: Suffix used to identify shipping address. Created during onboarding. + Resellers are provided with one or more address IDs depending on how many + bill to addresses they need for various flooring companies they are using + for credit. + type: string + contact: + description: The company contact provided by the reseller. + type: string + companyName: + description: The name of the company the order will be shipped to. + type: string + addressLine1: + description: The street address and building or house number the order will + be shipped to. + type: string + addressLine2: + description: The apartment number the order will be shipped to. + type: string + addressLine3: + description: Line 3 of the address the order will be shipped to. + type: string + city: + description: The city the order will be shipped to. + type: string + state: + description: The state the order will be shipped to. + type: string + postalCode: + description: The zip or postal code the order will be shipped to. + type: string + countryCode: + description: The two-character ISO country code the order will be shipped + to. + type: string + phoneNumber: + description: The company contact phone number. + type: string + email: + description: The company contact email address. + type: string + type: object + OrderModifyResponse_lines_inner_shipmentDetails: + description: Shipping details for the order provided by the reseller. + example: + freightAccountNumber: freightAccountNumber + carrierName: carrierName + carrierCode: carrierCode + properties: + carrierCode: + description: The carrier code for the shipment containing the line item. + type: string + carrierName: + description: The name of the carrier of the shipment containing the line + item. + type: string + freightAccountNumber: + description: The reseller's shipping account number with carrier. Used to + bill the shipping carrier directly from the reseller's account with the + carrier. + type: string + type: object + OrderModifyResponse_lines_inner_additionalAttributes_inner: + example: + attributeValue: attributeValue + attributeName: attributeName + properties: + attributeName: + description: Attribute Name. + type: string + attributeValue: + description: Attribute Value. + type: string + type: object + OrderModifyResponse_lines_inner: + example: + ingramPartNumber: ingramPartNumber + quantityBackOrdered: 7 + shipmentDetails: + freightAccountNumber: freightAccountNumber + carrierName: carrierName + carrierCode: carrierCode + notes: notes + subOrderNumber: subOrderNumber + quantityConfirmed: 2 + ingramLineNumber: ingramLineNumber + vendorPartNumber: vendorPartNumber + quantityOrdered: 5 + customerLineNumber: customerLineNumber + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + properties: + subOrderNumber: + description: The sub order number. The two-digit prefix is the warehouse + code of the warehouse nearest the reseller. The middle number is the order + number. The two-digit suffix is the sub order number. + type: string + ingramLineNumber: + description: The IngramMicro line number. + type: string + customerLineNumber: + description: The reseller's line number for reference in their system. + type: string + ingramPartNumber: + description: The unique IngramMicro part number for the line item. + type: string + vendorPartNumber: + description: The vendor's part number for the line item. + type: string + quantityOrdered: + description: The quantity ordered of the line item. + type: integer + quantityConfirmed: + description: The quantity confirmed of the line item. + type: integer + quantityBackOrdered: + description: The quantity backordered of the line item. + type: integer + shipmentDetails: + $ref: '#/components/schemas/OrderModifyResponse_lines_inner_shipmentDetails' + additionalAttributes: + description: SAP requested and country-specific line level details. + items: + $ref: '#/components/schemas/OrderModifyResponse_lines_inner_additionalAttributes_inner' + type: array + notes: + description: Line-level notes for the order. + type: string + OrderModifyResponse_rejectedLineItems_inner: + example: + ingramPartNumber: ingramPartNumber + rejectReason: rejectReason + rejectCode: rejectCode + ingramLineNumber: ingramLineNumber + vendorPartNumber: vendorPartNumber + quantityOrdered: 9 + customerLineNumber: customerLineNumber + properties: + ingramLineNumber: + description: The IngramMicro line number for the failed line item. + type: string + customerLineNumber: + description: The reseller's line number of the failed line item for reference + in their system. + type: string + ingramPartNumber: + description: The IngramMicro part number for the failed line item. + type: string + vendorPartNumber: + description: The vendor's part number for the failed line item. + type: string + quantityOrdered: + description: The quantity ordered of the failed line item. + type: integer + rejectCode: + description: The rejection code for the failed line item. + type: string + rejectReason: + description: The rejection reason for the failed line item. + type: string + OrderDetailResponse_billToInfo: + description: The billing information provided by the reseller. + example: + city: city + companyName: companyName + postalCode: postalCode + phoneNumber: phoneNumber + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + name2: name2 + name1: name1 + email: email + properties: + contact: + description: The company contact provided by the reseller. + type: string + companyName: + description: The name of the company the order will be billed to. + type: string + name1: + description: First name. + type: string + name2: + description: Last name. + type: string + addressLine1: + description: The street address and building or house number the order will + be billed to. + type: string + addressLine2: + description: The apartment number the order will be billed to. + type: string + addressLine3: + description: Address line 3. + type: string + city: + description: The city the order will be billed to. + type: string + state: + description: The state the order will be billed to. + type: string + postalCode: + description: The zip or postal code the order will be billed to. + type: string + countryCode: + description: The two-character ISO country code the order will be billed + to. + type: string + phoneNumber: + description: The company contact phone number. + type: string + email: + description: The company contact email address. + type: string + type: object + OrderDetailResponse_shipToInfo: + description: The shipping information provided by the reseller for order delivery. + example: + city: city + companyName: companyName + postalCode: postalCode + phoneNumber: phoneNumber + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + name2: name2 + name1: name1 + email: email + properties: + contact: + description: The company contact provided by the reseller. + type: string + companyName: + description: The name of the company the order will be shipped to. + type: string + name1: + description: First name. + type: string + name2: + description: Last name. + type: string + addressLine1: + description: The street address the order will be shipped to. + type: string + addressLine2: + description: The building or apartment number the order will be shipped + to. + type: string + addressLine3: + description: Line 3 of the address the order will be shipped to. + type: string + city: + description: The city the order will be shipped to. + type: string + state: + description: The state the order will be shipped to. + type: string + postalCode: + description: The zip or postal code the order will be shipped to. + type: string + countryCode: + description: The two-character ISO country code the order will be shipped + to. + type: string + phoneNumber: + description: The company contact phone number. + type: string + email: + description: The company contact email address. + type: string + type: object + OrderDetailResponse_endUserInfo: + description: The contact information for the end user/customer provided by the + reseller. Used to determine pricing and discounts. + example: + city: city + companyName: companyName + postalCode: postalCode + phoneNumber: phoneNumber + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + name2: name2 + name1: name1 + email: email + properties: + contact: + description: The contact name for the end user/customer. + type: string + companyName: + description: The company name for the end user/customer. + type: string + name1: + description: First name. + type: string + name2: + description: Last name. + type: string + addressLine1: + description: The street adress and building or house number for the end + user/customer. + type: string + addressLine2: + description: The apartment number for the end user/customer. + type: string + addressLine3: + description: Line 3 of the address for the end user/customer. + type: string + city: + description: The end user/customer's city. + type: string + state: + description: The end user/customer's state. + type: string + postalCode: + description: The end user/customer's zip or postal code. + type: string + countryCode: + description: The end user/customer's two character ISO country code. + type: string + phoneNumber: + description: The end user/customer's phone number. + type: string + email: + description: The end user/customer's email. + type: string + type: object + OrderDetailResponse_lines_inner_shipmentDetails_inner_carrierDetails_trackingDetails_inner_SerialNumbers_inner: + description: A list of serial numbers of the line items contained in the shipment. + example: + serialNumber: serialNumber + properties: + serialNumber: + description: The serial number for the line item. + type: string + type: object + OrderDetailResponse_lines_inner_shipmentDetails_inner_carrierDetails_trackingDetails_inner: + description: The tracking details for the shipment containing the line item. + example: + quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + SerialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + cartonNumber: cartonNumber + trackingNumber: trackingNumber + properties: + trackingNumber: + description: The tracking number for the shipment containing the line item. + type: string + trackingUrl: + description: The tracking URL for the shipment containing the line item. + type: string + packageWeight: + description: The weight of the package for the line item. + type: string + cartonNumber: + description: The shipment carton number that contains the line item. + type: string + quantityInBox: + description: The quantity of line items in the box. + type: string + SerialNumbers: + items: + $ref: '#/components/schemas/OrderDetailResponse_lines_inner_shipmentDetails_inner_carrierDetails_trackingDetails_inner_SerialNumbers_inner' + type: array + type: object + OrderDetailResponse_lines_inner_shipmentDetails_inner_carrierDetails: + description: The shipment carrier details for the line item. + example: + carrierName: carrierName + carrierCode: carrierCode + trackingDetails: + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + SerialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + cartonNumber: cartonNumber + trackingNumber: trackingNumber + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + SerialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + cartonNumber: cartonNumber + trackingNumber: trackingNumber + properties: + carrierCode: + description: The carrier code for the shipment containing the line item. + type: string + carrierName: + description: The name of the carrier of the shipment containing the line + item. + type: string + trackingDetails: + items: + $ref: '#/components/schemas/OrderDetailResponse_lines_inner_shipmentDetails_inner_carrierDetails_trackingDetails_inner' + type: array + type: object + OrderDetailResponse_lines_inner_shipmentDetails_inner: + description: Shipping details for the line item. + example: + deliveredDate: 2000-01-23 + quantity: 1 + invoiceNumber: invoiceNumber + estimatedShipDate: 2000-01-23 + invoiceDate: 2000-01-23 + shippedDate: 2000-01-23 + estimatedDeliveryDate: 2000-01-23 + shipFromWarehouseId: shipFromWarehouseId + carrierDetails: + carrierName: carrierName + carrierCode: carrierCode + trackingDetails: + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + SerialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + cartonNumber: cartonNumber + trackingNumber: trackingNumber + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + SerialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + cartonNumber: cartonNumber + trackingNumber: trackingNumber + shipFromLocation: shipFromLocation + properties: + quantity: + description: The quantity shipped of the line item. + type: integer + estimatedShipDate: + description: The estimated ship date for the line item. + format: date + type: string + shippedDate: + description: The date the line item was shipped. + format: date + type: string + estimatedDeliveryDate: + description: The date the line item is expected to be delivered. + format: date + type: string + deliveredDate: + description: The actual date of delivery of the line item. + format: date + type: string + shipFromWarehouseId: + description: The ID of the warehouse the product will ship from. + type: string + shipFromLocation: + description: The city and state the line item ships from. + type: string + invoiceNumber: + description: The Ingram Micro invoice number for the line item. + type: string + invoiceDate: + description: The date the IngramMicro invoice was created for the line item. + format: date + type: string + carrierDetails: + $ref: '#/components/schemas/OrderDetailResponse_lines_inner_shipmentDetails_inner_carrierDetails' + type: object + OrderDetailResponse_lines_inner_additionalAttributes_inner: + example: + attributeValue: attributeValue + attributeName: attributeName + properties: + attributeName: + description: Line level custom field names. + type: string + attributeValue: + description: Value of the custom fields. + type: string + type: object + OrderDetailResponse_lines_inner_links_inner: + description: Link to Order Details for the line item. + example: + topic: topic + href: href + type: type + properties: + topic: + description: Provides the details of the line item. + type: string + href: + description: The API endpoint for accessing the relevant data. + type: string + type: + description: "The type of call that can be made to the href link(GET,POST\ + \ etc)." + type: string + type: object + OrderDetailResponse_lines_inner: + example: + unitWeight: 2.3021358869347655 + vendorSalesOrderLineNumber: vendorSalesOrderLineNumber + quantityOrdered: 2 + customerLinenumber: customerLinenumber + lineStatus: lineStatus + extendedPrice: 9.301444243932576 + vendorPartNumber: vendorPartNumber + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + upcCode: upcCode + ingramPartNumber: ingramPartNumber + unitPrice: 7 + ingramOrderLineNumber: ingramOrderLineNumber + vendorName: vendorName + lineNotes: lineNotes + quantityBackOrdered: 7 + specialBidNumber: specialBidNumber + shipmentDetails: + - deliveredDate: 2000-01-23 + quantity: 1 + invoiceNumber: invoiceNumber + estimatedShipDate: 2000-01-23 + invoiceDate: 2000-01-23 + shippedDate: 2000-01-23 + estimatedDeliveryDate: 2000-01-23 + shipFromWarehouseId: shipFromWarehouseId + carrierDetails: + carrierName: carrierName + carrierCode: carrierCode + trackingDetails: + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + SerialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + cartonNumber: cartonNumber + trackingNumber: trackingNumber + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + SerialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + cartonNumber: cartonNumber + trackingNumber: trackingNumber + shipFromLocation: shipFromLocation + - deliveredDate: 2000-01-23 + quantity: 1 + invoiceNumber: invoiceNumber + estimatedShipDate: 2000-01-23 + invoiceDate: 2000-01-23 + shippedDate: 2000-01-23 + estimatedDeliveryDate: 2000-01-23 + shipFromWarehouseId: shipFromWarehouseId + carrierDetails: + carrierName: carrierName + carrierCode: carrierCode + trackingDetails: + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + SerialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + cartonNumber: cartonNumber + trackingNumber: trackingNumber + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + SerialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + cartonNumber: cartonNumber + trackingNumber: trackingNumber + shipFromLocation: shipFromLocation + promisedDeliveryDate: 2000-01-23 + subOrderNumber: subOrderNumber + partDescription: partDescription + quantityConfirmed: 4 + requestedDeliveryDate: 2000-01-23 + weightUom: weightUom + taxAmount: 3.616076749251911 + currencyCode: currencyCode + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + properties: + subOrderNumber: + description: The sub order number. The two-digit prefix is the warehouse + code of the warehouse nearest the reseller. The middle number is the order + number. The two-digit suffix is the sub order number. + type: string + ingramOrderLineNumber: + description: Unique Ingram Micro line number. Starts with 001. + type: string + vendorSalesOrderLineNumber: + description: The vendor's sales order line number. + type: string + customerLinenumber: + description: The reseller's line item number for reference in their system. + type: string + lineStatus: + description: "The status for the line item in the order. One of- Backordered,\ + \ In Progress, Shipped, Delivered, Canceled, On Hold" + type: string + ingramPartNumber: + description: Unique IngramMicro part number. + type: string + vendorPartNumber: + description: The vendor's part number for the line item. + type: string + vendorName: + description: The vendor's name for the part in their system. + type: string + partDescription: + description: The vendor's description of the part in their system. + type: string + unitWeight: + description: The unit weight of the line item. + format: decimal + type: number + weightUom: + description: The unit of measure for the line item. + type: string + unitPrice: + description: The unit price of the line item. + type: integer + upcCode: + description: The UPC code of a product. + type: string + extendedPrice: + description: Unit price X quantity for the line item. + format: decimal + type: number + taxAmount: + description: The tax amount for the line item. + format: decimal + type: number + currencyCode: + description: The country-specific three character ISO 4217 currency code + for the line item. + type: string + quantityOrdered: + description: The quantity ordered of the line item. + type: integer + quantityConfirmed: + description: The quantity confirmed for the line item. + type: integer + quantityBackOrdered: + description: The quantity backordered for the line item. + type: integer + specialBidNumber: + description: The line-level bid number provided to the reseller by the vendor + for special pricing and discounts. Used to track the bid number in the + case of split orders or where different line items have different bid + numbers. Line-level bid numbers take precedence over header-level bid + numbers. + type: string + requestedDeliveryDate: + description: Reseller-requested delivery date. Delivery date is not guaranteed. + format: date + type: string + promisedDeliveryDate: + description: The delivery date promised by IngramMicro. + format: date + type: string + lineNotes: + description: Line-level notes for the order. + type: string + shipmentDetails: + items: + $ref: '#/components/schemas/OrderDetailResponse_lines_inner_shipmentDetails_inner' + type: array + additionalAttributes: + items: + $ref: '#/components/schemas/OrderDetailResponse_lines_inner_additionalAttributes_inner' + type: array + links: + items: + $ref: '#/components/schemas/OrderDetailResponse_lines_inner_links_inner' + type: array + type: object + OrderDetailResponse_miscellaneousCharges_inner: + example: + chargeLineReference: chargeLineReference + subOrderNumber: subOrderNumber + chargeAmount: 1.0246457001441578 + chargeDescription: chargeDescription + properties: + subOrderNumber: + description: The sub order number. The two-digit prefix is the warehouse + code of the warehouse nearest the reseller. The middle number is the order + number. The two-digit suffix is the sub order number. + type: string + chargeLineReference: + description: Impulse line number for the miscellaneous charge. + type: string + chargeDescription: + description: Description of the miscellaneous charges. + type: string + chargeAmount: + description: The amount of miscellaneous charges. + format: double + type: number + type: object + OrderSearch_Response_orders_inner_subOrders_inner_links_inner: + example: + topic: topic + href: href + type: type + properties: + topic: + description: For orders or invoices. For orders the link provides details + of the order. For invoices the link provides details of the invoice. + type: string + href: + description: The URL endpoint for accessing the relevant data. + type: string + type: + description: "The type of call that can be made to the href link (GET, POST,\ + \ Etc.)." + type: string + type: object + OrderSearch_Response_orders_inner_subOrders_inner: + example: + subOrderNumber: subOrderNumber + subOrderTotal: 5.637376656633329 + subOrderStatus: subOrderStatus + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + properties: + subOrderNumber: + description: The sub order number. The two-digit prefix is the warehouse + code of the warehouse nearest to the reseller. The middle number is the + order number. The two-digit suffix is the sub order number. + type: string + subOrderTotal: + description: The total for the suborder. + format: decimal + type: number + subOrderStatus: + description: "The status of the suborder. One of:- Shipped, Canceled, Backordered,\ + \ Processing, On Hold, Delivered" + type: string + links: + description: Link to Order Details for the sub order(s). + items: + $ref: '#/components/schemas/OrderSearch_Response_orders_inner_subOrders_inner_links_inner' + type: array + type: object + OrderSearch_Response_orders_inner_links: + description: Link to Order Details for the order(s). + example: + topic: topic + href: href + type: type + properties: + topic: + description: Provides the details of the orders. + type: string + href: + description: The URL endpoint for accessing the relevant data. + type: string + type: + description: "The type of call that can be made to the href link (GET, POST,\ + \ Etc.)." + type: string + type: object + OrderSearch_Response_orders_inner: + example: + ingramOrderNumber: ingramOrderNumber + vendorSalesOrderNumber: vendorSalesOrderNumber + orderStatus: orderStatus + endUserCompanyName: endUserCompanyName + links: + topic: topic + href: href + type: type + subOrders: + - subOrderNumber: subOrderNumber + subOrderTotal: 5.637376656633329 + subOrderStatus: subOrderStatus + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + - subOrderNumber: subOrderNumber + subOrderTotal: 5.637376656633329 + subOrderStatus: subOrderStatus + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + vendorName: vendorName + customerOrderNumber: customerOrderNumber + orderTotal: 5.962133916683182 + ingramOrderDate: ingramOrderDate + properties: + ingramOrderNumber: + description: The Ingram Micro order number. + type: string + ingramOrderDate: + description: The date the order was created(UTC). + type: string + customerOrderNumber: + description: The reseller's order number for reference in their system. + type: string + vendorSalesOrderNumber: + description: The vendor's order number.(only for D-Type Orders) + type: string + vendorName: + description: The name of the vendor. + type: string + endUserCompanyName: + description: The company name of the end user/customer. + type: string + orderTotal: + description: The total of the order. + format: decimal + type: number + orderStatus: + description: The header-level status of the order.(OPEN/CLOSED/CANCELLED) + type: string + subOrders: + description: Individual Ingram Micro order numbers associated with a single + reseller PO. + items: + $ref: '#/components/schemas/OrderSearch_Response_orders_inner_subOrders_inner' + type: array + links: + $ref: '#/components/schemas/OrderSearch_Response_orders_inner_links' + type: object + PriceAndAvailabilityRequest_availabilityByWarehouse_inner: + example: + availabilityForAllLocation: true + availabilityByWarehouseId: availabilityByWarehouseId + properties: + availabilityByWarehouseId: + description: Plant/warehouse Id of a particular location in order to get + just the inventory of that location. + type: string + availabilityForAllLocation: + description: "Pass boolean value as input, if true the response will contain\ + \ warehouse location details, if false the response will not hold warehouse\ + \ location details. By default value is true." + type: boolean + type: object + PriceAndAvailabilityRequest_products_inner_additionalAttributes_inner: + example: + attributeValue: attributeValue + attributeName: attributeName + properties: + attributeName: + description: |- + governmentprogramcode: Special Discount details will be provided based on the governmentprogramcode if available. + shiptostatebrazil: Attribute Specific to Brazil. + shipfrombranchnumber: If provided, displays only the availability of the specified branch number. + type: string + attributeValue: + description: key value pair -key value. + type: string + type: object + PriceAndAvailabilityRequest_products_inner: + example: + ingramPartNumber: ingramPartNumber + customerPartNumber: customerPartNumber + quantityRequested: quantityRequested + upc: upc + vendorPartNumber: vendorPartNumber + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + properties: + ingramPartNumber: + description: Ingram Micro unique part number for the product. + type: string + vendorPartNumber: + description: Vendor’s part number for the product. + type: string + customerPartNumber: + description: Reseller/end-user’s part number for the product. + type: string + upc: + description: The UPC code for the product. Consists of 12 numeric digits + that are uniquely assigned to each trade item. + type: string + quantityRequested: + description: Number of quantity of the Product. + type: string + additionalAttributes: + items: + $ref: '#/components/schemas/PriceAndAvailabilityRequest_products_inner_additionalAttributes_inner' + type: array + type: object + PriceAndAvailabilityRequest_additionalAttributes_inner: + example: + attributeValue: attributeValue + attributeName: attributeName + properties: + attributeName: + description: key value pair -key Name. + type: string + attributeValue: + description: key value pair -key value. + type: string + type: object + PriceAndAvailabilityResponse_inner_availability_availabilityByWarehouse_inner_backOrderInfo_inner: + example: + quantity: 5 + etaDate: etaDate + properties: + quantity: + description: Quantity backordered. + type: integer + etaDate: + description: Expected availability date. + format: Date + type: string + type: object + PriceAndAvailabilityResponse_inner_availability_availabilityByWarehouse_inner: + example: + quantityAvailable: 6 + backOrderInfo: + - quantity: 5 + etaDate: etaDate + - quantity: 5 + etaDate: etaDate + warehouseId: warehouseId + location: location + quantityBackordered: 1 + quantityBackorderedEta: quantityBackorderedEta + properties: + location: + description: Indicates where (location) the product is available. + type: string + warehouseId: + description: Indicates where (Ingram Warehouse Id) the product is available. + type: string + quantityAvailable: + description: The quantity of the product available in a given warehouse. + type: integer + quantityBackordered: + description: The quantity of a product backordered in a given warehouse. + type: integer + quantityBackorderedEta: + description: The estimated time of arrival of a product that has been backordered + in a given warehouse. + type: string + backOrderInfo: + description: "*Currently, this feature is not available in these countries\ + \ (Mexico, Turkey, New Zealand, Colombia, Chile, Brazil, Peru, Western\ + \ Sahara)." + items: + $ref: '#/components/schemas/PriceAndAvailabilityResponse_inner_availability_availabilityByWarehouse_inner_backOrderInfo_inner' + type: array + type: object + PriceAndAvailabilityResponse_inner_availability: + example: + totalAvailability: 0 + availabilityByWarehouse: + - quantityAvailable: 6 + backOrderInfo: + - quantity: 5 + etaDate: etaDate + - quantity: 5 + etaDate: etaDate + warehouseId: warehouseId + location: location + quantityBackordered: 1 + quantityBackorderedEta: quantityBackorderedEta + - quantityAvailable: 6 + backOrderInfo: + - quantity: 5 + etaDate: etaDate + - quantity: 5 + etaDate: etaDate + warehouseId: warehouseId + location: location + quantityBackordered: 1 + quantityBackorderedEta: quantityBackorderedEta + available: true + properties: + available: + description: Boolean that indicates if the product ordered is available + type: boolean + totalAvailability: + description: The total amount of available products + type: integer + availabilityByWarehouse: + items: + $ref: '#/components/schemas/PriceAndAvailabilityResponse_inner_availability_availabilityByWarehouse_inner' + type: array + type: object + PriceAndAvailabilityResponse_inner_reserveInventoryDetails_inner: + example: + expirydate: expirydate + quantityAvailable: 2 + quantityReserved: 5 + effectivedate: effectivedate + properties: + quantityReserved: + description: The quantity of the product reserved for the customer. + type: integer + quantityAvailable: + description: The availability of the product reserved. + type: integer + effectivedate: + description: The reservation date for the product in UTC format. + format: Date + type: string + expirydate: + description: The expiration date for the reservation of the product in UTC + format. + format: Date + type: string + type: object + PriceAndAvailabilityResponse_inner_pricing: + example: + mapPrice: 9.301444243932576 + webDiscountsAvailable: true + specialBidPricingAvailable: true + currencyCode: currencyCode + retailPrice: 7.061401241503109 + customerPrice: 3.616076749251911 + properties: + currencyCode: + description: The 3-digit ISO currency code. + type: string + retailPrice: + description: The retail price of the product. + format: decimal + type: number + mapPrice: + description: "Minimum Advertised Price (MAP). If required by the vendor,\ + \ resellers can not sell below MAP price." + format: decimal + type: number + customerPrice: + description: The price customer pays after all special pricing and discounts + have been applied. + format: decimal + type: number + specialBidPricingAvailable: + description: Boolean values specifies whether special Bid discounts are + available for the product. + type: boolean + webDiscountsAvailable: + description: Boolean values specifies whether web Discounts are available + for the product. + type: boolean + type: object + PriceAndAvailabilityResponse_inner_discounts_inner_specialPricing_inner: + example: + specialBidNumer: specialBidNumer + specialPricingAvailableQuantity: 4 + specialPricingExpirationDate: 2000-01-23 + specialPricingMinQuantity: 7 + governmentDiscountedCustomerPrice: 1.2315135367772556 + specialPricingEffectiveDate: 2000-01-23 + governmentDiscountType: governmentDiscountType + discountType: "Special Bid, Promo Discount" + specialPricingDiscount: 2.027123023002322 + properties: + discountType: + description: The type of discount being given to the customer. + example: "Special Bid, Promo Discount" + type: string + specialBidNumer: + description: Pre-approved special pricing/bid number provided to the reseller + by the vendor for special pricing and discounts. Used to track the bid + number where different line items have different bid numbers. Line-level + bid numbers take precedence over header-level bid numbers. + type: string + specialPricingDiscount: + description: Special pricing discount amount given to the customer. + format: decimal + type: number + specialPricingEffectiveDate: + description: The effective date of the special pricing available to the + customer. + format: date + type: string + specialPricingExpirationDate: + description: The expiration date of the special pricing available to the + customer. + format: date + type: string + specialPricingAvailableQuantity: + description: The available quantity of products with discounts. + type: integer + specialPricingMinQuantity: + description: The minimum quantity of products that have to be purchased + to ensure the discount is applied. + type: integer + governmentDiscountType: + description: "Type of Government Discount. *Currently, this discount is\ + \ only available in the USA." + type: string + governmentDiscountedCustomerPrice: + description: "Government Discounted Customer Price. *Currently, this discount\ + \ is only available in the USA." + format: decimal + type: number + type: object + PriceAndAvailabilityResponse_inner_discounts_inner_quantityDiscounts_inner: + example: + currencyType: currencyType + amount: 1.4894159098541704 + quantity: 1 + conditionType: Total fee + currencyCode: currencyCode + properties: + conditionType: + description: Indicates when the discount is applied after ordering the product. + example: Total fee + type: string + currencyCode: + description: The country-specific three digit ISO 4217 currency code for + the order. + type: string + currencyType: + description: Type of currency. + type: string + quantity: + description: The total discounted quantity of the product. + type: integer + amount: + description: The total price of all the discounts applied. + format: decimal + type: number + type: object + PriceAndAvailabilityResponse_inner_discounts_inner: + example: + specialPricing: + - specialBidNumer: specialBidNumer + specialPricingAvailableQuantity: 4 + specialPricingExpirationDate: 2000-01-23 + specialPricingMinQuantity: 7 + governmentDiscountedCustomerPrice: 1.2315135367772556 + specialPricingEffectiveDate: 2000-01-23 + governmentDiscountType: governmentDiscountType + discountType: "Special Bid, Promo Discount" + specialPricingDiscount: 2.027123023002322 + - specialBidNumer: specialBidNumer + specialPricingAvailableQuantity: 4 + specialPricingExpirationDate: 2000-01-23 + specialPricingMinQuantity: 7 + governmentDiscountedCustomerPrice: 1.2315135367772556 + specialPricingEffectiveDate: 2000-01-23 + governmentDiscountType: governmentDiscountType + discountType: "Special Bid, Promo Discount" + specialPricingDiscount: 2.027123023002322 + quantityDiscounts: + - currencyType: currencyType + amount: 1.4894159098541704 + quantity: 1 + conditionType: Total fee + currencyCode: currencyCode + - currencyType: currencyType + amount: 1.4894159098541704 + quantity: 1 + conditionType: Total fee + currencyCode: currencyCode + properties: + specialPricing: + items: + $ref: '#/components/schemas/PriceAndAvailabilityResponse_inner_discounts_inner_specialPricing_inner' + type: array + quantityDiscounts: + items: + $ref: '#/components/schemas/PriceAndAvailabilityResponse_inner_discounts_inner_quantityDiscounts_inner' + type: array + type: object + PriceAndAvailabilityResponse_inner_serviceFees_inner: + example: + amount: 6.84685269835264 + endDate: endDate + description: description + conditionType: conditionType + currencyCode: currencyCode + properties: + conditionType: + description: Condition Type of the service fees. + type: string + description: + description: Description of the service fees. + type: string + amount: + description: Amount of the service fees. + format: decimal + type: number + endDate: + description: End Date of the service fees. + type: string + currencyCode: + description: Currency Code of the service fees. + type: string + type: object + PriceAndAvailabilityResponse_inner: + example: + productStatusMessage: productStatusMessage + customerPartNumber: customerPartNumber + description: description + productAuthorized: true + serviceFees: + - amount: 6.84685269835264 + endDate: endDate + description: description + conditionType: conditionType + currencyCode: currencyCode + - amount: 6.84685269835264 + endDate: endDate + description: description + conditionType: conditionType + currencyCode: currencyCode + availability: + totalAvailability: 0 + availabilityByWarehouse: + - quantityAvailable: 6 + backOrderInfo: + - quantity: 5 + etaDate: etaDate + - quantity: 5 + etaDate: etaDate + warehouseId: warehouseId + location: location + quantityBackordered: 1 + quantityBackorderedEta: quantityBackorderedEta + - quantityAvailable: 6 + backOrderInfo: + - quantity: 5 + etaDate: etaDate + - quantity: 5 + etaDate: etaDate + warehouseId: warehouseId + location: location + quantityBackordered: 1 + quantityBackorderedEta: quantityBackorderedEta + available: true + uom: uom + discounts: + - specialPricing: + - specialBidNumer: specialBidNumer + specialPricingAvailableQuantity: 4 + specialPricingExpirationDate: 2000-01-23 + specialPricingMinQuantity: 7 + governmentDiscountedCustomerPrice: 1.2315135367772556 + specialPricingEffectiveDate: 2000-01-23 + governmentDiscountType: governmentDiscountType + discountType: "Special Bid, Promo Discount" + specialPricingDiscount: 2.027123023002322 + - specialBidNumer: specialBidNumer + specialPricingAvailableQuantity: 4 + specialPricingExpirationDate: 2000-01-23 + specialPricingMinQuantity: 7 + governmentDiscountedCustomerPrice: 1.2315135367772556 + specialPricingEffectiveDate: 2000-01-23 + governmentDiscountType: governmentDiscountType + discountType: "Special Bid, Promo Discount" + specialPricingDiscount: 2.027123023002322 + quantityDiscounts: + - currencyType: currencyType + amount: 1.4894159098541704 + quantity: 1 + conditionType: Total fee + currencyCode: currencyCode + - currencyType: currencyType + amount: 1.4894159098541704 + quantity: 1 + conditionType: Total fee + currencyCode: currencyCode + - specialPricing: + - specialBidNumer: specialBidNumer + specialPricingAvailableQuantity: 4 + specialPricingExpirationDate: 2000-01-23 + specialPricingMinQuantity: 7 + governmentDiscountedCustomerPrice: 1.2315135367772556 + specialPricingEffectiveDate: 2000-01-23 + governmentDiscountType: governmentDiscountType + discountType: "Special Bid, Promo Discount" + specialPricingDiscount: 2.027123023002322 + - specialBidNumer: specialBidNumer + specialPricingAvailableQuantity: 4 + specialPricingExpirationDate: 2000-01-23 + specialPricingMinQuantity: 7 + governmentDiscountedCustomerPrice: 1.2315135367772556 + specialPricingEffectiveDate: 2000-01-23 + governmentDiscountType: governmentDiscountType + discountType: "Special Bid, Promo Discount" + specialPricingDiscount: 2.027123023002322 + quantityDiscounts: + - currencyType: currencyType + amount: 1.4894159098541704 + quantity: 1 + conditionType: Total fee + currencyCode: currencyCode + - currencyType: currencyType + amount: 1.4894159098541704 + quantity: 1 + conditionType: Total fee + currencyCode: currencyCode + productStatusCode: productStatusCode + vendorPartNumber: vendorPartNumber + acceptBackOrder: true + ingramPartNumber: ingramPartNumber + productClass: productClass + govtProgramType: govtProgramType + govtEndUserType: govtEndUserType + upc: upc + productStatus: productStatus + partNumberType: partNumberType + bundlePartIndicator: true + vendorName: vendorName + returnableProduct: true + govtSpecialPriceAvailable: true + extendedVendorPartNumber: extendedVendorPartNumber + endUserInfoRequired: true + vendorNumber: vendorNumber + reserveInventoryDetails: + - expirydate: expirydate + quantityAvailable: 2 + quantityReserved: 5 + effectivedate: effectivedate + - expirydate: expirydate + quantityAvailable: 2 + quantityReserved: 5 + effectivedate: effectivedate + pricing: + mapPrice: 9.301444243932576 + webDiscountsAvailable: true + specialBidPricingAvailable: true + currencyCode: currencyCode + retailPrice: 7.061401241503109 + customerPrice: 3.616076749251911 + properties: + productStatusCode: + description: Codes signifying whether the sku is active or not. + type: string + productStatusMessage: + description: Message returned saying whether sku is active. + type: string + ingramPartNumber: + description: Ingram Micro unique part number for the product. + type: string + vendorPartNumber: + description: Vendor’s part number for the product. + type: string + extendedVendorPartNumber: + description: "Extended Vendor Part Number. *Currently, this feature is not\ + \ available in these countries (Mexico, Turkey, New Zealand, Colombia,\ + \ Chile, Brazil, Peru, Western Sahara)." + type: string + customerPartNumber: + description: Reseller / end-user’s part number for the product. + type: string + upc: + description: The UPC code for the product. Consists of 12 numeric digits + that are uniquely assigned to each trade item. + type: string + partNumberType: + description: Number type of the part. + type: string + vendorNumber: + description: Vendor number that identifies the product. + type: string + vendorName: + description: Vendor name for the order. + type: string + description: + description: The description given for the product. + type: string + productClass: + description: |- + Indicates whether the product is directly shipped from the vendor’s warehouse or if the product ships from Ingram Micro’s warehouse. Class Codes are Ingram classifications on how skus are stocked + A = Product that is stocked usually in all IM warehouses and replenished on a regular basis. + B = Product that is stocked in limited IM warehouses and replenished on a regular basis + C = Product that is stocked in fewer IM warehouses and replenished on a regular basis. + D = Product that Ingram Micro has elected to discontinue. + E = Product that will be phased out later, according to the vendor. You may not want to replenish this product, but instead sell down what is in stock. + F = Product that we carry for a specific customer or supplier under a contractual agreement. + N = New Sku. Classification before first receipt + O = Discontinued product to be liquidated + S= Order for Specialized Demand (Order to backorder) + X= direct ship from Vendor + V = product that vendor has elected to discontinue. + type: string + uom: + description: The description given for the product. + type: string + productStatus: + description: Status that gives whether the product is Active. + type: string + acceptBackOrder: + description: Boolean that indicates if the product accepts backorder. + type: boolean + productAuthorized: + description: Boolean that indicates whether a product is authorized. + type: boolean + returnableProduct: + description: Boolean that indicates if the product can be returned. + type: boolean + endUserInfoRequired: + description: Boolean that indicates if end user information is required. + type: boolean + govtSpecialPriceAvailable: + description: Boolean that indicates if special pricing is available for + the product. + type: boolean + govtProgramType: + description: "Program type, “PA” for government orders, “ED” for education\ + \ order." + type: string + govtEndUserType: + description: "Type of end user of the program. F = Federal, S = State, E\ + \ = Local, K = K-12 school, and H = Higher Education." + type: string + availability: + $ref: '#/components/schemas/PriceAndAvailabilityResponse_inner_availability' + reserveInventoryDetails: + items: + $ref: '#/components/schemas/PriceAndAvailabilityResponse_inner_reserveInventoryDetails_inner' + type: array + pricing: + $ref: '#/components/schemas/PriceAndAvailabilityResponse_inner_pricing' + discounts: + items: + $ref: '#/components/schemas/PriceAndAvailabilityResponse_inner_discounts_inner' + type: array + bundlePartIndicator: + description: "True of false value to indicate whether it’s bundle part.\ + \ *Currently, this feature is not available in these countries (Mexico,\ + \ Turkey, New Zealand, Colombia, Chile, Brazil, Peru, Western Sahara)." + type: boolean + serviceFees: + description: "*Currently, this feature is not available in these countries\ + \ (Mexico, Turkey, New Zealand, Colombia, Chile, Brazil, Peru, Western\ + \ Sahara)." + items: + $ref: '#/components/schemas/PriceAndAvailabilityResponse_inner_serviceFees_inner' + type: array + type: object + ProductSearch_Response_catalog_inner_links_inner: + description: HATEOAS links for the price and availability of the sku. + example: + topic: topic + href: href + type: type + properties: + topic: + description: Provides the details of the product. + type: string + href: + description: The URL endpoint for accessing the relevant data.. + type: string + type: + description: The type of call that can be made to the href link(GET) + type: string + type: object + ProductSearch_Response_catalog_inner: + example: + ingramPartNumber: ingramPartNumber + extraDescription: extraDescription + subCategory: subCategory + replacementSku: replacementSku + endUserRequired: endUserRequired + authorizedToPurchase: authorizedToPurchase + description: description + discontinued: discontinued + vendorName: vendorName + type: type + newProduct: newProduct + hasWarranty: hasWarranty + hasDiscounts: hasDiscounts + directShip: directShip + vendorPartNumber: vendorPartNumber + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + category: category + productType: productType + upcCode: upcCode + properties: + description: + description: The description of the product. + type: string + category: + description: "The category of the product. Example: Displays." + type: string + subCategory: + description: "The sub category for the product. Example: ComputernMonitors." + type: string + productType: + description: "The product type of the product. Example: LCD Monitors." + type: string + ingramPartNumber: + description: The Unique IngramMicro part number for the product. + type: string + vendorPartNumber: + description: The vendor part number for the product. + type: string + upcCode: + description: The UPC code for the product. Consists of 12 numeric digits + that are uniquly assigned to each trade item. + type: string + vendorName: + description: The name of the vendor/manufacturer of the product. + type: string + endUserRequired: + description: "Indicates whether the contact information for the end user/customer\ + \ is required, which determines pricing and discounts." + type: string + hasDiscounts: + description: Specifies if there are discounts available for the product. + type: string + type: + description: "The SKU type of product. One of Physical, Digital, or Any." + type: string + discontinued: + description: Indicates if the product has been discontinued. + type: string + newProduct: + description: "Indicates if the product is new. For digital products, newer\ + \ than 10 days. For physical products, newer than 150 days." + type: string + directShip: + description: Indicates if the product will be shipped directly to the reseller + or end user from the vendor/manufacturer. + type: string + hasWarranty: + description: Indicates if the product has a warranty. + type: string + links: + items: + $ref: '#/components/schemas/ProductSearch_Response_catalog_inner_links_inner' + type: array + extraDescription: + description: The extended description of the product. + type: string + replacementSku: + description: Identifies a SKU that is a comparable subsititution of the + current SKU if available. + type: string + authorizedToPurchase: + description: It is true when it exists in matched queries field of ealstic + search API. + type: string + type: object + ProductDetailResponse_indicators_inner: + example: + isHeavyWeight: true + isEnduserRequired: true + hasStdWebDiscount: true + hasStdSpecialPrice: true + isPreorderProduct: true + hasWarranty: true + isDirectshipOrderable: true + isNewProduct: true + isDownloadable: true + isClearanceProduct: true + isOversizeProduct: true + isShippedFromPartner: true + isIngramShip: true + hasAcopQuantityBreak: true + IsBackOrderAllowed: true + isReplacementProduct: true + hasSpecialBid: true + isReturnableProduct: true + isConfigurable: true + isExportableToCountry: true + isDigitalType: true + hasAcopSpecialPrice: true + isRefurbishedProduct: true + isLicenseProduct: true + HasReturnLimits: true + skuType: skuType + isDiscontinuedProduct: true + hasLtl: true + isServiceSku: true + hasBundle: true + isDirectship: true + properties: + hasWarranty: + description: Boolean that indicates whether product has a warranty. + type: boolean + isNewProduct: + description: 'Boolean that indicates whether it’s a new product. ' + type: boolean + HasReturnLimits: + description: Boolean that indicates whether there is any limit to return + the product. + type: boolean + IsBackOrderAllowed: + description: Boolean that indicates whether back order is allowed for the + product. + type: boolean + isShippedFromPartner: + description: Boolean that indicates whether product is shipped from the + partner. + type: boolean + isReplacementProduct: + description: Boolean that indicates whether product is a replacement product. + type: boolean + isDirectship: + description: Boolean that indicates whether it’s a direct ship product. + type: boolean + isDownloadable: + description: Boolean that indicates whether product is downloadable. + type: boolean + isDigitalType: + description: 'Boolean that indicates whether it’s a digital product. ' + type: boolean + skuType: + description: skutype + type: string + hasStdSpecialPrice: + description: Boolean that indicates whether product has any standard special + price. + type: boolean + hasAcopSpecialPrice: + description: Boolean that indicates whether product has any ACOP special + price. + type: boolean + hasAcopQuantityBreak: + description: Boolean that indicates whether product has any ACOP quantity + break. + type: boolean + hasStdWebDiscount: + description: Boolean that indicates whether product has any standard web + discount. + type: boolean + hasSpecialBid: + description: Boolean that indicates whether product has any special bid. + type: boolean + isExportableToCountry: + description: Boolean that indicates whether product is exportable. + type: boolean + isDiscontinuedProduct: + description: Boolean that indicates whether it’s a discontinued product. + type: boolean + isRefurbishedProduct: + description: Boolean that indicates whether product is refurbished. + type: boolean + isReturnableProduct: + description: Boolean that indicates if the product can be returned. + type: boolean + isIngramShip: + description: Boolean that indicates whether it’s a Ingram shipped product. + type: boolean + isEnduserRequired: + description: Do vendor requires Enduser name required to create an order. + type: boolean + isHeavyWeight: + description: Boolean that indicates whether it’s heavy weight product. + type: boolean + hasLtl: + description: Boolean that indicates whether it hasLtl or not. + type: boolean + isClearanceProduct: + description: Boolean that indicates whether it’s clearnce product. + type: boolean + hasBundle: + description: Boolean that indicates whether it’s a bundled product. + type: boolean + isOversizeProduct: + description: Boolean that indicates whether it’s oversized product. + type: boolean + isPreorderProduct: + description: Boolean that indicates whether it’s a preorder product. + type: boolean + isLicenseProduct: + description: Boolean that indicates whether it’s a licened product. + type: boolean + isDirectshipOrderable: + description: Boolean that indicates whether product is directship orderable. + type: boolean + isServiceSku: + description: Boolean that indicates whether product is service SKU. + type: boolean + isConfigurable: + description: Boolean that indicates whether product is configurable. + type: boolean + type: object + ProductDetailResponse_ciscoFields_inner: + example: + itemType: itemType + productSubGroup: productSubGroup + configurationIndicator: configurationIndicator + internalBusinessEntity: internalBusinessEntity + serviceProgramName: serviceProgramName + globalListPrice: globalListPrice + itemCatalogCategory: itemCatalogCategory + properties: + productSubGroup: + description: Cisco product sub-group + type: string + serviceProgramName: + description: Cisco service program name + type: string + itemCatalogCategory: + description: Cisco item catalog category + type: string + configurationIndicator: + description: Cisco configuration indicator + type: string + internalBusinessEntity: + description: Cisco internal business entity + type: string + itemType: + description: Cisco item type + type: string + globalListPrice: + description: Cisco global list price + type: string + type: object + ProductDetailResponse_technicalSpecifications_inner: + example: + headername: headername + attributevalue: attributevalue + attributedisplay: attributedisplay + attributename: attributename + properties: + headername: + description: "Example : 'Basic'" + type: string + attributevalue: + description: "Example : 'LCD Monitor'" + type: string + attributedisplay: + description: "Example : 'Basic|Product Type|LCD Monitor'" + type: string + attributename: + description: "Example : 'Product Type'" + type: string + type: object + ProductDetailResponse_additionalInformation_productWeight_inner: + example: + plantId: plantId + weight: 0.8008281904610115 + weightUnit: weightUnit + properties: + plantId: + description: "ID of the plant. \nExample : 'US01'" + type: string + weight: + description: "Weight of the product. \n Example : 2" + type: number + weightUnit: + description: "Weight unit of the product. \n Example : 'LB'" + type: string + type: object + ProductDetailResponse_additionalInformation: + description: Additional Information related to the product. + example: + netWeight: netWeight + width: width + length: length + dimensionUnit: dimensionUnit + productWeight: + - plantId: plantId + weight: 0.8008281904610115 + weightUnit: weightUnit + - plantId: plantId + weight: 0.8008281904610115 + weightUnit: weightUnit + isBulkFreight: true + height: height + properties: + productWeight: + description: Weight information related to the product. + items: + $ref: '#/components/schemas/ProductDetailResponse_additionalInformation_productWeight_inner' + type: array + isBulkFreight: + description: "Example : true or false" + type: boolean + height: + description: "Example : '5.2 Inches'" + type: string + width: + description: "Example : '13 inches'" + type: string + length: + description: "Example : '20.4 inches'" + type: string + netWeight: + description: "Example : '10 lb'" + type: string + dimensionUnit: + description: "Example : 'Unit value'" + type: string + type: object + renewalsSearchRequest_status_OpporutinyStatus: + properties: + value: + description: "The value of opportunity status, it can be either Open or\ + \ Closed." + type: string + subStatus: + description: "The sub-status of Opportunity status. Possible sub-status\ + \ values for Open opportunity status are Ready to order, Quote pending,\ + \ Notification sent, Future, and Quote requested. Possible sub-status\ + \ values for Closed opportunity status are All, Ordered, Quote closed-contract\ + \ sales desk, Expired, Transition to new/upsell, Lost to competitior,\ + \ Consolidated, Transitioned to cloud, Renewal went direct, EOL, End user\ + \ out of business, Void, Other, and Cancelled." + type: string + type: object + renewalsSearchRequest_status: + properties: + OpporutinyStatus: + $ref: '#/components/schemas/renewalsSearchRequest_status_OpporutinyStatus' + type: object + renewalsSearchRequest_dataType_startDate: + properties: + customStartDate: + description: Custom from date for Renewal Start date. + type: string + customEndDate: + description: Custom to date for Renewal Start date. + type: string + type: object + renewalsSearchRequest_dataType_endDate: + properties: + customStartDate: + description: Custom from date for Renewal end date. + type: string + customEndDate: + description: Custom to date for Renewal end date. + type: string + type: object + renewalsSearchRequest_dataType_invoiceDate: + properties: + customStartDate: + description: Custom start date for invoice date. + type: string + customEndDate: + description: Custom end date for invoice date. + type: string + type: object + renewalsSearchRequest_dataType_expirationDate: + properties: + customStartDate: + description: Custom start date for expiration date. + type: string + customEndDate: + description: Custom end date for expiration date. + type: string + type: object + renewalsSearchRequest_dataType: + properties: + startDate: + $ref: '#/components/schemas/renewalsSearchRequest_dataType_startDate' + endDate: + $ref: '#/components/schemas/renewalsSearchRequest_dataType_endDate' + invoiceDate: + $ref: '#/components/schemas/renewalsSearchRequest_dataType_invoiceDate' + expirationDate: + $ref: '#/components/schemas/renewalsSearchRequest_dataType_expirationDate' + type: object + renewalsSearchResponse_renewals_inner_links_inner: + example: + topic: topic + href: href + type: type + properties: + topic: + description: The topic of the link. + type: string + href: + description: The URL of the topic. + type: string + type: + description: Type of a call. + type: string + type: object + renewalsSearchResponse_renewals_inner: + example: + renewalId: renewalId + endUser: endUser + referenceNumber: referenceNumber + vendor: vendor + renewalValue: renewalValue + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + customerOrderNumber: customerOrderNumber + expirationDate: expirationDate + status: status + properties: + renewalId: + description: Unique renewal ID. + type: string + customerOrderNumber: + description: The reseller's order number for reference in their system. + type: string + referenceNumber: + description: Renewal reference number. It could be notification id or quote + number. + type: string + endUser: + description: The company name for the end user/customer. + type: string + vendor: + description: The name of the vendor. + type: string + expirationDate: + description: Renewal expiration date. + type: string + renewalValue: + description: The value of the renewal. + type: string + status: + description: The status of the renewal. + type: string + links: + items: + $ref: '#/components/schemas/renewalsSearchResponse_renewals_inner_links_inner' + type: array + type: object + renewalsDetailsResponse_endUserInfo_inner: + example: + city: city + companyName: companyName + postalCode: postalCode + phoneNumber: phoneNumber + countryCode: countryCode + contact: contact + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + name2: name2 + addressLine4: addressLine4 + name1: name1 + email: email + properties: + contact: + description: The contact name for the end user/customer. + type: string + name1: + description: The name1 for the end user/customer. + type: string + name2: + description: The name2 for the end user/customer. + type: string + companyName: + description: The company name for the end user/customer. + type: string + addressLine1: + description: The address line 1 for the end user/customer. + type: string + addressLine2: + description: The address line 2 for the end user/customer. + type: string + addressLine3: + description: The address line 3 for the end user/customer. + type: string + addressLine4: + description: The address line 4 for the end user/customer. + type: string + city: + description: The end user/customer's city. + type: string + state: + description: The end user/customer's state. + type: string + postalCode: + description: The end user/customer's zip or postal code. + type: string + countryCode: + description: The end user/customer's two character ISO country code. + type: string + phoneNumber: + description: The end user/customer's phone number. + type: string + email: + description: The end user/customer's email. + type: string + type: object + renewalsDetailsResponse_referenceNumber_inner: + example: + notificationId: notificationId + quoteNumber: quoteNumber + properties: + notificationId: + description: Notification id of the communication sent from Ingram. + type: string + quoteNumber: + description: Quote number for the renewal. + type: string + type: object + renewalsDetailsResponse_products_inner: + example: + ingramPartNumber: ingramPartNumber + unitPrice: 6.027456183070403 + manufacturerPartNumber: manufacturerPartNumber + isConsolidated: isConsolidated + quantity: quantity + ingramLineNumber: ingramLineNumber + vendorPartNumber: vendorPartNumber + productDescription: productDescription + properties: + ingramLineNumber: + description: Unique Ingram Micro line number. + type: string + productDescription: + description: The description of the product. + type: string + vendorPartNumber: + description: The vendor's part number for the line item. + type: string + ingramPartNumber: + description: Unique IngramMicro part number. + type: string + manufacturerPartNumber: + description: The manufacturer's part number for the line item. + type: string + quantity: + description: The quantity of the line item. + type: string + unitPrice: + description: The unit price of the line item. + format: decimal + type: number + isConsolidated: + description: Is the line item consolidated? Yes or No. + type: string + type: object + renewalsDetailsResponse_additionalAttributes_inner: + example: + isConsolidated: isConsolidated + attributeValue: attributeValue + attributeDescription: attributeDescription + startDate: 2000-01-23 + expirationDate: 2000-01-23 + properties: + attributeDescription: + description: The description of the additional attribute. + type: string + attributeValue: + description: The value of the additional attribute. + type: string + startDate: + description: The attribute start date. + format: date + type: string + expirationDate: + description: The attribute expiration date. + format: date + type: string + isConsolidated: + description: Is the line item consolidated? Yes or No. + type: string + type: object + dealsSearchResponse_deals_inner: + example: + endUser: endUser + dealId: dealId + vendor: vendor + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + version: version + dealExpiryDate: 2000-01-23 + properties: + dealId: + description: Deal/Special bid number. + type: string + version: + description: Most recent version number of the deal. + type: string + endUser: + description: The end user/customer's name. + type: string + vendor: + description: The vendor's name. + type: string + dealExpiryDate: + description: Expiration date of the deal/Special bid. + format: date + type: string + links: + items: + $ref: '#/components/schemas/renewalsSearchResponse_renewals_inner_links_inner' + type: array + type: object + dealsDetailsResponse_products_inner: + example: + ingramPartNumber: ingramPartNumber + remainingQuantity: 2 + daysRemaining: 7 + comments: comments + specialConditions: specialConditions + upc: upc + standardPrice: 5.962133916683182 + approvedQuantity: 5 + msrp: 6.027456183070403 + vendorPartNumber: vendorPartNumber + extendedMSRP: 1.4658129805029452 + productDescription: productDescription + startDate: 2000-01-23 + expirationDate: 2000-01-23 + properties: + ingramPartNumber: + description: Unique Ingram part number. + type: string + vendorPartNumber: + description: Vendor Part number for the product. + type: string + upc: + description: The UPC code for the product. Consists of 12 numeric digits + that are uniquely assigned to each trade item. + type: string + productDescription: + description: Description of the product. + type: string + msrp: + description: Manufacturer Suggested Retail Price. + format: decimal + type: number + extendedMSRP: + description: Extended MSRP - Manufacturer Suggested Retail Price X Quantity. + format: decimal + type: number + standardPrice: + description: Standard price of the line item. + format: decimal + type: number + approvedQuantity: + description: Total quantity approved for the deal. + type: integer + remainingQuantity: + description: The quantity remaining as part of the deal for the customer + to order. + type: integer + comments: + description: Comments of the deal. + type: string + specialConditions: + description: Special conditions of the deal. + type: string + startDate: + description: Start Date. + format: date + type: string + expirationDate: + description: Expiration date. + format: date + type: string + daysRemaining: + description: Number of days remaining before the deal expires. + type: integer + type: object + returnsSearchResponse_returnsClaims_inner_links_inner: + example: + topic: topic + href: href + type: type + properties: + topic: + description: Provides the details of the return. + type: string + href: + description: The URL endpoint for accessing the relevant data. + type: string + type: + description: "The type of call that can be made to the href link (GET, POST,\ + \ Etc.)." + type: string + type: object + returnsSearchResponse_returnsClaims_inner: + example: + modifiedOn: modifiedOn + estimatedTotalValue: 2000-01-23 + referenceNumber: referenceNumber + returnReason: returnReason + returnClaimId: returnClaimId + caseRequestNumber: caseRequestNumber + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + type: type + credit: 5.962133916683182 + createdOn: 2000-01-23 + status: status + properties: + returnClaimId: + description: A unique return claim Id. + type: string + caseRequestNumber: + description: A unique return request number. + type: string + createdOn: + description: 'The date on which the return request was created. ' + format: date + type: string + type: + description: Type of request. + type: string + returnReason: + description: The reason for the return. + type: string + referenceNumber: + description: The reference number for the return. + type: string + estimatedTotalValue: + description: The estimated total value of the return. + format: date + type: string + credit: + description: The amount of credit. + format: decimal + type: number + modifiedOn: + description: The date on which the return request was last updated. + type: string + status: + description: The status of the request. + type: string + links: + items: + $ref: '#/components/schemas/returnsSearchResponse_returnsClaims_inner_links_inner' + type: array + type: object + returnsDetailsResponse_products_inner: + example: + ingramPartNumber: ingramPartNumber + unitPrice: 5.962133916683182 + quantity: 1 + requestDetails: 6 + description: description + upc: upc + ingramLineNumber: ingramLineNumber + invoiceDate: 2000-01-23 + customerOrderNumber: 0 + extendedPrice: 5.637376656633329 + invoiceNumber: invoiceNumber + returnBranch: 2 + vendorPartNumber: vendorPartNumber + shipFromBranch: 7 + status: status + properties: + ingramLineNumber: + description: Unique Ingram Micro line number. + type: string + description: + description: The description of the line item product. + type: string + ingramPartNumber: + description: Unique IngramMicro part number. + type: string + vendorPartNumber: + description: The vendor's part number for the line item. + type: string + upc: + description: The UPC code of a product. + type: string + invoiceDate: + description: The date of the invoice. + format: date + type: string + invoiceNumber: + description: Ingram micro Invoice number. + type: string + customerOrderNumber: + description: The reseller's order number for reference in their system. + type: integer + requestDetails: + description: Request details. + type: integer + quantity: + description: The quantity of the line item. + type: integer + unitPrice: + description: The unit price of the line item. + format: decimal + type: number + extendedPrice: + description: Unit price X quantity for the line item. + format: decimal + type: number + status: + description: The status of the line item. + type: string + returnBranch: + description: The code of the return branch. + type: integer + shipFromBranch: + description: The code of the ship from branch. + type: integer + type: object + returnsCreateRequest_list_inner_shipFromInfo_inner: + properties: + companyName: + description: Name of the company from where the product will be shipped. + type: string + contact: + description: Contact name of the person from where the product will be shipped. + type: string + addressLine1: + description: Ship from Address Line1. + type: string + addressLine2: + description: Ship from Address Line2. + type: string + addressLine3: + description: Ship from Address Line3. + type: string + city: + description: Ship from City. + type: string + state: + description: Ship from state. + type: string + postalCode: + description: Ship from postal code. + type: string + countryCode: + description: ship from country code. + type: string + email: + description: Ship from email. + type: string + phoneNumber: + description: Ship from phone number. + type: string + required: + - addressLine1 + - city + - companyName + - contact + - countryCode + - email + - postalCode + - state + returnsCreateRequest_list_inner: + properties: + invoiceNumber: + description: The Invoice number of the order. + type: string + invoiceDate: + description: Date of an Invoice. + format: date + type: string + customerOrderNumber: + description: The reseller's order number for reference in their system. + type: string + ingramPartNumber: + description: Unique line number from Ingram. + type: string + vendorPartNumber: + description: Vendor Part Number. + type: string + serialNumber: + description: Serial number of the product. + type: string + quantity: + description: Return quantity of the product. + type: integer + primaryReason: + description: Primary reason to return the product. + type: string + secondaryReason: + description: Secondary reason to return the product. + type: string + notes: + description: Return notes. + type: string + referenceNumber: + description: Reference number to return the product. + type: string + billToAddressId: + description: Suffix used to identify billing address. + type: string + shipFromInfo: + items: + $ref: '#/components/schemas/returnsCreateRequest_list_inner_shipFromInfo_inner' + type: array + numberOfBoxes: + description: Number of boxes to return. + type: integer + required: + - invoiceDate + - invoiceNumber + - numberOfBoxes + - primaryReason + - quantity + - secondaryReason + - shipFromInfo + returnsCreateResponse_returnsClaims_inner: + example: + ingramPartNumber: ingramPartNumber + quantity: 0 + notes: notes + estimatedTotalValue: 6.027456183070403 + type: type + createdOn: 2000-01-23 + rmaClaimId: rmaClaimId + referenceNumber: referenceNumber + returnReason: returnReason + caseRequestNumber: caseRequestNumber + vendorPartNumber: vendorPartNumber + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + credit: 1.4658129805029452 + status: status + properties: + rmaClaimId: + description: The rmaClaimId claim id. + type: string + caseRequestNumber: + description: A unique return request number. + type: string + referenceNumber: + description: The reference number for the return. + type: string + createdOn: + description: 'The date on which the return request was created. ' + format: date + type: string + type: + description: Type of request. + type: string + returnReason: + description: The reason for the return. + type: string + ingramPartNumber: + description: Unique line number from Ingram. + type: string + vendorPartNumber: + description: Vendor Part Number. + type: string + quantity: + description: Return quantity of the product. + type: integer + notes: + description: Return notes. + type: string + estimatedTotalValue: + description: The estimated total value of the return. + format: decimal + type: number + credit: + description: The amount of credit. + format: decimal + type: number + status: + description: The status of the request. + type: string + links: + items: + $ref: '#/components/schemas/returnsSearchResponse_returnsClaims_inner_links_inner' + type: array + type: object + freightRequest_shipToAddress_inner: + properties: + companyName: + description: The name of the company the order will be shipped to. + type: string + addressLine1: + description: Line 1 of the address the order will be shipped to. + type: string + addressLine2: + description: Line 2 of the address the order will be shipped to. + type: string + addressLine3: + description: Line 3 of the address the order will be shipped to. + type: string + city: + description: The city the order will be shipped to. + type: string + state: + description: The state the order will be shipped to. + type: string + postalCode: + description: The zip or postal code the order will be shipped to. + type: string + countryCode: + description: The two-character ISO country code the order will be shipped + to. + type: string + type: object + freightRequest_lines_inner: + properties: + customerLineNumber: + description: The ID references the reseller's address in Ingram Micro's + system for shipping. Provided to resellers during the onboarding process. + type: string + ingramPartNumber: + description: The unique IngramMicro part number. + type: string + quantity: + description: The requested quantity of the line item. + type: string + warehouseId: + description: The ID of the warehouse the line item will ship from. + type: string + carrierCode: + description: The code for the shipping carrier for the line item. + type: string + type: object + freightResponse_freightEstimateResponse_distribution_inner_carrierList_inner: + example: + daysInTransit: 2 + shipVia: shipVia + carrierCode: carrierCode + estimatedFreightCharge: 3.616076749251911 + carrierMode: carrierMode + properties: + carrierCode: + description: The code for the shipping carrier for the line item. + type: string + shipVia: + description: The name of the shipping carrier. + type: string + carrierMode: + description: Mode of the carrier. + type: string + estimatedFreightCharge: + description: Estimated freight charge. + format: decimal + type: number + daysInTransit: + description: Number of transit days. + type: integer + type: object + freightResponse_freightEstimateResponse_distribution_inner: + example: + carrierList: + - daysInTransit: 2 + shipVia: shipVia + carrierCode: carrierCode + estimatedFreightCharge: 3.616076749251911 + carrierMode: carrierMode + - daysInTransit: 2 + shipVia: shipVia + carrierCode: carrierCode + estimatedFreightCharge: 3.616076749251911 + carrierMode: carrierMode + freightRate: 2.3021358869347655 + shipVia: shipVia + carrierCode: carrierCode + totalWeight: 7.061401241503109 + shipFromBranchNumber: shipFromBranchNumber + transitDays: 9 + properties: + shipFromBranchNumber: + description: The ID of the warehouse the line item will ship from. + type: string + carrierCode: + description: The code for the shipping carrier for the line item. + type: string + shipVia: + description: The name of the shipping carrier. + type: string + freightRate: + description: Estimated freight charge. + format: decimal + type: number + totalWeight: + description: Total weight. + format: decimal + type: number + transitDays: + description: Number of transit days. + type: integer + carrierList: + items: + $ref: '#/components/schemas/freightResponse_freightEstimateResponse_distribution_inner_carrierList_inner' + type: array + type: object + freightResponse_freightEstimateResponse_lines_inner: + example: + ingramPartNumber: ingramPartNumber + unitPrice: 7.386281948385884 + quantity: 4 + warehouseId: warehouseId + netAmount: 1.2315135367772556 + vendorPartNumber: vendorPartNumber + properties: + ingramPartNumber: + description: The unique IngramMicro part number. + type: string + vendorPartNumber: + description: The vendor part number for the line item. + type: string + warehouseId: + description: The ID of the warehouse the line item will ship from. + type: string + quantity: + description: The requested quantity of the line item. + type: integer + unitPrice: + description: The unit price for the line item. + format: decimal + type: number + netAmount: + description: The net amount (unit price X quantity) for the line item. + format: decimal + type: number + type: object + freightResponse_freightEstimateResponse: + example: + totalFees: 1.4658129805029452 + totalNetAmount: 5.962133916683182 + totalFreightAmount: 0.8008281904610115 + grossAmount: 5.637376656633329 + totalTaxAmount: 6.027456183070403 + distribution: + - carrierList: + - daysInTransit: 2 + shipVia: shipVia + carrierCode: carrierCode + estimatedFreightCharge: 3.616076749251911 + carrierMode: carrierMode + - daysInTransit: 2 + shipVia: shipVia + carrierCode: carrierCode + estimatedFreightCharge: 3.616076749251911 + carrierMode: carrierMode + freightRate: 2.3021358869347655 + shipVia: shipVia + carrierCode: carrierCode + totalWeight: 7.061401241503109 + shipFromBranchNumber: shipFromBranchNumber + transitDays: 9 + - carrierList: + - daysInTransit: 2 + shipVia: shipVia + carrierCode: carrierCode + estimatedFreightCharge: 3.616076749251911 + carrierMode: carrierMode + - daysInTransit: 2 + shipVia: shipVia + carrierCode: carrierCode + estimatedFreightCharge: 3.616076749251911 + carrierMode: carrierMode + freightRate: 2.3021358869347655 + shipVia: shipVia + carrierCode: carrierCode + totalWeight: 7.061401241503109 + shipFromBranchNumber: shipFromBranchNumber + transitDays: 9 + lines: + - ingramPartNumber: ingramPartNumber + unitPrice: 7.386281948385884 + quantity: 4 + warehouseId: warehouseId + netAmount: 1.2315135367772556 + vendorPartNumber: vendorPartNumber + - ingramPartNumber: ingramPartNumber + unitPrice: 7.386281948385884 + quantity: 4 + warehouseId: warehouseId + netAmount: 1.2315135367772556 + vendorPartNumber: vendorPartNumber + currencyCode: currencyCode + properties: + currencyCode: + description: The country-specific three-character ISO 4217 currency code + used for the order. + type: string + totalFreightAmount: + description: Total freight amount. + format: decimal + type: number + totalTaxAmount: + description: Total tax amount. + format: decimal + type: number + totalFees: + description: Total fees. + format: decimal + type: number + totalNetAmount: + description: Total net amount. + format: decimal + type: number + grossAmount: + description: Gross amount. + format: decimal + type: number + distribution: + items: + $ref: '#/components/schemas/freightResponse_freightEstimateResponse_distribution_inner' + type: array + lines: + items: + $ref: '#/components/schemas/freightResponse_freightEstimateResponse_lines_inner' + type: array + type: object + QuoteSearchResponse_quotes_inner: + example: + specialBidNumber: specialBidNumber + lastModifiedDate: lastModifiedDate + createdBy: createdBy + vendor: vendor + ingramQuoteExpiryDate: ingramQuoteExpiryDate + quoteTotal: 5.962133916683182 + quoteNumber: quoteNumber + endUserContact: endUserContact + quoteStatus: quoteStatus + quoteName: quoteName + revision: revision + ingramQuoteDate: ingramQuoteDate + properties: + quoteName: + description: Quote Name given to quote by sales team or system generated. Generally + used as a reference to identify the quote. + type: string + quoteNumber: + description: "Unique identifier generated by Ingram Micros CRM specific\ + \ to each quote. When applying a filter to the quoteNumber and including\ + \ a partial quote number in the filter, all quotes containing any information\ + \ included in the filter can be retrieved as a subset of all available\ + \ customer quotes." + type: string + revision: + description: "When a quote has been revised and updated, the quote number\ + \ remains the same throughout the lifecycle of the quote, however, a Revision\ + \ number is updated for each revision of the quote. The revision numbers\ + \ is associated with the Unique Quote Number." + type: string + endUserContact: + description: End User Name is the end customer name that is associated with + a quote in Ingram Micros CRM. + type: string + specialBidNumber: + description: "Special Pricing Bid Number, also refers to as Dart Number\ + \ relates to a unique pricing deal associated with a vendor for the quote." + type: string + quoteTotal: + description: Total amount of quoted price for all products in the quote. + format: decimal + type: number + quoteStatus: + description: This refers to the primary status of the quote. + type: string + ingramQuoteDate: + description: Date the Quote was initially Created. + type: string + lastModifiedDate: + description: Date the Quote was last updated or modified. + type: string + ingramQuoteExpiryDate: + description: Date when the Quote Expires. + type: string + vendor: + description: Name of the vendor. + type: string + createdBy: + description: Name of the end user/customer who created a quote. + type: string + QuoteDetailsResponse_resellerInfo: + example: + phoneNumber: phoneNumber + contact: contact + companyName: companyName + customerNumber: customerNumber + email: email + properties: + contact: + description: Contact Name + type: string + companyName: + description: Ingram Micro Customer's Account Name + type: string + email: + description: Account Contact Email Address + type: string + phoneNumber: + description: Account Phone Number + type: string + customerNumber: + description: Reseller account number + type: string + type: object + QuoteDetailsResponse_endUserInfo: + example: + phoneNumber: phoneNumber + city: city + contact: contact + companyName: companyName + postalCode: postalCode + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + email: email + marketSegment: marketSegment + properties: + contact: + description: End User Name + type: string + companyName: + description: Contact name of end user associated with the quote. + type: string + addressLine1: + description: Address line 1 for end user associated with the quote + type: string + addressLine2: + description: Address line 2 for end user associated with the quote. + type: string + addressLine3: + description: Address line 3 for end user associated with the quote. + type: string + city: + description: City for end user associated with the quote + type: string + state: + description: Two letter state abreviation for end user associated with the + quote + type: string + email: + description: Email of end user the quote associated with the quote. + type: string + phoneNumber: + description: Phone number of end user associated with the quote. + type: string + postalCode: + description: Zip code of end user associated with the quote. + type: string + marketSegment: + description: "Market Segment of end user associated with the quote. End\ + \ user market segment is included when end user is included in specific\ + \ market segments like Educational, Government, Military, Medical - that\ + \ may receive special pricing due to their segmentation." + type: string + type: object + QuoteDetailsResponse_products_inner_price: + example: + quotePrice: 1 + msrp: 5 + extendedQuotePrice: 2 + extendedMsrp: 5 + discountOffList: 7.061401241503109 + properties: + quotePrice: + description: Ingram Micro quoted price specific to the reseller and quote. + type: integer + msrp: + description: Manufacturer Suggested Retail Price + type: integer + extendedMsrp: + description: Extended MSRP - Manufacturer Suggested Retail Price X Quantity + type: integer + extendedQuotePrice: + description: Extended reseller quoted price (cost to reseller) X Quantity + type: integer + discountOffList: + description: Discount off list percentage + format: decimal + type: number + type: object + QuoteDetailsResponse_products_inner: + example: + ingramPartNumber: ingramPartNumber + CoO: CoO + vpnCategory: vpnCategory + quantity: 0 + notes: notes + description: description + weight: 6 + vendorName: vendorName + EAN: EAN + terms: terms + price: + quotePrice: 1 + msrp: 5 + extendedQuotePrice: 2 + extendedMsrp: 5 + discountOffList: 7.061401241503109 + quoteProductGuid: quoteProductGuid + vendorPartNumber: vendorPartNumber + lineNumber: lineNumber + weightUom: weightUom + quoteProductsSupplierPartAuxiliaryId: quoteProductsSupplierPartAuxiliaryId + isSuggestionProduct: true + properties: + quoteProductGuid: + description: Quote Product GUID is the primary quote key in Ingram Micro's + CRM - needed to retrieve quote details. + type: string + lineNumber: + description: Line number which the product will appear in the quote. Line + number is manditory when unique configurations are included in a quote + and mainting the item line order is required. + type: string + quantity: + description: Quantity of product line item quoted. + type: integer + notes: + description: Product line item comments. + type: string + EAN: + description: EANUPC + type: string + CoO: + description: Country of Origin. + type: string + ingramPartNumber: + description: "Ingram Micro SKU (stock keeping unit). An identification,\ + \ usually alphanumeric, of a particular product that allows it to be tracked\ + \ for inventory purposes" + type: string + vendorPartNumber: + description: Vendor Part Number + type: string + description: + description: "Product description. Note - The quote view api returns only\ + \ the product short description as maintained in Ingram Micro's crm system.\ + \ For long descriptions, please refer to alternative information sources." + type: string + weight: + description: "Weight is provided based on country standard. For countries\ + \ following Imperial standards - weight is presented as pounds with decimal.\ + \ In countries following metric standards, weight is provided as kilograms\ + \ with decimal." + type: integer + weightUom: + description: Unit of measure + type: string + isSuggestionProduct: + description: Flag to indicate if a product line item is a suggested product. The + suggested product is provided in addition to the requested quoted products + and a suggested option. Suggested products are grouped together for subtotal + and total calculations. + type: boolean + vpnCategory: + description: Vendor product category specific to Cisco. HWDW (hardware) + or service. + type: string + quoteProductsSupplierPartAuxiliaryId: + description: Vendor product configuration ID specific to Cisco. + type: string + vendorName: + description: Vendor name of the product + type: string + terms: + description: Terms of the quote + type: string + price: + $ref: '#/components/schemas/QuoteDetailsResponse_products_inner_price' + type: object + QuoteDetailsResponse_additionalAttributes_inner: + example: + attributeValue: attributeValue + attributeName: attributeName + properties: + attributeName: + description: |- + estimateId - is the identification number for an estimate provided by Cisco for a quote. + + dealId - is the identification number for the specific deal pricing related to a Cisco quote + + vendorName - Name of Vendor associated with the quote. + + vendorMessage - Vendor Message is associated with primary vendor in the quote. In cases where a vendor requires a message be presented in the quote, the vendor name and message will be retreived and must be included in the quote vendor message fields. + type: string + attributeValue: + description: The attribute field data. + type: string + type: object + AvailabilityAsyncNotificationRequest_resource_inner_links_inner: + example: + topic: topic + href: href + type: type + properties: + topic: + description: Provides the details of the orders. + type: string + href: + description: The URL endpoint for accessing the relevant data. + type: string + type: + description: "The type of call that can be made to the href link (GET, POST,\ + \ Etc.). " + type: string + type: object + AvailabilityAsyncNotificationRequest_resource_inner: + example: + ingramPartNumber: ingramPartNumber + totalAvailability: totalAvailability + backOrderFlag: backOrderFlag + skuStatus: skuStatus + vendorPartNumber: vendorPartNumber + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + eventType: eventType + vendorName: vendorName + upcCode: upcCode + properties: + eventType: + description: The event name sent in the event request. + type: string + ingramPartNumber: + description: The Unique IngramMicro part number for the product. + type: string + vendorPartNumber: + description: The vendors part number for the product. + type: string + vendorName: + description: The name of the vendor/manufacturer of the product. + type: string + upcCode: + description: The UPC code for the product. Consists of 12 numeric digits + that are uniquly assigned to each trade item. + type: string + skuStatus: + description: Status returned saying whether sku is active. + type: string + backOrderFlag: + description: Backordered Flag. + type: string + totalAvailability: + description: totalAvailability. + type: string + links: + description: Link to Order Details for the order(s). + items: + $ref: '#/components/schemas/AvailabilityAsyncNotificationRequest_resource_inner_links_inner' + type: array + type: object + OrderStatusAsyncNotificationRequest_resource_inner_lines_inner_shipmentDetails_inner_packageDetails_inner: + example: + quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + properties: + cartonNumber: + description: The shipment carton number that contains the line item. + type: string + quantityInbox: + description: The quantity of line items in the box. + type: string + trackingNumber: + description: The tracking number for the shipment containing the line item. + type: string + type: object + OrderStatusAsyncNotificationRequest_resource_inner_lines_inner_shipmentDetails_inner: + example: + packageDetails: + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + carrierName: carrierName + carrierCode: carrierCode + shipmentDate: shipmentDate + warehouseName: warehouseName + shipFromWarehouseId: shipFromWarehouseId + properties: + shipmentDate: + description: The date the line item was shipped. + type: string + shipFromWarehouseId: + description: The ID of the warehouse the product will ship from. + type: string + warehouseName: + description: '""' + type: string + carrierCode: + description: |- + The carrier code for the shipment containing the + line item. + type: string + carrierName: + description: |- + The name of the carrier of the shipment containing + the line item. + type: string + packageDetails: + items: + $ref: '#/components/schemas/OrderStatusAsyncNotificationRequest_resource_inner_lines_inner_shipmentDetails_inner_packageDetails_inner' + type: array + type: object + OrderStatusAsyncNotificationRequest_resource_inner_lines_inner_serialNumberDetails_inner: + example: + serialNumber: serialNumber + properties: + serialNumber: + description: 'The serial number for the line item. ' + type: string + type: object + OrderStatusAsyncNotificationRequest_resource_inner_lines_inner: + example: + lineStatus: lineStatus + ingramPartNumber: ingramPartNumber + backorderedQuantity: backorderedQuantity + shipmentDetails: + - packageDetails: + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + carrierName: carrierName + carrierCode: carrierCode + shipmentDate: shipmentDate + warehouseName: warehouseName + shipFromWarehouseId: shipFromWarehouseId + - packageDetails: + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + carrierName: carrierName + carrierCode: carrierCode + shipmentDate: shipmentDate + warehouseName: warehouseName + shipFromWarehouseId: shipFromWarehouseId + serialNumberDetails: + - serialNumber: serialNumber + - serialNumber: serialNumber + subOrderNumber: subOrderNumber + shippedQuantity: shippedQuantity + requestedQuantity: requestedQuantity + vendorPartNumber: vendorPartNumber + LineNumber: LineNumber + properties: + LineNumber: + description: The Ingram Micro line number for the product + type: string + subOrderNumber: + description: The sub order number. The two-digit prefix is the warehouse + code of the warehouse nearest the reseller. The middle number is the order + number. The two-digit suffix is the sub order number. + type: string + lineStatus: + description: "The status for the line item in the order. One of: Backordered,\ + \ Open, Shipped" + type: string + ingramPartNumber: + description: The Ingram Micro part number for the line item. + type: string + vendorPartNumber: + description: The vendor part number for the line item. + type: string + requestedQuantity: + description: The quantity of the line item requested. + type: string + shippedQuantity: + description: The quantity of the line item that has been shipped. + type: string + backorderedQuantity: + description: The quantity of the line item that is backordered. + type: string + shipmentDetails: + items: + $ref: '#/components/schemas/OrderStatusAsyncNotificationRequest_resource_inner_lines_inner_shipmentDetails_inner' + type: array + serialNumberDetails: + items: + $ref: '#/components/schemas/OrderStatusAsyncNotificationRequest_resource_inner_lines_inner_serialNumberDetails_inner' + type: array + type: object + OrderStatusAsyncNotificationRequest_resource_inner_links_inner: + example: + topic: topic + href: href + type: type + properties: + topic: + description: Provides the details of the orders. + type: string + href: + description: The URL endpoint for accessing the relevant data. + type: string + type: + description: "The type of call that can be made to the href link (GET, POST,\ + \ Etc.). " + type: string + type: object + OrderStatusAsyncNotificationRequest_resource_inner: + example: + orderNumber: orderNumber + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + eventType: eventType + lines: + - lineStatus: lineStatus + ingramPartNumber: ingramPartNumber + backorderedQuantity: backorderedQuantity + shipmentDetails: + - packageDetails: + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + carrierName: carrierName + carrierCode: carrierCode + shipmentDate: shipmentDate + warehouseName: warehouseName + shipFromWarehouseId: shipFromWarehouseId + - packageDetails: + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + carrierName: carrierName + carrierCode: carrierCode + shipmentDate: shipmentDate + warehouseName: warehouseName + shipFromWarehouseId: shipFromWarehouseId + serialNumberDetails: + - serialNumber: serialNumber + - serialNumber: serialNumber + subOrderNumber: subOrderNumber + shippedQuantity: shippedQuantity + requestedQuantity: requestedQuantity + vendorPartNumber: vendorPartNumber + LineNumber: LineNumber + - lineStatus: lineStatus + ingramPartNumber: ingramPartNumber + backorderedQuantity: backorderedQuantity + shipmentDetails: + - packageDetails: + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + carrierName: carrierName + carrierCode: carrierCode + shipmentDate: shipmentDate + warehouseName: warehouseName + shipFromWarehouseId: shipFromWarehouseId + - packageDetails: + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + - quantityInbox: quantityInbox + cartonNumber: cartonNumber + trackingNumber: trackingNumber + carrierName: carrierName + carrierCode: carrierCode + shipmentDate: shipmentDate + warehouseName: warehouseName + shipFromWarehouseId: shipFromWarehouseId + serialNumberDetails: + - serialNumber: serialNumber + - serialNumber: serialNumber + subOrderNumber: subOrderNumber + shippedQuantity: shippedQuantity + requestedQuantity: requestedQuantity + vendorPartNumber: vendorPartNumber + LineNumber: LineNumber + customerOrderNumber: customerOrderNumber + orderEntryTimeStamp: orderEntryTimeStamp + properties: + eventType: + description: The event name sent in the event request. + type: string + orderNumber: + description: The Ingram Micro order number. + type: string + customerOrderNumber: + description: The reseller's unique PO/Order number. + type: string + orderEntryTimeStamp: + description: The timestamp at which the order was created. + type: string + lines: + description: The line-level details for the order. + items: + $ref: '#/components/schemas/OrderStatusAsyncNotificationRequest_resource_inner_lines_inner' + type: array + links: + description: Link to Order Details for the order(s). + items: + $ref: '#/components/schemas/OrderStatusAsyncNotificationRequest_resource_inner_links_inner' + type: array + type: object + InvoiceSearchResponse_invoices_inner: + example: + orderCreateDate: orderCreateDate + paymentTermsDueDate: paymentTermsDueDate + invoicedAmountDue: invoicedAmountDue + endCustomerOrderNumber: endCustomerOrderNumber + invoiceAmountInclTax: invoiceAmountInclTax + invoiceNumber: invoiceNumber + erpOrderNumber: erpOrderNumber + invoiceStatus: invoiceStatus + invoiceDate: invoiceDate + customerOrderNumber: customerOrderNumber + invoiceDueDate: invoiceDueDate + properties: + paymentTermsDueDate: + description: Payment Terms Due date. + type: string + erpOrderNumber: + description: Order number + type: string + invoiceNumber: + description: Invoice no. + type: string + invoiceStatus: + description: Invoice Status. + type: string + invoiceDate: + description: Invoice Date. + type: string + invoiceDueDate: + description: Invoice Due Date. + type: string + invoicedAmountDue: + description: Invoice Amount. + type: string + customerOrderNumber: + description: Customer Order No. + type: string + orderCreateDate: + description: Order Create Date. + type: string + endCustomerOrderNumber: + description: End Customer Order number. + type: string + invoiceAmountInclTax: + description: Invoice Amount Inclusive of Taxes + type: string + InvoiceDetailResponse_serviceresponse_responsepreamble: + example: + statuscode: statuscode + responsemessage: responsemessage + responsestatus: responsestatus + properties: + responsestatus: + type: string + statuscode: + type: string + responsemessage: + type: string + type: object + InvoiceDetailResponse_serviceresponse_invoicedetailresponse_extendedspecs_inner: + example: + attributevalue: attributevalue + attributename: attributename + properties: + attributename: + type: string + attributevalue: + type: string + type: object + InvoiceDetailResponse_serviceresponse_invoicedetailresponse_miscfeeline_inner: + example: + code: code + description: description + chargeamount: chargeamount + properties: + code: + type: string + description: + type: string + chargeamount: + type: string + type: object + InvoiceDetailResponse_serviceresponse_invoicedetailresponse: + example: + creditmemoreasoncode: creditmemoreasoncode + paymentterms: paymentterms + soldto: + city: city + countrycode: countrycode + phonenumber: phonenumber + postalcode: postalcode + addressline3: addressline3 + attention: attention + addressline2: addressline2 + addressline1: addressline1 + state: state + name2: name2 + fax: fax + name1: name1 + email: email + orderstatus: orderstatus + totalotherfees: 6.027456183070403 + shippableswitch: shippableswitch + currencyrate: currencyrate + invoicetype: invoicetype + orderdate: 2000-01-23 + currencycode: currencycode + globalorderid: globalorderid + totalsales: totalsales + extendedspecs: + - attributevalue: attributevalue + attributename: attributename + - attributevalue: attributevalue + attributename: attributename + taxtype: taxtype + totaltaxamount: totaltaxamount + discountamount: 0.8008281904610115 + originalshipcode: originalshipcode + customerordernumber: customerordernumber + lines: + - linenumber: linenumber + vendorpartnumber: vendorpartnumber + backorderquantity: backorderquantity + linetype: linetype + trackingnumberdetails: + - trackingnumber: trackingnumber + - trackingnumber: trackingnumber + specialbidnumber: specialbidnumber + ordersuffix: ordersuffix + unitprice: unitprice + productextendedspecs: + - attributevalue: attributevalue + attributename: attributename + - attributevalue: attributevalue + attributename: attributename + marginpercent: marginpercent + isacopapplied: isacopapplied + shippedquantity: shippedquantity + shipfrombranch: shipfrombranch + orderedquantity: orderedquantity + extendedprice: extendedprice + serialnumberdetails: + - deliverynumber: deliverynumber + serialnumber: serialnumber + - deliverynumber: deliverynumber + serialnumber: serialnumber + partdescription: partdescription + partnumber: partnumber + backorderetadate: 2000-01-23 + unitofmeasure: unitofmeasure + - linenumber: linenumber + vendorpartnumber: vendorpartnumber + backorderquantity: backorderquantity + linetype: linetype + trackingnumberdetails: + - trackingnumber: trackingnumber + - trackingnumber: trackingnumber + specialbidnumber: specialbidnumber + ordersuffix: ordersuffix + unitprice: unitprice + productextendedspecs: + - attributevalue: attributevalue + attributename: attributename + - attributevalue: attributevalue + attributename: attributename + marginpercent: marginpercent + isacopapplied: isacopapplied + shippedquantity: shippedquantity + shipfrombranch: shipfrombranch + orderedquantity: orderedquantity + extendedprice: extendedprice + serialnumberdetails: + - deliverynumber: deliverynumber + serialnumber: serialnumber + - deliverynumber: deliverynumber + serialnumber: serialnumber + partdescription: partdescription + partnumber: partnumber + backorderetadate: 2000-01-23 + unitofmeasure: unitofmeasure + invoicenumber: invoicenumber + shipdate: 2000-01-23 + customernumber: customernumber + freightamount: freightamount + miscfeeline: + - code: code + description: description + chargeamount: chargeamount + - code: code + description: description + chargeamount: chargeamount + carrierdescription: carrierdescription + weight: weight + freightforwardercode: freightforwardercode + shoptoaddress: + city: city + countrycode: countrycode + phonenumber: phonenumber + postalcode: postalcode + addressline3: addressline3 + attention: attention + addressline2: addressline2 + addressline1: addressline1 + state: state + name2: name2 + fax: fax + name1: name1 + email: email + customerfreightamount: customerfreightamount + companycurrency: companycurrency + billtosuffix: billtosuffix + carrier: carrier + enduserponumber: enduserponumber + totalamount: totalamount + holdreason: holdreason + shiptosuffix: shiptosuffix + fulfillmentflag: fulfillmentflag + billto: + city: city + countrycode: countrycode + phonenumber: phonenumber + postalcode: postalcode + addressline3: addressline3 + attention: attention + addressline2: addressline2 + addressline1: addressline1 + state: state + name2: name2 + fax: fax + name1: name1 + email: email + invoicedate: 2000-01-23 + shipcomplete: shipcomplete + customerforeignfrightamt: customerforeignfrightamt + ordertype: ordertype + properties: + customernumber: + type: string + invoicenumber: + type: string + invoicedate: + format: date + type: string + invoicetype: + type: string + customerordernumber: + type: string + customerfreightamount: + format: double + type: string + customerforeignfrightamt: + format: float + type: string + totaltaxamount: + format: double + type: string + totalamount: + format: double + type: string + shiptosuffix: + type: string + billtosuffix: + type: string + freightamount: + description: May not be available in all countries + format: double + type: string + paymentterms: + type: string + orderdate: + format: date + type: string + carrier: + type: string + carrierdescription: + type: string + discountamount: + format: double + type: number + taxtype: + type: string + enduserponumber: + type: string + freightforwardercode: + type: string + creditmemoreasoncode: + type: string + fulfillmentflag: + type: string + holdreason: + type: string + shipcomplete: + type: string + shipdate: + format: date + type: string + companycurrency: + type: string + currencycode: + type: string + currencyrate: + type: string + globalorderid: + type: string + originalshipcode: + type: string + ordertype: + type: string + orderstatus: + type: string + totalotherfees: + type: number + totalsales: + type: string + weight: + type: string + shippableswitch: + type: string + soldto: + $ref: '#/components/schemas/addressType' + billto: + $ref: '#/components/schemas/addressType' + shoptoaddress: + $ref: '#/components/schemas/addressType' + lines: + items: + $ref: '#/components/schemas/productLineType' + type: array + extendedspecs: + items: + $ref: '#/components/schemas/InvoiceDetailResponse_serviceresponse_invoicedetailresponse_extendedspecs_inner' + type: array + miscfeeline: + items: + $ref: '#/components/schemas/InvoiceDetailResponse_serviceresponse_invoicedetailresponse_miscfeeline_inner' + type: array + type: object + InvoiceDetailResponse_serviceresponse: + example: + invoicedetailresponse: + creditmemoreasoncode: creditmemoreasoncode + paymentterms: paymentterms + soldto: + city: city + countrycode: countrycode + phonenumber: phonenumber + postalcode: postalcode + addressline3: addressline3 + attention: attention + addressline2: addressline2 + addressline1: addressline1 + state: state + name2: name2 + fax: fax + name1: name1 + email: email + orderstatus: orderstatus + totalotherfees: 6.027456183070403 + shippableswitch: shippableswitch + currencyrate: currencyrate + invoicetype: invoicetype + orderdate: 2000-01-23 + currencycode: currencycode + globalorderid: globalorderid + totalsales: totalsales + extendedspecs: + - attributevalue: attributevalue + attributename: attributename + - attributevalue: attributevalue + attributename: attributename + taxtype: taxtype + totaltaxamount: totaltaxamount + discountamount: 0.8008281904610115 + originalshipcode: originalshipcode + customerordernumber: customerordernumber + lines: + - linenumber: linenumber + vendorpartnumber: vendorpartnumber + backorderquantity: backorderquantity + linetype: linetype + trackingnumberdetails: + - trackingnumber: trackingnumber + - trackingnumber: trackingnumber + specialbidnumber: specialbidnumber + ordersuffix: ordersuffix + unitprice: unitprice + productextendedspecs: + - attributevalue: attributevalue + attributename: attributename + - attributevalue: attributevalue + attributename: attributename + marginpercent: marginpercent + isacopapplied: isacopapplied + shippedquantity: shippedquantity + shipfrombranch: shipfrombranch + orderedquantity: orderedquantity + extendedprice: extendedprice + serialnumberdetails: + - deliverynumber: deliverynumber + serialnumber: serialnumber + - deliverynumber: deliverynumber + serialnumber: serialnumber + partdescription: partdescription + partnumber: partnumber + backorderetadate: 2000-01-23 + unitofmeasure: unitofmeasure + - linenumber: linenumber + vendorpartnumber: vendorpartnumber + backorderquantity: backorderquantity + linetype: linetype + trackingnumberdetails: + - trackingnumber: trackingnumber + - trackingnumber: trackingnumber + specialbidnumber: specialbidnumber + ordersuffix: ordersuffix + unitprice: unitprice + productextendedspecs: + - attributevalue: attributevalue + attributename: attributename + - attributevalue: attributevalue + attributename: attributename + marginpercent: marginpercent + isacopapplied: isacopapplied + shippedquantity: shippedquantity + shipfrombranch: shipfrombranch + orderedquantity: orderedquantity + extendedprice: extendedprice + serialnumberdetails: + - deliverynumber: deliverynumber + serialnumber: serialnumber + - deliverynumber: deliverynumber + serialnumber: serialnumber + partdescription: partdescription + partnumber: partnumber + backorderetadate: 2000-01-23 + unitofmeasure: unitofmeasure + invoicenumber: invoicenumber + shipdate: 2000-01-23 + customernumber: customernumber + freightamount: freightamount + miscfeeline: + - code: code + description: description + chargeamount: chargeamount + - code: code + description: description + chargeamount: chargeamount + carrierdescription: carrierdescription + weight: weight + freightforwardercode: freightforwardercode + shoptoaddress: + city: city + countrycode: countrycode + phonenumber: phonenumber + postalcode: postalcode + addressline3: addressline3 + attention: attention + addressline2: addressline2 + addressline1: addressline1 + state: state + name2: name2 + fax: fax + name1: name1 + email: email + customerfreightamount: customerfreightamount + companycurrency: companycurrency + billtosuffix: billtosuffix + carrier: carrier + enduserponumber: enduserponumber + totalamount: totalamount + holdreason: holdreason + shiptosuffix: shiptosuffix + fulfillmentflag: fulfillmentflag + billto: + city: city + countrycode: countrycode + phonenumber: phonenumber + postalcode: postalcode + addressline3: addressline3 + attention: attention + addressline2: addressline2 + addressline1: addressline1 + state: state + name2: name2 + fax: fax + name1: name1 + email: email + invoicedate: 2000-01-23 + shipcomplete: shipcomplete + customerforeignfrightamt: customerforeignfrightamt + ordertype: ordertype + responsepreamble: + statuscode: statuscode + responsemessage: responsemessage + responsestatus: responsestatus + properties: + responsepreamble: + $ref: '#/components/schemas/InvoiceDetailResponse_serviceresponse_responsepreamble' + invoicedetailresponse: + $ref: '#/components/schemas/InvoiceDetailResponse_serviceresponse_invoicedetailresponse' + type: object + InvoiceDetailsv6_1Response_paymentTermsInfo: + additionalProperties: false + description: Payment terms is the agreement between Ingram and the customer + by what period they should pay the invoice by + example: + paymentTermsDescription: paymentTermsDescription + paymentTermsDueDate: paymentTermsDueDate + paymentTermsCode: paymentTermsCode + properties: + paymentTermsCode: + description: Code of the payment terms. + type: string + paymentTermsDescription: + description: Description of the payment terms. + type: string + paymentTermsDueDate: + description: Due date of the payment terms. + type: string + type: object + InvoiceDetailsv6_1Response_billToInfo: + additionalProperties: false + example: + phoneNumber: phoneNumber + city: city + countryCode: countryCode + contact: contact + companyName: companyName + postalCode: postalCode + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + email: email + properties: + contact: + description: Bill to Name. + type: string + companyName: + description: Bill to company. + type: string + addressLine1: + description: Bill to Address Line1. + type: string + addressLine2: + description: Bill to Address Line2. + type: string + addressLine3: + description: Bill to Address Line3. + type: string + city: + description: Bill to City. + type: string + state: + description: Bill to State code + type: string + postalCode: + description: Bill to Postalcode code. + type: string + countryCode: + description: Bill to Country code. + type: string + phoneNumber: + description: Phone number of the bill to company. + type: string + email: + description: Email address of the bill to company. + type: string + type: object + InvoiceDetailsv6_1Response_shipToInfo: + additionalProperties: false + example: + phoneNumber: phoneNumber + city: city + countryCode: countryCode + contact: contact + companyName: companyName + postalCode: postalCode + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + email: email + properties: + contact: + description: Ship to Name. + type: string + companyName: + description: Ship to company. + type: string + addressLine1: + description: Ship to Address Line1. + type: string + addressLine2: + description: Ship to Address Line2. + type: string + addressLine3: + description: Ship to Address Line3. + type: string + city: + description: Ship to City. + type: string + state: + description: Ship to State code + type: string + postalCode: + description: Ship to Postalcode code. + type: string + countryCode: + description: Ship to Country code. + type: string + phoneNumber: + description: Phone number of the Ship to company. + type: string + email: + description: Email address of the Ship to company. + type: string + type: object + InvoiceDetailsv6_1Response_lines_inner_serialNumbers_inner: + additionalProperties: false + example: + serialNumber: serialNumber + properties: + serialNumber: + description: Serial number of the product. + nullable: true + type: string + type: object + InvoiceDetailsv6_1Response_lines_inner: + additionalProperties: false + example: + ingramPartNumber: ingramPartNumber + unitWeight: unitWeight + unitPrice: 6.027456183070403 + customerPartNumber: customerPartNumber + quantity: 0 + unitOfMeasure: unitOfMeasure + taxPercentage: 5.962133916683182 + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + ingramLineNumber: ingramLineNumber + quantityOrdered: 7 + vendorName: vendorName + customerLineNumber: "0" + taxRate: 5.637376656633329 + quantityShipped: 9 + extendedPrice: 1.4658129805029452 + vendorPartNumber: vendorPartNumber + taxAmount: 2.3021358869347655 + currencyCode: currencyCode + productDescription: productDescription + properties: + ingramLineNumber: + description: Unique line number from Ingram. + type: string + customerLineNumber: + default: "0" + description: Line number passes by customer while creating an order. + type: string + ingramPartNumber: + description: "Ingram Micro SKU (stock keeping unit). An identification,\ + \ usually alphanumeric, of a particular product that allows it to be tracked\ + \ for inventory purposes." + type: string + vendorPartNumber: + description: Vendor Part Number. + type: string + customerPartNumber: + description: Part number from customer's system. + type: string + vendorName: + description: Name of the vendor. + type: string + productDescription: + description: Description of the product. + type: string + unitWeight: + description: Weight of the product. + type: string + quantity: + description: Quantity of the product. + format: int32 + type: integer + unitPrice: + description: Unit price of the product. + format: double + type: number + unitOfMeasure: + description: Unit of measure of the product. + type: string + currencyCode: + description: Currency code. + type: string + extendedPrice: + description: Extended price of the product. + format: double + type: number + taxPercentage: + description: Tax percentage + format: double + type: number + taxRate: + description: Tax rate + format: double + type: number + taxAmount: + description: Line level tax amount. + format: double + type: number + serialNumbers: + items: + $ref: '#/components/schemas/InvoiceDetailsv6_1Response_lines_inner_serialNumbers_inner' + nullable: true + type: array + quantityOrdered: + description: Quantity ordered by the customer. + format: int32 + type: integer + quantityShipped: + description: Quantity shipped to the customer. + format: int32 + type: integer + type: object + InvoiceDetailsv6_1Response_fxRateInfo: + additionalProperties: false + example: + companyCurrency: companyCurrency + currencyFxRate: 3.616076749251911 + currencyCode: currencyCode + invoiceCurrency: invoiceCurrency + properties: + currencyCode: + description: Currency code. + type: string + companyCurrency: + description: Company currency code. + type: string + invoiceCurrency: + description: Invoice currency. + type: string + currencyFxRate: + description: Currency FX rate. + format: double + type: number + type: object + InvoiceDetailsv6_1Response_summary_lines: + additionalProperties: false + example: + productLineCount: 2 + productLineTotalQuantity: 4 + properties: + productLineCount: + description: Number of lines in the order. + format: int32 + type: integer + productLineTotalQuantity: + description: Total quantity of the order. + format: int32 + type: integer + type: object + InvoiceDetailsv6_1Response_summary_miscCharges_inner: + additionalProperties: false + example: + chargeLineReference: chargeLineReference + isNonMisc: isNonMisc + miscChargeLineTotal: 1.2315135367772556 + miscChargeLineCount: 7 + chargeDescription: chargeDescription + properties: + chargeDescription: + description: Description of the charge. + type: string + miscChargeLineCount: + description: The number of lines for which miscellaneous charges are applicable. + format: int32 + type: integer + miscChargeLineTotal: + description: Miscellaneous charge amount. + format: double + type: number + chargeLineReference: + description: Reference of the chargeLine. + type: string + isNonMisc: + description: Is charge non miscellaneous. + type: string + type: object + InvoiceDetailsv6_1Response_summary_totals: + additionalProperties: false + example: + netInvoiceAmount: 1.0246457001441578 + freightAmount: 1.1730742509559433 + invoicedAmountDue: 7.457744773683766 + discountAmount: 1.4894159098541704 + discountType: discountType + totalTaxAmount: 6.84685269835264 + properties: + netInvoiceAmount: + description: Net Invoice amount. + format: double + type: number + discountAmount: + description: Discount amount. + format: double + type: number + discountType: + description: Type of discount. + type: string + totalTaxAmount: + description: Total Tax amount. + format: double + type: number + invoicedAmountDue: + description: Total amount due for the invoice. + format: double + type: number + freightAmount: + description: Freight amount + format: double + type: number + type: object + InvoiceDetailsv6_1Response_summary_foreignFxTotals: + additionalProperties: false + example: + foreignCurrencyCode: foreignCurrencyCode + foreignCurrencyFxRate: 4.965218492984954 + foreignTotalTaxAmount: 5.025004791520295 + foreignInvoiceAmountDue: foreignInvoiceAmountDue + foreignTotalTaxableAmount: foreignTotalTaxableAmount + properties: + foreignCurrencyCode: + description: Foreign Currency Code. + type: string + foreignCurrencyFxRate: + description: Foreign rate. + format: double + type: number + foreignTotalTaxableAmount: + description: Foreign amount. + type: string + foreignTotalTaxAmount: + description: Foreign amount. + format: double + type: number + foreignInvoiceAmountDue: + description: Foreign due. + type: string + type: object + InvoiceDetailsv6_1Response_summary: + additionalProperties: false + example: + miscCharges: + - chargeLineReference: chargeLineReference + isNonMisc: isNonMisc + miscChargeLineTotal: 1.2315135367772556 + miscChargeLineCount: 7 + chargeDescription: chargeDescription + - chargeLineReference: chargeLineReference + isNonMisc: isNonMisc + miscChargeLineTotal: 1.2315135367772556 + miscChargeLineCount: 7 + chargeDescription: chargeDescription + totals: + netInvoiceAmount: 1.0246457001441578 + freightAmount: 1.1730742509559433 + invoicedAmountDue: 7.457744773683766 + discountAmount: 1.4894159098541704 + discountType: discountType + totalTaxAmount: 6.84685269835264 + foreignFxTotals: + foreignCurrencyCode: foreignCurrencyCode + foreignCurrencyFxRate: 4.965218492984954 + foreignTotalTaxAmount: 5.025004791520295 + foreignInvoiceAmountDue: foreignInvoiceAmountDue + foreignTotalTaxableAmount: foreignTotalTaxableAmount + lines: + productLineCount: 2 + productLineTotalQuantity: 4 + properties: + lines: + $ref: '#/components/schemas/InvoiceDetailsv6_1Response_summary_lines' + miscCharges: + description: Miscellaneous charges. + items: + $ref: '#/components/schemas/InvoiceDetailsv6_1Response_summary_miscCharges_inner' + nullable: true + type: array + totals: + $ref: '#/components/schemas/InvoiceDetailsv6_1Response_summary_totals' + foreignFxTotals: + $ref: '#/components/schemas/InvoiceDetailsv6_1Response_summary_foreignFxTotals' + type: object + productLineType_serialnumberdetails_inner: + example: + deliverynumber: deliverynumber + serialnumber: serialnumber + properties: + serialnumber: + type: string + deliverynumber: + type: string + type: object + productLineType_trackingnumberdetails_inner: + example: + trackingnumber: trackingnumber + properties: + trackingnumber: + type: string + type: object + ErrorResponse_errors_inner_fields_inner: + properties: + field: + description: Contains the name of the field. + type: string + value: + description: Value sent in the input for the specific field. + type: string + message: + description: Gives the description of the field message. + type: string + type: object + ErrorResponse_errors_inner: + properties: + id: + description: Unique Id to identify error. + type: string + type: + description: Describes the type of the error. + type: string + message: + description: Describes the error message. + type: string + fields: + items: + $ref: '#/components/schemas/ErrorResponse_errors_inner_fields_inner' + type: array + type: object + orderCreateRequest_ordercreaterequest_requestpreamble: + properties: + isocountrycode: + description: 2 digit ISO country code + type: string + customernumber: + description: Your unique Ingram Micro customer number + example: 10-123456 or 123456 + type: string + required: + - customernumber + - isocountrycode + type: object + orderCreateRequest_ordercreaterequest_ordercreatedetails_shiptoaddress: + properties: + attention: + description: Customer contact name + example: “Mr. Customer” + maxLength: 35 + type: string + addressline1: + description: |- + Company Name or person to deliver. + *If there isn’t an attention line please add the company name on address line 1. UPS and FedEx will create surcharges if address line 1 contains a physical address. + example: “Ingram Micro” + maxLength: 35 + type: string + addressline2: + description: Street address for delivery + example: 3351 Michelson Dr + maxLength: 35 + type: string + addressline3: + description: Continuation of address line 2 + example: Ste 100 or ship to phone number + maxLength: 35 + type: string + city: + description: Ship to city + example: Irvine + maxLength: 21 + type: string + state: + description: Ship to State or Region + example: CA + maxLength: 2 + type: string + postalcode: + description: Ship to Zip code or Postal code + example: "92712" + maxLength: 9 + type: string + countrycode: + description: Ship to country + example: US + maxLength: 2 + type: string + required: + - addressline1 + - addressline2 + - city + - postalcode + - state + type: object + orderCreateRequest_ordercreaterequest_ordercreatedetails_lines_inner_enduser: + properties: + id: + type: string + addressline1: + type: string + addressline2: + type: string + addressline3: + type: string + city: + type: string + state: + type: string + postalcode: + type: string + countrycode: + type: string + phonenumber: + type: string + extensionnumber: + type: string + faxnumber: + type: string + email: + format: email + type: string + type: object + orderCreateRequest_ordercreaterequest_ordercreatedetails_lines_inner_productextendedspecs_inner: + properties: + attributename: + enum: + - shipfrom + - specialprice + - authbidnumber + - commenttext + - serialnumber + - contactnumber + - shipnotestxt + type: string + attributevalue: + type: string + type: object + orderCreateRequest_ordercreaterequest_ordercreatedetails_lines_inner: + properties: + linetype: + description: "Values are “P” for product or “C” for comments. This can be\ + \ left blank when ordering product and a “P” will be assumed. If you\ + \ are adding a COMMENT, then this value must be “C”.\n\nExtended spec\ + \ for comments: \nAttribute Name: “commenttext”\nAttribute Value: “thank\ + \ you for the order” \nTo make the comment invisible to the packing slip\ + \ place “///” in front of the comment in the Attribute Value field. This\ + \ will allow the Ingram sales rep to see the comment on the order but\ + \ will not forward on to shipping documents." + enum: + - P + - C + type: string + linenumber: + description: This is used when a partner wants to use their own line number. + Can be left blank. + type: string + ingrampartnumber: + description: This is the Ingram sku number to be used for placing an order. + type: string + quantity: + description: The quantity that is to be ordered. + type: string + vendorpartnumber: + description: The Manufacturer part number. Can be used to place an order + instead of the Ingram sku. If there are multiple Ingram part numbers + to one vendor part number. The order will be rejected. + type: string + customerpartnumber: + description: This is the Customers unique part numbers that must be crossed + referenced to the Ingram Micro Sku before it can be used. Please contact + your sales rep for additional information on how to set this up. + type: string + UPCCode: + type: string + warehouseid: + type: string + unitprice: + description: |- + This is a requested price from the customer. Pre-approval is necessary before using this feature. A methodology called price variance to manage requested pricing needs to be setup in advance by your sales rep. + + If unit price is provided without this advanced setup the unit price will be ignored and standard Ingram Micro pricing will apply. + type: string + enduser: + $ref: '#/components/schemas/orderCreateRequest_ordercreaterequest_ordercreatedetails_lines_inner_enduser' + productextendedspecs: + items: + $ref: '#/components/schemas/orderCreateRequest_ordercreaterequest_ordercreatedetails_lines_inner_productextendedspecs_inner' + type: array + required: + - quantity + type: object + orderCreateRequest_ordercreaterequest_ordercreatedetails_extendedspecs_inner: + description: "Attribute Name and Value: This field identifies if your order\ + \ is a DIRECT SHIP order (license / warranty) or how you want your Backorders\ + \ managed as well as other process options like placing your order on hold\ + \ or adding a comment. " + properties: + attributename: + enum: + - Isdirectshiporder + - emailaddress + - Isbackorderflagallowed + - placeoncustomerhold + - signaturerequired + - commenttext + - resellerctacemail + - duplicatecustomerordernumbervalidate + - quotenumber + - shipctacphone + - vendauthnumber + - continueonerror + type: string + attributevalue: + type: string + type: object + orderCreateRequest_ordercreaterequest_ordercreatedetails: + properties: + customerponumber: + description: The customers unique Purchase Order number. Keep it unique + to retrieve order information + maxLength: 18 + minLength: 1 + type: string + ordertype: + description: "Order Type - Standard orders, Direct ship orders" + enum: + - Standard + - Direct Ship + type: string + enduserordernumber: + description: Customers End-user PO number + maxLength: 18 + minLength: 0 + type: string + billtosuffix: + description: Designates flooring acct to be used + maxLength: 3 + type: string + shiptosuffix: + description: Applies to customers with multiple ship to locations (store + locations) + maxLength: 3 + type: string + shiptoaddress: + $ref: '#/components/schemas/orderCreateRequest_ordercreaterequest_ordercreatedetails_shiptoaddress' + carriercode: + description: A customer can dictate what carrier to use for their shipment + (Ingram 2-digit carrier code is required). Our recommendation is leave + this field blank which will allow Ingram Micro to choose the best carrier + to gain the best freight rates. + maxLength: 2 + type: string + thirdpartyfreightaccountnumber: + description: "Refers to a third-party freight account number for charging\ + \ freight against. The account number should be passed within this field\ + \ and the appropriate carrier code should be supplied within the carrier\ + \ code tags. Prior to sending your request containing the third-party\ + \ account number, it must be first entered into our system. Your Ingram\ + \ Micro Sales Representative can action this for you. If submitted within\ + \ an order without this preapproval the third-party account number will\ + \ be ignored.\n\nNote: USA partners- For FedEx Air only (carrier codes\ + \ F1, FO, F2, FG.), please send three leading zeros before your third-party\ + \ freight account number (i.e.: 000999999999.) " + type: string + specialbidnumber: + description: This is the special quote number given to a customer either + by a vendor for special pricing or by Ingram Micro. To receive the special + pricing assigned to this number it must be included on the order. + type: string + lines: + items: + $ref: '#/components/schemas/orderCreateRequest_ordercreaterequest_ordercreatedetails_lines_inner' + type: array + extendedspecs: + items: + $ref: '#/components/schemas/orderCreateRequest_ordercreaterequest_ordercreatedetails_extendedspecs_inner' + type: array + required: + - customerponumber + - lines + - ordertype + - shiptoaddress + type: object + orderCreateRequest_ordercreaterequest: + properties: + requestpreamble: + $ref: '#/components/schemas/orderCreateRequest_ordercreaterequest_requestpreamble' + ordercreatedetails: + $ref: '#/components/schemas/orderCreateRequest_ordercreaterequest_ordercreatedetails' + required: + - requestpreamble + type: object + orderCreateResponse_serviceresponse_ordersummary_shiptoaddress: + example: + city: city + postalcode: postalcode + countrycode: countrycode + name: name + addressline3: addressline3 + attention: attention + addressline2: addressline2 + addressline1: addressline1 + state: state + properties: + attention: + type: string + name: + type: string + addressline1: + type: string + addressline2: + type: string + addressline3: + type: string + city: + type: string + state: + type: string + postalcode: + type: string + countrycode: + type: string + type: object + orderCreateResponse_serviceresponse_ordersummary: + example: + totalorderamount: totalorderamount + totalordercreated: totalordercreated + customerponumber: customerponumber + shiptoaddress: + city: city + postalcode: postalcode + countrycode: countrycode + name: name + addressline3: addressline3 + attention: attention + addressline2: addressline2 + addressline1: addressline1 + state: state + properties: + customerponumber: + type: string + totalorderamount: + description: Total of all the orders including taxes and fees + type: string + totalordercreated: + description: "Number of orders created, in some cases we may create more\ + \ than one order." + type: string + shiptoaddress: + $ref: '#/components/schemas/orderCreateResponse_serviceresponse_ordersummary_shiptoaddress' + type: object + orderCreateResponse_serviceresponse_ordercreateresponse_inner_Lines_inner: + example: + linenumber: linenumber + requestedunitprice: 5.962133916683182 + carriercode: carriercode + linetype: linetype + confirmedquantity: 2 + carrierdescription: carrierdescription + ordersuffix: ordersuffix + unitproductprice: 9.301444243932576 + warehouseid: warehouseid + globalskuid: globalskuid + backorderedquantity: 7 + globallinenumber: globallinenumber + requestedquantity: 5 + partnumber: partnumber + netamount: 3.616076749251911 + properties: + linetype: + description: “P”-Line or SKU Number “C”-Comment Line + type: string + globallinenumber: + description: Ingram generated line number + type: string + partnumber: + description: Ingram Micro Sku Number + type: string + globalskuid: + type: string + linenumber: + type: string + carriercode: + description: Transportation 2 digit codes + type: string + carrierdescription: + description: Transportation Carrier Name + type: string + requestedunitprice: + description: Price requested by reseller. Price Variance can be set up by + Ingram Micro Sales Rep + type: number + requestedquantity: + description: Quanity Requested + type: integer + confirmedquantity: + description: Quanity Shipped + type: integer + backorderedquantity: + description: Quanity of units that didn’t ship + type: integer + unitproductprice: + description: Price Per Unit + type: number + netamount: + description: Total amount. Quantity X Unit Price + type: number + warehouseid: + type: string + ordersuffix: + description: Use order suffix with the globalorderid for this line item. + type: string + type: object + orderCreateResponse_serviceresponse_ordercreateresponse_inner: + example: + freightamount: 6.027456183070403 + numberoflineswitherror: numberoflineswitherror + numberoflineswithwarning: numberoflineswithwarning + orderamount: 1.4658129805029452 + ordertimestamp: ordertimestamp + taxamount: 0.8008281904610115 + globalorderid: globalorderid + invoicingsystemorderid: invoicingsystemorderid + numberoflineswithsuccess: numberoflineswithsuccess + ordertype: S + Lines: + - linenumber: linenumber + requestedunitprice: 5.962133916683182 + carriercode: carriercode + linetype: linetype + confirmedquantity: 2 + carrierdescription: carrierdescription + ordersuffix: ordersuffix + unitproductprice: 9.301444243932576 + warehouseid: warehouseid + globalskuid: globalskuid + backorderedquantity: 7 + globallinenumber: globallinenumber + requestedquantity: 5 + partnumber: partnumber + netamount: 3.616076749251911 + - linenumber: linenumber + requestedunitprice: 5.962133916683182 + carriercode: carriercode + linetype: linetype + confirmedquantity: 2 + carrierdescription: carrierdescription + ordersuffix: ordersuffix + unitproductprice: 9.301444243932576 + warehouseid: warehouseid + globalskuid: globalskuid + backorderedquantity: 7 + globallinenumber: globallinenumber + requestedquantity: 5 + partnumber: partnumber + netamount: 3.616076749251911 + properties: + numberoflineswithsuccess: + description: Number of line items that were successful + type: string + numberoflineswitherror: + description: Number of line items with error + type: string + numberoflineswithwarning: + description: Number of line items with warnings + type: string + globalorderid: + description: Ingram sales order number + type: string + ordertype: + description: S=Stocked PO D=Direct Ship PO + enum: + - S + - D + type: string + ordertimestamp: + description: Time order received + type: string + invoicingsystemorderid: + description: Ingram Micro generated order number + type: string + taxamount: + type: number + freightamount: + description: Freight amount customer pays for freight + type: number + orderamount: + description: Total amount of order with freight and taxes + type: number + Lines: + description: Collection of lines + items: + $ref: '#/components/schemas/orderCreateResponse_serviceresponse_ordercreateresponse_inner_Lines_inner' + type: array + type: object + orderCreateResponse_serviceresponse: + example: + ordersummary: + totalorderamount: totalorderamount + totalordercreated: totalordercreated + customerponumber: customerponumber + shiptoaddress: + city: city + postalcode: postalcode + countrycode: countrycode + name: name + addressline3: addressline3 + attention: attention + addressline2: addressline2 + addressline1: addressline1 + state: state + ordercreateresponse: + - freightamount: 6.027456183070403 + numberoflineswitherror: numberoflineswitherror + numberoflineswithwarning: numberoflineswithwarning + orderamount: 1.4658129805029452 + ordertimestamp: ordertimestamp + taxamount: 0.8008281904610115 + globalorderid: globalorderid + invoicingsystemorderid: invoicingsystemorderid + numberoflineswithsuccess: numberoflineswithsuccess + ordertype: S + Lines: + - linenumber: linenumber + requestedunitprice: 5.962133916683182 + carriercode: carriercode + linetype: linetype + confirmedquantity: 2 + carrierdescription: carrierdescription + ordersuffix: ordersuffix + unitproductprice: 9.301444243932576 + warehouseid: warehouseid + globalskuid: globalskuid + backorderedquantity: 7 + globallinenumber: globallinenumber + requestedquantity: 5 + partnumber: partnumber + netamount: 3.616076749251911 + - linenumber: linenumber + requestedunitprice: 5.962133916683182 + carriercode: carriercode + linetype: linetype + confirmedquantity: 2 + carrierdescription: carrierdescription + ordersuffix: ordersuffix + unitproductprice: 9.301444243932576 + warehouseid: warehouseid + globalskuid: globalskuid + backorderedquantity: 7 + globallinenumber: globallinenumber + requestedquantity: 5 + partnumber: partnumber + netamount: 3.616076749251911 + - freightamount: 6.027456183070403 + numberoflineswitherror: numberoflineswitherror + numberoflineswithwarning: numberoflineswithwarning + orderamount: 1.4658129805029452 + ordertimestamp: ordertimestamp + taxamount: 0.8008281904610115 + globalorderid: globalorderid + invoicingsystemorderid: invoicingsystemorderid + numberoflineswithsuccess: numberoflineswithsuccess + ordertype: S + Lines: + - linenumber: linenumber + requestedunitprice: 5.962133916683182 + carriercode: carriercode + linetype: linetype + confirmedquantity: 2 + carrierdescription: carrierdescription + ordersuffix: ordersuffix + unitproductprice: 9.301444243932576 + warehouseid: warehouseid + globalskuid: globalskuid + backorderedquantity: 7 + globallinenumber: globallinenumber + requestedquantity: 5 + partnumber: partnumber + netamount: 3.616076749251911 + - linenumber: linenumber + requestedunitprice: 5.962133916683182 + carriercode: carriercode + linetype: linetype + confirmedquantity: 2 + carrierdescription: carrierdescription + ordersuffix: ordersuffix + unitproductprice: 9.301444243932576 + warehouseid: warehouseid + globalskuid: globalskuid + backorderedquantity: 7 + globallinenumber: globallinenumber + requestedquantity: 5 + partnumber: partnumber + netamount: 3.616076749251911 + responsepreamble: + statuscode: statuscode + responsemessage: responsemessage + responsestatus: responsestatus + properties: + responsepreamble: + $ref: '#/components/schemas/InvoiceDetailResponse_serviceresponse_responsepreamble' + ordersummary: + $ref: '#/components/schemas/orderCreateResponse_serviceresponse_ordersummary' + ordercreateresponse: + description: Collection of orders + items: + $ref: '#/components/schemas/orderCreateResponse_serviceresponse_ordercreateresponse_inner' + type: array + type: object + orderDetailResponse_serviceresponse_orderdetailresponse_billtoaddress: + example: + city: city + postalcode: postalcode + countrycode: countrycode + name: name + addressline3: addressline3 + attention: attention + addressline2: addressline2 + addressline1: addressline1 + state: state + suffix: suffix + properties: + suffix: + type: string + name: + type: string + attention: + type: string + addressline1: + type: string + addressline2: + type: string + addressline3: + type: string + city: + type: string + state: + type: string + postalcode: + type: string + countrycode: + type: string + type: object + orderDetailResponse_serviceresponse_orderdetailresponse_shiptoaddress: + example: + city: city + postalcode: postalcode + countrycode: countrycode + name: name + addressline3: addressline3 + attention: attention + addressline2: addressline2 + addressline1: addressline1 + state: state + suffix: suffix + properties: + suffix: + type: string + attention: + type: string + name: + type: string + addressline1: + type: string + addressline2: + type: string + addressline3: + type: string + city: + type: string + state: + type: string + postalcode: + type: string + countrycode: + type: string + type: object + orderDetailResponse_serviceresponse_orderdetailresponse_enduserinfo: + example: + enduserid: enduserid + properties: + enduserid: + type: string + type: object + orderDetailResponse_serviceresponse_orderdetailresponse_lines_inner_serialnumberdetails_inner: + example: + serialnumber: serialnumber + properties: + serialnumber: + description: serial number of the ordered SKU + type: string + type: object + orderDetailResponse_serviceresponse_orderdetailresponse_lines_inner_shipmentdetails_inner_packagedetails: + example: + cartonnumber: cartonnumber + trackingnumber: trackingnumber + quantityinbox: quantityinbox + packageweight: packageweight + properties: + trackingnumber: + type: string + packageweight: + type: string + cartonnumber: + type: string + quantityinbox: + type: string + type: object + orderDetailResponse_serviceresponse_orderdetailresponse_lines_inner_shipmentdetails_inner: + example: + shipfromwarehouseid: shipfromwarehouseid + quantity: 2.3021358869347655 + statusdescription: statusdescription + carriercode: carriercode + carriername: carriername + shipmentdate: shipmentdate + shippeddate: shippeddate + pronumber: pronumber + ponumber: ponumber + holdreasoncodedescription: holdreasoncodedescription + carriertype: carriertype + invoicedate: invoicedate + warehousename: warehousename + invoicenumber: invoicenumber + status: status + packagedetails: + cartonnumber: cartonnumber + trackingnumber: trackingnumber + quantityinbox: quantityinbox + packageweight: packageweight + properties: + quantity: + description: quantity shipped + type: number + shipmentdate: + description: date of shipment + type: string + shipfromwarehouseid: + description: Warehouse product was shipped from + type: string + warehousename: + description: name of the warehouse + type: string + invoicenumber: + description: Invoice Number + type: string + invoicedate: + description: date on the invoice generated + type: string + status: + description: code for current Status of the order + type: string + statusdescription: + description: Description of status + type: string + shippeddate: + description: date of shipment + type: string + holdreasoncodedescription: + description: Description of the code if the order is on hold + type: string + ponumber: + description: Ingram PO Number to vendors for direct ship orders + type: string + carriertype: + description: Helps to determine shipment type. for e.g. LTL is used for + heavy shipment. SML is used for light shipment + type: string + carriercode: + description: "" + type: string + carriername: + description: Name of the carrier. If carriername is LTL then the tracking + info is in the "pronumber" data field + type: string + pronumber: + description: "" + type: string + packagedetails: + $ref: '#/components/schemas/orderDetailResponse_serviceresponse_orderdetailresponse_lines_inner_shipmentdetails_inner_packagedetails' + type: object + orderDetailResponse_serviceresponse_orderdetailresponse_lines_inner: + example: + linenumber: linenumber + backorderquantity: backorderquantity + confirmedquantity: confirmedquantity + manufacturerpartnumber: manufacturerpartnumber + ordersuffix: ordersuffix + unitweight: unitweight + shipmentdetails: + - shipfromwarehouseid: shipfromwarehouseid + quantity: 2.3021358869347655 + statusdescription: statusdescription + carriercode: carriercode + carriername: carriername + shipmentdate: shipmentdate + shippeddate: shippeddate + pronumber: pronumber + ponumber: ponumber + holdreasoncodedescription: holdreasoncodedescription + carriertype: carriertype + invoicedate: invoicedate + warehousename: warehousename + invoicenumber: invoicenumber + status: status + packagedetails: + cartonnumber: cartonnumber + trackingnumber: trackingnumber + quantityinbox: quantityinbox + packageweight: packageweight + - shipfromwarehouseid: shipfromwarehouseid + quantity: 2.3021358869347655 + statusdescription: statusdescription + carriercode: carriercode + carriername: carriername + shipmentdate: shipmentdate + shippeddate: shippeddate + pronumber: pronumber + ponumber: ponumber + holdreasoncodedescription: holdreasoncodedescription + carriertype: carriertype + invoicedate: invoicedate + warehousename: warehousename + invoicenumber: invoicenumber + status: status + packagedetails: + cartonnumber: cartonnumber + trackingnumber: trackingnumber + quantityinbox: quantityinbox + packageweight: packageweight + unitprice: 1.4658129805029452 + productextendedspecs: + - attributevalue: attributevalue + attributename: attributename + - attributevalue: attributevalue + attributename: attributename + erpordernumber: erpordernumber + linestatus: linestatus + extendedprice: 5.962133916683182 + trackingnumber: + - trackingnumber + - trackingnumber + taxamount: 5.637376656633329 + partdescription1: partdescription1 + globallinenumber: globallinenumber + partdescription2: partdescription2 + serialnumberdetails: + - serialnumber: serialnumber + - serialnumber: serialnumber + vendorcode: vendorcode + requestedquantity: requestedquantity + partnumber: partnumber + vendorname: vendorname + backorderetadate: backorderetadate + properties: + linenumber: + description: Impulse line number + type: string + globallinenumber: + description: Line of the Globel Sku / Customer Line Number + type: string + ordersuffix: + description: Order Suffix + type: string + erpordernumber: + description: Sales order number + type: string + linestatus: + description: Status of the line + type: string + partnumber: + description: Ingram part number + type: string + manufacturerpartnumber: + description: manufacture number of the product + type: string + vendorname: + description: name of the vendor + type: string + vendorcode: + description: Ingram Micro assigned code for the vendor + type: string + partdescription1: + type: string + partdescription2: + type: string + unitweight: + description: weight of the product unit + type: string + unitprice: + description: Customer price of the unit + type: number + extendedprice: + description: extended price of the order + type: number + taxamount: + description: tax amount for the order + type: number + requestedquantity: + description: no. of units requested + type: string + confirmedquantity: + description: no. of units confirmed available + type: string + backorderquantity: + description: quantity of back order + type: string + serialnumberdetails: + items: + $ref: '#/components/schemas/orderDetailResponse_serviceresponse_orderdetailresponse_lines_inner_serialnumberdetails_inner' + type: array + trackingnumber: + items: + description: Tracking number of the order. If carriername is LTL then + the tracking info is in the "pronumber" data field + type: string + type: array + shipmentdetails: + items: + $ref: '#/components/schemas/orderDetailResponse_serviceresponse_orderdetailresponse_lines_inner_shipmentdetails_inner' + type: array + productextendedspecs: + items: + $ref: '#/components/schemas/InvoiceDetailResponse_serviceresponse_invoicedetailresponse_extendedspecs_inner' + type: array + backorderetadate: + description: estimated date of back order + type: string + type: object + orderDetailResponse_serviceresponse_orderdetailresponse_commentlines_inner: + example: + commenttext1: commenttext1 + commenttext2: commenttext2 + properties: + commenttext1: + type: string + commenttext2: + type: string + type: object + orderDetailResponse_serviceresponse_orderdetailresponse_miscfeeline_inner: + example: + description: description + chargeamount: chargeamount + properties: + description: + description: Handling charges/Miscellaneous Fee description + type: string + chargeamount: + description: Handling charges/ Miscelaneous fee amount + type: string + type: object + orderDetailResponse_serviceresponse_orderdetailresponse_extendedspecs_inner: + example: + attributevalue: attributevalue + attributename: attributename + properties: + attributename: + description: termscode' | 'termsdescription' | 'commenttext' are the atrribute + name + type: string + attributevalue: + description: values of these fields are send . termscode' | 'termsdescription' + | 'commenttext' are the atrribute name + type: string + type: object + orderDetailResponse_serviceresponse_orderdetailresponse: + example: + freightamount: freightamount + totalweight: totalweight + orderstatus: orderstatus + miscfeeline: + - description: description + chargeamount: chargeamount + - description: description + chargeamount: chargeamount + entrytimestamp: entrytimestamp + ordertotalvalue: 0.8008281904610115 + billtoaddress: + city: city + postalcode: postalcode + countrycode: countrycode + name: name + addressline3: addressline3 + attention: attention + addressline2: addressline2 + addressline1: addressline1 + state: state + suffix: suffix + currencycode: currencycode + extendedspecs: + - attributevalue: attributevalue + attributename: attributename + - attributevalue: attributevalue + attributename: attributename + shiptoaddress: + city: city + postalcode: postalcode + countrycode: countrycode + name: name + addressline3: addressline3 + attention: attention + addressline2: addressline2 + addressline1: addressline1 + state: state + suffix: suffix + totaltax: totaltax + enduserponumber: enduserponumber + ordersubtotal: 6.027456183070403 + ordernumber: ordernumber + customerordernumber: customerordernumber + lines: + - linenumber: linenumber + backorderquantity: backorderquantity + confirmedquantity: confirmedquantity + manufacturerpartnumber: manufacturerpartnumber + ordersuffix: ordersuffix + unitweight: unitweight + shipmentdetails: + - shipfromwarehouseid: shipfromwarehouseid + quantity: 2.3021358869347655 + statusdescription: statusdescription + carriercode: carriercode + carriername: carriername + shipmentdate: shipmentdate + shippeddate: shippeddate + pronumber: pronumber + ponumber: ponumber + holdreasoncodedescription: holdreasoncodedescription + carriertype: carriertype + invoicedate: invoicedate + warehousename: warehousename + invoicenumber: invoicenumber + status: status + packagedetails: + cartonnumber: cartonnumber + trackingnumber: trackingnumber + quantityinbox: quantityinbox + packageweight: packageweight + - shipfromwarehouseid: shipfromwarehouseid + quantity: 2.3021358869347655 + statusdescription: statusdescription + carriercode: carriercode + carriername: carriername + shipmentdate: shipmentdate + shippeddate: shippeddate + pronumber: pronumber + ponumber: ponumber + holdreasoncodedescription: holdreasoncodedescription + carriertype: carriertype + invoicedate: invoicedate + warehousename: warehousename + invoicenumber: invoicenumber + status: status + packagedetails: + cartonnumber: cartonnumber + trackingnumber: trackingnumber + quantityinbox: quantityinbox + packageweight: packageweight + unitprice: 1.4658129805029452 + productextendedspecs: + - attributevalue: attributevalue + attributename: attributename + - attributevalue: attributevalue + attributename: attributename + erpordernumber: erpordernumber + linestatus: linestatus + extendedprice: 5.962133916683182 + trackingnumber: + - trackingnumber + - trackingnumber + taxamount: 5.637376656633329 + partdescription1: partdescription1 + globallinenumber: globallinenumber + partdescription2: partdescription2 + serialnumberdetails: + - serialnumber: serialnumber + - serialnumber: serialnumber + vendorcode: vendorcode + requestedquantity: requestedquantity + partnumber: partnumber + vendorname: vendorname + backorderetadate: backorderetadate + - linenumber: linenumber + backorderquantity: backorderquantity + confirmedquantity: confirmedquantity + manufacturerpartnumber: manufacturerpartnumber + ordersuffix: ordersuffix + unitweight: unitweight + shipmentdetails: + - shipfromwarehouseid: shipfromwarehouseid + quantity: 2.3021358869347655 + statusdescription: statusdescription + carriercode: carriercode + carriername: carriername + shipmentdate: shipmentdate + shippeddate: shippeddate + pronumber: pronumber + ponumber: ponumber + holdreasoncodedescription: holdreasoncodedescription + carriertype: carriertype + invoicedate: invoicedate + warehousename: warehousename + invoicenumber: invoicenumber + status: status + packagedetails: + cartonnumber: cartonnumber + trackingnumber: trackingnumber + quantityinbox: quantityinbox + packageweight: packageweight + - shipfromwarehouseid: shipfromwarehouseid + quantity: 2.3021358869347655 + statusdescription: statusdescription + carriercode: carriercode + carriername: carriername + shipmentdate: shipmentdate + shippeddate: shippeddate + pronumber: pronumber + ponumber: ponumber + holdreasoncodedescription: holdreasoncodedescription + carriertype: carriertype + invoicedate: invoicedate + warehousename: warehousename + invoicenumber: invoicenumber + status: status + packagedetails: + cartonnumber: cartonnumber + trackingnumber: trackingnumber + quantityinbox: quantityinbox + packageweight: packageweight + unitprice: 1.4658129805029452 + productextendedspecs: + - attributevalue: attributevalue + attributename: attributename + - attributevalue: attributevalue + attributename: attributename + erpordernumber: erpordernumber + linestatus: linestatus + extendedprice: 5.962133916683182 + trackingnumber: + - trackingnumber + - trackingnumber + taxamount: 5.637376656633329 + partdescription1: partdescription1 + globallinenumber: globallinenumber + partdescription2: partdescription2 + serialnumberdetails: + - serialnumber: serialnumber + - serialnumber: serialnumber + vendorcode: vendorcode + requestedquantity: requestedquantity + partnumber: partnumber + vendorname: vendorname + backorderetadate: backorderetadate + entrymethoddescription: entrymethoddescription + commentlines: + - commenttext1: commenttext1 + commenttext2: commenttext2 + - commenttext1: commenttext1 + commenttext2: commenttext2 + ordertype: ordertype + enduserinfo: + enduserid: enduserid + properties: + ordernumber: + type: string + ordertype: + description: "Order Type\t\t\nB - BRANCH TRANSFER\nC - CASH ORDER\nD - DIRECT\ + \ ORDER\nF - FUTURE ORDER\nP - SPECIAL ORDER\nQ - QUOTE ORDER\nS - STOCK\ + \ ORDER\nM - MEMO ORDER" + type: string + customerordernumber: + description: Customer PO number + type: string + enduserponumber: + description: End User PO number + type: string + orderstatus: + description: |- + Status of order within Ingram system + S - SALES HOLD + H - TAG HOLD + I - INVOICED + P - PENDING + E - BILLING ERROR + F - FORCE BILLING + V - VOIDED + T - TRANSFERRED + D - HOLD SHIPMENT + R - RELEASED + O - IM ONLINE HOLD + U - BILL FOR HISTORY ONLY + W - ORDER NOT PRINTED + A - DROP SHIP HOLD + B - INTERNET CUST ORIG HOLD + 1 - PICKED + 2 - INSPECTED + 3 - PACKED + 4 - SHIPPED + C - CREDIT HOLD + 9 - CISCO 3A6 + Q - RMA HOLD + G - CREDIT HOLD + N - CREDIT HOLD + type: string + entrytimestamp: + description: Time stamp of the order placed + type: string + entrymethoddescription: + description: "Description of the entry method\t" + type: string + ordertotalvalue: + description: Total order value + type: number + ordersubtotal: + description: Subtotal order value + type: number + freightamount: + description: Freight charges + type: string + currencycode: + description: Country specific currency code + type: string + totalweight: + description: "Total order weight. unit -- North america - Pounds , other\ + \ countries will be KG" + type: string + totaltax: + description: total tax on the orders placed + type: string + billtoaddress: + $ref: '#/components/schemas/orderDetailResponse_serviceresponse_orderdetailresponse_billtoaddress' + shiptoaddress: + $ref: '#/components/schemas/orderDetailResponse_serviceresponse_orderdetailresponse_shiptoaddress' + enduserinfo: + $ref: '#/components/schemas/orderDetailResponse_serviceresponse_orderdetailresponse_enduserinfo' + lines: + items: + $ref: '#/components/schemas/orderDetailResponse_serviceresponse_orderdetailresponse_lines_inner' + type: array + commentlines: + items: + $ref: '#/components/schemas/orderDetailResponse_serviceresponse_orderdetailresponse_commentlines_inner' + type: array + miscfeeline: + items: + $ref: '#/components/schemas/orderDetailResponse_serviceresponse_orderdetailresponse_miscfeeline_inner' + type: array + extendedspecs: + items: + $ref: '#/components/schemas/orderDetailResponse_serviceresponse_orderdetailresponse_extendedspecs_inner' + type: array + type: object + orderDetailResponse_serviceresponse: + example: + orderdetailresponse: + freightamount: freightamount + totalweight: totalweight + orderstatus: orderstatus + miscfeeline: + - description: description + chargeamount: chargeamount + - description: description + chargeamount: chargeamount + entrytimestamp: entrytimestamp + ordertotalvalue: 0.8008281904610115 + billtoaddress: + city: city + postalcode: postalcode + countrycode: countrycode + name: name + addressline3: addressline3 + attention: attention + addressline2: addressline2 + addressline1: addressline1 + state: state + suffix: suffix + currencycode: currencycode + extendedspecs: + - attributevalue: attributevalue + attributename: attributename + - attributevalue: attributevalue + attributename: attributename + shiptoaddress: + city: city + postalcode: postalcode + countrycode: countrycode + name: name + addressline3: addressline3 + attention: attention + addressline2: addressline2 + addressline1: addressline1 + state: state + suffix: suffix + totaltax: totaltax + enduserponumber: enduserponumber + ordersubtotal: 6.027456183070403 + ordernumber: ordernumber + customerordernumber: customerordernumber + lines: + - linenumber: linenumber + backorderquantity: backorderquantity + confirmedquantity: confirmedquantity + manufacturerpartnumber: manufacturerpartnumber + ordersuffix: ordersuffix + unitweight: unitweight + shipmentdetails: + - shipfromwarehouseid: shipfromwarehouseid + quantity: 2.3021358869347655 + statusdescription: statusdescription + carriercode: carriercode + carriername: carriername + shipmentdate: shipmentdate + shippeddate: shippeddate + pronumber: pronumber + ponumber: ponumber + holdreasoncodedescription: holdreasoncodedescription + carriertype: carriertype + invoicedate: invoicedate + warehousename: warehousename + invoicenumber: invoicenumber + status: status + packagedetails: + cartonnumber: cartonnumber + trackingnumber: trackingnumber + quantityinbox: quantityinbox + packageweight: packageweight + - shipfromwarehouseid: shipfromwarehouseid + quantity: 2.3021358869347655 + statusdescription: statusdescription + carriercode: carriercode + carriername: carriername + shipmentdate: shipmentdate + shippeddate: shippeddate + pronumber: pronumber + ponumber: ponumber + holdreasoncodedescription: holdreasoncodedescription + carriertype: carriertype + invoicedate: invoicedate + warehousename: warehousename + invoicenumber: invoicenumber + status: status + packagedetails: + cartonnumber: cartonnumber + trackingnumber: trackingnumber + quantityinbox: quantityinbox + packageweight: packageweight + unitprice: 1.4658129805029452 + productextendedspecs: + - attributevalue: attributevalue + attributename: attributename + - attributevalue: attributevalue + attributename: attributename + erpordernumber: erpordernumber + linestatus: linestatus + extendedprice: 5.962133916683182 + trackingnumber: + - trackingnumber + - trackingnumber + taxamount: 5.637376656633329 + partdescription1: partdescription1 + globallinenumber: globallinenumber + partdescription2: partdescription2 + serialnumberdetails: + - serialnumber: serialnumber + - serialnumber: serialnumber + vendorcode: vendorcode + requestedquantity: requestedquantity + partnumber: partnumber + vendorname: vendorname + backorderetadate: backorderetadate + - linenumber: linenumber + backorderquantity: backorderquantity + confirmedquantity: confirmedquantity + manufacturerpartnumber: manufacturerpartnumber + ordersuffix: ordersuffix + unitweight: unitweight + shipmentdetails: + - shipfromwarehouseid: shipfromwarehouseid + quantity: 2.3021358869347655 + statusdescription: statusdescription + carriercode: carriercode + carriername: carriername + shipmentdate: shipmentdate + shippeddate: shippeddate + pronumber: pronumber + ponumber: ponumber + holdreasoncodedescription: holdreasoncodedescription + carriertype: carriertype + invoicedate: invoicedate + warehousename: warehousename + invoicenumber: invoicenumber + status: status + packagedetails: + cartonnumber: cartonnumber + trackingnumber: trackingnumber + quantityinbox: quantityinbox + packageweight: packageweight + - shipfromwarehouseid: shipfromwarehouseid + quantity: 2.3021358869347655 + statusdescription: statusdescription + carriercode: carriercode + carriername: carriername + shipmentdate: shipmentdate + shippeddate: shippeddate + pronumber: pronumber + ponumber: ponumber + holdreasoncodedescription: holdreasoncodedescription + carriertype: carriertype + invoicedate: invoicedate + warehousename: warehousename + invoicenumber: invoicenumber + status: status + packagedetails: + cartonnumber: cartonnumber + trackingnumber: trackingnumber + quantityinbox: quantityinbox + packageweight: packageweight + unitprice: 1.4658129805029452 + productextendedspecs: + - attributevalue: attributevalue + attributename: attributename + - attributevalue: attributevalue + attributename: attributename + erpordernumber: erpordernumber + linestatus: linestatus + extendedprice: 5.962133916683182 + trackingnumber: + - trackingnumber + - trackingnumber + taxamount: 5.637376656633329 + partdescription1: partdescription1 + globallinenumber: globallinenumber + partdescription2: partdescription2 + serialnumberdetails: + - serialnumber: serialnumber + - serialnumber: serialnumber + vendorcode: vendorcode + requestedquantity: requestedquantity + partnumber: partnumber + vendorname: vendorname + backorderetadate: backorderetadate + entrymethoddescription: entrymethoddescription + commentlines: + - commenttext1: commenttext1 + commenttext2: commenttext2 + - commenttext1: commenttext1 + commenttext2: commenttext2 + ordertype: ordertype + enduserinfo: + enduserid: enduserid + responsepreamble: + statuscode: statuscode + responsemessage: responsemessage + responsestatus: responsestatus + properties: + responsepreamble: + $ref: '#/components/schemas/InvoiceDetailResponse_serviceresponse_responsepreamble' + orderdetailresponse: + $ref: '#/components/schemas/orderDetailResponse_serviceresponse_orderdetailresponse' + type: object + orderCancelResponse_serviceresponse_responsepreamble: + example: + returnCode: returnCode + returnMessage: returnMessage + requestStatus: requestStatus + properties: + requestStatus: + type: string + returnCode: + type: string + returnMessage: + type: string + type: object + orderCancelResponse_serviceresponse: + example: + responsepreamble: + returnCode: returnCode + returnMessage: returnMessage + requestStatus: requestStatus + properties: + responsepreamble: + $ref: '#/components/schemas/orderCancelResponse_serviceresponse_responsepreamble' + type: object + orderSearchResponse_serviceResponse_responsepreamble: + example: + returnmessage: returnmessage + requeststatus: requeststatus + properties: + requeststatus: + type: string + returnmessage: + type: string + required: + - requeststatus + - returnmessage + type: object + orderSearchResponse_serviceResponse_ordersearchresponse_orders_inner_suborders_inner_links_inner: + example: + topic: orders + href: https://openapi-generator.tech + type: GET + properties: + topic: + description: "topic being orders or invoices, if it is orders then the link\ + \ will provide details of the order. If its invoices then the link provides\ + \ details of the invoice" + enum: + - orders + - invoices + type: string + href: + description: The API endpoint for accessing the relevant data + format: uri + type: string + type: + description: The type of call that can be made to the href link + enum: + - GET + - POST + - PUT + type: string + type: object + orderSearchResponse_serviceResponse_ordersearchresponse_orders_inner_suborders_inner: + example: + statuscode: statuscode + subordernumber: subordernumber + holdreason: holdreason + holdreasoncode: holdreasoncode + links: + - topic: orders + href: https://openapi-generator.tech + type: GET + - topic: orders + href: https://openapi-generator.tech + type: GET + status: status + properties: + subordernumber: + description: A sub order number + type: string + statuscode: + description: Order status code + type: string + status: + description: Details of the order statuscode - i.e. statuscode = 4 then + status = SHIPPED + type: string + holdreasoncode: + description: Will be returned in case of order on hold + type: string + holdreason: + description: Reason for order hold - will be returned if the order is on + hold + type: string + links: + description: HATEOAS links for the details and invoices of the sub-orders + if available + items: + $ref: '#/components/schemas/orderSearchResponse_serviceResponse_ordersearchresponse_orders_inner_suborders_inner_links_inner' + type: array + type: object + orderSearchResponse_serviceResponse_ordersearchresponse_orders_inner_links: + description: HATEOAS links for the main order + example: + topic: orders + href: https://openapi-generator.tech + type: GET + properties: + topic: + description: "Topic being orders in this case, if it is orders then the\ + \ link will provide details of the order." + enum: + - orders + - invoices + type: string + href: + description: The API endpoint for accessing the relevant data + format: uri + type: string + type: + description: The type of call that can be made to the href link + enum: + - GET + - POST + - PUT + type: string + type: object + orderSearchResponse_serviceResponse_ordersearchresponse_orders_inner: + example: + entrytimestamp: entrytimestamp + ordernumber: ordernumber + links: + topic: orders + href: https://openapi-generator.tech + type: GET + customerordernumber: customerordernumber + suborders: + - statuscode: statuscode + subordernumber: subordernumber + holdreason: holdreason + holdreasoncode: holdreasoncode + links: + - topic: orders + href: https://openapi-generator.tech + type: GET + - topic: orders + href: https://openapi-generator.tech + type: GET + status: status + - statuscode: statuscode + subordernumber: subordernumber + holdreason: holdreason + holdreasoncode: holdreasoncode + links: + - topic: orders + href: https://openapi-generator.tech + type: GET + - topic: orders + href: https://openapi-generator.tech + type: GET + status: status + properties: + ordernumber: + description: Ingram micro sales order number + type: string + entrytimestamp: + description: The order creation date-time in UTC format + type: string + customerordernumber: + description: PO/Order number submitted while creating the order + type: string + suborders: + description: "An order MAY get divided into various sub orders, for example\ + \ if the SKUs are being shipped from different warehouse." + items: + $ref: '#/components/schemas/orderSearchResponse_serviceResponse_ordersearchresponse_orders_inner_suborders_inner' + type: array + links: + $ref: '#/components/schemas/orderSearchResponse_serviceResponse_ordersearchresponse_orders_inner_links' + required: + - entrytimestamp + - ordernumber + type: object + orderSearchResponse_serviceResponse_ordersearchresponse: + example: + ordersfound: ordersfound + pagesize: pagesize + orders: + - entrytimestamp: entrytimestamp + ordernumber: ordernumber + links: + topic: orders + href: https://openapi-generator.tech + type: GET + customerordernumber: customerordernumber + suborders: + - statuscode: statuscode + subordernumber: subordernumber + holdreason: holdreason + holdreasoncode: holdreasoncode + links: + - topic: orders + href: https://openapi-generator.tech + type: GET + - topic: orders + href: https://openapi-generator.tech + type: GET + status: status + - statuscode: statuscode + subordernumber: subordernumber + holdreason: holdreason + holdreasoncode: holdreasoncode + links: + - topic: orders + href: https://openapi-generator.tech + type: GET + - topic: orders + href: https://openapi-generator.tech + type: GET + status: status + - entrytimestamp: entrytimestamp + ordernumber: ordernumber + links: + topic: orders + href: https://openapi-generator.tech + type: GET + customerordernumber: customerordernumber + suborders: + - statuscode: statuscode + subordernumber: subordernumber + holdreason: holdreason + holdreasoncode: holdreasoncode + links: + - topic: orders + href: https://openapi-generator.tech + type: GET + - topic: orders + href: https://openapi-generator.tech + type: GET + status: status + - statuscode: statuscode + subordernumber: subordernumber + holdreason: holdreason + holdreasoncode: holdreasoncode + links: + - topic: orders + href: https://openapi-generator.tech + type: GET + - topic: orders + href: https://openapi-generator.tech + type: GET + status: status + pagenumber: pagenumber + properties: + ordersfound: + description: Number of records found in the search result + type: string + pagesize: + description: "The submitted pagesize, default is 25" + type: string + pagenumber: + description: "The submitted pager number, default is 1" + type: string + orders: + description: An array of orders in the search result + items: + $ref: '#/components/schemas/orderSearchResponse_serviceResponse_ordersearchresponse_orders_inner' + type: array + required: + - ordersfound + type: object + orderSearchResponse_serviceResponse: + example: + responsepreamble: + returnmessage: returnmessage + requeststatus: requeststatus + ordersearchresponse: + ordersfound: ordersfound + pagesize: pagesize + orders: + - entrytimestamp: entrytimestamp + ordernumber: ordernumber + links: + topic: orders + href: https://openapi-generator.tech + type: GET + customerordernumber: customerordernumber + suborders: + - statuscode: statuscode + subordernumber: subordernumber + holdreason: holdreason + holdreasoncode: holdreasoncode + links: + - topic: orders + href: https://openapi-generator.tech + type: GET + - topic: orders + href: https://openapi-generator.tech + type: GET + status: status + - statuscode: statuscode + subordernumber: subordernumber + holdreason: holdreason + holdreasoncode: holdreasoncode + links: + - topic: orders + href: https://openapi-generator.tech + type: GET + - topic: orders + href: https://openapi-generator.tech + type: GET + status: status + - entrytimestamp: entrytimestamp + ordernumber: ordernumber + links: + topic: orders + href: https://openapi-generator.tech + type: GET + customerordernumber: customerordernumber + suborders: + - statuscode: statuscode + subordernumber: subordernumber + holdreason: holdreason + holdreasoncode: holdreasoncode + links: + - topic: orders + href: https://openapi-generator.tech + type: GET + - topic: orders + href: https://openapi-generator.tech + type: GET + status: status + - statuscode: statuscode + subordernumber: subordernumber + holdreason: holdreason + holdreasoncode: holdreasoncode + links: + - topic: orders + href: https://openapi-generator.tech + type: GET + - topic: orders + href: https://openapi-generator.tech + type: GET + status: status + pagenumber: pagenumber + properties: + responsepreamble: + $ref: '#/components/schemas/orderSearchResponse_serviceResponse_responsepreamble' + ordersearchresponse: + $ref: '#/components/schemas/orderSearchResponse_serviceResponse_ordersearchresponse' + type: object + productSearchResponse_serviceresponse_responsepreamble: + example: + returnmessage: returnmessage + returncode: returncode + requeststatus: requeststatus + properties: + requeststatus: + type: string + returncode: + type: string + returnmessage: + type: string + type: object + productSearchResponse_serviceresponse_productsearchresponse_inner_partnumbers_inner: + example: + productdescription: productdescription + manufacturerpartnumber: manufacturerpartnumber + ingrampartnumber: ingrampartnumber + haswarranty: haswarranty + currency: currency + upccode: upccode + properties: + ingrampartnumber: + description: Ingram Part Number + type: string + manufacturerpartnumber: + description: Vendor or Manufacturer Part Number + type: string + upccode: + description: UPC + type: string + productdescription: + description: Product description + type: string + currency: + type: string + haswarranty: + type: string + type: object + productSearchResponse_serviceresponse_productsearchresponse_inner: + example: + partnumbers: + - productdescription: productdescription + manufacturerpartnumber: manufacturerpartnumber + ingrampartnumber: ingrampartnumber + haswarranty: haswarranty + currency: currency + upccode: upccode + - productdescription: productdescription + manufacturerpartnumber: manufacturerpartnumber + ingrampartnumber: ingrampartnumber + haswarranty: haswarranty + currency: currency + upccode: upccode + responseflag: responseflag + properties: + responseflag: + description: Number of records in the search result. + type: string + partnumbers: + items: + $ref: '#/components/schemas/productSearchResponse_serviceresponse_productsearchresponse_inner_partnumbers_inner' + type: array + type: object + productSearchResponse_serviceresponse: + example: + responsepreamble: + returnmessage: returnmessage + returncode: returncode + requeststatus: requeststatus + productsearchresponse: + - partnumbers: + - productdescription: productdescription + manufacturerpartnumber: manufacturerpartnumber + ingrampartnumber: ingrampartnumber + haswarranty: haswarranty + currency: currency + upccode: upccode + - productdescription: productdescription + manufacturerpartnumber: manufacturerpartnumber + ingrampartnumber: ingrampartnumber + haswarranty: haswarranty + currency: currency + upccode: upccode + responseflag: responseflag + - partnumbers: + - productdescription: productdescription + manufacturerpartnumber: manufacturerpartnumber + ingrampartnumber: ingrampartnumber + haswarranty: haswarranty + currency: currency + upccode: upccode + - productdescription: productdescription + manufacturerpartnumber: manufacturerpartnumber + ingrampartnumber: ingrampartnumber + haswarranty: haswarranty + currency: currency + upccode: upccode + responseflag: responseflag + properties: + responsepreamble: + $ref: '#/components/schemas/productSearchResponse_serviceresponse_responsepreamble' + productsearchresponse: + items: + $ref: '#/components/schemas/productSearchResponse_serviceresponse_productsearchresponse_inner' + type: array + type: object + priceAndAvailabilityRequest_servicerequest_requestpreamble: + properties: + isocountrycode: + description: 2 Digit ISO country code + example: US + maxLength: 2 + minLength: 2 + type: string + customernumber: + description: Your Ingram Micro customer number + example: '12-34567 or 12-345678 or 123456 ' + type: string + required: + - customernumber + - isocountrycode + type: object + priceAndAvailabilityRequest_servicerequest_priceandstockrequest_item_inner: + properties: + index: + type: integer + ingrampartnumber: + description: Ingram Micro SKU number + type: string + vendorpartnumber: + description: Vendor/Manufacture Part Number + type: string + upc: + description: Universal Product code + type: string + customerpartnumber: + description: "Unique identoifier for the customer, needs custom setup." + type: string + warehouseidlist: + description: Unique identity for Ingram Micro warehouses against which stock + details are returned. + items: + type: string + type: array + extendedvendorpartnumber: + type: string + quantity: + type: number + enduserid: + type: string + govtprogramtype: + type: string + govtendusertype: + type: string + specialbidnumber: + type: string + type: object + priceAndAvailabilityRequest_servicerequest_priceandstockrequest: + properties: + showwarehouseavailability: + description: True/false to show the availability of individual warehouses + type: string + extravailabilityflag: + description: Y/N to show extra availability flag + type: string + includeallsystems: + description: Flag to indicate if the price and stock information is required + for all Ingram Micro systems. + type: boolean + item: + items: + $ref: '#/components/schemas/priceAndAvailabilityRequest_servicerequest_priceandstockrequest_item_inner' + type: array + type: object + priceAndAvailabilityRequest_servicerequest: + properties: + requestpreamble: + $ref: '#/components/schemas/priceAndAvailabilityRequest_servicerequest_requestpreamble' + priceandstockrequest: + $ref: '#/components/schemas/priceAndAvailabilityRequest_servicerequest_priceandstockrequest' + type: object + priceAndAvailabilityResponse_serviceresponse_responsepreamble: + example: + statuscode: statuscode + responsemessage: responsemessage + responsestatus: responsestatus + properties: + responsestatus: + description: "SUCCESS or FAILED, sometimes PARTIAL SUCCESS if connection\ + \ to 1 of the systems fails" + type: string + responsemessage: + description: Overall status message including error message + type: string + statuscode: + description: Statuscode Message + type: string + type: object + priceAndAvailabilityResponse_serviceresponse_priceandstockresponse_details_inner: + example: + customerprice: 0.8008281904610115 + vendorpartnumber: vendorpartnumber + warehousedetails: + - onholdquantity: 5 + warehouseid: warehouseid + warehousedescription: warehousedescription + onorderquantity: 5 + etadate: etadate + availablequantity: 1 + - onholdquantity: 5 + warehouseid: warehouseid + warehousedescription: warehousedescription + onorderquantity: 5 + etadate: etadate + availablequantity: 1 + itemstatus: SUCCESS + extendedvendorpartnumber: extendedvendorpartnumber + mediacpu: mediacpu + skustatus: ACTIVE + cpucode: cpucode + newmedia: newmedia + categorysubcategory: categorysubcategory + skuauthorized: skuauthorized + statusmessage: statusmessage + globalskuid: globalskuid + retailprice: 6.027456183070403 + enduserrequired: "Y" + ingrampartnumber: ingrampartnumber + vendornumber: vendornumber + partdescription1: partdescription1 + partdescription2: partdescription2 + vendorname: vendorname + class: A + backorderflag: "Y" + properties: + itemstatus: + description: SUCCESS or FAILED + enum: + - SUCCESS + - FAILED + type: string + statusmessage: + description: Description of itemstatus + type: string + ingrampartnumber: + description: Ingram Micro part number + type: string + vendorpartnumber: + description: Manufacturer/Vendor part number + type: string + globalskuid: + type: string + customerprice: + description: "Customer specific price for the product, excluding taxes" + type: number + partdescription1: + description: Product description part 1 + type: string + partdescription2: + description: Product description part 2 + type: string + vendornumber: + type: string + vendorname: + description: Name of the vendor + type: string + cpucode: + type: string + class: + description: "Ingram Micro assigned product classification - \nA-Stocked\ + \ product in all IM warehouses, B-Limited stock in IM warehouses, C-Stocked\ + \ in fewer wareshouses, D-Ingram discontinued, E-Planned to be phased\ + \ out as per the vendor, F-Carried for specific customer as per the contract,\ + \ N-New SKU, O-Discontinued to be liquidated, S-Order for specialized\ + \ demand, V-Discontinued by vendor, X-Direct Ship products from vendor" + enum: + - A + - B + - C + - D + - E + - F + - "N" + - O + - S + - V + - X + type: string + skustatus: + description: Identifies if the SKU has been discontinued. + enum: + - ACTIVE + type: string + mediacpu: + type: string + categorysubcategory: + type: string + retailprice: + type: number + newmedia: + type: string + enduserrequired: + description: Y - End user required N - Not required End user + enum: + - "Y" + - "N" + type: string + backorderflag: + description: Y- Allow Backorder Flag N- Not allowed + enum: + - "Y" + - "N" + type: string + skuauthorized: + type: string + extendedvendorpartnumber: + type: string + warehousedetails: + items: + $ref: '#/components/schemas/warehouseListType' + type: array + type: object + priceAndAvailabilityResponse_serviceresponse_priceandstockresponse: + example: + details: + - customerprice: 0.8008281904610115 + vendorpartnumber: vendorpartnumber + warehousedetails: + - onholdquantity: 5 + warehouseid: warehouseid + warehousedescription: warehousedescription + onorderquantity: 5 + etadate: etadate + availablequantity: 1 + - onholdquantity: 5 + warehouseid: warehouseid + warehousedescription: warehousedescription + onorderquantity: 5 + etadate: etadate + availablequantity: 1 + itemstatus: SUCCESS + extendedvendorpartnumber: extendedvendorpartnumber + mediacpu: mediacpu + skustatus: ACTIVE + cpucode: cpucode + newmedia: newmedia + categorysubcategory: categorysubcategory + skuauthorized: skuauthorized + statusmessage: statusmessage + globalskuid: globalskuid + retailprice: 6.027456183070403 + enduserrequired: "Y" + ingrampartnumber: ingrampartnumber + vendornumber: vendornumber + partdescription1: partdescription1 + partdescription2: partdescription2 + vendorname: vendorname + class: A + backorderflag: "Y" + - customerprice: 0.8008281904610115 + vendorpartnumber: vendorpartnumber + warehousedetails: + - onholdquantity: 5 + warehouseid: warehouseid + warehousedescription: warehousedescription + onorderquantity: 5 + etadate: etadate + availablequantity: 1 + - onholdquantity: 5 + warehouseid: warehouseid + warehousedescription: warehousedescription + onorderquantity: 5 + etadate: etadate + availablequantity: 1 + itemstatus: SUCCESS + extendedvendorpartnumber: extendedvendorpartnumber + mediacpu: mediacpu + skustatus: ACTIVE + cpucode: cpucode + newmedia: newmedia + categorysubcategory: categorysubcategory + skuauthorized: skuauthorized + statusmessage: statusmessage + globalskuid: globalskuid + retailprice: 6.027456183070403 + enduserrequired: "Y" + ingrampartnumber: ingrampartnumber + vendornumber: vendornumber + partdescription1: partdescription1 + partdescription2: partdescription2 + vendorname: vendorname + class: A + backorderflag: "Y" + properties: + details: + items: + $ref: '#/components/schemas/priceAndAvailabilityResponse_serviceresponse_priceandstockresponse_details_inner' + type: array + type: object + priceAndAvailabilityResponse_serviceresponse: + example: + priceandstockresponse: + details: + - customerprice: 0.8008281904610115 + vendorpartnumber: vendorpartnumber + warehousedetails: + - onholdquantity: 5 + warehouseid: warehouseid + warehousedescription: warehousedescription + onorderquantity: 5 + etadate: etadate + availablequantity: 1 + - onholdquantity: 5 + warehouseid: warehouseid + warehousedescription: warehousedescription + onorderquantity: 5 + etadate: etadate + availablequantity: 1 + itemstatus: SUCCESS + extendedvendorpartnumber: extendedvendorpartnumber + mediacpu: mediacpu + skustatus: ACTIVE + cpucode: cpucode + newmedia: newmedia + categorysubcategory: categorysubcategory + skuauthorized: skuauthorized + statusmessage: statusmessage + globalskuid: globalskuid + retailprice: 6.027456183070403 + enduserrequired: "Y" + ingrampartnumber: ingrampartnumber + vendornumber: vendornumber + partdescription1: partdescription1 + partdescription2: partdescription2 + vendorname: vendorname + class: A + backorderflag: "Y" + - customerprice: 0.8008281904610115 + vendorpartnumber: vendorpartnumber + warehousedetails: + - onholdquantity: 5 + warehouseid: warehouseid + warehousedescription: warehousedescription + onorderquantity: 5 + etadate: etadate + availablequantity: 1 + - onholdquantity: 5 + warehouseid: warehouseid + warehousedescription: warehousedescription + onorderquantity: 5 + etadate: etadate + availablequantity: 1 + itemstatus: SUCCESS + extendedvendorpartnumber: extendedvendorpartnumber + mediacpu: mediacpu + skustatus: ACTIVE + cpucode: cpucode + newmedia: newmedia + categorysubcategory: categorysubcategory + skuauthorized: skuauthorized + statusmessage: statusmessage + globalskuid: globalskuid + retailprice: 6.027456183070403 + enduserrequired: "Y" + ingrampartnumber: ingrampartnumber + vendornumber: vendornumber + partdescription1: partdescription1 + partdescription2: partdescription2 + vendorname: vendorname + class: A + backorderflag: "Y" + responsepreamble: + statuscode: statuscode + responsemessage: responsemessage + responsestatus: responsestatus + properties: + responsepreamble: + $ref: '#/components/schemas/priceAndAvailabilityResponse_serviceresponse_responsepreamble' + priceandstockresponse: + $ref: '#/components/schemas/priceAndAvailabilityResponse_serviceresponse_priceandstockresponse' + type: object + quoteListRequest_quoteSearchRequest_requestPreamble: + properties: + customerNumber: + description: Reseller Number (referred to as the account BCN) is the unique + identifier for an Ingram Micro customer account. + maxLength: 10 + type: string + customerContact: + description: Logged in User's email address. + format: email + type: string + isoCountryCode: + description: The ISO country codes are internationally recognized codes + designated for each country represented by a two-letter combination (alpha-2). + maxLength: 3 + type: string + required: + - customerNumber + - isoCountryCode + type: object + quoteListRequest_quoteSearchRequest_retrieveQuoteRequest: + properties: + quoteNumber: + description: "Unique identifier generated by Ingram Micro's CRM specific\ + \ to each quote. When applying a filter to the quoteNumber and including\ + \ a partial quote number in the filter, all quotes containing any information\ + \ included in the filter can be retrieved as a subset of all available\ + \ customer quotes." + maxLength: 100 + type: string + bidNumber: + description: "Special Pricing Bid Number, also referred to as a Dart Number\ + \ by some vendors, is a unique identifier associated with vendor specific\ + \ products and discounts." + maxLength: 100 + type: string + endUserName: + description: End User Name is the end customer name that is associated with + a quote in Ingram Micro's CRM + maxLength: 300 + type: string + fromDate: + description: "Filter to select the beginning date of a desired date range.\ + \ The default filter is set to the date the user is logged-in to request\ + \ quotes. Date format: YYYY-MM-DD - An incorrect date input will result\ + \ in a message \"Date must be entered as YYYY-MM-DD\"" + example: 2019-08-01 + format: date + type: string + toDate: + description: "Filter to select the end date of a desired date range. The\ + \ default number of days to request is the previous 30 days from the date\ + \ user has logged in. Date format: YYYY-MM-DD - An incorrect date input\ + \ will result in a message \"Date must be entered as YYYY-MM-DD\"" + example: 2019-11-01 + format: date + type: string + pageIndex: + description: "Page index or page number for the list of quotes being returned.\ + \ When less than 25 quotes are returned, the page number will be \"1\"\ + . In cases where more than 25 quotes are returned, and the default quotes\ + \ per page are 25 (see recordPerPage), then the list will continue on\ + \ subsequent pages." + type: string + recordsPerPage: + description: "Number of records (quotes) to display per page in the quote\ + \ list. The default is 25, but may be increased using the filter by up\ + \ to 100 records per page. If more than 100 records are requested a message\ + \ will be returned \"The number of records requested exceeds the 100 record\ + \ limit.\"\t" + type: string + sorting: + description: Sort applies to the selected column (sortingColumnName) and + may be specified in Ascending (asc) or Descending (desc) order. The default + sort is Descending (desc) - most recent first. + enum: + - asc + - desc + type: string + sortingColumnName: + description: "Refers to the column selected to apply the sorting criteria.\ + \ The default column is dateCreated and will sort by the most recently\ + \ created quote first with the following in descending order. The default\ + \ filter retrieves quotes created within the last 30 days. Filtering allows\ + \ user to select a specific column to sort: quoteNumber, createdDate,\ + \ lastModifiedDate, expiryDate, and endUserName." + example: toDate + maxLength: 100 + type: string + thirdPartySource: + description: Unique identifier used to identify the third party source accessing + the services. + maxLength: 100 + type: string + type: object + quoteListRequest_quoteSearchRequest: + properties: + requestPreamble: + $ref: '#/components/schemas/quoteListRequest_quoteSearchRequest_requestPreamble' + retrieveQuoteRequest: + $ref: '#/components/schemas/quoteListRequest_quoteSearchRequest_retrieveQuoteRequest' + type: object + quoteListResponse_quoteSearchResponse_responsePreamble: + example: + responseStatusCode: responseStatusCode + responseStatus: responseStatus + responseMessage: responseMessage + properties: + responseStatus: + description: "Status of the Request - \"Passed\", \"Failed\"" + type: string + responseStatusCode: + description: "responseStatusCode is the code returned in response to a request.\ + \ The following Codes are returned: 200 400 500" + type: string + responseMessage: + description: "200 = Action was successfully received, understood and accepted.\ + \ 400 = The request contains bad syntax or can not be fullfilled. This\ + \ means there is a problem with the request. 500 = The server failed to\ + \ fulfill an apparently valid request. This is a temporary problem, the\ + \ request should be resubmitted." + type: string + type: object + quoteListResponse_quoteSearchResponse_quoteList_inner: + example: + totalAmount: totalAmount + createdDate: 2019-10-08T00:00:00.000+00:00 + revisionNumber: 0 + lastModifiedDate: 2019-10-08T00:00:00.000+00:00 + endUserName: endUserName + bidNumber: bidNumber + quoteNumber: quoteNumber + quoteStatus: quoteStatus + quoteExpiryDate: 2019-10-08T00:00:00.000+00:00 + quoteName: quoteName + properties: + quoteName: + description: Quote Name given to quote by sales team or system generated. + Generally used as a reference to identify the quote. + type: string + quoteNumber: + description: "Unique identifier generated by Ingram Micro's CRM specific\ + \ to each quote. When applying a filter to the quoteNumber and including\ + \ a partial quote number in the filter, all quotes containing any information\ + \ included in the filter can be retrieved as a subset of all available\ + \ customer quotes." + type: string + revisionNumber: + description: "When a quote has been revised and updated, the quote number\ + \ remains the same throughout the lifecycle of the quote, however, a Revision\ + \ number is updated for each revision of the quote. The revision numbers\ + \ is associated with the Unique Quote Number." + type: integer + endUserName: + description: End User Name is the end customer name that is associated with + a quote in Ingram Micro's CRM + type: string + bidNumber: + description: "Special Pricing Bid Number, also refers to as Dart Number\ + \ relates to a unique pricing deal associated with a vendor for the quote." + type: string + totalAmount: + description: Total amount of quoted price for all products in the quote. + type: string + quoteStatus: + description: "This refers to the primary status of the quote. API responses\ + \ will return: Active" + type: string + createdDate: + description: Date the Quote was initially Created + example: 2019-10-08 + format: date + type: string + lastModifiedDate: + description: Date the Quote was last updated or modified. + example: 2019-10-08 + format: date + type: string + quoteExpiryDate: + description: Date the Quote Expires + example: 2019-10-08 + format: date + type: string + type: object + quoteListResponse_quoteSearchResponse: + example: + responsePreamble: + responseStatusCode: responseStatusCode + responseStatus: responseStatus + responseMessage: responseMessage + totalCount: 6 + quoteList: + - totalAmount: totalAmount + createdDate: 2019-10-08T00:00:00.000+00:00 + revisionNumber: 0 + lastModifiedDate: 2019-10-08T00:00:00.000+00:00 + endUserName: endUserName + bidNumber: bidNumber + quoteNumber: quoteNumber + quoteStatus: quoteStatus + quoteExpiryDate: 2019-10-08T00:00:00.000+00:00 + quoteName: quoteName + - totalAmount: totalAmount + createdDate: 2019-10-08T00:00:00.000+00:00 + revisionNumber: 0 + lastModifiedDate: 2019-10-08T00:00:00.000+00:00 + endUserName: endUserName + bidNumber: bidNumber + quoteNumber: quoteNumber + quoteStatus: quoteStatus + quoteExpiryDate: 2019-10-08T00:00:00.000+00:00 + quoteName: quoteName + properties: + responsePreamble: + $ref: '#/components/schemas/quoteListResponse_quoteSearchResponse_responsePreamble' + quoteList: + items: + $ref: '#/components/schemas/quoteListResponse_quoteSearchResponse_quoteList_inner' + type: array + totalCount: + description: Total count of quotes retrieved in the request response. + type: integer + type: object + quoteDetailsRequest_quoteProductsRequest_requestpreamble: + properties: + customerNumber: + description: Reseller Number (referred to as the account BCN) is the unique + identifier for an Ingram Micro customer account. + type: string + isoCountryCode: + description: The ISO country codes are internationally recognized codes + designated for each country represented by a two-letter combination (alpha-2). + type: string + required: + - customerNumber + - isoCountryCode + type: object + quoteDetailsRequest_quoteProductsRequest_retrieveQuoteProductsRequest: + properties: + quoteNumber: + description: "Unique identifier generated by Ingram Micro's CRM specific\ + \ to each quote. When applying a filter to the quoteNumber and including\ + \ a partial quote number in the filter, all quotes containing any information\ + \ included in the filter can be retrieved as a subset of all available\ + \ customer quotes." + type: string + thirdPartySource: + description: Unique identifier used to identify the third party source accessing + the services. + type: string + type: object + quoteDetailsRequest_quoteProductsRequest: + properties: + requestpreamble: + $ref: '#/components/schemas/quoteDetailsRequest_quoteProductsRequest_requestpreamble' + retrieveQuoteProductsRequest: + $ref: '#/components/schemas/quoteDetailsRequest_quoteProductsRequest_retrieveQuoteProductsRequest' + type: object + quoteDetails_quoteDetailResponse_responsePreamble: + example: + responseStatus: responseStatus + responseMessage: responseMessage + statusCode: statusCode + properties: + responseStatus: + type: string + statusCode: + type: string + responseMessage: + type: string + type: object + quoteDetails_quoteDetailResponse_retrieveQuoteResponse_accountInfo: + example: + accountName: accountName + phone: phone + bcn: bcn + properties: + accountName: + type: string + bcn: + type: string + phone: + type: string + type: object + quoteDetails_quoteDetailResponse_retrieveQuoteResponse_contactInfo: + example: + contactEmail: contactEmail + contactName: contactName + properties: + contactEmail: + type: string + contactName: + type: string + type: object + quoteDetails_quoteDetailResponse_retrieveQuoteResponse_vendorAttributes: + example: + vendorSettingMessage: vendorSettingMessage + dealId: dealId + estimateId: estimateId + vendorName: vendorName + properties: + estimateId: + type: string + dealId: + type: string + vendorName: + type: string + vendorSettingMessage: + type: string + type: object + quoteDetails_quoteDetailResponse_retrieveQuoteResponse_endUser: + example: + endUserContactName: endUserContactName + endUserZipCode: endUserZipCode + endUserMarketSegment: endUserMarketSegment + endUserCity: endUserCity + endUserName: endUserName + endUserAddress3: endUserAddress3 + endUserAddress2: endUserAddress2 + endUserPhone: endUserPhone + endUserAddress: endUserAddress + endUserState: endUserState + endUserEmail: endUserEmail + properties: + endUserName: + type: string + endUserAddress: + type: string + endUserAddress2: + type: string + endUserAddress3: + type: string + endUserCity: + type: string + endUserState: + type: string + endUserEmail: + type: string + endUserPhone: + type: string + endUserZipCode: + type: string + endUserContactName: + type: string + endUserMarketSegment: + type: string + type: object + quoteDetails_quoteDetailResponse_retrieveQuoteResponse: + example: + accountInfo: + accountName: accountName + phone: phone + bcn: bcn + introPreamble: introPreamble + contactInfo: + contactEmail: contactEmail + contactName: contactName + revisionNumber: revisionNumber + legalTerms: legalTerms + created: 2019-10-04T00:00:00.000+00:00 + priceDeviationExpiryDate: 2000-01-23 + solutionProposed: solutionProposed + quoteNumber: quoteNumber + quoteGuid: quoteGuid + priceDeviationStartDate: 2000-01-23 + leasingCalculations: leasingCalculations + endUser: + endUserContactName: endUserContactName + endUserZipCode: endUserZipCode + endUserMarketSegment: endUserMarketSegment + endUserCity: endUserCity + endUserName: endUserName + endUserAddress3: endUserAddress3 + endUserAddress2: endUserAddress2 + endUserPhone: endUserPhone + endUserAddress: endUserAddress + endUserState: endUserState + endUserEmail: endUserEmail + customerNeed: customerNeed + modified: 2019-10-04T00:00:00.000+00:00 + vendorAttributes: + vendorSettingMessage: vendorSettingMessage + dealId: dealId + estimateId: estimateId + vendorName: vendorName + purchaseInstructions: purchaseInstructions + priceDeviationId: priceDeviationId + leasingInstructions: leasingInstructions + currencyCode: currencyCode + quoteExpiryDate: 2020-01-01T00:00:00.000+00:00 + quoteName: quoteName + status: status + properties: + quoteGuid: + type: string + quoteName: + type: string + quoteNumber: + type: string + quoteExpiryDate: + example: 2020-01-01 + format: date + type: string + revisionNumber: + type: string + introPreamble: + type: string + purchaseInstructions: + type: string + legalTerms: + type: string + currencyCode: + type: string + priceDeviationId: + type: string + priceDeviationStartDate: + format: date + type: string + priceDeviationExpiryDate: + format: date + type: string + customerNeed: + type: string + solutionProposed: + type: string + status: + type: string + created: + example: 2019-10-04 + format: date + type: string + modified: + example: 2019-10-04 + format: date + type: string + leasingCalculations: + type: string + leasingInstructions: + type: string + accountInfo: + $ref: '#/components/schemas/quoteDetails_quoteDetailResponse_retrieveQuoteResponse_accountInfo' + contactInfo: + $ref: '#/components/schemas/quoteDetails_quoteDetailResponse_retrieveQuoteResponse_contactInfo' + vendorAttributes: + $ref: '#/components/schemas/quoteDetails_quoteDetailResponse_retrieveQuoteResponse_vendorAttributes' + endUser: + $ref: '#/components/schemas/quoteDetails_quoteDetailResponse_retrieveQuoteResponse_endUser' + type: object + quoteDetails_quoteDetailResponse: + example: + totalExtendedMsrp: totalExtendedMsrp + totalQuantity: 5 + totalExtendedQuotePrice: totalExtendedQuotePrice + retrieveQuoteResponse: + accountInfo: + accountName: accountName + phone: phone + bcn: bcn + introPreamble: introPreamble + contactInfo: + contactEmail: contactEmail + contactName: contactName + revisionNumber: revisionNumber + legalTerms: legalTerms + created: 2019-10-04T00:00:00.000+00:00 + priceDeviationExpiryDate: 2000-01-23 + solutionProposed: solutionProposed + quoteNumber: quoteNumber + quoteGuid: quoteGuid + priceDeviationStartDate: 2000-01-23 + leasingCalculations: leasingCalculations + endUser: + endUserContactName: endUserContactName + endUserZipCode: endUserZipCode + endUserMarketSegment: endUserMarketSegment + endUserCity: endUserCity + endUserName: endUserName + endUserAddress3: endUserAddress3 + endUserAddress2: endUserAddress2 + endUserPhone: endUserPhone + endUserAddress: endUserAddress + endUserState: endUserState + endUserEmail: endUserEmail + customerNeed: customerNeed + modified: 2019-10-04T00:00:00.000+00:00 + vendorAttributes: + vendorSettingMessage: vendorSettingMessage + dealId: dealId + estimateId: estimateId + vendorName: vendorName + purchaseInstructions: purchaseInstructions + priceDeviationId: priceDeviationId + leasingInstructions: leasingInstructions + currencyCode: currencyCode + quoteExpiryDate: 2020-01-01T00:00:00.000+00:00 + quoteName: quoteName + status: status + responsePreamble: + responseStatus: responseStatus + responseMessage: responseMessage + statusCode: statusCode + quoteProductList: + - bidExpiryDate: bidExpiryDate + vpnCategory: vpnCategory + quantity: quantity + comments: comments + description: description + weight: weight + bidStartDate: bidStartDate + price: + quotePrice: 0.8008281904610115 + msrp: 6.027456183070403 + extendedQuotePrice: 5.962133916683182 + extendedMsrp: 1.4658129805029452 + quoteProductGuid: quoteProductGuid + vendorPartNumber: vendorPartNumber + sku: sku + lineNumber: lineNumber + quoteProductsSupplierPartAuxiliaryId: quoteProductsSupplierPartAuxiliaryId + quoteProductsVendor: quoteProductsVendor + isSuggestionProduct: isSuggestionProduct + - bidExpiryDate: bidExpiryDate + vpnCategory: vpnCategory + quantity: quantity + comments: comments + description: description + weight: weight + bidStartDate: bidStartDate + price: + quotePrice: 0.8008281904610115 + msrp: 6.027456183070403 + extendedQuotePrice: 5.962133916683182 + extendedMsrp: 1.4658129805029452 + quoteProductGuid: quoteProductGuid + vendorPartNumber: vendorPartNumber + sku: sku + lineNumber: lineNumber + quoteProductsSupplierPartAuxiliaryId: quoteProductsSupplierPartAuxiliaryId + quoteProductsVendor: quoteProductsVendor + isSuggestionProduct: isSuggestionProduct + totalQuoteProductCount: totalQuoteProductCount + properties: + responsePreamble: + $ref: '#/components/schemas/quoteDetails_quoteDetailResponse_responsePreamble' + retrieveQuoteResponse: + $ref: '#/components/schemas/quoteDetails_quoteDetailResponse_retrieveQuoteResponse' + quoteProductList: + items: + $ref: '#/components/schemas/quoteProductList' + type: array + totalQuoteProductCount: + type: string + totalExtendedMsrp: + type: string + totalQuantity: + type: integer + totalExtendedQuotePrice: + type: string + type: object + quoteProductList_price: + example: + quotePrice: 0.8008281904610115 + msrp: 6.027456183070403 + extendedQuotePrice: 5.962133916683182 + extendedMsrp: 1.4658129805029452 + properties: + quotePrice: + type: number + msrp: + type: number + extendedMsrp: + type: number + extendedQuotePrice: + type: number + type: object + productSearchRequest_servicerequest_requestpreamble: + properties: + isocountrycode: + type: string + customernumber: + type: string + vendornumber: + type: string + required: + - customernumber + - isocountrycode + type: object + productSearchRequest_servicerequest_productsearchrequest_searchcriteria: + properties: + vendor: + description: Name of the vendor or manufacturer or brand of the product + type: string + vendorpartnumber: + description: Vendor provided part number + example: WKB-1500GB + type: string + partdescription: + description: This field seraches the decriptioon of the product. + example: WRLS ERGO KEYBOARD & MOUSE + type: string + UPC: + description: Universal Product Code + example: "783750005524" + type: string + customerpartnumber: + description: 'Customer’s designated part number ' + type: string + type: object + productSearchRequest_servicerequest_productsearchrequest: + properties: + searchcriteria: + $ref: '#/components/schemas/productSearchRequest_servicerequest_productsearchrequest_searchcriteria' + type: object + productSearchRequest_servicerequest: + properties: + requestpreamble: + $ref: '#/components/schemas/productSearchRequest_servicerequest_requestpreamble' + productsearchrequest: + $ref: '#/components/schemas/productSearchRequest_servicerequest_productsearchrequest' + type: object + multiSKUPriceAndStockResponse_serviceresponse_priceandstockresponse_details_inner_warehousedetails_inner: + example: + onholdquantity: onholdquantity + warehouseid: 10-Mira Loma CA + warehousedescription: warehousedescription + onorderquantity: 1 + etadate: etadate + availablequantity: 6 + properties: + warehouseid: + description: Unique 2-digit code of the Ingram Micro warehouse + enum: + - 10-Mira Loma CA + - 20-Carrollton TX + - 30-Millington TN + - 40-Carol Stream IL + - 80-Jonestown PA + type: string + warehousedescription: + description: City of the Ingram Micro warehouse location + type: string + availablequantity: + description: On hand available quantity + type: integer + onorderquantity: + description: On Order quantity + type: integer + onholdquantity: + type: string + etadate: + type: string + type: object + multiSKUPriceAndStockResponse_serviceresponse_priceandstockresponse_details_inner: + example: + customerprice: customerprice + vendorpartnumber: vendorpartnumber + warehousedetails: + - onholdquantity: onholdquantity + warehouseid: 10-Mira Loma CA + warehousedescription: warehousedescription + onorderquantity: 1 + etadate: etadate + availablequantity: 6 + - onholdquantity: onholdquantity + warehouseid: 10-Mira Loma CA + warehousedescription: warehousedescription + onorderquantity: 1 + etadate: etadate + availablequantity: 6 + itemstatus: itemstatus + extendedvendorpartnumber: extendedvendorpartnumber + mediacpu: mediacpu + skustatus: skustatus + cpucode: cpucode + newmedia: newmedia + categorysubcategory: categorysubcategory + skuauthorized: skuauthorized + statusmessage: statusmessage + globalskuid: globalskuid + retailprice: 0.8008281904610115 + enduserrequired: Y-End user data required + ingrampartnumber: ingrampartnumber + vendornumber: vendornumber + partdescription1: partdescription1 + partdescription2: partdescription2 + vendorname: vendorname + class: A-Stocked product in all IM warehouses + backorderflag: Y- Can be backordered + properties: + itemstatus: + type: string + statusmessage: + type: string + ingrampartnumber: + description: SKU number for the product for which order needs to be created + with Ingram Micro + maxLength: 6 + type: string + vendorpartnumber: + description: Vendor Part number for the product + maxLength: 21 + type: string + globalskuid: + type: string + customerprice: + description: "Customer specific price for the product, excluding taxes" + type: string + partdescription1: + description: Description on the part number that is being requested + type: string + partdescription2: + description: Contuiation of description on the part number that is being + requested + type: string + vendornumber: + description: Internal four digit code assigned by Ingram + maxLength: 4 + type: string + vendorname: + description: Name of the vendor + type: string + cpucode: + description: Ingram internal code for a product + maxLength: 6 + type: string + class: + description: Ingram Micro assigned product classification. + enum: + - A-Stocked product in all IM warehouses + - B-Limited stock in IM warehouses + - C-Stocked in fewer wareshouses + - D-Ingram discontinued + - E-Planned to be phased out as per the vendor + - F-Carried for specific customer as per the contract + - N-New SKU + - O-Discontinued to be liquidated + - S-Order for specialized demand + - V-Discontinued by vendor + - X-Direct Ship products from vendor + maxLength: 1 + type: string + skustatus: + description: Identifies if the SKU has been discontinued. Rules must be + defined on the values to be sent out to partner. + maxLength: 1 + type: string + mediacpu: + type: string + categorysubcategory: + description: Ingram's internal categorization of the product + type: string + retailprice: + description: MSRP Price 0.00 + type: number + newmedia: + description: Internal four-digit code assigned by Ingram to represent the + item group + type: string + enduserrequired: + description: Y - End user required N - Not required End user + enum: + - Y-End user data required + - N-End user data not required + maxLength: 1 + type: string + backorderflag: + description: Y- Allow Backorder Flag N- Not allowed + enum: + - Y- Can be backordered + - N-Cannot be backordered + maxLength: 1 + type: string + skuauthorized: + type: string + extendedvendorpartnumber: + type: string + warehousedetails: + items: + $ref: '#/components/schemas/multiSKUPriceAndStockResponse_serviceresponse_priceandstockresponse_details_inner_warehousedetails_inner' + type: array + required: + - retailprice + type: object + multiSKUPriceAndStockResponse_serviceresponse_priceandstockresponse: + example: + details: + - customerprice: customerprice + vendorpartnumber: vendorpartnumber + warehousedetails: + - onholdquantity: onholdquantity + warehouseid: 10-Mira Loma CA + warehousedescription: warehousedescription + onorderquantity: 1 + etadate: etadate + availablequantity: 6 + - onholdquantity: onholdquantity + warehouseid: 10-Mira Loma CA + warehousedescription: warehousedescription + onorderquantity: 1 + etadate: etadate + availablequantity: 6 + itemstatus: itemstatus + extendedvendorpartnumber: extendedvendorpartnumber + mediacpu: mediacpu + skustatus: skustatus + cpucode: cpucode + newmedia: newmedia + categorysubcategory: categorysubcategory + skuauthorized: skuauthorized + statusmessage: statusmessage + globalskuid: globalskuid + retailprice: 0.8008281904610115 + enduserrequired: Y-End user data required + ingrampartnumber: ingrampartnumber + vendornumber: vendornumber + partdescription1: partdescription1 + partdescription2: partdescription2 + vendorname: vendorname + class: A-Stocked product in all IM warehouses + backorderflag: Y- Can be backordered + - customerprice: customerprice + vendorpartnumber: vendorpartnumber + warehousedetails: + - onholdquantity: onholdquantity + warehouseid: 10-Mira Loma CA + warehousedescription: warehousedescription + onorderquantity: 1 + etadate: etadate + availablequantity: 6 + - onholdquantity: onholdquantity + warehouseid: 10-Mira Loma CA + warehousedescription: warehousedescription + onorderquantity: 1 + etadate: etadate + availablequantity: 6 + itemstatus: itemstatus + extendedvendorpartnumber: extendedvendorpartnumber + mediacpu: mediacpu + skustatus: skustatus + cpucode: cpucode + newmedia: newmedia + categorysubcategory: categorysubcategory + skuauthorized: skuauthorized + statusmessage: statusmessage + globalskuid: globalskuid + retailprice: 0.8008281904610115 + enduserrequired: Y-End user data required + ingrampartnumber: ingrampartnumber + vendornumber: vendornumber + partdescription1: partdescription1 + partdescription2: partdescription2 + vendorname: vendorname + class: A-Stocked product in all IM warehouses + backorderflag: Y- Can be backordered + properties: + details: + items: + $ref: '#/components/schemas/multiSKUPriceAndStockResponse_serviceresponse_priceandstockresponse_details_inner' + type: array + type: object + multiSKUPriceAndStockResponse_serviceresponse: + example: + priceandstockresponse: + details: + - customerprice: customerprice + vendorpartnumber: vendorpartnumber + warehousedetails: + - onholdquantity: onholdquantity + warehouseid: 10-Mira Loma CA + warehousedescription: warehousedescription + onorderquantity: 1 + etadate: etadate + availablequantity: 6 + - onholdquantity: onholdquantity + warehouseid: 10-Mira Loma CA + warehousedescription: warehousedescription + onorderquantity: 1 + etadate: etadate + availablequantity: 6 + itemstatus: itemstatus + extendedvendorpartnumber: extendedvendorpartnumber + mediacpu: mediacpu + skustatus: skustatus + cpucode: cpucode + newmedia: newmedia + categorysubcategory: categorysubcategory + skuauthorized: skuauthorized + statusmessage: statusmessage + globalskuid: globalskuid + retailprice: 0.8008281904610115 + enduserrequired: Y-End user data required + ingrampartnumber: ingrampartnumber + vendornumber: vendornumber + partdescription1: partdescription1 + partdescription2: partdescription2 + vendorname: vendorname + class: A-Stocked product in all IM warehouses + backorderflag: Y- Can be backordered + - customerprice: customerprice + vendorpartnumber: vendorpartnumber + warehousedetails: + - onholdquantity: onholdquantity + warehouseid: 10-Mira Loma CA + warehousedescription: warehousedescription + onorderquantity: 1 + etadate: etadate + availablequantity: 6 + - onholdquantity: onholdquantity + warehouseid: 10-Mira Loma CA + warehousedescription: warehousedescription + onorderquantity: 1 + etadate: etadate + availablequantity: 6 + itemstatus: itemstatus + extendedvendorpartnumber: extendedvendorpartnumber + mediacpu: mediacpu + skustatus: skustatus + cpucode: cpucode + newmedia: newmedia + categorysubcategory: categorysubcategory + skuauthorized: skuauthorized + statusmessage: statusmessage + globalskuid: globalskuid + retailprice: 0.8008281904610115 + enduserrequired: Y-End user data required + ingrampartnumber: ingrampartnumber + vendornumber: vendornumber + partdescription1: partdescription1 + partdescription2: partdescription2 + vendorname: vendorname + class: A-Stocked product in all IM warehouses + backorderflag: Y- Can be backordered + responsepreamble: + statuscode: statuscode + responsemessage: responsemessage + responsestatus: responsestatus + properties: + responsepreamble: + $ref: '#/components/schemas/priceAndAvailabilityResponse_serviceresponse_responsepreamble' + priceandstockresponse: + $ref: '#/components/schemas/multiSKUPriceAndStockResponse_serviceresponse_priceandstockresponse' + type: object + multiSKUPriceAndStockRequest_servicerequest_requestpreamble: + properties: + isocountrycode: + description: |- + 2 Digit code + “US”-United States + “CA”-Canada + example: US + maxLength: 2 + minLength: 2 + type: string + customernumber: + description: |- + Ingram Micro customer number + 10-12389 + example: 20-222222 + type: string + required: + - customernumber + - isocountrycode + type: object + multiSKUPriceAndStockRequest_servicerequest_priceandstockrequest_item: + properties: + index: + type: integer + ingrampartnumber: + description: Ingram Micro system specific SKU number for the product for + which the price is requested at Ingram Micro + type: string + vendorpartnumber: + description: Vendor Part Number for the product for which the price is requested + at Ingram Micro + type: string + UPC: + description: Universal Product code for the product for which the price + is requested at Ingram Micro + type: string + customerpartnumber: + description: 'Unique identification number of customer. For this option + the Ingram Micro Sales rep must set up a cross reference table. ' + type: string + warehouseidlist: + description: Unique identity for Ingram Micro warehouses against which stock + details are returned. + type: string + type: object + multiSKUPriceAndStockRequest_servicerequest_priceandstockrequest: + properties: + showwarehouseavailability: + description: True/false to show the availability of individual warehouses + type: string + extravailabilityflag: + description: Y/N to show extra availability flag + type: string + includeallsystems: + description: "Flag to indicate if the price and stock information is required\ + \ for all Ingram Micro systems. If it is set to true, the price and stock\ + \ details will be returned from all Ingram Micro systems and if false,\ + \ the price and stock will have returned from the system where the reseller\ + \ number is set up in." + type: boolean + item: + $ref: '#/components/schemas/multiSKUPriceAndStockRequest_servicerequest_priceandstockrequest_item' + type: object + multiSKUPriceAndStockRequest_servicerequest: + properties: + requestpreamble: + $ref: '#/components/schemas/multiSKUPriceAndStockRequest_servicerequest_requestpreamble' + priceandstockrequest: + $ref: '#/components/schemas/multiSKUPriceAndStockRequest_servicerequest_priceandstockrequest' + type: object + invoiceDetailRequest_servicerequest_requestpreamble: + properties: + isocountrycode: + type: string + customernumber: + type: string + required: + - customernumber + - isocountrycode + type: object + invoiceDetailRequest_servicerequest_invoicedetailrequest: + properties: + invoicenumber: + type: string + required: + - invoicenumber + type: object + invoiceDetailRequest_servicerequest: + properties: + requestpreamble: + $ref: '#/components/schemas/invoiceDetailRequest_servicerequest_requestpreamble' + invoicedetailrequest: + $ref: '#/components/schemas/invoiceDetailRequest_servicerequest_invoicedetailrequest' + type: object + invoiceDetailResponse_serviceresponse_invoicedetailresponse: + example: + customernumber: customernumber + freightamount: 5.637376656633329 + creditmemoreasoncode: creditmemoreasoncode + paymentterms: paymentterms + carrierdescription: carrierdescription + invoicetype: invoicetype + orderdate: orderdate + freightforwardercode: freightforwardercode + customerfreightamount: 0.8008281904610115 + taxtype: taxtype + billtosuffix: billtosuffix + carrier: carrier + enduserponumber: enduserponumber + totaltaxamount: 1.4658129805029452 + totalamount: 5.962133916683182 + discountamount: 2.3021358869347655 + shiptosuffix: shiptosuffix + customerordernumber: customerordernumber + invoicedate: 2000-01-23 + invoicenumber: invoicenumber + customerforeignfrightamt: 6.0274563 + properties: + customernumber: + type: string + invoicenumber: + type: string + invoicedate: + format: date + type: string + invoicetype: + type: string + customerordernumber: + type: string + customerfreightamount: + format: double + type: number + customerforeignfrightamt: + format: float + type: number + totaltaxamount: + format: double + type: number + totalamount: + format: double + type: number + shiptosuffix: + type: string + billtosuffix: + type: string + freightamount: + format: double + type: number + paymentterms: + type: string + orderdate: + type: string + carrier: + type: string + carrierdescription: + type: string + discountamount: + format: double + type: number + taxtype: + type: string + enduserponumber: + type: string + freightforwardercode: + type: string + creditmemoreasoncode: + type: string + type: object + invoiceDetailResponse_serviceresponse: + example: + invoicedetailresponse: + customernumber: customernumber + freightamount: 5.637376656633329 + creditmemoreasoncode: creditmemoreasoncode + paymentterms: paymentterms + carrierdescription: carrierdescription + invoicetype: invoicetype + orderdate: orderdate + freightforwardercode: freightforwardercode + customerfreightamount: 0.8008281904610115 + taxtype: taxtype + billtosuffix: billtosuffix + carrier: carrier + enduserponumber: enduserponumber + totaltaxamount: 1.4658129805029452 + totalamount: 5.962133916683182 + discountamount: 2.3021358869347655 + shiptosuffix: shiptosuffix + customerordernumber: customerordernumber + invoicedate: 2000-01-23 + invoicenumber: invoicenumber + customerforeignfrightamt: 6.0274563 + responsepreamble: + statuscode: statuscode + responsemessage: responsemessage + responsestatus: responsestatus + properties: + responsepreamble: + $ref: '#/components/schemas/InvoiceDetailResponse_serviceresponse_responsepreamble' + invoicedetailresponse: + $ref: '#/components/schemas/invoiceDetailResponse_serviceresponse_invoicedetailresponse' + type: object + orderModifyResponse_serviceresponse_responsepreamble: + example: + responsemessage: responsemessage + responsestatus: responsestatus + properties: + responsestatus: + type: string + responsemessage: + type: string + type: object + orderModifyResponse_serviceresponse_ordermodifyresponse: + example: + errortype: errortype + headerresponse: headerresponse + acktriggered: acktriggered + responseflag: responseflag + warncode: warncode + properties: + responseflag: + type: string + errortype: + type: string + acktriggered: + type: string + warncode: + type: string + headerresponse: + type: string + type: object + orderModifyResponse_serviceresponse: + example: + responsepreamble: + responsemessage: responsemessage + responsestatus: responsestatus + ordermodifyresponse: + errortype: errortype + headerresponse: headerresponse + acktriggered: acktriggered + responseflag: responseflag + warncode: warncode + properties: + responsepreamble: + $ref: '#/components/schemas/orderModifyResponse_serviceresponse_responsepreamble' + ordermodifyresponse: + $ref: '#/components/schemas/orderModifyResponse_serviceresponse_ordermodifyresponse' + type: object + orderModifyRequest_servicerequest_requestpreamble: + properties: + isocountrycode: + type: string + customernumber: + type: string + type: object + orderModifyRequest_servicerequest_ordermodifyrequest_shipto: + properties: + Id: + type: string + name: + type: string + addressline: + type: string + city: + type: string + state: + type: string + postalcode: + type: string + countrycode: + type: string + type: object + orderModifyRequest_servicerequest_ordermodifyrequest_headerdata: + properties: + actioncode: + type: string + shipviacode: + type: string + type: object + orderModifyRequest_servicerequest_ordermodifyrequest_linedata_inner: + properties: + addlineorupdateline: + type: string + linenumber: + type: string + customerlinenumber: + type: string + ingrampartnumber: + type: string + quantityordered: + type: integer + customerpartnumber: + type: string + linetype: + type: string + type: object + orderModifyRequest_servicerequest_ordermodifyrequest: + properties: + ingramorderbranch: + type: string + ingramordernumber: + type: string + ingramorderdist: + type: string + ingramordership: + type: string + customerponumber: + type: string + shipto: + $ref: '#/components/schemas/orderModifyRequest_servicerequest_ordermodifyrequest_shipto' + headerdata: + $ref: '#/components/schemas/orderModifyRequest_servicerequest_ordermodifyrequest_headerdata' + linedata: + items: + $ref: '#/components/schemas/orderModifyRequest_servicerequest_ordermodifyrequest_linedata_inner' + type: array + type: object + orderModifyRequest_servicerequest: + properties: + requestpreamble: + $ref: '#/components/schemas/orderModifyRequest_servicerequest_requestpreamble' + ordermodifyrequest: + $ref: '#/components/schemas/orderModifyRequest_servicerequest_ordermodifyrequest' + type: object + orderSearchRequest_servicerequest_requestpreamble: + properties: + isoCountryCode: + type: string + customerNumber: + type: string + required: + - customerNumber + - isoCountryCode + type: object + orderSearchRequest_servicerequest_orderLookupRequest_orderNumber: + properties: + entryDate: + type: string + orderBranch: + type: string + orderNumber: + type: string + distributionNumber: + type: string + shipmentNumber: + type: string + required: + - entryDate + - orderBranch + type: object + orderSearchRequest_servicerequest_orderLookupRequest_customerOrderNumber: + properties: + customerOrderNumber: + type: string + type: object + orderSearchRequest_servicerequest_orderLookupRequest: + properties: + orderNumber: + $ref: '#/components/schemas/orderSearchRequest_servicerequest_orderLookupRequest_orderNumber' + customerOrderNumber: + $ref: '#/components/schemas/orderSearchRequest_servicerequest_orderLookupRequest_customerOrderNumber' + type: object + orderSearchRequest_servicerequest: + properties: + requestpreamble: + $ref: '#/components/schemas/orderSearchRequest_servicerequest_requestpreamble' + orderLookupRequest: + $ref: '#/components/schemas/orderSearchRequest_servicerequest_orderLookupRequest' + required: + - requestpreamble + type: object + orderDeleteRequest_servicerequest_requestpreamble: + properties: + isocountrycode: + description: Country that Order is being place in. + type: string + customerNumber: + description: |- + Account number order will be billed to. + INGRAM MICRO ACCOUNT NUMBER REQUIRED + type: string + required: + - customerNumber + - isocountrycode + type: object + orderDeleteRequest_servicerequest_OrderDeleteRequestDetails: + properties: + entryDate: + description: Date order entered + example: 8/25/2018 + type: string + orderBranch: + description: Ingram Micro's first 2 numbers of the order number + type: string + orderNumber: + description: Ingram Micro's middle 6 numbers of the order# + type: string + rejectionCode: + type: string + distributionNumber: + description: Ingram Micro's suffix number of the order# + type: string + shipmentNumber: + description: Ingram Micro's last number of the order# + type: string + operatorID: + description: Ingram ID(not required) + type: string + required: + - entryDate + - orderBranch + - orderNumber + type: object + orderDeleteRequest_servicerequest: + properties: + requestpreamble: + $ref: '#/components/schemas/orderDeleteRequest_servicerequest_requestpreamble' + OrderDeleteRequestDetails: + $ref: '#/components/schemas/orderDeleteRequest_servicerequest_OrderDeleteRequestDetails' + required: + - requestpreamble + type: object + orderDetailRequest_servicerequest_orderdetailrequest: + properties: + ordernumber: + description: Ingram Micro Order Number + type: string + customerponumber: + type: string + orderdate: + type: string + systemid: + type: string + required: + - ordernumber + type: object + orderDetailRequest_servicerequest: + properties: + requestpreamble: + $ref: '#/components/schemas/invoiceDetailRequest_servicerequest_requestpreamble' + orderdetailrequest: + $ref: '#/components/schemas/orderDetailRequest_servicerequest_orderdetailrequest' + required: + - requestpreamble + type: object + quoteDetailsResponse_quoteDetailResponse_retrieveQuoteResponse: + example: + totalExtendedQuotePrice: totalExtendedQuotePrice + contactInfo: + contactEmail: contactEmail + contactName: contactName + revisionNumber: revisionNumber + priceDeviationExpiryDate: priceDeviationExpiryDate + priceDeviationStartDate: priceDeviationStartDate + leasingCalculations: leasingCalculations + totalQuantity: totalQuantity + quoteProductList: + - bidExpiryDate: bidExpiryDate + vpnCategory: vpnCategory + quantity: quantity + comments: comments + description: description + weight: weight + bidStartDate: bidStartDate + price: + quotePrice: 0.8008281904610115 + msrp: 6.027456183070403 + extendedQuotePrice: 5.962133916683182 + extendedMsrp: 1.4658129805029452 + quoteProductGuid: quoteProductGuid + vendorPartNumber: vendorPartNumber + sku: sku + lineNumber: lineNumber + quoteProductsSupplierPartAuxiliaryId: quoteProductsSupplierPartAuxiliaryId + quoteProductsVendor: quoteProductsVendor + isSuggestionProduct: isSuggestionProduct + - bidExpiryDate: bidExpiryDate + vpnCategory: vpnCategory + quantity: quantity + comments: comments + description: description + weight: weight + bidStartDate: bidStartDate + price: + quotePrice: 0.8008281904610115 + msrp: 6.027456183070403 + extendedQuotePrice: 5.962133916683182 + extendedMsrp: 1.4658129805029452 + quoteProductGuid: quoteProductGuid + vendorPartNumber: vendorPartNumber + sku: sku + lineNumber: lineNumber + quoteProductsSupplierPartAuxiliaryId: quoteProductsSupplierPartAuxiliaryId + quoteProductsVendor: quoteProductsVendor + isSuggestionProduct: isSuggestionProduct + totalQuoteProductCount: totalQuoteProductCount + modified: modified + vendorAttributes: + vendorSettingMessage: vendorSettingMessage + dealId: dealId + estimateId: estimateId + vendorName: vendorName + leasingInstructions: leasingInstructions + accountInfo: + accountName: accountName + phone: phone + bcn: bcn + totalExtendedMsrp: totalExtendedMsrp + introPreamble: introPreamble + legalTerms: legalTerms + created: created + solutionProposed: solutionProposed + quoteNumber: quoteNumber + quoteGuid: quoteGuid + endUser: + endUserContactName: endUserContactName + endUserZipCode: endUserZipCode + endUserMarketSegment: endUserMarketSegment + endUserCity: endUserCity + endUserName: endUserName + endUserAddress3: endUserAddress3 + endUserAddress2: endUserAddress2 + endUserPhone: endUserPhone + endUserAddress: endUserAddress + endUserState: endUserState + endUserEmail: endUserEmail + customerNeed: customerNeed + purchaseInstructions: purchaseInstructions + priceDeviationId: priceDeviationId + currencyCode: currencyCode + quoteExpiryDate: quoteExpiryDate + quoteName: quoteName + status: status + properties: + quoteGuid: + type: string + quoteName: + type: string + quoteNumber: + type: string + quoteExpiryDate: + type: string + revisionNumber: + type: string + introPreamble: + type: string + purchaseInstructions: + type: string + legalTerms: + type: string + currencyCode: + type: string + priceDeviationId: + type: string + priceDeviationStartDate: + type: string + priceDeviationExpiryDate: + type: string + customerNeed: + type: string + solutionProposed: + type: string + status: + type: string + created: + type: string + modified: + type: string + leasingCalculations: + type: string + leasingInstructions: + type: string + accountInfo: + $ref: '#/components/schemas/quoteDetails_quoteDetailResponse_retrieveQuoteResponse_accountInfo' + contactInfo: + $ref: '#/components/schemas/quoteDetails_quoteDetailResponse_retrieveQuoteResponse_contactInfo' + vendorAttributes: + $ref: '#/components/schemas/quoteDetails_quoteDetailResponse_retrieveQuoteResponse_vendorAttributes' + endUser: + $ref: '#/components/schemas/quoteDetails_quoteDetailResponse_retrieveQuoteResponse_endUser' + quoteProductList: + items: + $ref: '#/components/schemas/quoteProductList' + type: array + totalQuoteProductCount: + type: string + totalExtendedMsrp: + type: string + totalQuantity: + type: string + totalExtendedQuotePrice: + type: string + type: object + quoteDetailsResponse_quoteDetailResponse: + example: + retrieveQuoteResponse: + totalExtendedQuotePrice: totalExtendedQuotePrice + contactInfo: + contactEmail: contactEmail + contactName: contactName + revisionNumber: revisionNumber + priceDeviationExpiryDate: priceDeviationExpiryDate + priceDeviationStartDate: priceDeviationStartDate + leasingCalculations: leasingCalculations + totalQuantity: totalQuantity + quoteProductList: + - bidExpiryDate: bidExpiryDate + vpnCategory: vpnCategory + quantity: quantity + comments: comments + description: description + weight: weight + bidStartDate: bidStartDate + price: + quotePrice: 0.8008281904610115 + msrp: 6.027456183070403 + extendedQuotePrice: 5.962133916683182 + extendedMsrp: 1.4658129805029452 + quoteProductGuid: quoteProductGuid + vendorPartNumber: vendorPartNumber + sku: sku + lineNumber: lineNumber + quoteProductsSupplierPartAuxiliaryId: quoteProductsSupplierPartAuxiliaryId + quoteProductsVendor: quoteProductsVendor + isSuggestionProduct: isSuggestionProduct + - bidExpiryDate: bidExpiryDate + vpnCategory: vpnCategory + quantity: quantity + comments: comments + description: description + weight: weight + bidStartDate: bidStartDate + price: + quotePrice: 0.8008281904610115 + msrp: 6.027456183070403 + extendedQuotePrice: 5.962133916683182 + extendedMsrp: 1.4658129805029452 + quoteProductGuid: quoteProductGuid + vendorPartNumber: vendorPartNumber + sku: sku + lineNumber: lineNumber + quoteProductsSupplierPartAuxiliaryId: quoteProductsSupplierPartAuxiliaryId + quoteProductsVendor: quoteProductsVendor + isSuggestionProduct: isSuggestionProduct + totalQuoteProductCount: totalQuoteProductCount + modified: modified + vendorAttributes: + vendorSettingMessage: vendorSettingMessage + dealId: dealId + estimateId: estimateId + vendorName: vendorName + leasingInstructions: leasingInstructions + accountInfo: + accountName: accountName + phone: phone + bcn: bcn + totalExtendedMsrp: totalExtendedMsrp + introPreamble: introPreamble + legalTerms: legalTerms + created: created + solutionProposed: solutionProposed + quoteNumber: quoteNumber + quoteGuid: quoteGuid + endUser: + endUserContactName: endUserContactName + endUserZipCode: endUserZipCode + endUserMarketSegment: endUserMarketSegment + endUserCity: endUserCity + endUserName: endUserName + endUserAddress3: endUserAddress3 + endUserAddress2: endUserAddress2 + endUserPhone: endUserPhone + endUserAddress: endUserAddress + endUserState: endUserState + endUserEmail: endUserEmail + customerNeed: customerNeed + purchaseInstructions: purchaseInstructions + priceDeviationId: priceDeviationId + currencyCode: currencyCode + quoteExpiryDate: quoteExpiryDate + quoteName: quoteName + status: status + responsePreamble: + responseStatus: responseStatus + responseMessage: responseMessage + statusCode: statusCode + properties: + responsePreamble: + $ref: '#/components/schemas/quoteDetails_quoteDetailResponse_responsePreamble' + retrieveQuoteResponse: + $ref: '#/components/schemas/quoteDetailsResponse_quoteDetailResponse_retrieveQuoteResponse' + type: object + ValidateQuoteResponse_vmfAdditionalAttributes_inner: + example: + attributeValue: ABC1234 + attributeName: VEND_AUTH_NBR_FLG + attributeDescription: Authorization Number + properties: + attributeName: + description: The name of the header level field. + example: VEND_AUTH_NBR_FLG + type: string + attributeValue: + description: The value of the header level field. + example: ABC1234 + type: string + attributeDescription: + description: The description of the header level field. + example: Authorization Number + type: string + type: object + ValidateQuoteResponse_lines_inner_vmfAdditionalAttributesLines_inner: + example: + attributeValue: attributeValue + attributeName: attributeName + attributeDescription: attributeDescription + properties: + attributeName: + description: The name of the line level field. + type: string + attributeValue: + description: The value of the line level field. + type: string + attributeDescription: + description: The description of the line level field. + type: string + type: object + ValidateQuoteResponse_lines_inner: + example: + ingramPartNumber: YN6551 + vmfAdditionalAttributesLines: + - attributeValue: attributeValue + attributeName: attributeName + attributeDescription: attributeDescription + - attributeValue: attributeValue + attributeName: attributeName + attributeDescription: attributeDescription + quantity: "1" + customerLineNumber: "11" + properties: + customerLineNumber: + description: The reseller's line item number for reference in their system. + example: "11" + type: string + ingramPartNumber: + description: Unique Ingram Micro part number. + example: YN6551 + type: string + quantity: + description: The quantity of the line item. + example: "1" + type: string + vmfAdditionalAttributesLines: + description: The object containing the list of fields required at a line + level by the vendor. + items: + $ref: '#/components/schemas/ValidateQuoteResponse_lines_inner_vmfAdditionalAttributesLines_inner' + type: array + type: object + QuoteToOrderDetailsDTO_endUserInfo_inner: + example: + phoneNumber: phoneNumber + city: city + countryCode: countryCode + companyName: companyName + contact: contact + postalCode: postalCode + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + email: email + properties: + companyName: + description: The company name for the end user/customer. + type: string + contact: + description: The contact name for the end user/customer. + type: string + addressLine1: + description: The address line 1 for the end user/customer. + type: string + addressLine2: + description: The address line 2 for the end user/customer. + type: string + addressLine3: + description: The address line 3 for the end user/customer. + type: string + city: + description: The end user/customer's city. + type: string + state: + description: The end user/customer's state. + type: string + postalCode: + description: The end user/customer's zip or postal code. + type: string + countryCode: + description: The end user/customer's two character ISO country code. + type: string + email: + description: The end user/customer's phone number. + type: string + phoneNumber: + description: The end user/customer's phone number. + type: string + type: object + QuoteToOrderDetailsDTO_shipToInfo_inner: + example: + city: city + countryCode: countryCode + companyName: companyName + contact: contact + postalCode: postalCode + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + email: email + addressId: addressId + properties: + addressId: + description: The company contact provided by the reseller. + type: string + companyName: + description: The name of the company the order will be shipped to. + type: string + contact: + description: The contact name for the order will be shipped to. + type: string + addressLine1: + description: The address line 1 the order will be shipped to. + type: string + addressLine2: + description: The address line 2 the order will be shipped to. + type: string + addressLine3: + description: The address line 3 the order will be shipped to. + nullable: true + type: string + city: + description: The city the order will be shipped to. + type: string + state: + description: The state the order will be shipped to. + type: string + postalCode: + description: The zip or postal code the order will be shipped to. + type: string + countryCode: + description: The two-character ISO country code the order will be shipped + to. + type: string + email: + description: The company contact email address. + nullable: true + type: string + type: object + QuoteToOrderDetailsDTO_additionalAttributes_inner: + example: + attributeValue: attributeValue + attributeName: attributeName + properties: + attributeName: + description: "The attribute name. allowDuplicateCustomerOrderNumber: Allow\ + \ orders with duplicate customer PO numbers. Enables resellers to have\ + \ the same PO number for multiple orders. enableCommentsAsLines: It will\ + \ enable comments as lines." + type: string + attributeValue: + description: The attribute field data. + type: string + QuoteToOrderDetailsDTO_vmfadditionalAttributes_inner: + additionalProperties: false + example: + attributeValue: attributeValue + attributeName: attributeName + attributeDescription: attributeDescription + properties: + attributeName: + description: The name of the header level field. + type: string + attributeValue: + description: The value of the header level field. + type: string + attributeDescription: + description: The description of the header level field. + type: string + type: object + QuoteToOrderDetailsDTO_lines_inner: + example: + ingramPartNumber: ingramPartNumber + vmfAdditionalAttributesLines: + - attributeValue: attributeValue + attributeName: attributeName + attributeDescription: attributeDescription + - attributeValue: attributeValue + attributeName: attributeName + attributeDescription: attributeDescription + quantity: quantity + customerLineNumber: customerLineNumber + properties: + customerLineNumber: + description: The reseller's line item number for reference in their system. + type: string + ingramPartNumber: + description: Unique IngramMicro part number. + type: string + quantity: + description: The quantity of the line item. + type: string + vmfAdditionalAttributesLines: + description: The object containing the list of fields required at a line + level by the vendor. + items: + $ref: '#/components/schemas/ValidateQuoteResponse_lines_inner_vmfAdditionalAttributesLines_inner' + type: array + type: object + OrderDetailB2B_billToInfo: + additionalProperties: false + description: The billing information provided by the reseller. + example: + phoneNumber: phoneNumber + city: city + countryCode: countryCode + contact: contact + companyName: companyName + postalCode: postalCode + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + email: email + properties: + contact: + description: The company contact provided by the reseller. + type: string + companyName: + description: The name of the company the order will be billed to. + type: string + addressLine1: + description: The address line 1 the order will be billed to. + type: string + addressLine2: + description: The address line 2 the order will be billed to. + type: string + addressLine3: + description: The address line 3 the order will be billed to. + type: string + city: + description: The city the order will be billed to. + type: string + state: + description: The state the order will be billed to. + type: string + postalCode: + description: The zip or postal code the order will be billed to. + type: string + countryCode: + description: The two-character ISO country code the order will be billed + to. + type: string + phoneNumber: + description: The company contact phone number. + type: string + email: + description: The company contact email address. + type: string + type: object + OrderDetailB2B_shipToInfo: + additionalProperties: false + description: The shipping information provided by the reseller for order delivery. + example: + phoneNumber: phoneNumber + city: city + countryCode: countryCode + contact: contact + companyName: companyName + postalCode: postalCode + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + email: email + properties: + contact: + description: The company contact provided by the reseller. + type: string + companyName: + description: The name of the company the order will be shipped to. + type: string + addressLine1: + description: The address line 1 the order will be shipped to. + type: string + addressLine2: + description: The address line 2 the order will be shipped to. + type: string + addressLine3: + description: The address line 3 the order will be shipped to. + type: string + city: + description: The city the order will be shipped to. + type: string + state: + description: The state the order will be shipped to. + type: string + postalCode: + description: The zip or postal code the order will be shipped to. + type: string + countryCode: + description: The two-character ISO country code the order will be shipped + to. + type: string + phoneNumber: + description: The company contact phone number. + type: string + email: + description: The company contact email address. + type: string + type: object + OrderDetailB2B_endUserInfo: + additionalProperties: false + description: The contact information for the end user/customer provided by the + reseller. Used to determine pricing and discounts. + example: + phoneNumber: phoneNumber + city: city + countryCode: countryCode + contact: contact + companyName: companyName + postalCode: postalCode + addressLine1: addressLine1 + addressLine2: addressLine2 + addressLine3: addressLine3 + state: state + email: email + properties: + contact: + description: The contact name for the end user/customer. + type: string + companyName: + description: The company name for the end user/customer. + type: string + addressLine1: + description: The address line 1 for the end user/customer. + type: string + addressLine2: + description: The address line 2 for the end user/customer. + type: string + addressLine3: + description: The address line 3 for the end user/customer. + type: string + city: + description: The end user/customer's city. + type: string + state: + description: The end user/customer's state. + type: string + postalCode: + description: The end user/customer's zip or postal code. + type: string + countryCode: + description: The end user/customer's two character ISO country code. + type: string + phoneNumber: + description: The end user/customer's phone number. + type: string + email: + description: The end user/customer's email. + type: string + type: object + OrderDetailB2B_lines_inner_shipmentDetails_inner_carrierDetails_inner_trackingDetails_inner_serialNumbers_inner: + additionalProperties: false + example: + serialNumber: serialNumber + properties: + serialNumber: + description: The serial number for the line item. + type: string + type: object + OrderDetailB2B_lines_inner_shipmentDetails_inner_carrierDetails_inner_trackingDetails_inner: + additionalProperties: false + example: + quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + properties: + trackingNumber: + description: The tracking number for the shipment containing the line item. + type: string + trackingUrl: + description: The tracking URL for the shipment containing the line item. + type: string + packageWeight: + description: The weight of the package for the line item. + type: string + cartonNumber: + description: The shipment carton number that contains the line item. + type: string + quantityInBox: + description: The quantity of line items in the box. + type: string + serialNumbers: + description: A list of serial numbers of the line items contained in the + shipment. + items: + $ref: '#/components/schemas/OrderDetailB2B_lines_inner_shipmentDetails_inner_carrierDetails_inner_trackingDetails_inner_serialNumbers_inner' + nullable: true + type: array + type: object + OrderDetailB2B_lines_inner_shipmentDetails_inner_carrierDetails_inner: + additionalProperties: false + example: + deliveredDate: deliveredDate + carrierPickupDate: carrierPickupDate + quantity: 1 + carrierName: carrierName + carrierCode: carrierCode + trackingDetails: + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + shippedDate: shippedDate + estimatedDeliveryDate: estimatedDeliveryDate + properties: + carrierCode: + description: The carrier code for the shipment containing the line item. + type: string + carrierName: + description: The name of the carrier of the shipment containing the line + item. + type: string + quantity: + description: The quantity shipped of the line item. + format: int32 + type: integer + shippedDate: + description: The actual date when line item shipped. + type: string + estimatedDeliveryDate: + description: The date the line item is expected to be delivered. + type: string + deliveredDate: + description: The actual date of delivery of the line item. + type: string + carrierPickupDate: + description: The actual date when carrier picked up line item. + type: string + trackingDetails: + description: The tracking details for the shipment containing the line item. + items: + $ref: '#/components/schemas/OrderDetailB2B_lines_inner_shipmentDetails_inner_carrierDetails_inner_trackingDetails_inner' + nullable: true + type: array + type: object + OrderDetailB2B_lines_inner_shipmentDetails_inner: + additionalProperties: false + example: + quantity: 1 + invoiceNumber: invoiceNumber + estimatedShipDate: estimatedShipDate + invoiceDate: invoiceDate + deliveryNumber: deliveryNumber + shipFromWarehouseId: shipFromWarehouseId + carrierDetails: + - deliveredDate: deliveredDate + carrierPickupDate: carrierPickupDate + quantity: 1 + carrierName: carrierName + carrierCode: carrierCode + trackingDetails: + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + shippedDate: shippedDate + estimatedDeliveryDate: estimatedDeliveryDate + - deliveredDate: deliveredDate + carrierPickupDate: carrierPickupDate + quantity: 1 + carrierName: carrierName + carrierCode: carrierCode + trackingDetails: + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + shippedDate: shippedDate + estimatedDeliveryDate: estimatedDeliveryDate + shipFromLocation: shipFromLocation + properties: + quantity: + description: The quantity shipped of the line item. + format: int32 + type: integer + deliveryNumber: + description: The actual date of delivery of the line item. + type: string + estimatedShipDate: + description: The date the line item is expected to be shipped. + type: string + shipFromWarehouseId: + description: The ID of the warehouse the product will ship from. + type: string + shipFromLocation: + description: The city and state the line item ships from. + type: string + invoiceNumber: + description: The Ingram Micro invoice number for the line item. + type: string + invoiceDate: + description: The date the IngramMicro invoice was created for the line item. + type: string + carrierDetails: + description: The shipment carrier details for the line item. + items: + $ref: '#/components/schemas/OrderDetailB2B_lines_inner_shipmentDetails_inner_carrierDetails_inner' + nullable: true + type: array + type: object + OrderDetailB2B_lines_inner_serviceContractInfo_contractInfo: + additionalProperties: false + example: + contractStatus: contractStatus + contractDuration: contractDuration + contractStartDate: contractStartDate + contractEndDate: contractEndDate + contractDescription: contractDescription + contractNumber: contractNumber + properties: + contractDescription: + description: The description of the contract. + type: string + contractNumber: + description: Contract number. + type: string + contractStatus: + description: The status of the contract. + type: string + contractStartDate: + description: Start date of the contract. + type: string + contractEndDate: + description: End date of the contract. + type: string + contractDuration: + description: The duration of the contract. + type: string + type: object + OrderDetailB2B_lines_inner_serviceContractInfo_subscriptions: + additionalProperties: false + example: + renewalTerm: renewalTerm + subcriptionEndDate: subcriptionEndDate + billingModel: billingModel + subscriptionTerm: subscriptionTerm + subscriptionId: subscriptionId + subcriptionStartDate: subcriptionStartDate + properties: + subscriptionId: + description: The ID of the subscription. + type: string + subscriptionTerm: + description: The term of the subscription. + type: string + renewalTerm: + description: The renewal term of the subscription. + type: string + billingModel: + description: The billing model of the billing. + type: string + subcriptionStartDate: + description: Start date of the subcription. + type: string + subcriptionEndDate: + description: End date of the subcription. + type: string + type: object + OrderDetailB2B_lines_inner_serviceContractInfo_licenseInfo: + additionalProperties: false + example: + quantity: quantity + licenseStartDate: licenseStartDate + description: description + licenseNumber: + - licenseNumber + - licenseNumber + licenseEndDate: licenseEndDate + properties: + licenseNumber: + description: License numbers. + items: + type: string + nullable: true + type: array + licenseStartDate: + description: Start Date of the license. + type: string + licenseEndDate: + description: End Date of the license. + type: string + description: + description: Description of the license. + type: string + quantity: + description: Quantity of the license. + type: string + type: object + OrderDetailB2B_lines_inner_serviceContractInfo: + additionalProperties: false + example: + subscriptions: + renewalTerm: renewalTerm + subcriptionEndDate: subcriptionEndDate + billingModel: billingModel + subscriptionTerm: subscriptionTerm + subscriptionId: subscriptionId + subcriptionStartDate: subcriptionStartDate + contractInfo: + contractStatus: contractStatus + contractDuration: contractDuration + contractStartDate: contractStartDate + contractEndDate: contractEndDate + contractDescription: contractDescription + contractNumber: contractNumber + licenseInfo: + quantity: quantity + licenseStartDate: licenseStartDate + description: description + licenseNumber: + - licenseNumber + - licenseNumber + licenseEndDate: licenseEndDate + properties: + contractInfo: + $ref: '#/components/schemas/OrderDetailB2B_lines_inner_serviceContractInfo_contractInfo' + subscriptions: + $ref: '#/components/schemas/OrderDetailB2B_lines_inner_serviceContractInfo_subscriptions' + licenseInfo: + $ref: '#/components/schemas/OrderDetailB2B_lines_inner_serviceContractInfo_licenseInfo' + type: object + OrderDetailB2B_lines_inner_additionalAttributes_inner: + additionalProperties: false + example: + attributeValue: attributeValue + attributeName: attributeName + properties: + attributeName: + description: Line level custom field names. + type: string + attributeValue: + description: Value of the custom fields. + type: string + type: object + OrderDetailB2B_lines_inner_links_inner: + additionalProperties: false + description: Link to Order Details for the line item. + example: + topic: topic + href: href + type: type + properties: + topic: + description: Provides the details of the line item. + type: string + href: + description: The API endpoint for accessing the relevant data. + type: string + type: + description: "The type of call that can be made to the href link(GET,POST\ + \ etc)." + type: string + type: object + OrderDetailB2B_lines_inner_estimatedDates_inner_ship_shipDateRange: + example: + endDate: endDate + startDate: startDate + properties: + startDate: + description: Start Date. + type: string + endDate: + description: End Date. + type: string + type: object + OrderDetailB2B_lines_inner_estimatedDates_inner_ship: + example: + shipDateRange: + endDate: endDate + startDate: startDate + shipSource: shipSource + shipDate: shipDate + shipDateType: shipDateType + shipDescription: shipDescription + properties: + shipDateType: + description: Date type. Example Single or multiple dates. + type: string + shipDateRange: + $ref: '#/components/schemas/OrderDetailB2B_lines_inner_estimatedDates_inner_ship_shipDateRange' + shipSource: + description: Source of the shipment. + type: string + shipDescription: + description: Shipment description. + type: string + shipDate: + description: Ship date. + type: string + type: object + OrderDetailB2B_lines_inner_estimatedDates_inner_delivery_deliveryDateRange: + description: Delivery date range. + example: + endDate: endDate + startDate: startDate + properties: + startDate: + description: Start Date. + type: string + endDate: + description: End Date. + type: string + OrderDetailB2B_lines_inner_estimatedDates_inner_delivery: + example: + deliveredDate: deliveredDate + deliveryDescription: deliveryDescription + deliveryDateType: deliveryDateType + deliverySource: deliverySource + deliveryDateRange: + endDate: endDate + startDate: startDate + properties: + deliveryDateType: + description: Date type. Example Single or multiple dates. + type: string + deliveryDateRange: + $ref: '#/components/schemas/OrderDetailB2B_lines_inner_estimatedDates_inner_delivery_deliveryDateRange' + deliverySource: + description: Source of the delivery. + type: string + deliveryDescription: + description: Delivery description. + type: string + deliveredDate: + description: Delivery date. + type: string + type: object + OrderDetailB2B_lines_inner_estimatedDates_inner: + example: + delivery: + deliveredDate: deliveredDate + deliveryDescription: deliveryDescription + deliveryDateType: deliveryDateType + deliverySource: deliverySource + deliveryDateRange: + endDate: endDate + startDate: startDate + ship: + shipDateRange: + endDate: endDate + startDate: startDate + shipSource: shipSource + shipDate: shipDate + shipDateType: shipDateType + shipDescription: shipDescription + properties: + ship: + $ref: '#/components/schemas/OrderDetailB2B_lines_inner_estimatedDates_inner_ship' + delivery: + $ref: '#/components/schemas/OrderDetailB2B_lines_inner_estimatedDates_inner_delivery' + type: object + OrderDetailB2B_lines_inner_scheduleLines_inner: + example: + goodsIssueDate: goodsIssueDate + scheduleLineDate: scheduleLineDate + requestedQuantity: requestedQuantity + lineNumber: lineNumber + confirmedQuantity: confirmedQuantity + properties: + lineNumber: + description: Line number. + type: string + scheduleLineDate: + description: schedule Line Date. + type: string + requestedQuantity: + description: Requested quantity. + type: string + confirmedQuantity: + description: Confirmed quantity. + type: string + goodsIssueDate: + description: Date when good issued. + type: string + type: object + OrderDetailB2B_lines_inner_multipleShipments_inner: + example: + date: date + dateRange: + endDate: endDate + startDate: startDate + dataType: dataType + requestedQuantity: requestedQuantity + description: description + source: source + lineNumber: lineNumber + deliveryDate: deliveryDate + confirmedQuantity: confirmedQuantity + properties: + lineNumber: + description: Line number. + type: string + requestedQuantity: + description: Requested quantity. + type: string + confirmedQuantity: + description: Confirmed quantity. + type: string + dataType: + description: Date type. Example Single or multiple dates. + type: string + dateRange: + $ref: '#/components/schemas/OrderDetailB2B_lines_inner_estimatedDates_inner_ship_shipDateRange' + source: + description: Source. + type: string + description: + description: Description. + type: string + date: + description: Date. + type: string + deliveryDate: + description: Delivery date. + type: string + type: object + OrderDetailB2B_lines_inner: + additionalProperties: false + example: + unitWeight: 2.3021358869347655 + vendorSalesOrderLineNumber: vendorSalesOrderLineNumber + requestedDeliverydate: requestedDeliverydate + multipleShipments: + - date: date + dateRange: + endDate: endDate + startDate: startDate + dataType: dataType + requestedQuantity: requestedQuantity + description: description + source: source + lineNumber: lineNumber + deliveryDate: deliveryDate + confirmedQuantity: confirmedQuantity + - date: date + dateRange: + endDate: endDate + startDate: startDate + dataType: dataType + requestedQuantity: requestedQuantity + description: description + source: source + lineNumber: lineNumber + deliveryDate: deliveryDate + confirmedQuantity: confirmedQuantity + quantityOrdered: 2 + customerLineNumber: customerLineNumber + lineStatus: lineStatus + extendedPrice: 9.301444243932576 + scheduleLines: + - goodsIssueDate: goodsIssueDate + scheduleLineDate: scheduleLineDate + requestedQuantity: requestedQuantity + lineNumber: lineNumber + confirmedQuantity: confirmedQuantity + - goodsIssueDate: goodsIssueDate + scheduleLineDate: scheduleLineDate + requestedQuantity: requestedQuantity + lineNumber: lineNumber + confirmedQuantity: confirmedQuantity + vendorPartNumber: vendorPartNumber + links: + - topic: topic + href: href + type: type + - topic: topic + href: href + type: type + upcCode: upcCode + ingramPartNumber: ingramPartNumber + unitPrice: 7.061401241503109 + ingramOrderLineNumber: ingramOrderLineNumber + estimatedDates: + - delivery: + deliveredDate: deliveredDate + deliveryDescription: deliveryDescription + deliveryDateType: deliveryDateType + deliverySource: deliverySource + deliveryDateRange: + endDate: endDate + startDate: startDate + ship: + shipDateRange: + endDate: endDate + startDate: startDate + shipSource: shipSource + shipDate: shipDate + shipDateType: shipDateType + shipDescription: shipDescription + - delivery: + deliveredDate: deliveredDate + deliveryDescription: deliveryDescription + deliveryDateType: deliveryDateType + deliverySource: deliverySource + deliveryDateRange: + endDate: endDate + startDate: startDate + ship: + shipDateRange: + endDate: endDate + startDate: startDate + shipSource: shipSource + shipDate: shipDate + shipDateType: shipDateType + shipDescription: shipDescription + serviceContractInfo: + subscriptions: + renewalTerm: renewalTerm + subcriptionEndDate: subcriptionEndDate + billingModel: billingModel + subscriptionTerm: subscriptionTerm + subscriptionId: subscriptionId + subcriptionStartDate: subcriptionStartDate + contractInfo: + contractStatus: contractStatus + contractDuration: contractDuration + contractStartDate: contractStartDate + contractEndDate: contractEndDate + contractDescription: contractDescription + contractNumber: contractNumber + licenseInfo: + quantity: quantity + licenseStartDate: licenseStartDate + description: description + licenseNumber: + - licenseNumber + - licenseNumber + licenseEndDate: licenseEndDate + vendorName: vendorName + lineNotes: lineNotes + quantityBackOrdered: 7 + specialBidNumber: specialBidNumber + shipmentDetails: + - quantity: 1 + invoiceNumber: invoiceNumber + estimatedShipDate: estimatedShipDate + invoiceDate: invoiceDate + deliveryNumber: deliveryNumber + shipFromWarehouseId: shipFromWarehouseId + carrierDetails: + - deliveredDate: deliveredDate + carrierPickupDate: carrierPickupDate + quantity: 1 + carrierName: carrierName + carrierCode: carrierCode + trackingDetails: + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + shippedDate: shippedDate + estimatedDeliveryDate: estimatedDeliveryDate + - deliveredDate: deliveredDate + carrierPickupDate: carrierPickupDate + quantity: 1 + carrierName: carrierName + carrierCode: carrierCode + trackingDetails: + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + shippedDate: shippedDate + estimatedDeliveryDate: estimatedDeliveryDate + shipFromLocation: shipFromLocation + - quantity: 1 + invoiceNumber: invoiceNumber + estimatedShipDate: estimatedShipDate + invoiceDate: invoiceDate + deliveryNumber: deliveryNumber + shipFromWarehouseId: shipFromWarehouseId + carrierDetails: + - deliveredDate: deliveredDate + carrierPickupDate: carrierPickupDate + quantity: 1 + carrierName: carrierName + carrierCode: carrierCode + trackingDetails: + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + shippedDate: shippedDate + estimatedDeliveryDate: estimatedDeliveryDate + - deliveredDate: deliveredDate + carrierPickupDate: carrierPickupDate + quantity: 1 + carrierName: carrierName + carrierCode: carrierCode + trackingDetails: + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + - quantityInBox: quantityInBox + trackingUrl: trackingUrl + packageWeight: packageWeight + cartonNumber: cartonNumber + serialNumbers: + - serialNumber: serialNumber + - serialNumber: serialNumber + trackingNumber: trackingNumber + shippedDate: shippedDate + estimatedDeliveryDate: estimatedDeliveryDate + shipFromLocation: shipFromLocation + promisedDeliveryDate: promisedDeliveryDate + subOrderNumber: subOrderNumber + partDescription: partDescription + quantityConfirmed: 4 + weightUom: weightUom + taxAmount: 3.616076749251911 + currencyCode: currencyCode + additionalAttributes: + - attributeValue: attributeValue + attributeName: attributeName + - attributeValue: attributeValue + attributeName: attributeName + properties: + subOrderNumber: + description: The sub order number. The two-digit prefix is the warehouse + code of the warehouse nearest the reseller. The middle number is the order + number. The two-digit suffix is the sub order number. + type: string + ingramOrderLineNumber: + description: Unique Ingram Micro line number. Starts with 001. + type: string + vendorSalesOrderLineNumber: + description: The vendor's sales order line number. + type: string + customerLineNumber: + description: The reseller's line item number for reference in their system. + type: string + lineStatus: + description: "The status for the line item in the order. One of- Backordered,\ + \ In Progress, Shipped, Delivered, Canceled, On Hold." + type: string + ingramPartNumber: + description: Unique IngramMicro part number. + type: string + vendorPartNumber: + description: The vendor's part number for the line item. + type: string + vendorName: + description: The vendor's name for the part in their system. + type: string + partDescription: + description: The vendor's description of the part in their system. + type: string + unitWeight: + description: The unit weight of the line item. + format: double + type: number + weightUom: + description: The unit of measure for the line item. + type: string + unitPrice: + description: The unit price of the line item. + format: double + type: number + upcCode: + description: The UPC code of a product. + type: string + extendedPrice: + description: Unit price X quantity for the line item. + format: double + type: number + taxAmount: + description: The tax amount for the line item. + format: double + type: number + currencyCode: + description: The country-specific three character ISO 4217 currency code + for the line item. + type: string + quantityOrdered: + description: The quantity ordered of the line item. + format: int32 + type: integer + quantityConfirmed: + description: The quantity confirmed for the line item. + format: int32 + type: integer + quantityBackOrdered: + description: The quantity backordered for the line item. + format: int32 + type: integer + specialBidNumber: + description: The line-level bid number provided to the reseller by the vendor + for special pricing and discounts. Used to track the bid number in the + case of split orders or where different line items have different bid + numbers. Line-level bid numbers take precedence over header-level bid + numbers. + type: string + requestedDeliverydate: + description: Reseller-requested delivery date. Delivery date is not guaranteed. + type: string + promisedDeliveryDate: + description: The delivery date promised by IngramMicro. + type: string + lineNotes: + description: Line-level notes for the order. + type: string + shipmentDetails: + description: Shipping details for the line item. + items: + $ref: '#/components/schemas/OrderDetailB2B_lines_inner_shipmentDetails_inner' + nullable: true + type: array + serviceContractInfo: + $ref: '#/components/schemas/OrderDetailB2B_lines_inner_serviceContractInfo' + additionalAttributes: + items: + $ref: '#/components/schemas/OrderDetailB2B_lines_inner_additionalAttributes_inner' + nullable: true + type: array + links: + items: + $ref: '#/components/schemas/OrderDetailB2B_lines_inner_links_inner' + nullable: true + type: array + estimatedDates: + items: + $ref: '#/components/schemas/OrderDetailB2B_lines_inner_estimatedDates_inner' + type: array + scheduleLines: + items: + $ref: '#/components/schemas/OrderDetailB2B_lines_inner_scheduleLines_inner' + type: array + multipleShipments: + items: + $ref: '#/components/schemas/OrderDetailB2B_lines_inner_multipleShipments_inner' + type: array + type: object + OrderDetailB2B_miscellaneousCharges_inner: + additionalProperties: false + example: + chargeLineReference: chargeLineReference + subOrderNumber: subOrderNumber + chargeAmount: chargeAmount + chargeDescription: chargeDescription + properties: + subOrderNumber: + description: The sub order number. The two-digit prefix is the warehouse + code of the warehouse nearest the reseller. The middle number is the order + number. The two-digit suffix is the sub order number. + type: string + chargeLineReference: + description: Impulse line number for the miscellaneous charge. + type: string + chargeDescription: + description: Description of the miscellaneous charges. + type: string + chargeAmount: + description: The amount of miscellaneous charges. + type: string + type: object + OrderDetailB2B_additionalAttributes_inner: + additionalProperties: false + example: + attributeValue: attributeValue + attributeName: attributeName + properties: + attributeName: + description: Header level custom field names. + type: string + attributeValue: + description: Value of the custom fields. + type: string + type: object + securitySchemes: + application: + description: "" + flows: + clientCredentials: + scopes: + write: allows modifying resources + read: allows reading resources + tokenUrl: https://api.ingrammicro.com:443/oauth/oauth30/token + type: oauth2 +x-tagGroups: +- name: Reseller API (Version 6) + tags: + - Product Catalog + - Orders + - Quotes + - Quote To Order + - Invoices + - Renewals + - Deals + - Returns + - Freight Estimate +- name: Webhook APIs (Version 6) + tags: + - OrderStatus + - StockUpdate +- name: Legacy APIs (Version 6) + tags: + - Orders v6 + - Invoices v6 +- name: Legacy APIs (Version 5) + tags: + - Product Catalog v5 + - Orders v5 + - Quotes v5 + - Invoices V5 +- name: Legacy APIs (Version 4) + tags: + - Product Catalog v4 + - Orders v4 + - Quotes v4 + - Invoices v4 + diff --git a/build.gradle b/build.gradle new file mode 100644 index 00000000..af202caf --- /dev/null +++ b/build.gradle @@ -0,0 +1,169 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' +apply plugin: 'java' +apply plugin: 'com.diffplug.spotless' + +group = 'xi.sdk.resellers' +version = '6.0' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.3.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.11.0' + } +} + +repositories { + mavenCentral() +} +sourceSets { + main.java.srcDirs = ['src/main/java'] +} + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 25 + buildToolsVersion '25.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 25 + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDirectory + task.destinationDirectory = project.file("${project.buildDir}/outputs/jar") + task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task) + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven-publish' + + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + publishing { + publications { + maven(MavenPublication) { + artifactId = 'xi.sdk.resellers' + from components.java + } + } + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +ext { + jakarta_annotation_version = "1.3.5" +} + +dependencies { + implementation 'io.swagger:swagger-annotations:1.6.8' + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation 'com.squareup.okhttp3:okhttp:4.10.0' + implementation 'com.squareup.okhttp3:logging-interceptor:4.10.0' + implementation 'com.google.code.gson:gson:2.9.1' + implementation 'io.gsonfire:gson-fire:1.9.0' + implementation 'javax.ws.rs:jsr311-api:1.1.1' + implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1' + implementation 'org.openapitools:jackson-databind-nullable:0.2.6' + implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.2' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.1' + testImplementation 'org.mockito:mockito-core:3.12.4' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.1' +} + +javadoc { + options.tags = [ "http.response.details:a:Http Response Details" ] +} + +// Use spotless plugin to automatically format code, remove unused import, etc +// To apply changes directly to the file, run `gradlew spotlessApply` +// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle +spotless { + // comment out below to run spotless as part of the `check` task + enforceCheck false + + format 'misc', { + // define the files (e.g. '*.gradle', '*.md') to apply `misc` to + target '.gitignore' + + // define the steps to apply to those files + trimTrailingWhitespace() + indentWithSpaces() // Takes an integer argument if you don't like 4 + endWithNewline() + } + java { + // don't need to set target, it is inferred from java + + // apply a specific flavor of google-java-format + googleJavaFormat('1.8').aosp().reflowLongStrings() + + removeUnusedImports() + importOrder() + } +} + +test { + // Enable JUnit 5 (Gradle 4.6+). + useJUnitPlatform() + + // Always run tests, even when nothing changed. + dependsOn 'cleanTest' + + // Show test results. + testLogging { + events "passed", "skipped", "failed" + } + +} diff --git a/build.sbt b/build.sbt new file mode 100644 index 00000000..576c4a65 --- /dev/null +++ b/build.sbt @@ -0,0 +1,29 @@ +lazy val root = (project in file(".")). + settings( + organization := "xi.sdk.resellers", + name := "xi.sdk.resellers", + version := "6.0", + scalaVersion := "2.11.4", + scalacOptions ++= Seq("-feature"), + javacOptions in compile ++= Seq("-Xlint:deprecation"), + publishArtifact in (Compile, packageDoc) := false, + resolvers += Resolver.mavenLocal, + libraryDependencies ++= Seq( + "io.swagger" % "swagger-annotations" % "1.6.5", + "com.squareup.okhttp3" % "okhttp" % "4.10.0", + "com.squareup.okhttp3" % "logging-interceptor" % "4.10.0", + "com.google.code.gson" % "gson" % "2.9.1", + "org.apache.commons" % "commons-lang3" % "3.12.0", + "javax.ws.rs" % "jsr311-api" % "1.1.1", + "javax.ws.rs" % "javax.ws.rs-api" % "2.1.1", + "org.openapitools" % "jackson-databind-nullable" % "0.2.6", + "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.2", + "io.gsonfire" % "gson-fire" % "1.9.0" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", + "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", + "org.junit.jupiter" % "junit-jupiter-api" % "5.9.1" % "test", + "com.novocode" % "junit-interface" % "0.10" % "test", + "org.mockito" % "mockito-core" % "3.12.4" % "test" + ) + ) diff --git a/docs/AddressType.md b/docs/AddressType.md new file mode 100644 index 00000000..5721e7d3 --- /dev/null +++ b/docs/AddressType.md @@ -0,0 +1,26 @@ + + +# AddressType + +Address type object + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attention** | **String** | | [optional] | +|**name1** | **String** | | [optional] | +|**name2** | **String** | | [optional] | +|**addressline1** | **String** | | [optional] | +|**addressline2** | **String** | | [optional] | +|**addressline3** | **String** | | [optional] | +|**city** | **String** | | [optional] | +|**state** | **String** | | [optional] | +|**postalcode** | **String** | | [optional] | +|**countrycode** | **String** | | [optional] | +|**fax** | **String** | | [optional] | +|**phonenumber** | **String** | | [optional] | +|**email** | **String** | | [optional] | + + + diff --git a/docs/AvailabilityAsyncNotificationRequest.md b/docs/AvailabilityAsyncNotificationRequest.md new file mode 100644 index 00000000..ff7bdc98 --- /dev/null +++ b/docs/AvailabilityAsyncNotificationRequest.md @@ -0,0 +1,17 @@ + + +# AvailabilityAsyncNotificationRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**topic** | **String** | Field for identifying whether it is a reseller or vendor event. For eg, resellers/orders | [optional] | +|**event** | **String** | The event sent in the request. For eg, im::create. | [optional] | +|**eventTimeStamp** | **String** | The timestamp at which the event was sent. | [optional] | +|**eventId** | **String** | A unique id used as identifier for the sepcific event and used for generating the x-hub signature. | [optional] | +|**resource** | [**List<AvailabilityAsyncNotificationRequestResourceInner>**](AvailabilityAsyncNotificationRequestResourceInner.md) | | [optional] | + + + diff --git a/docs/AvailabilityAsyncNotificationRequestResourceInner.md b/docs/AvailabilityAsyncNotificationRequestResourceInner.md new file mode 100644 index 00000000..e4630d0b --- /dev/null +++ b/docs/AvailabilityAsyncNotificationRequestResourceInner.md @@ -0,0 +1,21 @@ + + +# AvailabilityAsyncNotificationRequestResourceInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eventType** | **String** | The event name sent in the event request. | [optional] | +|**ingramPartNumber** | **String** | The Unique IngramMicro part number for the product. | [optional] | +|**vendorPartNumber** | **String** | The vendors part number for the product. | [optional] | +|**vendorName** | **String** | The name of the vendor/manufacturer of the product. | [optional] | +|**upcCode** | **String** | The UPC code for the product. Consists of 12 numeric digits that are uniquly assigned to each trade item. | [optional] | +|**skuStatus** | **String** | Status returned saying whether sku is active. | [optional] | +|**backOrderFlag** | **String** | Backordered Flag. | [optional] | +|**totalAvailability** | **String** | totalAvailability. | [optional] | +|**links** | [**List<AvailabilityAsyncNotificationRequestResourceInnerLinksInner>**](AvailabilityAsyncNotificationRequestResourceInnerLinksInner.md) | Link to Order Details for the order(s). | [optional] | + + + diff --git a/docs/AvailabilityAsyncNotificationRequestResourceInnerLinksInner.md b/docs/AvailabilityAsyncNotificationRequestResourceInnerLinksInner.md new file mode 100644 index 00000000..8a760757 --- /dev/null +++ b/docs/AvailabilityAsyncNotificationRequestResourceInnerLinksInner.md @@ -0,0 +1,15 @@ + + +# AvailabilityAsyncNotificationRequestResourceInnerLinksInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**topic** | **String** | Provides the details of the orders. | [optional] | +|**href** | **String** | The URL endpoint for accessing the relevant data. | [optional] | +|**type** | **String** | The type of call that can be made to the href link (GET, POST, Etc.). | [optional] | + + + diff --git a/docs/DealsApi.md b/docs/DealsApi.md new file mode 100644 index 00000000..6d49de91 --- /dev/null +++ b/docs/DealsApi.md @@ -0,0 +1,168 @@ +# DealsApi + +All URIs are relative to *https://api.ingrammicro.com:443/sandbox* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getResellersV6Dealsdetails**](DealsApi.md#getResellersV6Dealsdetails) | **GET** /resellers/v6/deals/{dealId} | Deals Details | +| [**getResellersV6Dealssearch**](DealsApi.md#getResellersV6Dealssearch) | **GET** /resellers/v6/deals/search | Deals Search | + + + +# **getResellersV6Dealsdetails** +> DealsDetailsResponse getResellersV6Dealsdetails(imCustomerNumber, imCountryCode, imCorrelationID, dealId, imSenderID) + +Deals Details + +The Deals Details API will retrieve all the details related to the specific deal id. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.DealsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + DealsApi apiInstance = new DealsApi(defaultClient); + String imCustomerNumber = "20-222222"; // String | Your unique Ingram Micro customer number. + String imCountryCode = "US"; // String | Two-character ISO country code. + String imCorrelationID = "fbac82ba-cf0a-4bcf-fc03-0c5084"; // String | Unique transaction number to identify each transaction across all the systems. + String dealId = "12345678"; // String | Unique deal ID. + String imSenderID = "MyCompany"; // String | Unique value used to identify the sender of the transaction. Example: MyCompany + try { + DealsDetailsResponse result = apiInstance.getResellersV6Dealsdetails(imCustomerNumber, imCountryCode, imCorrelationID, dealId, imSenderID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DealsApi#getResellersV6Dealsdetails"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **imCustomerNumber** | **String**| Your unique Ingram Micro customer number. | | +| **imCountryCode** | **String**| Two-character ISO country code. | | +| **imCorrelationID** | **String**| Unique transaction number to identify each transaction across all the systems. | | +| **dealId** | **String**| Unique deal ID. | | +| **imSenderID** | **String**| Unique value used to identify the sender of the transaction. Example: MyCompany | [optional] | + +### Return type + +[**DealsDetailsResponse**](DealsDetailsResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | Bad Request | - | +| **500** | Internal Server Error | - | + + +# **getResellersV6Dealssearch** +> DealsSearchResponse getResellersV6Dealssearch(imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, endUser, vendor, dealId) + +Deals Search + +The Deals Search API, by default, will retrieve all the deals that are associated with the customer’s account. The customer will be able to search deals using the End-user name, Vendor name, or DealID. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.DealsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + DealsApi apiInstance = new DealsApi(defaultClient); + String imCustomerNumber = "20-222222"; // String | Your unique Ingram Micro customer number. + String imCountryCode = "US"; // String | Two-character ISO country code. + String imCorrelationID = "fbac82ba-cf0a-4bcf-fc03-0c5084"; // String | Unique transaction number to identify each transaction across all the systems. + String imSenderID = "MyCompany"; // String | Unique value used to identify the sender of the transaction. Example: MyCompany + String endUser = "EnduserCompany"; // String | The end user/customer's name. + String vendor = "Cisco"; // String | The vendor's name. + String dealId = "12345678"; // String | Deal/Special bid number. + try { + DealsSearchResponse result = apiInstance.getResellersV6Dealssearch(imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, endUser, vendor, dealId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DealsApi#getResellersV6Dealssearch"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **imCustomerNumber** | **String**| Your unique Ingram Micro customer number. | | +| **imCountryCode** | **String**| Two-character ISO country code. | | +| **imCorrelationID** | **String**| Unique transaction number to identify each transaction across all the systems. | | +| **imSenderID** | **String**| Unique value used to identify the sender of the transaction. Example: MyCompany | [optional] | +| **endUser** | **String**| The end user/customer's name. | [optional] | +| **vendor** | **String**| The vendor's name. | [optional] | +| **dealId** | **String**| Deal/Special bid number. | [optional] | + +### Return type + +[**DealsSearchResponse**](DealsSearchResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | Bad Request | - | +| **500** | Internal Server Error | - | + diff --git a/docs/DealsDetailsResponse.md b/docs/DealsDetailsResponse.md new file mode 100644 index 00000000..aaba77fa --- /dev/null +++ b/docs/DealsDetailsResponse.md @@ -0,0 +1,23 @@ + + +# DealsDetailsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**dealId** | **String** | Deal/Special bid number. | [optional] | +|**version** | **String** | Most recent version number of the deal. | [optional] | +|**endUser** | **String** | The end user/customer's name. | [optional] | +|**extendedMsrp** | **BigDecimal** | Extended MSRP - Manufacturer Suggested Retail Price X Quantity. | [optional] | +|**vendor** | **String** | The vendor's name. | [optional] | +|**dealReceivedOn** | **LocalDate** | The date on which the deal starts. | [optional] | +|**dealExpiryDate** | **LocalDate** | Expiration date of the deal/Special bid. | [optional] | +|**priceProtectionEndDate** | **LocalDate** | The date on which the price protection will end. | [optional] | +|**currencyCode** | **String** | Country specific currency code. | [optional] | +|**endUserInfo** | [**List<RenewalsDetailsResponseEndUserInfoInner>**](RenewalsDetailsResponseEndUserInfoInner.md) | | [optional] | +|**products** | [**List<DealsDetailsResponseProductsInner>**](DealsDetailsResponseProductsInner.md) | | [optional] | + + + diff --git a/docs/DealsDetailsResponseProductsInner.md b/docs/DealsDetailsResponseProductsInner.md new file mode 100644 index 00000000..924120dc --- /dev/null +++ b/docs/DealsDetailsResponseProductsInner.md @@ -0,0 +1,26 @@ + + +# DealsDetailsResponseProductsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ingramPartNumber** | **String** | Unique Ingram part number. | [optional] | +|**vendorPartNumber** | **String** | Vendor Part number for the product. | [optional] | +|**upc** | **String** | The UPC code for the product. Consists of 12 numeric digits that are uniquely assigned to each trade item. | [optional] | +|**productDescription** | **String** | Description of the product. | [optional] | +|**msrp** | **BigDecimal** | Manufacturer Suggested Retail Price. | [optional] | +|**extendedMSRP** | **BigDecimal** | Extended MSRP - Manufacturer Suggested Retail Price X Quantity. | [optional] | +|**standardPrice** | **BigDecimal** | Standard price of the line item. | [optional] | +|**approvedQuantity** | **Integer** | Total quantity approved for the deal. | [optional] | +|**remainingQuantity** | **Integer** | The quantity remaining as part of the deal for the customer to order. | [optional] | +|**comments** | **String** | Comments of the deal. | [optional] | +|**specialConditions** | **String** | Special conditions of the deal. | [optional] | +|**startDate** | **LocalDate** | Start Date. | [optional] | +|**expirationDate** | **LocalDate** | Expiration date. | [optional] | +|**daysRemaining** | **Integer** | Number of days remaining before the deal expires. | [optional] | + + + diff --git a/docs/DealsSearchResponse.md b/docs/DealsSearchResponse.md new file mode 100644 index 00000000..4a046185 --- /dev/null +++ b/docs/DealsSearchResponse.md @@ -0,0 +1,18 @@ + + +# DealsSearchResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**recordsFound** | **Integer** | Number of records found. | [optional] | +|**pageSize** | **Integer** | Number of records in a page. | [optional] | +|**pageNumber** | **Integer** | Number of page. | [optional] | +|**deals** | [**List<DealsSearchResponseDealsInner>**](DealsSearchResponseDealsInner.md) | | [optional] | +|**nextPage** | **String** | URL for the next page. | [optional] | +|**previousPage** | **String** | URL for the previous page. | [optional] | + + + diff --git a/docs/DealsSearchResponseDealsInner.md b/docs/DealsSearchResponseDealsInner.md new file mode 100644 index 00000000..c09648e8 --- /dev/null +++ b/docs/DealsSearchResponseDealsInner.md @@ -0,0 +1,18 @@ + + +# DealsSearchResponseDealsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**dealId** | **String** | Deal/Special bid number. | [optional] | +|**version** | **String** | Most recent version number of the deal. | [optional] | +|**endUser** | **String** | The end user/customer's name. | [optional] | +|**vendor** | **String** | The vendor's name. | [optional] | +|**dealExpiryDate** | **LocalDate** | Expiration date of the deal/Special bid. | [optional] | +|**links** | [**List<RenewalsSearchResponseRenewalsInnerLinksInner>**](RenewalsSearchResponseRenewalsInnerLinksInner.md) | | [optional] | + + + diff --git a/docs/Error.md b/docs/Error.md new file mode 100644 index 00000000..901cf320 --- /dev/null +++ b/docs/Error.md @@ -0,0 +1,16 @@ + + +# Error + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | +|**fields** | [**List<Fields>**](Fields.md) | | [optional] | + + + diff --git a/docs/ErrorResponse.md b/docs/ErrorResponse.md new file mode 100644 index 00000000..c52df3ef --- /dev/null +++ b/docs/ErrorResponse.md @@ -0,0 +1,13 @@ + + +# ErrorResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**errors** | [**List<ErrorResponseErrorsInner>**](ErrorResponseErrorsInner.md) | | [optional] | + + + diff --git a/docs/ErrorResponseDTO.md b/docs/ErrorResponseDTO.md new file mode 100644 index 00000000..ac6b61bd --- /dev/null +++ b/docs/ErrorResponseDTO.md @@ -0,0 +1,13 @@ + + +# ErrorResponseDTO + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**errors** | [**List<Error>**](Error.md) | | [optional] | + + + diff --git a/docs/ErrorResponseErrorsInner.md b/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..43b54e59 --- /dev/null +++ b/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,16 @@ + + +# ErrorResponseErrorsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique Id to identify error. | [optional] | +|**type** | **String** | Describes the type of the error. | [optional] | +|**message** | **String** | Describes the error message. | [optional] | +|**fields** | [**List<ErrorResponseErrorsInnerFieldsInner>**](ErrorResponseErrorsInnerFieldsInner.md) | | [optional] | + + + diff --git a/docs/ErrorResponseErrorsInnerFieldsInner.md b/docs/ErrorResponseErrorsInnerFieldsInner.md new file mode 100644 index 00000000..4c2bc681 --- /dev/null +++ b/docs/ErrorResponseErrorsInnerFieldsInner.md @@ -0,0 +1,15 @@ + + +# ErrorResponseErrorsInnerFieldsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**field** | **String** | Contains the name of the field. | [optional] | +|**value** | **String** | Value sent in the input for the specific field. | [optional] | +|**message** | **String** | Gives the description of the field message. | [optional] | + + + diff --git a/docs/Fields.md b/docs/Fields.md new file mode 100644 index 00000000..5ce1cd3b --- /dev/null +++ b/docs/Fields.md @@ -0,0 +1,15 @@ + + +# Fields + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**field** | **String** | | [optional] | +|**message** | **String** | | [optional] | +|**value** | **String** | | [optional] | + + + diff --git a/docs/FreightEstimateApi.md b/docs/FreightEstimateApi.md new file mode 100644 index 00000000..d985cab9 --- /dev/null +++ b/docs/FreightEstimateApi.md @@ -0,0 +1,88 @@ +# FreightEstimateApi + +All URIs are relative to *https://api.ingrammicro.com:443/sandbox* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**postFreightestimate**](FreightEstimateApi.md#postFreightestimate) | **POST** /resellers/v6/freightestimate | Freight Estimate | + + + +# **postFreightestimate** +> FreightResponse postFreightestimate(imCustomerNumber, imCountryCode, imCorrelationID, imCustomerContact, imSenderID, freightRequest) + +Freight Estimate + +The freight estimator endpoint will allow customers to understand the freight cost for an order. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.FreightEstimateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + FreightEstimateApi apiInstance = new FreightEstimateApi(defaultClient); + String imCustomerNumber = "20-222222"; // String | Your unique Ingram Micro customer number. + String imCountryCode = "US"; // String | Two-character ISO country code. + String imCorrelationID = "fbac82ba-cf0a-4bcf-fc03-0c5084"; // String | Unique transaction number to identify each transaction across all the systems. + String imCustomerContact = "John.Doe@reseller.com"; // String | Logged in Users email address contact. + String imSenderID = "MyCompany"; // String | Unique value used to identify the sender of the transaction. + FreightRequest freightRequest = new FreightRequest(); // FreightRequest | + try { + FreightResponse result = apiInstance.postFreightestimate(imCustomerNumber, imCountryCode, imCorrelationID, imCustomerContact, imSenderID, freightRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FreightEstimateApi#postFreightestimate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **imCustomerNumber** | **String**| Your unique Ingram Micro customer number. | | +| **imCountryCode** | **String**| Two-character ISO country code. | | +| **imCorrelationID** | **String**| Unique transaction number to identify each transaction across all the systems. | | +| **imCustomerContact** | **String**| Logged in Users email address contact. | | +| **imSenderID** | **String**| Unique value used to identify the sender of the transaction. | [optional] | +| **freightRequest** | [**FreightRequest**](FreightRequest.md)| | [optional] | + +### Return type + +[**FreightResponse**](FreightResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | Error: Bad Request | - | +| **500** | Internal Server Error | - | + diff --git a/docs/FreightRequest.md b/docs/FreightRequest.md new file mode 100644 index 00000000..c332cb9f --- /dev/null +++ b/docs/FreightRequest.md @@ -0,0 +1,16 @@ + + +# FreightRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**billToAddressId** | **String** | Suffix used to identify billing address. Created during onboarding. Resellers are provided with one or more address IDs depending on how many bill to addresses they need for various flooring companies they are using for credit. | [optional] | +|**shipToAddressId** | **String** | The ID references the reseller's address in Ingram Micro's system for shipping. Provided to resellers during the onboarding process. | [optional] | +|**shipToAddress** | [**List<FreightRequestShipToAddressInner>**](FreightRequestShipToAddressInner.md) | The shipping information. | [optional] | +|**lines** | [**List<FreightRequestLinesInner>**](FreightRequestLinesInner.md) | | [optional] | + + + diff --git a/docs/FreightRequestLinesInner.md b/docs/FreightRequestLinesInner.md new file mode 100644 index 00000000..0f4b157a --- /dev/null +++ b/docs/FreightRequestLinesInner.md @@ -0,0 +1,17 @@ + + +# FreightRequestLinesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**customerLineNumber** | **String** | The ID references the reseller's address in Ingram Micro's system for shipping. Provided to resellers during the onboarding process. | [optional] | +|**ingramPartNumber** | **String** | The unique IngramMicro part number. | [optional] | +|**quantity** | **String** | The requested quantity of the line item. | [optional] | +|**warehouseId** | **String** | The ID of the warehouse the line item will ship from. | [optional] | +|**carrierCode** | **String** | The code for the shipping carrier for the line item. | [optional] | + + + diff --git a/docs/FreightRequestShipToAddressInner.md b/docs/FreightRequestShipToAddressInner.md new file mode 100644 index 00000000..5be2dcb6 --- /dev/null +++ b/docs/FreightRequestShipToAddressInner.md @@ -0,0 +1,20 @@ + + +# FreightRequestShipToAddressInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**companyName** | **String** | The name of the company the order will be shipped to. | [optional] | +|**addressLine1** | **String** | Line 1 of the address the order will be shipped to. | [optional] | +|**addressLine2** | **String** | Line 2 of the address the order will be shipped to. | [optional] | +|**addressLine3** | **String** | Line 3 of the address the order will be shipped to. | [optional] | +|**city** | **String** | The city the order will be shipped to. | [optional] | +|**state** | **String** | The state the order will be shipped to. | [optional] | +|**postalCode** | **String** | The zip or postal code the order will be shipped to. | [optional] | +|**countryCode** | **String** | The two-character ISO country code the order will be shipped to. | [optional] | + + + diff --git a/docs/FreightResponse.md b/docs/FreightResponse.md new file mode 100644 index 00000000..33598205 --- /dev/null +++ b/docs/FreightResponse.md @@ -0,0 +1,13 @@ + + +# FreightResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**freightEstimateResponse** | [**FreightResponseFreightEstimateResponse**](FreightResponseFreightEstimateResponse.md) | | [optional] | + + + diff --git a/docs/FreightResponseFreightEstimateResponse.md b/docs/FreightResponseFreightEstimateResponse.md new file mode 100644 index 00000000..85408fb0 --- /dev/null +++ b/docs/FreightResponseFreightEstimateResponse.md @@ -0,0 +1,20 @@ + + +# FreightResponseFreightEstimateResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**currencyCode** | **String** | The country-specific three-character ISO 4217 currency code used for the order. | [optional] | +|**totalFreightAmount** | **BigDecimal** | Total freight amount. | [optional] | +|**totalTaxAmount** | **BigDecimal** | Total tax amount. | [optional] | +|**totalFees** | **BigDecimal** | Total fees. | [optional] | +|**totalNetAmount** | **BigDecimal** | Total net amount. | [optional] | +|**grossAmount** | **BigDecimal** | Gross amount. | [optional] | +|**distribution** | [**List<FreightResponseFreightEstimateResponseDistributionInner>**](FreightResponseFreightEstimateResponseDistributionInner.md) | | [optional] | +|**lines** | [**List<FreightResponseFreightEstimateResponseLinesInner>**](FreightResponseFreightEstimateResponseLinesInner.md) | | [optional] | + + + diff --git a/docs/FreightResponseFreightEstimateResponseDistributionInner.md b/docs/FreightResponseFreightEstimateResponseDistributionInner.md new file mode 100644 index 00000000..81627575 --- /dev/null +++ b/docs/FreightResponseFreightEstimateResponseDistributionInner.md @@ -0,0 +1,19 @@ + + +# FreightResponseFreightEstimateResponseDistributionInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shipFromBranchNumber** | **String** | The ID of the warehouse the line item will ship from. | [optional] | +|**carrierCode** | **String** | The code for the shipping carrier for the line item. | [optional] | +|**shipVia** | **String** | The name of the shipping carrier. | [optional] | +|**freightRate** | **BigDecimal** | Estimated freight charge. | [optional] | +|**totalWeight** | **BigDecimal** | Total weight. | [optional] | +|**transitDays** | **Integer** | Number of transit days. | [optional] | +|**carrierList** | [**List<FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner>**](FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner.md) | | [optional] | + + + diff --git a/docs/FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner.md b/docs/FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner.md new file mode 100644 index 00000000..f62a7114 --- /dev/null +++ b/docs/FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner.md @@ -0,0 +1,17 @@ + + +# FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**carrierCode** | **String** | The code for the shipping carrier for the line item. | [optional] | +|**shipVia** | **String** | The name of the shipping carrier. | [optional] | +|**carrierMode** | **String** | Mode of the carrier. | [optional] | +|**estimatedFreightCharge** | **BigDecimal** | Estimated freight charge. | [optional] | +|**daysInTransit** | **Integer** | Number of transit days. | [optional] | + + + diff --git a/docs/FreightResponseFreightEstimateResponseLinesInner.md b/docs/FreightResponseFreightEstimateResponseLinesInner.md new file mode 100644 index 00000000..61c32f99 --- /dev/null +++ b/docs/FreightResponseFreightEstimateResponseLinesInner.md @@ -0,0 +1,18 @@ + + +# FreightResponseFreightEstimateResponseLinesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ingramPartNumber** | **String** | The unique IngramMicro part number. | [optional] | +|**vendorPartNumber** | **String** | The vendor part number for the line item. | [optional] | +|**warehouseId** | **String** | The ID of the warehouse the line item will ship from. | [optional] | +|**quantity** | **Integer** | The requested quantity of the line item. | [optional] | +|**unitPrice** | **BigDecimal** | The unit price for the line item. | [optional] | +|**netAmount** | **BigDecimal** | The net amount (unit price X quantity) for the line item. | [optional] | + + + diff --git a/docs/GetResellerV6ValidateQuote400Response.md b/docs/GetResellerV6ValidateQuote400Response.md new file mode 100644 index 00000000..46232f77 --- /dev/null +++ b/docs/GetResellerV6ValidateQuote400Response.md @@ -0,0 +1,16 @@ + + +# GetResellerV6ValidateQuote400Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**traceid** | **String** | Unique Id to identify error. | [optional] | +|**type** | **String** | Describes the type of the error. | [optional] | +|**message** | **String** | A detailed error message. | [optional] | +|**fields** | [**List<GetResellerV6ValidateQuote400ResponseFieldsInner>**](GetResellerV6ValidateQuote400ResponseFieldsInner.md) | | [optional] | + + + diff --git a/docs/GetResellerV6ValidateQuote400ResponseFieldsInner.md b/docs/GetResellerV6ValidateQuote400ResponseFieldsInner.md new file mode 100644 index 00000000..7e3163a7 --- /dev/null +++ b/docs/GetResellerV6ValidateQuote400ResponseFieldsInner.md @@ -0,0 +1,15 @@ + + +# GetResellerV6ValidateQuote400ResponseFieldsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**field** | **String** | Contains the name of the field. | [optional] | +|**message** | **String** | Gives the description of the field message. | [optional] | +|**value** | **String** | Value sent in the input for the specific field. | [optional] | + + + diff --git a/docs/GetResellerV6ValidateQuote500Response.md b/docs/GetResellerV6ValidateQuote500Response.md new file mode 100644 index 00000000..c22ab9f6 --- /dev/null +++ b/docs/GetResellerV6ValidateQuote500Response.md @@ -0,0 +1,16 @@ + + +# GetResellerV6ValidateQuote500Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**traceid** | **String** | Unique Id to identify error. | [optional] | +|**type** | **String** | Describes the type of the error. | [optional] | +|**message** | **String** | Describes the error message. | [optional] | +|**fields** | **List<Object>** | | [optional] | + + + diff --git a/docs/InvoiceDetailRequest.md b/docs/InvoiceDetailRequest.md new file mode 100644 index 00000000..5d39b686 --- /dev/null +++ b/docs/InvoiceDetailRequest.md @@ -0,0 +1,13 @@ + + +# InvoiceDetailRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**servicerequest** | [**InvoiceDetailRequestServicerequest**](InvoiceDetailRequestServicerequest.md) | | [optional] | + + + diff --git a/docs/InvoiceDetailRequestServicerequest.md b/docs/InvoiceDetailRequestServicerequest.md new file mode 100644 index 00000000..d741baac --- /dev/null +++ b/docs/InvoiceDetailRequestServicerequest.md @@ -0,0 +1,14 @@ + + +# InvoiceDetailRequestServicerequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**requestpreamble** | [**InvoiceDetailRequestServicerequestRequestpreamble**](InvoiceDetailRequestServicerequestRequestpreamble.md) | | [optional] | +|**invoicedetailrequest** | [**InvoiceDetailRequestServicerequestInvoicedetailrequest**](InvoiceDetailRequestServicerequestInvoicedetailrequest.md) | | [optional] | + + + diff --git a/docs/InvoiceDetailRequestServicerequestInvoicedetailrequest.md b/docs/InvoiceDetailRequestServicerequestInvoicedetailrequest.md new file mode 100644 index 00000000..cd1d7640 --- /dev/null +++ b/docs/InvoiceDetailRequestServicerequestInvoicedetailrequest.md @@ -0,0 +1,13 @@ + + +# InvoiceDetailRequestServicerequestInvoicedetailrequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**invoicenumber** | **String** | | | + + + diff --git a/docs/InvoiceDetailRequestServicerequestRequestpreamble.md b/docs/InvoiceDetailRequestServicerequestRequestpreamble.md new file mode 100644 index 00000000..2d81eb9a --- /dev/null +++ b/docs/InvoiceDetailRequestServicerequestRequestpreamble.md @@ -0,0 +1,14 @@ + + +# InvoiceDetailRequestServicerequestRequestpreamble + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**isocountrycode** | **String** | | | +|**customernumber** | **String** | | | + + + diff --git a/docs/InvoiceDetailResponse.md b/docs/InvoiceDetailResponse.md new file mode 100644 index 00000000..c0f90886 --- /dev/null +++ b/docs/InvoiceDetailResponse.md @@ -0,0 +1,13 @@ + + +# InvoiceDetailResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**serviceresponse** | [**InvoiceDetailResponseServiceresponse**](InvoiceDetailResponseServiceresponse.md) | | [optional] | + + + diff --git a/docs/InvoiceDetailResponseServiceresponse.md b/docs/InvoiceDetailResponseServiceresponse.md new file mode 100644 index 00000000..cabe2a50 --- /dev/null +++ b/docs/InvoiceDetailResponseServiceresponse.md @@ -0,0 +1,14 @@ + + +# InvoiceDetailResponseServiceresponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responsepreamble** | [**InvoiceDetailResponseServiceresponseResponsepreamble**](InvoiceDetailResponseServiceresponseResponsepreamble.md) | | [optional] | +|**invoicedetailresponse** | [**InvoiceDetailResponseServiceresponseInvoicedetailresponse**](InvoiceDetailResponseServiceresponseInvoicedetailresponse.md) | | [optional] | + + + diff --git a/docs/InvoiceDetailResponseServiceresponseInvoicedetailresponse.md b/docs/InvoiceDetailResponseServiceresponseInvoicedetailresponse.md new file mode 100644 index 00000000..8f26dbed --- /dev/null +++ b/docs/InvoiceDetailResponseServiceresponseInvoicedetailresponse.md @@ -0,0 +1,33 @@ + + +# InvoiceDetailResponseServiceresponseInvoicedetailresponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**customernumber** | **String** | | [optional] | +|**invoicenumber** | **String** | | [optional] | +|**invoicedate** | **LocalDate** | | [optional] | +|**invoicetype** | **String** | | [optional] | +|**customerordernumber** | **String** | | [optional] | +|**customerfreightamount** | **Double** | | [optional] | +|**customerforeignfrightamt** | **Float** | | [optional] | +|**totaltaxamount** | **Double** | | [optional] | +|**totalamount** | **Double** | | [optional] | +|**shiptosuffix** | **String** | | [optional] | +|**billtosuffix** | **String** | | [optional] | +|**freightamount** | **Double** | | [optional] | +|**paymentterms** | **String** | | [optional] | +|**orderdate** | **String** | | [optional] | +|**carrier** | **String** | | [optional] | +|**carrierdescription** | **String** | | [optional] | +|**discountamount** | **Double** | | [optional] | +|**taxtype** | **String** | | [optional] | +|**enduserponumber** | **String** | | [optional] | +|**freightforwardercode** | **String** | | [optional] | +|**creditmemoreasoncode** | **String** | | [optional] | + + + diff --git a/docs/InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner.md b/docs/InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner.md new file mode 100644 index 00000000..12ccdee5 --- /dev/null +++ b/docs/InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner.md @@ -0,0 +1,14 @@ + + +# InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributename** | **String** | | [optional] | +|**attributevalue** | **String** | | [optional] | + + + diff --git a/docs/InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner.md b/docs/InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner.md new file mode 100644 index 00000000..a007c13e --- /dev/null +++ b/docs/InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner.md @@ -0,0 +1,15 @@ + + +# InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **String** | | [optional] | +|**description** | **String** | | [optional] | +|**chargeamount** | **String** | | [optional] | + + + diff --git a/docs/InvoiceDetailResponseServiceresponseResponsepreamble.md b/docs/InvoiceDetailResponseServiceresponseResponsepreamble.md new file mode 100644 index 00000000..a88b886c --- /dev/null +++ b/docs/InvoiceDetailResponseServiceresponseResponsepreamble.md @@ -0,0 +1,15 @@ + + +# InvoiceDetailResponseServiceresponseResponsepreamble + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responsestatus** | **String** | | [optional] | +|**statuscode** | **String** | | [optional] | +|**responsemessage** | **String** | | [optional] | + + + diff --git a/docs/InvoiceDetails.md b/docs/InvoiceDetails.md new file mode 100644 index 00000000..da57dd31 --- /dev/null +++ b/docs/InvoiceDetails.md @@ -0,0 +1,13 @@ + + +# InvoiceDetails + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**serviceresponse** | [**InvoiceDetailResponseServiceresponse**](InvoiceDetailResponseServiceresponse.md) | | [optional] | + + + diff --git a/docs/InvoiceDetailsv61Response.md b/docs/InvoiceDetailsv61Response.md new file mode 100644 index 00000000..7c0c6e60 --- /dev/null +++ b/docs/InvoiceDetailsv61Response.md @@ -0,0 +1,31 @@ + + +# InvoiceDetailsv61Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**invoiceNumber** | **String** | The Invoice number for the order. | [optional] | +|**invoiceStatus** | **String** | Status of the invoice. | [optional] | +|**invoiceDate** | **LocalDate** | Date of an Invoice. | [optional] | +|**customerOrderNumber** | **String** | The reseller's order number for reference in their system. | [optional] | +|**endCustomerOrderNumber** | **String** | The end customer's order number for reference in their system. | [optional] | +|**orderDate** | **LocalDate** | The date and time in UTC format that the order was created. | [optional] | +|**billToID** | **String** | Bill to party | [optional] | +|**invoiceType** | **String** | Type of the Invoice | [optional] | +|**invoiceDueDate** | **String** | Date when the invoice is due. | [optional] | +|**customerCountryCode** | **String** | Customer country code. | [optional] | +|**customerNumber** | **String** | Unique customer number in Ingram's system. | [optional] | +|**ingramOrderNumber** | **String** | The IngramMicro sales order number. | [optional] | +|**notes** | **String** | Notes for the invoice. | [optional] | +|**paymentTermsInfo** | [**InvoiceDetailsv61ResponsePaymentTermsInfo**](InvoiceDetailsv61ResponsePaymentTermsInfo.md) | | [optional] | +|**billToInfo** | [**InvoiceDetailsv61ResponseBillToInfo**](InvoiceDetailsv61ResponseBillToInfo.md) | | [optional] | +|**shipToInfo** | [**InvoiceDetailsv61ResponseShipToInfo**](InvoiceDetailsv61ResponseShipToInfo.md) | | [optional] | +|**lines** | [**List<InvoiceDetailsv61ResponseLinesInner>**](InvoiceDetailsv61ResponseLinesInner.md) | | [optional] | +|**fxRateInfo** | [**InvoiceDetailsv61ResponseFxRateInfo**](InvoiceDetailsv61ResponseFxRateInfo.md) | | [optional] | +|**summary** | [**InvoiceDetailsv61ResponseSummary**](InvoiceDetailsv61ResponseSummary.md) | | [optional] | + + + diff --git a/docs/InvoiceDetailsv61ResponseBillToInfo.md b/docs/InvoiceDetailsv61ResponseBillToInfo.md new file mode 100644 index 00000000..0cfb8f18 --- /dev/null +++ b/docs/InvoiceDetailsv61ResponseBillToInfo.md @@ -0,0 +1,23 @@ + + +# InvoiceDetailsv61ResponseBillToInfo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**contact** | **String** | Bill to Name. | [optional] | +|**companyName** | **String** | Bill to company. | [optional] | +|**addressLine1** | **String** | Bill to Address Line1. | [optional] | +|**addressLine2** | **String** | Bill to Address Line2. | [optional] | +|**addressLine3** | **String** | Bill to Address Line3. | [optional] | +|**city** | **String** | Bill to City. | [optional] | +|**state** | **String** | Bill to State code | [optional] | +|**postalCode** | **String** | Bill to Postalcode code. | [optional] | +|**countryCode** | **String** | Bill to Country code. | [optional] | +|**phoneNumber** | **String** | Phone number of the bill to company. | [optional] | +|**email** | **String** | Email address of the bill to company. | [optional] | + + + diff --git a/docs/InvoiceDetailsv61ResponseFxRateInfo.md b/docs/InvoiceDetailsv61ResponseFxRateInfo.md new file mode 100644 index 00000000..3b768765 --- /dev/null +++ b/docs/InvoiceDetailsv61ResponseFxRateInfo.md @@ -0,0 +1,16 @@ + + +# InvoiceDetailsv61ResponseFxRateInfo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**currencyCode** | **String** | Currency code. | [optional] | +|**companyCurrency** | **String** | Company currency code. | [optional] | +|**invoiceCurrency** | **String** | Invoice currency. | [optional] | +|**currencyFxRate** | **Double** | Currency FX rate. | [optional] | + + + diff --git a/docs/InvoiceDetailsv61ResponseLinesInner.md b/docs/InvoiceDetailsv61ResponseLinesInner.md new file mode 100644 index 00000000..9ca1668d --- /dev/null +++ b/docs/InvoiceDetailsv61ResponseLinesInner.md @@ -0,0 +1,31 @@ + + +# InvoiceDetailsv61ResponseLinesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ingramLineNumber** | **String** | Unique line number from Ingram. | [optional] | +|**customerLineNumber** | **String** | Line number passes by customer while creating an order. | [optional] | +|**ingramPartNumber** | **String** | Ingram Micro SKU (stock keeping unit). An identification, usually alphanumeric, of a particular product that allows it to be tracked for inventory purposes. | [optional] | +|**vendorPartNumber** | **String** | Vendor Part Number. | [optional] | +|**customerPartNumber** | **String** | Part number from customer's system. | [optional] | +|**vendorName** | **String** | Name of the vendor. | [optional] | +|**productDescription** | **String** | Description of the product. | [optional] | +|**unitWeight** | **String** | Weight of the product. | [optional] | +|**quantity** | **Integer** | Quantity of the product. | [optional] | +|**unitPrice** | **Double** | Unit price of the product. | [optional] | +|**unitOfMeasure** | **String** | Unit of measure of the product. | [optional] | +|**currencyCode** | **String** | Currency code. | [optional] | +|**extendedPrice** | **Double** | Extended price of the product. | [optional] | +|**taxPercentage** | **Double** | Tax percentage | [optional] | +|**taxRate** | **Double** | Tax rate | [optional] | +|**taxAmount** | **Double** | Line level tax amount. | [optional] | +|**serialNumbers** | [**List<InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner>**](InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner.md) | | [optional] | +|**quantityOrdered** | **Integer** | Quantity ordered by the customer. | [optional] | +|**quantityShipped** | **Integer** | Quantity shipped to the customer. | [optional] | + + + diff --git a/docs/InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner.md b/docs/InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner.md new file mode 100644 index 00000000..88d8a120 --- /dev/null +++ b/docs/InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner.md @@ -0,0 +1,13 @@ + + +# InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**serialNumber** | **String** | Serial number of the product. | [optional] | + + + diff --git a/docs/InvoiceDetailsv61ResponsePaymentTermsInfo.md b/docs/InvoiceDetailsv61ResponsePaymentTermsInfo.md new file mode 100644 index 00000000..b63ff14a --- /dev/null +++ b/docs/InvoiceDetailsv61ResponsePaymentTermsInfo.md @@ -0,0 +1,16 @@ + + +# InvoiceDetailsv61ResponsePaymentTermsInfo + +Payment terms is the agreement between Ingram and the customer by what period they should pay the invoice by + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**paymentTermsCode** | **String** | Code of the payment terms. | [optional] | +|**paymentTermsDescription** | **String** | Description of the payment terms. | [optional] | +|**paymentTermsDueDate** | **String** | Due date of the payment terms. | [optional] | + + + diff --git a/docs/InvoiceDetailsv61ResponseShipToInfo.md b/docs/InvoiceDetailsv61ResponseShipToInfo.md new file mode 100644 index 00000000..f0be3cd1 --- /dev/null +++ b/docs/InvoiceDetailsv61ResponseShipToInfo.md @@ -0,0 +1,23 @@ + + +# InvoiceDetailsv61ResponseShipToInfo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**contact** | **String** | Ship to Name. | [optional] | +|**companyName** | **String** | Ship to company. | [optional] | +|**addressLine1** | **String** | Ship to Address Line1. | [optional] | +|**addressLine2** | **String** | Ship to Address Line2. | [optional] | +|**addressLine3** | **String** | Ship to Address Line3. | [optional] | +|**city** | **String** | Ship to City. | [optional] | +|**state** | **String** | Ship to State code | [optional] | +|**postalCode** | **String** | Ship to Postalcode code. | [optional] | +|**countryCode** | **String** | Ship to Country code. | [optional] | +|**phoneNumber** | **String** | Phone number of the Ship to company. | [optional] | +|**email** | **String** | Email address of the Ship to company. | [optional] | + + + diff --git a/docs/InvoiceDetailsv61ResponseSummary.md b/docs/InvoiceDetailsv61ResponseSummary.md new file mode 100644 index 00000000..2393ff51 --- /dev/null +++ b/docs/InvoiceDetailsv61ResponseSummary.md @@ -0,0 +1,16 @@ + + +# InvoiceDetailsv61ResponseSummary + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**lines** | [**InvoiceDetailsv61ResponseSummaryLines**](InvoiceDetailsv61ResponseSummaryLines.md) | | [optional] | +|**miscCharges** | [**List<InvoiceDetailsv61ResponseSummaryMiscChargesInner>**](InvoiceDetailsv61ResponseSummaryMiscChargesInner.md) | Miscellaneous charges. | [optional] | +|**totals** | [**InvoiceDetailsv61ResponseSummaryTotals**](InvoiceDetailsv61ResponseSummaryTotals.md) | | [optional] | +|**foreignFxTotals** | [**InvoiceDetailsv61ResponseSummaryForeignFxTotals**](InvoiceDetailsv61ResponseSummaryForeignFxTotals.md) | | [optional] | + + + diff --git a/docs/InvoiceDetailsv61ResponseSummaryForeignFxTotals.md b/docs/InvoiceDetailsv61ResponseSummaryForeignFxTotals.md new file mode 100644 index 00000000..c831c64a --- /dev/null +++ b/docs/InvoiceDetailsv61ResponseSummaryForeignFxTotals.md @@ -0,0 +1,17 @@ + + +# InvoiceDetailsv61ResponseSummaryForeignFxTotals + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**foreignCurrencyCode** | **String** | Foreign Currency Code. | [optional] | +|**foreignCurrencyFxRate** | **Double** | Foreign rate. | [optional] | +|**foreignTotalTaxableAmount** | **String** | Foreign amount. | [optional] | +|**foreignTotalTaxAmount** | **Double** | Foreign amount. | [optional] | +|**foreignInvoiceAmountDue** | **String** | Foreign due. | [optional] | + + + diff --git a/docs/InvoiceDetailsv61ResponseSummaryLines.md b/docs/InvoiceDetailsv61ResponseSummaryLines.md new file mode 100644 index 00000000..9d33315c --- /dev/null +++ b/docs/InvoiceDetailsv61ResponseSummaryLines.md @@ -0,0 +1,14 @@ + + +# InvoiceDetailsv61ResponseSummaryLines + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**productLineCount** | **Integer** | Number of lines in the order. | [optional] | +|**productLineTotalQuantity** | **Integer** | Total quantity of the order. | [optional] | + + + diff --git a/docs/InvoiceDetailsv61ResponseSummaryMiscChargesInner.md b/docs/InvoiceDetailsv61ResponseSummaryMiscChargesInner.md new file mode 100644 index 00000000..209a3caf --- /dev/null +++ b/docs/InvoiceDetailsv61ResponseSummaryMiscChargesInner.md @@ -0,0 +1,17 @@ + + +# InvoiceDetailsv61ResponseSummaryMiscChargesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**chargeDescription** | **String** | Description of the charge. | [optional] | +|**miscChargeLineCount** | **Integer** | The number of lines for which miscellaneous charges are applicable. | [optional] | +|**miscChargeLineTotal** | **Double** | Miscellaneous charge amount. | [optional] | +|**chargeLineReference** | **String** | Reference of the chargeLine. | [optional] | +|**isNonMisc** | **String** | Is charge non miscellaneous. | [optional] | + + + diff --git a/docs/InvoiceDetailsv61ResponseSummaryTotals.md b/docs/InvoiceDetailsv61ResponseSummaryTotals.md new file mode 100644 index 00000000..01a9fb0a --- /dev/null +++ b/docs/InvoiceDetailsv61ResponseSummaryTotals.md @@ -0,0 +1,18 @@ + + +# InvoiceDetailsv61ResponseSummaryTotals + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**netInvoiceAmount** | **Double** | Net Invoice amount. | [optional] | +|**discountAmount** | **Double** | Discount amount. | [optional] | +|**discountType** | **String** | Type of discount. | [optional] | +|**totalTaxAmount** | **Double** | Total Tax amount. | [optional] | +|**invoicedAmountDue** | **Double** | Total amount due for the invoice. | [optional] | +|**freightAmount** | **Double** | Freight amount | [optional] | + + + diff --git a/docs/InvoiceSearchResponse.md b/docs/InvoiceSearchResponse.md new file mode 100644 index 00000000..b59d9c46 --- /dev/null +++ b/docs/InvoiceSearchResponse.md @@ -0,0 +1,17 @@ + + +# InvoiceSearchResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**recordsFound** | **Integer** | Total count of quotes retrieved in the request response. | [optional] | +|**pageSize** | **Integer** | Number of records (quotes) displayed per page in the quote list. | [optional] | +|**pageNumber** | **Integer** | Page index or page number for the list of quotes being returned. | [optional] | +|**invoices** | [**List<InvoiceSearchResponseInvoicesInner>**](InvoiceSearchResponseInvoicesInner.md) | The Invoices details for the requested criteria. | [optional] | +|**nextPage** | **String** | Next page of the pagination. | [optional] | + + + diff --git a/docs/InvoiceSearchResponseInvoicesInner.md b/docs/InvoiceSearchResponseInvoicesInner.md new file mode 100644 index 00000000..78a53bf0 --- /dev/null +++ b/docs/InvoiceSearchResponseInvoicesInner.md @@ -0,0 +1,23 @@ + + +# InvoiceSearchResponseInvoicesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**paymentTermsDueDate** | **String** | Payment Terms Due date. | [optional] | +|**erpOrderNumber** | **String** | Order number | [optional] | +|**invoiceNumber** | **String** | Invoice no. | [optional] | +|**invoiceStatus** | **String** | Invoice Status. | [optional] | +|**invoiceDate** | **String** | Invoice Date. | [optional] | +|**invoiceDueDate** | **String** | Invoice Due Date. | [optional] | +|**invoicedAmountDue** | **String** | Invoice Amount. | [optional] | +|**customerOrderNumber** | **String** | Customer Order No. | [optional] | +|**orderCreateDate** | **String** | Order Create Date. | [optional] | +|**endCustomerOrderNumber** | **String** | End Customer Order number. | [optional] | +|**invoiceAmountInclTax** | **String** | Invoice Amount Inclusive of Taxes | [optional] | + + + diff --git a/docs/InvoicesApi.md b/docs/InvoicesApi.md new file mode 100644 index 00000000..2701fd7d --- /dev/null +++ b/docs/InvoicesApi.md @@ -0,0 +1,212 @@ +# InvoicesApi + +All URIs are relative to *https://api.ingrammicro.com:443/sandbox* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getInvoicedetailsV61**](InvoicesApi.md#getInvoicedetailsV61) | **GET** /resellers/v6.1/invoices/{invoiceNumber} | Get Invoice Details v6.1 | +| [**getResellersV6Invoicesearch**](InvoicesApi.md#getResellersV6Invoicesearch) | **GET** /resellers/v6/invoices/ | Search your invoice | + + + +# **getInvoicedetailsV61** +> InvoiceDetailsv61Response getInvoicedetailsV61(invoiceNumber, imCustomerNumber, imCountryCode, imCorrelationID, imApplicationID, customerType, includeSerialNumbers) + +Get Invoice Details v6.1 + +Use your Ingram Micro invoice number to search for existing invoices or retrieve existing invoice details. The invoice number, IM-CustomerNumber, IM-CountryCode, IM-ApplicationId and IM-CorrelationID are required parameters. . + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.InvoicesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + InvoicesApi apiInstance = new InvoicesApi(defaultClient); + String invoiceNumber = "335238411"; // String | The Ingram Micro invoice number. + String imCustomerNumber = "20-222222"; // String | Your unique Ingram Micro customer number. + String imCountryCode = "US"; // String | Two-character ISO country code. + String imCorrelationID = "fbac82ba-cf0a-4bcf-fc03-0c5084"; // String | Unique transaction number to identify each transaction across all the systems. + String imApplicationID = "MyCompany"; // String | Unique value used to identify the sender of the transaction. Example: MyCompany. + String customerType = "invoice"; // String | it should be invoice or order + Boolean includeSerialNumbers = false; // Boolean | if serial in the response send as true or else false + try { + InvoiceDetailsv61Response result = apiInstance.getInvoicedetailsV61(invoiceNumber, imCustomerNumber, imCountryCode, imCorrelationID, imApplicationID, customerType, includeSerialNumbers); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InvoicesApi#getInvoicedetailsV61"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **invoiceNumber** | **String**| The Ingram Micro invoice number. | | +| **imCustomerNumber** | **String**| Your unique Ingram Micro customer number. | | +| **imCountryCode** | **String**| Two-character ISO country code. | | +| **imCorrelationID** | **String**| Unique transaction number to identify each transaction across all the systems. | | +| **imApplicationID** | **String**| Unique value used to identify the sender of the transaction. Example: MyCompany. | | +| **customerType** | **String**| it should be invoice or order | [optional] | +| **includeSerialNumbers** | **Boolean**| if serial in the response send as true or else false | [optional] | + +### Return type + +[**InvoiceDetailsv61Response**](InvoiceDetailsv61Response.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | Bad Request | - | +| **500** | Internal Server Error | - | + + +# **getResellersV6Invoicesearch** +> InvoiceSearchResponse getResellersV6Invoicesearch(imApplicationID, imCustomerNumber, imCountryCode, imCorrelationID, paymentTermsNetDate, invoiceDate, invoiceDueDate, orderDate, orderFromDate, orderToDate, orderNumber, deliveryNumber, invoiceNumber, invoiceStatus, invoiceType, customerOrderNumber, endCustomerOrderNumber, specialBidNumber, invoiceFromDueDate, invoiceToDueDate, invoiceFromDate, invoiceToDate, pageSize, pageNumber, orderby, direction, serialNumber) + +Search your invoice + +Search your Ingram Micro invoices. This endpoint searches by multiple invoice parameters and supports pagination of results. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.InvoicesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + InvoicesApi apiInstance = new InvoicesApi(defaultClient); + String imApplicationID = "MyCompany"; // String | Unique value used to identify the sender of the transaction. Example: MyCompany + String imCustomerNumber = "20-222222"; // String | Your unique Ingram Micro customer number. + String imCountryCode = "US"; // String | Two-character ISO country code. + String imCorrelationID = "fbac82ba-cf0a-4bcf-fc03-0c5084"; // String | Unique transaction number to identify each transaction across all the systems. + String paymentTermsNetDate = "2021-04-23"; // String | Search by payment terms net date(yyyy-MM-dd). + String invoiceDate = "2021-04-23"; // String | Search by invoice date(yyyy-MM-dd). + String invoiceDueDate = "2021-04-23"; // String | Search by invoice date from(yyyy-MM-dd). + String orderDate = "2021-04-23"; // String | Search by OrderDate date(yyyy-MM-dd). + String orderFromDate = "2021-04-23"; // String | Search by OrderFromDate date(yyyy-MM-dd). + String orderToDate = "2021-04-23"; // String | Search by OrderToDate date(yyyy-MM-dd). + String orderNumber = "2021-04-23"; // String | Search by order number + String deliveryNumber = "335238411"; // String | Search by delivery number. + String invoiceNumber = "invoiceNumber_example"; // String | The Ingram Micro invoice number. + String invoiceStatus = "invoiceStatus_example"; // String | Ingram Micro invoice status. + String invoiceType = "invoiceType_example"; // String | Ingram Micro InvoiceType. + String customerOrderNumber = "customerOrderNumber_example"; // String | Ingram Micro CustomerOrderNumber. + String endCustomerOrderNumber = "endCustomerOrderNumber_example"; // String | Ingram Micro EndCustomerOrderNumber. + String specialBidNumber = "specialBidNumber_example"; // String | Ingram Micro SpecialBidNumber. + String invoiceFromDueDate = "2021-04-23"; // String | Search by invoice due date from(yyyy-MM-dd). + String invoiceToDueDate = "2021-04-23"; // String | Search by invoice due date to(yyyy-MM-dd). + List invoiceFromDate = Arrays.asList(); // List | Search by invoice date from(yyyy-MM-dd). + List invoiceToDate = Arrays.asList(); // List | Search by invoice date To(yyyy-MM-dd). + Integer pageSize = 56; // Integer | Number of records required in the call - max records 100 per page. + Integer pageNumber = 56; // Integer | The page number reference. + String orderby = "InvoiceDate"; // String | Column name with which we want to sort. + String direction = "desc"; // String | asc or desc , along with orderby column result set will be sorted. + String serialNumber = "serialNumber_example"; // String | Serial number of the product. + try { + InvoiceSearchResponse result = apiInstance.getResellersV6Invoicesearch(imApplicationID, imCustomerNumber, imCountryCode, imCorrelationID, paymentTermsNetDate, invoiceDate, invoiceDueDate, orderDate, orderFromDate, orderToDate, orderNumber, deliveryNumber, invoiceNumber, invoiceStatus, invoiceType, customerOrderNumber, endCustomerOrderNumber, specialBidNumber, invoiceFromDueDate, invoiceToDueDate, invoiceFromDate, invoiceToDate, pageSize, pageNumber, orderby, direction, serialNumber); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InvoicesApi#getResellersV6Invoicesearch"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **imApplicationID** | **String**| Unique value used to identify the sender of the transaction. Example: MyCompany | | +| **imCustomerNumber** | **String**| Your unique Ingram Micro customer number. | | +| **imCountryCode** | **String**| Two-character ISO country code. | | +| **imCorrelationID** | **String**| Unique transaction number to identify each transaction across all the systems. | | +| **paymentTermsNetDate** | **String**| Search by payment terms net date(yyyy-MM-dd). | [optional] | +| **invoiceDate** | **String**| Search by invoice date(yyyy-MM-dd). | [optional] | +| **invoiceDueDate** | **String**| Search by invoice date from(yyyy-MM-dd). | [optional] | +| **orderDate** | **String**| Search by OrderDate date(yyyy-MM-dd). | [optional] | +| **orderFromDate** | **String**| Search by OrderFromDate date(yyyy-MM-dd). | [optional] | +| **orderToDate** | **String**| Search by OrderToDate date(yyyy-MM-dd). | [optional] | +| **orderNumber** | **String**| Search by order number | [optional] | +| **deliveryNumber** | **String**| Search by delivery number. | [optional] | +| **invoiceNumber** | **String**| The Ingram Micro invoice number. | [optional] | +| **invoiceStatus** | **String**| Ingram Micro invoice status. | [optional] | +| **invoiceType** | **String**| Ingram Micro InvoiceType. | [optional] | +| **customerOrderNumber** | **String**| Ingram Micro CustomerOrderNumber. | [optional] | +| **endCustomerOrderNumber** | **String**| Ingram Micro EndCustomerOrderNumber. | [optional] | +| **specialBidNumber** | **String**| Ingram Micro SpecialBidNumber. | [optional] | +| **invoiceFromDueDate** | **String**| Search by invoice due date from(yyyy-MM-dd). | [optional] | +| **invoiceToDueDate** | **String**| Search by invoice due date to(yyyy-MM-dd). | [optional] | +| **invoiceFromDate** | [**List<String>**](String.md)| Search by invoice date from(yyyy-MM-dd). | [optional] | +| **invoiceToDate** | [**List<String>**](String.md)| Search by invoice date To(yyyy-MM-dd). | [optional] | +| **pageSize** | **Integer**| Number of records required in the call - max records 100 per page. | [optional] | +| **pageNumber** | **Integer**| The page number reference. | [optional] | +| **orderby** | **String**| Column name with which we want to sort. | [optional] | +| **direction** | **String**| asc or desc , along with orderby column result set will be sorted. | [optional] | +| **serialNumber** | **String**| Serial number of the product. | [optional] | + +### Return type + +[**InvoiceSearchResponse**](InvoiceSearchResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | InvoiceSearchResponse to be returned | - | +| **400** | Bad Request | - | +| **500** | Internal Server Error | - | + diff --git a/docs/InvoicesV4Api.md b/docs/InvoicesV4Api.md new file mode 100644 index 00000000..18dec3ac --- /dev/null +++ b/docs/InvoicesV4Api.md @@ -0,0 +1,76 @@ +# InvoicesV4Api + +All URIs are relative to *https://api.ingrammicro.com:443/sandbox* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**postV4Invoicedetails**](InvoicesV4Api.md#postV4Invoicedetails) | **POST** /invoices/v4/invoicedetails | Get Invoice Details | + + + +# **postV4Invoicedetails** +> InvoiceDetailResponse postV4Invoicedetails(invoiceDetailRequest) + +Get Invoice Details + +A real-time request that allows the customer to query Ingram Micro for Invoice information for a specific open or shipped order (in the past 9 months). Orders are searched using Ingram Micro Sales Order Number. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.InvoicesV4Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + InvoicesV4Api apiInstance = new InvoicesV4Api(defaultClient); + InvoiceDetailRequest invoiceDetailRequest = new InvoiceDetailRequest(); // InvoiceDetailRequest | + try { + InvoiceDetailResponse result = apiInstance.postV4Invoicedetails(invoiceDetailRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InvoicesV4Api#postV4Invoicedetails"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **invoiceDetailRequest** | [**InvoiceDetailRequest**](InvoiceDetailRequest.md)| | [optional] | + +### Return type + +[**InvoiceDetailResponse**](InvoiceDetailResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + diff --git a/docs/InvoicesV5Api.md b/docs/InvoicesV5Api.md new file mode 100644 index 00000000..20924d53 --- /dev/null +++ b/docs/InvoicesV5Api.md @@ -0,0 +1,80 @@ +# InvoicesV5Api + +All URIs are relative to *https://api.ingrammicro.com:443/sandbox* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getInvoices**](InvoicesV5Api.md#getInvoices) | **GET** /resellers/v5/invoices/{invoiceNumber} | Get Invoice Details | + + + +# **getInvoices** +> InvoiceDetails getInvoices(invoiceNumber, customerNumber, isoCountryCode) + +Get Invoice Details + +View invoice details. This is a request to query invoice details for a specific Ingram Micro order placed in the last 9 months, whether open or shipped. <strong>invoiceNumber</strong>, <strong>isoCountryCode</strong> and <strong>customerNumber</strong> parameters are required. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.InvoicesV5Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + InvoicesV5Api apiInstance = new InvoicesV5Api(defaultClient); + String invoiceNumber = "20-RCW67-11"; // String | Ingram Micro Invoice Number + String customerNumber = "20-222222"; // String | Your unique Ingram Micro customer number + String isoCountryCode = "US"; // String | ISO 2 char country code + try { + InvoiceDetails result = apiInstance.getInvoices(invoiceNumber, customerNumber, isoCountryCode); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InvoicesV5Api#getInvoices"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **invoiceNumber** | **String**| Ingram Micro Invoice Number | [default to 20-RCW67-11] | +| **customerNumber** | **String**| Your unique Ingram Micro customer number | [default to 20-222222] | +| **isoCountryCode** | **String**| ISO 2 char country code | [default to US] | + +### Return type + +[**InvoiceDetails**](InvoiceDetails.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + diff --git a/docs/InvoicesV6Api.md b/docs/InvoicesV6Api.md new file mode 100644 index 00000000..74937506 --- /dev/null +++ b/docs/InvoicesV6Api.md @@ -0,0 +1,92 @@ +# InvoicesV6Api + +All URIs are relative to *https://api.ingrammicro.com:443/sandbox* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getInvoicedetailsV6**](InvoicesV6Api.md#getInvoicedetailsV6) | **GET** /resellers/v6/invoices/{invoicenumber} | Get Invoice Details v6 | + + + +# **getInvoicedetailsV6** +> InvoiceDetailResponse getInvoicedetailsV6(invoicenumber, version, imCustomerNumber, imCountryCode, imCorrelationID, imApplicationID, customerType, includeSerialNumbers) + +Get Invoice Details v6 + +Use your Ingram Micro invoice number to search for existing invoices or retrieve existing invoice details. The invoice number, IM-CustomerNumber, IM-CountryCode, IM-ApplicationId and IM-CorrelationID are required parameters. . + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.InvoicesV6Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + InvoicesV6Api apiInstance = new InvoicesV6Api(defaultClient); + String invoicenumber = "335238411"; // String | The Ingram Micro invoice number. + String version = "20-222222"; // String | Version of codebase. + String imCustomerNumber = "20-222222"; // String | Your unique Ingram Micro customer number. + String imCountryCode = "US"; // String | Two-character ISO country code. + String imCorrelationID = "fbac82ba-cf0a-4bcf-fc03-0c5084"; // String | Unique transaction number to identify each transaction across all the systems. + String imApplicationID = "MyCompany"; // String | Unique value used to identify the sender of the transaction. Example: MyCompany. + String customerType = "invoice"; // String | it should be invoice or order + Boolean includeSerialNumbers = false; // Boolean | if serial in the response send as true or else false + try { + InvoiceDetailResponse result = apiInstance.getInvoicedetailsV6(invoicenumber, version, imCustomerNumber, imCountryCode, imCorrelationID, imApplicationID, customerType, includeSerialNumbers); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InvoicesV6Api#getInvoicedetailsV6"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **invoicenumber** | **String**| The Ingram Micro invoice number. | | +| **version** | **String**| Version of codebase. | | +| **imCustomerNumber** | **String**| Your unique Ingram Micro customer number. | | +| **imCountryCode** | **String**| Two-character ISO country code. | | +| **imCorrelationID** | **String**| Unique transaction number to identify each transaction across all the systems. | | +| **imApplicationID** | **String**| Unique value used to identify the sender of the transaction. Example: MyCompany. | | +| **customerType** | **String**| it should be invoice or order | [optional] | +| **includeSerialNumbers** | **Boolean**| if serial in the response send as true or else false | [optional] | + +### Return type + +[**InvoiceDetailResponse**](InvoiceDetailResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-ApplicationID - Unique value used to identify the sender of the transaction. Example: MyCompany
    | +| **400** | Bad Request | - | +| **500** | Internal Server Error | - | + diff --git a/docs/MultiSKUPriceAndStockRequest.md b/docs/MultiSKUPriceAndStockRequest.md new file mode 100644 index 00000000..0412840a --- /dev/null +++ b/docs/MultiSKUPriceAndStockRequest.md @@ -0,0 +1,14 @@ + + +# MultiSKUPriceAndStockRequest + +Request object model for the multi sku price and stock API endpoint + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**servicerequest** | [**MultiSKUPriceAndStockRequestServicerequest**](MultiSKUPriceAndStockRequestServicerequest.md) | | [optional] | + + + diff --git a/docs/MultiSKUPriceAndStockRequestServicerequest.md b/docs/MultiSKUPriceAndStockRequestServicerequest.md new file mode 100644 index 00000000..450cc7c1 --- /dev/null +++ b/docs/MultiSKUPriceAndStockRequestServicerequest.md @@ -0,0 +1,14 @@ + + +# MultiSKUPriceAndStockRequestServicerequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**requestpreamble** | [**MultiSKUPriceAndStockRequestServicerequestRequestpreamble**](MultiSKUPriceAndStockRequestServicerequestRequestpreamble.md) | | [optional] | +|**priceandstockrequest** | [**MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest**](MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest.md) | | [optional] | + + + diff --git a/docs/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest.md b/docs/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest.md new file mode 100644 index 00000000..e00081ad --- /dev/null +++ b/docs/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest.md @@ -0,0 +1,16 @@ + + +# MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**showwarehouseavailability** | **String** | True/false to show the availability of individual warehouses | [optional] | +|**extravailabilityflag** | **String** | Y/N to show extra availability flag | [optional] | +|**includeallsystems** | **Boolean** | Flag to indicate if the price and stock information is required for all Ingram Micro systems. If it is set to true, the price and stock details will be returned from all Ingram Micro systems and if false, the price and stock will have returned from the system where the reseller number is set up in. | [optional] | +|**item** | [**MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem**](MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem.md) | | [optional] | + + + diff --git a/docs/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem.md b/docs/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem.md new file mode 100644 index 00000000..78561938 --- /dev/null +++ b/docs/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem.md @@ -0,0 +1,18 @@ + + +# MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**index** | **Integer** | | [optional] | +|**ingrampartnumber** | **String** | Ingram Micro system specific SKU number for the product for which the price is requested at Ingram Micro | [optional] | +|**vendorpartnumber** | **String** | Vendor Part Number for the product for which the price is requested at Ingram Micro | [optional] | +|**UPC** | **String** | Universal Product code for the product for which the price is requested at Ingram Micro | [optional] | +|**customerpartnumber** | **String** | Unique identification number of customer. For this option the Ingram Micro Sales rep must set up a cross reference table. | [optional] | +|**warehouseidlist** | **String** | Unique identity for Ingram Micro warehouses against which stock details are returned. | [optional] | + + + diff --git a/docs/MultiSKUPriceAndStockRequestServicerequestRequestpreamble.md b/docs/MultiSKUPriceAndStockRequestServicerequestRequestpreamble.md new file mode 100644 index 00000000..0fa7baf3 --- /dev/null +++ b/docs/MultiSKUPriceAndStockRequestServicerequestRequestpreamble.md @@ -0,0 +1,14 @@ + + +# MultiSKUPriceAndStockRequestServicerequestRequestpreamble + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**isocountrycode** | **String** | 2 Digit code “US”-United States “CA”-Canada | | +|**customernumber** | **String** | Ingram Micro customer number 10-12389 | | + + + diff --git a/docs/MultiSKUPriceAndStockResponse.md b/docs/MultiSKUPriceAndStockResponse.md new file mode 100644 index 00000000..4c735085 --- /dev/null +++ b/docs/MultiSKUPriceAndStockResponse.md @@ -0,0 +1,14 @@ + + +# MultiSKUPriceAndStockResponse + +Response object model for the multi sku price and stock API endpoint + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**serviceresponse** | [**MultiSKUPriceAndStockResponseServiceresponse**](MultiSKUPriceAndStockResponseServiceresponse.md) | | [optional] | + + + diff --git a/docs/MultiSKUPriceAndStockResponseServiceresponse.md b/docs/MultiSKUPriceAndStockResponseServiceresponse.md new file mode 100644 index 00000000..8355ac4b --- /dev/null +++ b/docs/MultiSKUPriceAndStockResponseServiceresponse.md @@ -0,0 +1,14 @@ + + +# MultiSKUPriceAndStockResponseServiceresponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responsepreamble** | [**PriceAndAvailabilityResponseServiceresponseResponsepreamble**](PriceAndAvailabilityResponseServiceresponseResponsepreamble.md) | | [optional] | +|**priceandstockresponse** | [**MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse**](MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse.md) | | [optional] | + + + diff --git a/docs/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse.md b/docs/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse.md new file mode 100644 index 00000000..70339b98 --- /dev/null +++ b/docs/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse.md @@ -0,0 +1,13 @@ + + +# MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**details** | [**List<MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner>**](MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.md) | | [optional] | + + + diff --git a/docs/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.md b/docs/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.md new file mode 100644 index 00000000..23582018 --- /dev/null +++ b/docs/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.md @@ -0,0 +1,70 @@ + + +# MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**itemstatus** | **String** | | [optional] | +|**statusmessage** | **String** | | [optional] | +|**ingrampartnumber** | **String** | SKU number for the product for which order needs to be created with Ingram Micro | [optional] | +|**vendorpartnumber** | **String** | Vendor Part number for the product | [optional] | +|**globalskuid** | **String** | | [optional] | +|**customerprice** | **String** | Customer specific price for the product, excluding taxes | [optional] | +|**partdescription1** | **String** | Description on the part number that is being requested | [optional] | +|**partdescription2** | **String** | Contuiation of description on the part number that is being requested | [optional] | +|**vendornumber** | **String** | Internal four digit code assigned by Ingram | [optional] | +|**vendorname** | **String** | Name of the vendor | [optional] | +|**cpucode** | **String** | Ingram internal code for a product | [optional] | +|**propertyClass** | [**PropertyClassEnum**](#PropertyClassEnum) | Ingram Micro assigned product classification. | [optional] | +|**skustatus** | **String** | Identifies if the SKU has been discontinued. Rules must be defined on the values to be sent out to partner. | [optional] | +|**mediacpu** | **String** | | [optional] | +|**categorysubcategory** | **String** | Ingram's internal categorization of the product | [optional] | +|**retailprice** | **BigDecimal** | MSRP Price 0.00 | | +|**newmedia** | **String** | Internal four-digit code assigned by Ingram to represent the item group | [optional] | +|**enduserrequired** | [**EnduserrequiredEnum**](#EnduserrequiredEnum) | Y - End user required N - Not required End user | [optional] | +|**backorderflag** | [**BackorderflagEnum**](#BackorderflagEnum) | Y- Allow Backorder Flag N- Not allowed | [optional] | +|**skuauthorized** | **String** | | [optional] | +|**extendedvendorpartnumber** | **String** | | [optional] | +|**warehousedetails** | [**List<MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner>**](MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner.md) | | [optional] | + + + +## Enum: PropertyClassEnum + +| Name | Value | +|---- | -----| +| A_STOCKED_PRODUCT_IN_ALL_IM_WAREHOUSES | "A-Stocked product in all IM warehouses" | +| B_LIMITED_STOCK_IN_IM_WAREHOUSES | "B-Limited stock in IM warehouses" | +| C_STOCKED_IN_FEWER_WARESHOUSES | "C-Stocked in fewer wareshouses" | +| D_INGRAM_DISCONTINUED | "D-Ingram discontinued" | +| E_PLANNED_TO_BE_PHASED_OUT_AS_PER_THE_VENDOR | "E-Planned to be phased out as per the vendor" | +| F_CARRIED_FOR_SPECIFIC_CUSTOMER_AS_PER_THE_CONTRACT | "F-Carried for specific customer as per the contract" | +| N_NEW_SKU | "N-New SKU" | +| O_DISCONTINUED_TO_BE_LIQUIDATED | "O-Discontinued to be liquidated" | +| S_ORDER_FOR_SPECIALIZED_DEMAND | "S-Order for specialized demand" | +| V_DISCONTINUED_BY_VENDOR | "V-Discontinued by vendor" | +| X_DIRECT_SHIP_PRODUCTS_FROM_VENDOR | "X-Direct Ship products from vendor" | + + + +## Enum: EnduserrequiredEnum + +| Name | Value | +|---- | -----| +| Y_END_USER_DATA_REQUIRED | "Y-End user data required" | +| N_END_USER_DATA_NOT_REQUIRED | "N-End user data not required" | + + + +## Enum: BackorderflagEnum + +| Name | Value | +|---- | -----| +| Y_CAN_BE_BACKORDERED | "Y- Can be backordered" | +| N_CANNOT_BE_BACKORDERED | "N-Cannot be backordered" | + + + diff --git a/docs/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner.md b/docs/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner.md new file mode 100644 index 00000000..fe2710ae --- /dev/null +++ b/docs/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner.md @@ -0,0 +1,30 @@ + + +# MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**warehouseid** | [**WarehouseidEnum**](#WarehouseidEnum) | Unique 2-digit code of the Ingram Micro warehouse | [optional] | +|**warehousedescription** | **String** | City of the Ingram Micro warehouse location | [optional] | +|**availablequantity** | **Integer** | On hand available quantity | [optional] | +|**onorderquantity** | **Integer** | On Order quantity | [optional] | +|**onholdquantity** | **String** | | [optional] | +|**etadate** | **String** | | [optional] | + + + +## Enum: WarehouseidEnum + +| Name | Value | +|---- | -----| +| _10_MIRA_LOMA_CA | "10-Mira Loma CA" | +| _20_CARROLLTON_TX | "20-Carrollton TX" | +| _30_MILLINGTON_TN | "30-Millington TN" | +| _40_CAROL_STREAM_IL | "40-Carol Stream IL" | +| _80_JONESTOWN_PA | "80-Jonestown PA" | + + + diff --git a/docs/OrderCancelResponse.md b/docs/OrderCancelResponse.md new file mode 100644 index 00000000..a4535564 --- /dev/null +++ b/docs/OrderCancelResponse.md @@ -0,0 +1,14 @@ + + +# OrderCancelResponse + +Response schema for order delete endpoint + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**serviceresponse** | [**OrderCancelResponseServiceresponse**](OrderCancelResponseServiceresponse.md) | | [optional] | + + + diff --git a/docs/OrderCancelResponseServiceresponse.md b/docs/OrderCancelResponseServiceresponse.md new file mode 100644 index 00000000..9ea19836 --- /dev/null +++ b/docs/OrderCancelResponseServiceresponse.md @@ -0,0 +1,13 @@ + + +# OrderCancelResponseServiceresponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responsepreamble** | [**OrderCancelResponseServiceresponseResponsepreamble**](OrderCancelResponseServiceresponseResponsepreamble.md) | | [optional] | + + + diff --git a/docs/OrderCancelResponseServiceresponseResponsepreamble.md b/docs/OrderCancelResponseServiceresponseResponsepreamble.md new file mode 100644 index 00000000..36c616ba --- /dev/null +++ b/docs/OrderCancelResponseServiceresponseResponsepreamble.md @@ -0,0 +1,15 @@ + + +# OrderCancelResponseServiceresponseResponsepreamble + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**requestStatus** | **String** | | [optional] | +|**returnCode** | **String** | | [optional] | +|**returnMessage** | **String** | | [optional] | + + + diff --git a/docs/OrderCreateRequest.md b/docs/OrderCreateRequest.md new file mode 100644 index 00000000..201dbdb0 --- /dev/null +++ b/docs/OrderCreateRequest.md @@ -0,0 +1,14 @@ + + +# OrderCreateRequest + +Request schema for order create endpoint + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ordercreaterequest** | [**OrderCreateRequestOrdercreaterequest**](OrderCreateRequestOrdercreaterequest.md) | | [optional] | + + + diff --git a/docs/OrderCreateRequestAdditionalAttributesInner.md b/docs/OrderCreateRequestAdditionalAttributesInner.md new file mode 100644 index 00000000..b82cfec7 --- /dev/null +++ b/docs/OrderCreateRequestAdditionalAttributesInner.md @@ -0,0 +1,14 @@ + + +# OrderCreateRequestAdditionalAttributesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeName** | **String** | allowPartialOrder: Allow orders with failed lines. (SAP) Depends on backorder settings. DpasRating: DX rating by Department of Defense is the highest rating by the highest offices and meant to be top priority. DO any other gov offices at the federal level to priotize. DpasProgramId: Identifies the actual agency that signed off on the DPAS priority. allowDuplicateCustomerOrderNumber: Allow orders with duplicate customer PO numbers. Enables resellers to have the same PO number for multiple orders. channelCode: Determine storage location for Markeplace(SAP) for different orderTypes. customerPOType: Used for pricing, similar to orderType. Possible SAP values- ZXML and ZWEB. storageLocation: Determine the location of the product stock in SAP for Marketplaces. soldTo: To be used in cases when Sold-To is different than Customer ID. orderType: Order Type[SAP]- ZOR and ZLCN. endUserSearchTerm: Search ID for a end user contact is used in SAP to determine the contact name. Z101: Used for end customer details such as name, address, phone, etc. This information flows to SAP and is used by warehouse. euDepId: DEP ID would be the 'End User DEP/ABM Organization ID' up to 32 characters and is assigned by Apple. depOrderNbr: depordernbr is 'End User PO to reseller' Can appear in message lines or dedicated end user po#. govtProgramType: Program type, “PA” for government orders, “ED” for education order. govtEndUserType: Type of end user of the program. F = Federal, S = State, E = Local, K = K-12 school, and H = Higher Education govtSolicitationNumber: Education order’s contract number govtPublicPrivateCode: Determines TAX / NO TAX. 'P' PUBLIC SECTOR, 'R' PRIVATE SECTOR. Value needs only to be provided for EDUCATION order. govtEndUserData: Name of the End user of the program. For example, STATE OF OHIO, CHICAGO SCHOOLDISTRICT etc. govtEndUserPostalCode: 9 CHAR FIELD / Zip Code of the End user of the order. dynamicMessageLine1: Custom Dynamic Message line 1. allowOrderOnCustomerHold: Boolean value flag which allows a customer to create an order with the hold status. | [optional] | +|**attributeValue** | **String** | attributefield data | [optional] | + + + diff --git a/docs/OrderCreateRequestEndUserInfo.md b/docs/OrderCreateRequestEndUserInfo.md new file mode 100644 index 00000000..12398188 --- /dev/null +++ b/docs/OrderCreateRequestEndUserInfo.md @@ -0,0 +1,28 @@ + + +# OrderCreateRequestEndUserInfo + +The contact information for the end user/customer provided by the reseller. Used to determine pricing and discounts. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**endUserId** | **String** | ID for the end user/customer in Ingram Micro's system. | [optional] | +|**contact** | **String** | The contact name for the end user/customer. | [optional] | +|**companyName** | **String** | The company name for the end user/customer. Required for Impulse countries. | [optional] | +|**name1** | **String** | name1 | [optional] | +|**name2** | **String** | name2 | [optional] | +|**addressLine1** | **String** | The end user/customer's street address and building or house number. Required for Impulse countries. | [optional] | +|**addressLine2** | **String** | The end user/customer's apartment number. | [optional] | +|**addressLine3** | **String** | Line 3 of the address for the end user/customer. | [optional] | +|**addressLine4** | **String** | Street address4 | [optional] | +|**city** | **String** | The end user/customer's city. Required for Impulse countries. | [optional] | +|**state** | **String** | The end user/customer's state. Required for Impulse countries but optional for EMEA countries. | [optional] | +|**postalCode** | **String** | The end user/customer's zip or postal code. Required for Impulse countries. | [optional] | +|**countryCode** | **String** | The end user/customer's two-character ISO country code. | [optional] | +|**phoneNumber** | **Integer** | The end user/customer's phone number. | [optional] | +|**email** | **String** | The end user/customer's email. | [optional] | + + + diff --git a/docs/OrderCreateRequestLinesInner.md b/docs/OrderCreateRequestLinesInner.md new file mode 100644 index 00000000..24700d97 --- /dev/null +++ b/docs/OrderCreateRequestLinesInner.md @@ -0,0 +1,22 @@ + + +# OrderCreateRequestLinesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**customerLineNumber** | **String** | The reseller's line item number for reference in their system. The customer line number needs to be a unique numeric value between 1 and 884. In the event we receive duplicate values or alphanumeric values in the customer line number, we will re-sequence the customer line number. To prevent re-sequencing, please use a unique numeric value between 1 and 884 in the customer line number. | [optional] | +|**ingramPartNumber** | **String** | The unique IngramMicro part number. | [optional] | +|**quantity** | **Integer** | The requested quantity of the line item. | [optional] | +|**specialBidNumber** | **String** | The line-level bid number provided to the reseller by the vendor for special pricing and discounts. Used to track the bid number in the case of split orders or where different line items have different bid numbers. Line-level bid number take precedence over header-level bid numbers. | [optional] | +|**notes** | **String** | Line-level notes. | [optional] | +|**unitPrice** | **BigDecimal** | The reseller-requested unit price for the line item. The unit price is not guaranteed. | [optional] | +|**endUserPrice** | **BigDecimal** | The end user price. | [optional] | +|**additionalAttributes** | [**List<OrderCreateRequestLinesInnerAdditionalAttributesInner>**](OrderCreateRequestLinesInnerAdditionalAttributesInner.md) | | [optional] | +|**warrantyInfo** | [**List<OrderCreateRequestLinesInnerWarrantyInfoInner>**](OrderCreateRequestLinesInnerWarrantyInfoInner.md) | Warranty details for the line. This is required in case of warranty orders. | [optional] | +|**endUserInfo** | [**List<OrderCreateRequestLinesInnerEndUserInfoInner>**](OrderCreateRequestLinesInnerEndUserInfoInner.md) | | [optional] | + + + diff --git a/docs/OrderCreateRequestLinesInnerAdditionalAttributesInner.md b/docs/OrderCreateRequestLinesInnerAdditionalAttributesInner.md new file mode 100644 index 00000000..3781f7d2 --- /dev/null +++ b/docs/OrderCreateRequestLinesInnerAdditionalAttributesInner.md @@ -0,0 +1,14 @@ + + +# OrderCreateRequestLinesInnerAdditionalAttributesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeName** | **String** | SAP requested and country-specific line level details. | [optional] | +|**attributeValue** | **String** | Line-level additional attributes. | [optional] | + + + diff --git a/docs/OrderCreateRequestLinesInnerEndUserInfoInner.md b/docs/OrderCreateRequestLinesInnerEndUserInfoInner.md new file mode 100644 index 00000000..08a708dd --- /dev/null +++ b/docs/OrderCreateRequestLinesInnerEndUserInfoInner.md @@ -0,0 +1,28 @@ + + +# OrderCreateRequestLinesInnerEndUserInfoInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**endUserType** | **String** | Specifies the type of endUser. It can be endUser or endUserContact for SAP flow. | [optional] | +|**endUserId** | **String** | ID for the end user/customer in Ingram Micro's system. | [optional] | +|**contact** | **String** | The contact name for the end user/customer. | [optional] | +|**companyName** | **String** | The company name for the end user/customer. | [optional] | +|**name1** | **String** | name1 | [optional] | +|**name2** | **String** | name2 | [optional] | +|**addressLine1** | **String** | The end user/customer's street address and building or house number. | [optional] | +|**addressLine2** | **String** | The end user/customer's apartment number. | [optional] | +|**addressLine3** | **String** | Line 3 of the address for the end user/customer. | [optional] | +|**addressLine4** | **String** | Street address4 | [optional] | +|**city** | **String** | The end user/customer's city. | [optional] | +|**state** | **String** | The end user/customer's state. | [optional] | +|**postalCode** | **String** | The end user/customer's zip or postal code. | [optional] | +|**countryCode** | **String** | The end user/customer's two-character ISO country code. | [optional] | +|**phoneNumber** | **BigDecimal** | The end user/customer's phone number. | [optional] | +|**email** | **String** | The end user/customer's email. | [optional] | + + + diff --git a/docs/OrderCreateRequestLinesInnerWarrantyInfoInner.md b/docs/OrderCreateRequestLinesInnerWarrantyInfoInner.md new file mode 100644 index 00000000..90322fb1 --- /dev/null +++ b/docs/OrderCreateRequestLinesInnerWarrantyInfoInner.md @@ -0,0 +1,16 @@ + + +# OrderCreateRequestLinesInnerWarrantyInfoInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**directLineLink** | **String** | Unique value to link hardware and warranty lines. Should be used only when products are purchased from both Ingram and/or vendor but the warranty is purchased through Ingram for them. | [optional] | +|**warrantyLineLink** | **String** | Customer line number of the hardware product in this request for linkage, either hardwareLineLink or warrantyLineLink can be used in a line. | [optional] | +|**hardwareLineLink** | **String** | Customer line number of the warranty product in this request for linkage, either hardwareLineLink or warrantyLineLink can be used in a line | [optional] | +|**serialInfo** | [**List<OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner>**](OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner.md) | Serial information of the hardware to be associated with the warranty, applicable on post sale orders. | [optional] | + + + diff --git a/docs/OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner.md b/docs/OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner.md new file mode 100644 index 00000000..6f6bc243 --- /dev/null +++ b/docs/OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner.md @@ -0,0 +1,16 @@ + + +# OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**dateofPurchase** | **LocalDate** | Date of purchase of the hardware. | [optional] | +|**shipDate** | **LocalDate** | Vendor specific mandatory field, date of hardware/product shipment from vendor. | [optional] | +|**primarySerialNumber** | **String** | Serial number of the hardware/product. | [optional] | +|**secondarySerialNumber** | **String** | Serial number of accessory associated with the above hardware/product. | [optional] | + + + diff --git a/docs/OrderCreateRequestOrdercreaterequest.md b/docs/OrderCreateRequestOrdercreaterequest.md new file mode 100644 index 00000000..a30c31f8 --- /dev/null +++ b/docs/OrderCreateRequestOrdercreaterequest.md @@ -0,0 +1,14 @@ + + +# OrderCreateRequestOrdercreaterequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**requestpreamble** | [**OrderCreateRequestOrdercreaterequestRequestpreamble**](OrderCreateRequestOrdercreaterequestRequestpreamble.md) | | | +|**ordercreatedetails** | [**OrderCreateRequestOrdercreaterequestOrdercreatedetails**](OrderCreateRequestOrdercreaterequestOrdercreatedetails.md) | | [optional] | + + + diff --git a/docs/OrderCreateRequestOrdercreaterequestOrdercreatedetails.md b/docs/OrderCreateRequestOrdercreaterequestOrdercreatedetails.md new file mode 100644 index 00000000..cc12d50c --- /dev/null +++ b/docs/OrderCreateRequestOrdercreaterequestOrdercreatedetails.md @@ -0,0 +1,32 @@ + + +# OrderCreateRequestOrdercreaterequestOrdercreatedetails + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**customerponumber** | **String** | The customers unique Purchase Order number. Keep it unique to retrieve order information | | +|**ordertype** | [**OrdertypeEnum**](#OrdertypeEnum) | Order Type - Standard orders, Direct ship orders | | +|**enduserordernumber** | **String** | Customers End-user PO number | [optional] | +|**billtosuffix** | **String** | Designates flooring acct to be used | [optional] | +|**shiptosuffix** | **String** | Applies to customers with multiple ship to locations (store locations) | [optional] | +|**shiptoaddress** | [**OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress**](OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.md) | | | +|**carriercode** | **String** | A customer can dictate what carrier to use for their shipment (Ingram 2-digit carrier code is required). Our recommendation is leave this field blank which will allow Ingram Micro to choose the best carrier to gain the best freight rates. | [optional] | +|**thirdpartyfreightaccountnumber** | **String** | Refers to a third-party freight account number for charging freight against. The account number should be passed within this field and the appropriate carrier code should be supplied within the carrier code tags. Prior to sending your request containing the third-party account number, it must be first entered into our system. Your Ingram Micro Sales Representative can action this for you. If submitted within an order without this preapproval the third-party account number will be ignored. Note: USA partners- For FedEx Air only (carrier codes F1, FO, F2, FG.), please send three leading zeros before your third-party freight account number (i.e.: 000999999999.) | [optional] | +|**specialbidnumber** | **String** | This is the special quote number given to a customer either by a vendor for special pricing or by Ingram Micro. To receive the special pricing assigned to this number it must be included on the order. | [optional] | +|**lines** | [**List<OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner>**](OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.md) | | | +|**extendedspecs** | [**List<OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner>**](OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner.md) | | [optional] | + + + +## Enum: OrdertypeEnum + +| Name | Value | +|---- | -----| +| STANDARD | "Standard" | +| DIRECT_SHIP | "Direct Ship" | + + + diff --git a/docs/OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner.md b/docs/OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner.md new file mode 100644 index 00000000..55d1b413 --- /dev/null +++ b/docs/OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner.md @@ -0,0 +1,34 @@ + + +# OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner + +Attribute Name and Value: This field identifies if your order is a DIRECT SHIP order (license / warranty) or how you want your Backorders managed as well as other process options like placing your order on hold or adding a comment. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributename** | [**AttributenameEnum**](#AttributenameEnum) | | [optional] | +|**attributevalue** | **String** | | [optional] | + + + +## Enum: AttributenameEnum + +| Name | Value | +|---- | -----| +| ISDIRECTSHIPORDER | "Isdirectshiporder" | +| EMAILADDRESS | "emailaddress" | +| ISBACKORDERFLAGALLOWED | "Isbackorderflagallowed" | +| PLACEONCUSTOMERHOLD | "placeoncustomerhold" | +| SIGNATUREREQUIRED | "signaturerequired" | +| COMMENTTEXT | "commenttext" | +| RESELLERCTACEMAIL | "resellerctacemail" | +| DUPLICATECUSTOMERORDERNUMBERVALIDATE | "duplicatecustomerordernumbervalidate" | +| QUOTENUMBER | "quotenumber" | +| SHIPCTACPHONE | "shipctacphone" | +| VENDAUTHNUMBER | "vendauthnumber" | +| CONTINUEONERROR | "continueonerror" | + + + diff --git a/docs/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.md b/docs/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.md new file mode 100644 index 00000000..28474cc3 --- /dev/null +++ b/docs/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.md @@ -0,0 +1,32 @@ + + +# OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**linetype** | [**LinetypeEnum**](#LinetypeEnum) | Values are “P” for product or “C” for comments. This can be left blank when ordering product and a “P” will be assumed. If you are adding a COMMENT, then this value must be “C”. Extended spec for comments: Attribute Name: “commenttext” Attribute Value: “thank you for the order” To make the comment invisible to the packing slip place “///” in front of the comment in the Attribute Value field. This will allow the Ingram sales rep to see the comment on the order but will not forward on to shipping documents. | [optional] | +|**linenumber** | **String** | This is used when a partner wants to use their own line number. Can be left blank. | [optional] | +|**ingrampartnumber** | **String** | This is the Ingram sku number to be used for placing an order. | [optional] | +|**quantity** | **String** | The quantity that is to be ordered. | | +|**vendorpartnumber** | **String** | The Manufacturer part number. Can be used to place an order instead of the Ingram sku. If there are multiple Ingram part numbers to one vendor part number. The order will be rejected. | [optional] | +|**customerpartnumber** | **String** | This is the Customers unique part numbers that must be crossed referenced to the Ingram Micro Sku before it can be used. Please contact your sales rep for additional information on how to set this up. | [optional] | +|**upCCode** | **String** | | [optional] | +|**warehouseid** | **String** | | [optional] | +|**unitprice** | **String** | This is a requested price from the customer. Pre-approval is necessary before using this feature. A methodology called price variance to manage requested pricing needs to be setup in advance by your sales rep. If unit price is provided without this advanced setup the unit price will be ignored and standard Ingram Micro pricing will apply. | [optional] | +|**enduser** | [**OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser**](OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.md) | | [optional] | +|**productextendedspecs** | [**List<OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner>**](OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner.md) | | [optional] | + + + +## Enum: LinetypeEnum + +| Name | Value | +|---- | -----| +| P | "P" | +| C | "C" | + + + diff --git a/docs/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.md b/docs/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.md new file mode 100644 index 00000000..3a9f89ca --- /dev/null +++ b/docs/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.md @@ -0,0 +1,24 @@ + + +# OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | [optional] | +|**addressline1** | **String** | | [optional] | +|**addressline2** | **String** | | [optional] | +|**addressline3** | **String** | | [optional] | +|**city** | **String** | | [optional] | +|**state** | **String** | | [optional] | +|**postalcode** | **String** | | [optional] | +|**countrycode** | **String** | | [optional] | +|**phonenumber** | **String** | | [optional] | +|**extensionnumber** | **String** | | [optional] | +|**faxnumber** | **String** | | [optional] | +|**email** | **String** | | [optional] | + + + diff --git a/docs/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner.md b/docs/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner.md new file mode 100644 index 00000000..4ef59a40 --- /dev/null +++ b/docs/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner.md @@ -0,0 +1,28 @@ + + +# OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributename** | [**AttributenameEnum**](#AttributenameEnum) | | [optional] | +|**attributevalue** | **String** | | [optional] | + + + +## Enum: AttributenameEnum + +| Name | Value | +|---- | -----| +| SHIPFROM | "shipfrom" | +| SPECIALPRICE | "specialprice" | +| AUTHBIDNUMBER | "authbidnumber" | +| COMMENTTEXT | "commenttext" | +| SERIALNUMBER | "serialnumber" | +| CONTACTNUMBER | "contactnumber" | +| SHIPNOTESTXT | "shipnotestxt" | + + + diff --git a/docs/OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.md b/docs/OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.md new file mode 100644 index 00000000..d7f289aa --- /dev/null +++ b/docs/OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.md @@ -0,0 +1,20 @@ + + +# OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attention** | **String** | Customer contact name | [optional] | +|**addressline1** | **String** | Company Name or person to deliver. *If there isn’t an attention line please add the company name on address line 1. UPS and FedEx will create surcharges if address line 1 contains a physical address. | | +|**addressline2** | **String** | Street address for delivery | | +|**addressline3** | **String** | Continuation of address line 2 | [optional] | +|**city** | **String** | Ship to city | | +|**state** | **String** | Ship to State or Region | | +|**postalcode** | **String** | Ship to Zip code or Postal code | | +|**countrycode** | **String** | Ship to country | [optional] | + + + diff --git a/docs/OrderCreateRequestOrdercreaterequestRequestpreamble.md b/docs/OrderCreateRequestOrdercreaterequestRequestpreamble.md new file mode 100644 index 00000000..e9dcc122 --- /dev/null +++ b/docs/OrderCreateRequestOrdercreaterequestRequestpreamble.md @@ -0,0 +1,14 @@ + + +# OrderCreateRequestOrdercreaterequestRequestpreamble + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**isocountrycode** | **String** | 2 digit ISO country code | | +|**customernumber** | **String** | Your unique Ingram Micro customer number | | + + + diff --git a/docs/OrderCreateRequestResellerInfo.md b/docs/OrderCreateRequestResellerInfo.md new file mode 100644 index 00000000..cca70420 --- /dev/null +++ b/docs/OrderCreateRequestResellerInfo.md @@ -0,0 +1,25 @@ + + +# OrderCreateRequestResellerInfo + +The address and contact information provided by the reseller. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**resellerId** | **String** | The reseller's Id. | [optional] | +|**companyName** | **String** | The reseller's company name. | [optional] | +|**contact** | **String** | The reseller's contact name. | [optional] | +|**addressLine1** | **String** | The reseller's street address. | [optional] | +|**addressLine2** | **String** | The reseller's building or apartment number. | [optional] | +|**addressLine3** | **String** | The reseller's address line 3. | [optional] | +|**city** | **String** | The reseller's city. | [optional] | +|**state** | **String** | The reseller's state. | [optional] | +|**postalCode** | **String** | The reseller's zip or postal code. | [optional] | +|**countryCode** | **String** | The reseller's two-character ISO country code. | [optional] | +|**phoneNumber** | **Integer** | The reseller's phone number. | [optional] | +|**email** | **String** | The reseller's email address. | [optional] | + + + diff --git a/docs/OrderCreateRequestShipToInfo.md b/docs/OrderCreateRequestShipToInfo.md new file mode 100644 index 00000000..27db4cdd --- /dev/null +++ b/docs/OrderCreateRequestShipToInfo.md @@ -0,0 +1,28 @@ + + +# OrderCreateRequestShipToInfo + +The shipping information provided by the reseller. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**addressId** | **String** | The ID references the resellers address in Ingram Micro's system for shipping. Provided to resellers during the onboarding process. | [optional] | +|**contact** | **String** | The company contact provided by the reseller. | [optional] | +|**companyName** | **String** | The name of the company the order will be shipped to. | [optional] | +|**name1** | **String** | name1 | [optional] | +|**name2** | **String** | name2 | [optional] | +|**addressLine1** | **String** | The street address and building or house number the order will be shipped to. | [optional] | +|**addressLine2** | **String** | The apartment number the order will be shipped to. | [optional] | +|**addressLine3** | **String** | Line 3 of the address the order will be shipped to. | [optional] | +|**addressLine4** | **String** | Street address4 | [optional] | +|**city** | **String** | The city the order will be shipped to. | [optional] | +|**state** | **String** | The state the order will be shipped to. | [optional] | +|**postalCode** | **String** | The zip or postal code the order will be shipped to. | [optional] | +|**countryCode** | **String** | The two-character ISO country code the order will be shipped to. | [optional] | +|**phoneNumber** | **String** | The company contact phone number. | [optional] | +|**email** | **String** | The company contact email address. | [optional] | + + + diff --git a/docs/OrderCreateRequestShipmentDetails.md b/docs/OrderCreateRequestShipmentDetails.md new file mode 100644 index 00000000..bde071cc --- /dev/null +++ b/docs/OrderCreateRequestShipmentDetails.md @@ -0,0 +1,19 @@ + + +# OrderCreateRequestShipmentDetails + +Shipping details for the order provided by the customer. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**carrierCode** | **String** | The code for the shipping carrier for the line item. | [optional] | +|**freightAccountNumber** | **String** | The reseller 's shipping account number with carrier. Used to bill the shipping carrier directly from the reseller's account with the carrier. | [optional] | +|**shipComplete** | **String** | Specifies whether the shipment will be shipped only when all products are fulfilled. The value of this field along with acceptBackOrder field decides the value of backorderflag. If this field is set, acceptBackOrder field is ignored. Possible values for this field are true, C, P, E. With value as true or C, backorderflag will be set as C. With value as P, or E, backorderflag will be set as P or E respectively. C = Ship complete at distribution level. P = ship complete at line level. E = ship complete across all distributions. | [optional] | +|**requestedDeliveryDate** | **LocalDate** | The reseller-requested delivery date in UTC format. Delivery date is not guaranteed. | [optional] | +|**signatureRequired** | **Boolean** | Specifies whether a signature is required for delivery. Default is False. | [optional] | +|**shippingInstructions** | **String** | | [optional] | + + + diff --git a/docs/OrderCreateRequestVmf.md b/docs/OrderCreateRequestVmf.md new file mode 100644 index 00000000..0bead6dc --- /dev/null +++ b/docs/OrderCreateRequestVmf.md @@ -0,0 +1,14 @@ + + +# OrderCreateRequestVmf + +Vendor mandatory fields, this is required in case of warranty orders. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**vendAuthNumber** | **String** | Authorization number provided by vendor to Ingram's reseller. Orders will be placed on hold without this value, vendor specific mandatory field - please reach out Ingram Sales team for list of vendor for whom this is mandatory. | [optional] | + + + diff --git a/docs/OrderCreateResponse.md b/docs/OrderCreateResponse.md new file mode 100644 index 00000000..b90376e4 --- /dev/null +++ b/docs/OrderCreateResponse.md @@ -0,0 +1,14 @@ + + +# OrderCreateResponse + +Response schema for order create endpoint + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**serviceresponse** | [**OrderCreateResponseServiceresponse**](OrderCreateResponseServiceresponse.md) | | [optional] | + + + diff --git a/docs/OrderCreateResponseEndUserInfo.md b/docs/OrderCreateResponseEndUserInfo.md new file mode 100644 index 00000000..96ec12af --- /dev/null +++ b/docs/OrderCreateResponseEndUserInfo.md @@ -0,0 +1,28 @@ + + +# OrderCreateResponseEndUserInfo + +The contact information for the end user/customer provided by the reseller. Used to determine pricing and discounts. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**endUserId** | **String** | The unique ID provided by the reseller for the end user/customer. | [optional] | +|**contact** | **String** | The contact name for the end user/customer. | [optional] | +|**companyName** | **String** | The company name for the end user/customer. | [optional] | +|**name1** | **String** | name1 | [optional] | +|**name2** | **String** | name2 | [optional] | +|**addressLine1** | **String** | The street adress and building or house number for the end user/customer. | [optional] | +|**addressLine2** | **String** | The apartment number for the end user/customer. | [optional] | +|**addressLine3** | **String** | Line 3 of the address for the end user/customer. | [optional] | +|**addressLine4** | **String** | Street address4 | [optional] | +|**city** | **String** | The end user/customer's city. | [optional] | +|**state** | **String** | The end user/customer's state. | [optional] | +|**postalCode** | **String** | The end user/customer's zip or postal code. | [optional] | +|**countryCode** | **String** | The end user/customer's two-character ISO country code. | [optional] | +|**phoneNumber** | **String** | The end user/customer's phone number. | [optional] | +|**email** | **String** | The end user/customer's email. | [optional] | + + + diff --git a/docs/OrderCreateResponseOrdersInner.md b/docs/OrderCreateResponseOrdersInner.md new file mode 100644 index 00000000..7ad978c5 --- /dev/null +++ b/docs/OrderCreateResponseOrdersInner.md @@ -0,0 +1,28 @@ + + +# OrderCreateResponseOrdersInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**numberOfLinesWithSuccess** | **Integer** | The number of lines in the order that were successful. | [optional] | +|**numberOfLinesWithError** | **Integer** | The number of lines in the order that have errors. | [optional] | +|**numberOfLinesWithWarning** | **Integer** | The number of lines in the order that have a warning. | [optional] | +|**ingramOrderNumber** | **String** | The Ingram Micro order number. | [optional] | +|**ingramOrderDate** | **String** | The date in UTC format that the order was created in Ingram Micro's system. | [optional] | +|**notes** | **String** | Order-level notes. | [optional] | +|**orderType** | **String** | The order typer. One of: S=Stocked PO D=Direct Ship PO | [optional] | +|**orderTotal** | **BigDecimal** | The total price for the order. | [optional] | +|**freightCharges** | **BigDecimal** | The total freight charges for the order. | [optional] | +|**totalTax** | **BigDecimal** | The total tax for the order. | [optional] | +|**currencyCode** | **String** | The country-specific three character ISO 4217 currency code used for the order. | [optional] | +|**lines** | [**List<OrderCreateResponseOrdersInnerLinesInner>**](OrderCreateResponseOrdersInnerLinesInner.md) | The line-level details for the order. | [optional] | +|**miscellaneousCharges** | [**List<OrderCreateResponseOrdersInnerMiscellaneousChargesInner>**](OrderCreateResponseOrdersInnerMiscellaneousChargesInner.md) | | [optional] | +|**links** | [**List<OrderCreateResponseOrdersInnerLinksInner>**](OrderCreateResponseOrdersInnerLinksInner.md) | Link to Order Details for the order(s). | [optional] | +|**rejectedLineItems** | [**List<OrderCreateResponseOrdersInnerRejectedLineItemsInner>**](OrderCreateResponseOrdersInnerRejectedLineItemsInner.md) | A list of rejected line items. | [optional] | +|**additionalAttributes** | [**List<OrderCreateResponseOrdersInnerAdditionalAttributesInner>**](OrderCreateResponseOrdersInnerAdditionalAttributesInner.md) | | [optional] | + + + diff --git a/docs/OrderCreateResponseOrdersInnerAdditionalAttributesInner.md b/docs/OrderCreateResponseOrdersInnerAdditionalAttributesInner.md new file mode 100644 index 00000000..5433a7c0 --- /dev/null +++ b/docs/OrderCreateResponseOrdersInnerAdditionalAttributesInner.md @@ -0,0 +1,14 @@ + + +# OrderCreateResponseOrdersInnerAdditionalAttributesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeName** | **String** | allowPartialOrder: Allow orders with failed lines. (SAP) Depends on backorder settings. dpasRating: DX rating by Department of Defense is the highest rating by the highest offices and meant to be top priority. DO any other gov offices at the federal level to priotize. dpasProgramId: Identifies the actual agency that signed off on the DPAS priority. storageLocation: Determine the location of the product stock in SAP for Marketplaces. soldTo: To be used in cases when Sold-To is different than Customer ID. Z101: Used for end customer details such as name, address, phone, etc. This information flows to SAP and is used by warehouse. euDepId: DEP ID would be the 'End User DEP/ABM Organization ID' up to 32 characters and is assigned by Apple. depOrderNbr: depordernbr is 'End User PO to reseller' Can appear in message lines or dedicated end user po#. | [optional] | +|**attributeValue** | **String** | Attribute value | [optional] | + + + diff --git a/docs/OrderCreateResponseOrdersInnerLinesInner.md b/docs/OrderCreateResponseOrdersInnerLinesInner.md new file mode 100644 index 00000000..5f754d44 --- /dev/null +++ b/docs/OrderCreateResponseOrdersInnerLinesInner.md @@ -0,0 +1,27 @@ + + +# OrderCreateResponseOrdersInnerLinesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**subOrderNumber** | **String** | The sub order number. The two-digit prefix is the warehouse code of the warehouse nearest the reseller. The middle number is the order number. The two-digit suffix is the sub order number. | [optional] | +|**ingramLineNumber** | **String** | The Ingram Micro line number for the product. | [optional] | +|**customerLineNumber** | **String** | The reseller's line number for reference in their system. | [optional] | +|**lineStatus** | **String** | The status for the line item in the order. One of: Backordered, Open | [optional] | +|**ingramPartNumber** | **String** | The Ingram Micro part number for the line item. | [optional] | +|**vendorPartNumber** | **String** | The vendor part number for the line item. | [optional] | +|**unitPrice** | **BigDecimal** | The unit price for the line item. | [optional] | +|**extendedUnitPrice** | **BigDecimal** | The extended list price (unit price X quantity) for the line item. | [optional] | +|**quantityOrdered** | **Integer** | The quantity of the line item ordered. | [optional] | +|**quantityConfirmed** | **Integer** | The quantity of the line item that has been confirmed. | [optional] | +|**quantityBackOrdered** | **Integer** | The quantity of the line item that is backordered. | [optional] | +|**specialBidNumber** | **String** | The bid number for the line item provided to the reseller by the vendor for special pricing and discounts. Line-level bid numbers take precedence over header-level bid numbers. | [optional] | +|**notes** | **String** | Line-level notes. | [optional] | +|**shipmentDetails** | [**List<OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner>**](OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner.md) | The shipment details for the line item. | [optional] | +|**additionalAttributes** | [**List<OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner>**](OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner.md) | SAP requested and country-specific line level details. | [optional] | + + + diff --git a/docs/OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner.md b/docs/OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner.md new file mode 100644 index 00000000..371d6d9c --- /dev/null +++ b/docs/OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner.md @@ -0,0 +1,14 @@ + + +# OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeName** | **String** | | [optional] | +|**attributeValue** | **String** | | [optional] | + + + diff --git a/docs/OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner.md b/docs/OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner.md new file mode 100644 index 00000000..828082c5 --- /dev/null +++ b/docs/OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner.md @@ -0,0 +1,19 @@ + + +# OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**carrierCode** | **String** | The code for the shipping carrier for the line item. | [optional] | +|**carrierName** | **String** | The name of the shipping carrier for the line item. | [optional] | +|**shipFromWarehouseId** | **String** | The ID of the warehouse the line item will ship from. | [optional] | +|**shipFromLocation** | **String** | Location from which order is shipped. | [optional] | +|**freightAccountNumber** | **String** | The reseller's shipping account number with carrier. Used to bill the shipping carrier directly from the reseller's account with the carrier. | [optional] | +|**signatureRequired** | **String** | Specifies whether a signature is required for delivery. Default is False. | [optional] | +|**shippingInstructions** | **String** | The shipping instructions for the order. | [optional] | + + + diff --git a/docs/OrderCreateResponseOrdersInnerLinksInner.md b/docs/OrderCreateResponseOrdersInnerLinksInner.md new file mode 100644 index 00000000..24e354e5 --- /dev/null +++ b/docs/OrderCreateResponseOrdersInnerLinksInner.md @@ -0,0 +1,15 @@ + + +# OrderCreateResponseOrdersInnerLinksInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**topic** | **String** | Provides the details of the orders. | [optional] | +|**href** | **String** | The URL endpoint for accessing the relevant data. | [optional] | +|**type** | **String** | The type of call that can be made to the href link (GET, POST, Etc.). | [optional] | + + + diff --git a/docs/OrderCreateResponseOrdersInnerMiscellaneousChargesInner.md b/docs/OrderCreateResponseOrdersInnerMiscellaneousChargesInner.md new file mode 100644 index 00000000..3804187c --- /dev/null +++ b/docs/OrderCreateResponseOrdersInnerMiscellaneousChargesInner.md @@ -0,0 +1,16 @@ + + +# OrderCreateResponseOrdersInnerMiscellaneousChargesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**subOrderNumber** | **String** | The sub order number. The two-digit prefix is the warehouse code of the warehouse nearest the reseller. The middle number is the order number. The two-digit suffix is the sub order number. | [optional] | +|**chargeLineReference** | **String** | Impulse line number for the miscellaneous charge. | [optional] | +|**chargeDescription** | **String** | Description of the miscellaneous charges for the order. | [optional] | +|**chargeAmount** | **BigDecimal** | The total amount of miscellaneous charges for the order. | [optional] | + + + diff --git a/docs/OrderCreateResponseOrdersInnerRejectedLineItemsInner.md b/docs/OrderCreateResponseOrdersInnerRejectedLineItemsInner.md new file mode 100644 index 00000000..32c3e917 --- /dev/null +++ b/docs/OrderCreateResponseOrdersInnerRejectedLineItemsInner.md @@ -0,0 +1,18 @@ + + +# OrderCreateResponseOrdersInnerRejectedLineItemsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**customerLinenumber** | **String** | The reseller's line item number of the rejected item for their reference. Number | [optional] | +|**ingramPartNumber** | **String** | The Ingram Micro part number for the rejected line item. | [optional] | +|**vendorPartNumber** | **String** | The vendor part number for the rejected line item. | [optional] | +|**quantityOrdered** | **Integer** | The quantity ordered of the rejected line item. | [optional] | +|**rejectCode** | **String** | The rejection code for the rejected line item. Ex: 'EN' | [optional] | +|**rejectReason** | **String** | The rejection reason for the rejected line item. Ex: 'SKU-NOTFOUND DF41281' | [optional] | + + + diff --git a/docs/OrderCreateResponseServiceresponse.md b/docs/OrderCreateResponseServiceresponse.md new file mode 100644 index 00000000..e61b7950 --- /dev/null +++ b/docs/OrderCreateResponseServiceresponse.md @@ -0,0 +1,15 @@ + + +# OrderCreateResponseServiceresponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responsepreamble** | [**InvoiceDetailResponseServiceresponseResponsepreamble**](InvoiceDetailResponseServiceresponseResponsepreamble.md) | | [optional] | +|**ordersummary** | [**OrderCreateResponseServiceresponseOrdersummary**](OrderCreateResponseServiceresponseOrdersummary.md) | | [optional] | +|**ordercreateresponse** | [**List<OrderCreateResponseServiceresponseOrdercreateresponseInner>**](OrderCreateResponseServiceresponseOrdercreateresponseInner.md) | Collection of orders | [optional] | + + + diff --git a/docs/OrderCreateResponseServiceresponseOrdercreateresponseInner.md b/docs/OrderCreateResponseServiceresponseOrdercreateresponseInner.md new file mode 100644 index 00000000..45bbd4ff --- /dev/null +++ b/docs/OrderCreateResponseServiceresponseOrdercreateresponseInner.md @@ -0,0 +1,32 @@ + + +# OrderCreateResponseServiceresponseOrdercreateresponseInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**numberoflineswithsuccess** | **String** | Number of line items that were successful | [optional] | +|**numberoflineswitherror** | **String** | Number of line items with error | [optional] | +|**numberoflineswithwarning** | **String** | Number of line items with warnings | [optional] | +|**globalorderid** | **String** | Ingram sales order number | [optional] | +|**ordertype** | [**OrdertypeEnum**](#OrdertypeEnum) | S=Stocked PO D=Direct Ship PO | [optional] | +|**ordertimestamp** | **String** | Time order received | [optional] | +|**invoicingsystemorderid** | **String** | Ingram Micro generated order number | [optional] | +|**taxamount** | **BigDecimal** | | [optional] | +|**freightamount** | **BigDecimal** | Freight amount customer pays for freight | [optional] | +|**orderamount** | **BigDecimal** | Total amount of order with freight and taxes | [optional] | +|**lines** | [**List<OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner>**](OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.md) | Collection of lines | [optional] | + + + +## Enum: OrdertypeEnum + +| Name | Value | +|---- | -----| +| S | "S" | +| D | "D" | + + + diff --git a/docs/OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.md b/docs/OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.md new file mode 100644 index 00000000..7515e937 --- /dev/null +++ b/docs/OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.md @@ -0,0 +1,27 @@ + + +# OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**linetype** | **String** | “P”-Line or SKU Number “C”-Comment Line | [optional] | +|**globallinenumber** | **String** | Ingram generated line number | [optional] | +|**partnumber** | **String** | Ingram Micro Sku Number | [optional] | +|**globalskuid** | **String** | | [optional] | +|**linenumber** | **String** | | [optional] | +|**carriercode** | **String** | Transportation 2 digit codes | [optional] | +|**carrierdescription** | **String** | Transportation Carrier Name | [optional] | +|**requestedunitprice** | **BigDecimal** | Price requested by reseller. Price Variance can be set up by Ingram Micro Sales Rep | [optional] | +|**requestedquantity** | **Integer** | Quanity Requested | [optional] | +|**confirmedquantity** | **Integer** | Quanity Shipped | [optional] | +|**backorderedquantity** | **Integer** | Quanity of units that didn’t ship | [optional] | +|**unitproductprice** | **BigDecimal** | Price Per Unit | [optional] | +|**netamount** | **BigDecimal** | Total amount. Quantity X Unit Price | [optional] | +|**warehouseid** | **String** | | [optional] | +|**ordersuffix** | **String** | Use order suffix with the globalorderid for this line item. | [optional] | + + + diff --git a/docs/OrderCreateResponseServiceresponseOrdersummary.md b/docs/OrderCreateResponseServiceresponseOrdersummary.md new file mode 100644 index 00000000..b9a475e0 --- /dev/null +++ b/docs/OrderCreateResponseServiceresponseOrdersummary.md @@ -0,0 +1,16 @@ + + +# OrderCreateResponseServiceresponseOrdersummary + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**customerponumber** | **String** | | [optional] | +|**totalorderamount** | **String** | Total of all the orders including taxes and fees | [optional] | +|**totalordercreated** | **String** | Number of orders created, in some cases we may create more than one order. | [optional] | +|**shiptoaddress** | [**OrderCreateResponseServiceresponseOrdersummaryShiptoaddress**](OrderCreateResponseServiceresponseOrdersummaryShiptoaddress.md) | | [optional] | + + + diff --git a/docs/OrderCreateResponseServiceresponseOrdersummaryShiptoaddress.md b/docs/OrderCreateResponseServiceresponseOrdersummaryShiptoaddress.md new file mode 100644 index 00000000..74c6b997 --- /dev/null +++ b/docs/OrderCreateResponseServiceresponseOrdersummaryShiptoaddress.md @@ -0,0 +1,21 @@ + + +# OrderCreateResponseServiceresponseOrdersummaryShiptoaddress + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attention** | **String** | | [optional] | +|**name** | **String** | | [optional] | +|**addressline1** | **String** | | [optional] | +|**addressline2** | **String** | | [optional] | +|**addressline3** | **String** | | [optional] | +|**city** | **String** | | [optional] | +|**state** | **String** | | [optional] | +|**postalcode** | **String** | | [optional] | +|**countrycode** | **String** | | [optional] | + + + diff --git a/docs/OrderCreateResponseShipToInfo.md b/docs/OrderCreateResponseShipToInfo.md new file mode 100644 index 00000000..fa33a1ca --- /dev/null +++ b/docs/OrderCreateResponseShipToInfo.md @@ -0,0 +1,28 @@ + + +# OrderCreateResponseShipToInfo + +The shipping information provided by the reseller. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**addressId** | **String** | The ID references the resellers address in Ingram Micro's system for shipping. Provided to resellers during the onboarding process. | [optional] | +|**contact** | **String** | The company contact provided by the reseller. | [optional] | +|**companyName** | **String** | The name of the company the order will be shipped to. | [optional] | +|**name1** | **String** | name1 | [optional] | +|**name2** | **String** | name2 | [optional] | +|**addressLine1** | **String** | The street address and building or house number the order will be shipped to. | [optional] | +|**addressLine2** | **String** | The apartment number the order will be shipped to. | [optional] | +|**addressLine3** | **String** | Line 3 of the address the order will be shipped to. | [optional] | +|**addressLine4** | **String** | Street address4 | [optional] | +|**city** | **String** | The city the order will be shipped to. | [optional] | +|**state** | **String** | The state the order will be shipped to. | [optional] | +|**postalCode** | **String** | The zip or postal code the order will be shipped to. | [optional] | +|**countryCode** | **String** | The two-character ISO country code the order will be shipped to. | [optional] | +|**phoneNumber** | **String** | The company contact phone number. | [optional] | +|**email** | **String** | The company contact email address. | [optional] | + + + diff --git a/docs/OrderDeleteRequest.md b/docs/OrderDeleteRequest.md new file mode 100644 index 00000000..180e7c3a --- /dev/null +++ b/docs/OrderDeleteRequest.md @@ -0,0 +1,14 @@ + + +# OrderDeleteRequest + +Request schema for order delete endpoint + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**servicerequest** | [**OrderDeleteRequestServicerequest**](OrderDeleteRequestServicerequest.md) | | [optional] | + + + diff --git a/docs/OrderDeleteRequestServicerequest.md b/docs/OrderDeleteRequestServicerequest.md new file mode 100644 index 00000000..06a130b5 --- /dev/null +++ b/docs/OrderDeleteRequestServicerequest.md @@ -0,0 +1,14 @@ + + +# OrderDeleteRequestServicerequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**requestpreamble** | [**OrderDeleteRequestServicerequestRequestpreamble**](OrderDeleteRequestServicerequestRequestpreamble.md) | | | +|**orderDeleteRequestDetails** | [**OrderDeleteRequestServicerequestOrderDeleteRequestDetails**](OrderDeleteRequestServicerequestOrderDeleteRequestDetails.md) | | [optional] | + + + diff --git a/docs/OrderDeleteRequestServicerequestOrderDeleteRequestDetails.md b/docs/OrderDeleteRequestServicerequestOrderDeleteRequestDetails.md new file mode 100644 index 00000000..55bf40dc --- /dev/null +++ b/docs/OrderDeleteRequestServicerequestOrderDeleteRequestDetails.md @@ -0,0 +1,19 @@ + + +# OrderDeleteRequestServicerequestOrderDeleteRequestDetails + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**entryDate** | **String** | Date order entered | | +|**orderBranch** | **String** | Ingram Micro's first 2 numbers of the order number | | +|**orderNumber** | **String** | Ingram Micro's middle 6 numbers of the order# | | +|**rejectionCode** | **String** | | [optional] | +|**distributionNumber** | **String** | Ingram Micro's suffix number of the order# | [optional] | +|**shipmentNumber** | **String** | Ingram Micro's last number of the order# | [optional] | +|**operatorID** | **String** | Ingram ID(not required) | [optional] | + + + diff --git a/docs/OrderDeleteRequestServicerequestRequestpreamble.md b/docs/OrderDeleteRequestServicerequestRequestpreamble.md new file mode 100644 index 00000000..0f756378 --- /dev/null +++ b/docs/OrderDeleteRequestServicerequestRequestpreamble.md @@ -0,0 +1,14 @@ + + +# OrderDeleteRequestServicerequestRequestpreamble + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**isocountrycode** | **String** | Country that Order is being place in. | | +|**customerNumber** | **String** | Account number order will be billed to. INGRAM MICRO ACCOUNT NUMBER REQUIRED | | + + + diff --git a/docs/OrderDeleteResponse.md b/docs/OrderDeleteResponse.md new file mode 100644 index 00000000..92ec9801 --- /dev/null +++ b/docs/OrderDeleteResponse.md @@ -0,0 +1,14 @@ + + +# OrderDeleteResponse + +Response schema for order delete endpoint + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**serviceresponse** | [**OrderCancelResponseServiceresponse**](OrderCancelResponseServiceresponse.md) | | [optional] | + + + diff --git a/docs/OrderDetailB2B.md b/docs/OrderDetailB2B.md new file mode 100644 index 00000000..251bf70b --- /dev/null +++ b/docs/OrderDetailB2B.md @@ -0,0 +1,35 @@ + + +# OrderDetailB2B + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ingramOrderNumber** | **String** | The IngramMicro sales order number. | [optional] | +|**ingramOrderDate** | **OffsetDateTime** | The IngramMicro sales order date. | [optional] | +|**orderType** | **String** | The IngramMicro sales order type. | [optional] | +|**customerOrderNumber** | **String** | The reseller's order number for reference in their system. | [optional] | +|**endCustomerOrderNumber** | **String** | The end customer's order number for reference in their system. | [optional] | +|**webOrderId** | **String** | The web order id of the order. | [optional] | +|**vendorSalesOrderNumber** | **String** | The vendor's order number for reference in their system | [optional] | +|**ingramPurchaseOrderNumber** | **String** | Ingram purchase order number. | [optional] | +|**orderStatus** | **String** | The header-level status of the order. One of- Shipped, Canceled, Backordered, Processing, On Hold, Delivered. | [optional] | +|**orderTotal** | **Double** | The total cost for the order, includes subtotal, freight charges, and tax. | [optional] | +|**orderSubTotal** | **Double** | The sub total cost for the order, not including tax and freight. | [optional] | +|**freightCharges** | **Double** | The freight charges for the order. | [optional] | +|**currencyCode** | **String** | The country-specific three digit ISO 4217 currency code for the order. | [optional] | +|**totalWeight** | **Double** | Total order weight. unit -- North america - Pounds , other countries will be KG. | [optional] | +|**totalTax** | **Double** | Total tax on the orders placed. | [optional] | +|**paymentTerms** | **String** | The payment terms of the order. (Ex- Net 30 days). | [optional] | +|**notes** | **String** | The header-level notes for the order. | [optional] | +|**billToInfo** | [**OrderDetailB2BBillToInfo**](OrderDetailB2BBillToInfo.md) | | [optional] | +|**shipToInfo** | [**OrderDetailB2BShipToInfo**](OrderDetailB2BShipToInfo.md) | | [optional] | +|**endUserInfo** | [**OrderDetailB2BEndUserInfo**](OrderDetailB2BEndUserInfo.md) | | [optional] | +|**lines** | [**List<OrderDetailB2BLinesInner>**](OrderDetailB2BLinesInner.md) | | [optional] | +|**miscellaneousCharges** | [**List<OrderDetailB2BMiscellaneousChargesInner>**](OrderDetailB2BMiscellaneousChargesInner.md) | | [optional] | +|**additionalAttributes** | [**List<OrderDetailB2BAdditionalAttributesInner>**](OrderDetailB2BAdditionalAttributesInner.md) | | [optional] | + + + diff --git a/docs/OrderDetailB2BAdditionalAttributesInner.md b/docs/OrderDetailB2BAdditionalAttributesInner.md new file mode 100644 index 00000000..2b8027c3 --- /dev/null +++ b/docs/OrderDetailB2BAdditionalAttributesInner.md @@ -0,0 +1,14 @@ + + +# OrderDetailB2BAdditionalAttributesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeName** | **String** | Header level custom field names. | [optional] | +|**attributeValue** | **String** | Value of the custom fields. | [optional] | + + + diff --git a/docs/OrderDetailB2BBillToInfo.md b/docs/OrderDetailB2BBillToInfo.md new file mode 100644 index 00000000..d7350472 --- /dev/null +++ b/docs/OrderDetailB2BBillToInfo.md @@ -0,0 +1,24 @@ + + +# OrderDetailB2BBillToInfo + +The billing information provided by the reseller. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**contact** | **String** | The company contact provided by the reseller. | [optional] | +|**companyName** | **String** | The name of the company the order will be billed to. | [optional] | +|**addressLine1** | **String** | The address line 1 the order will be billed to. | [optional] | +|**addressLine2** | **String** | The address line 2 the order will be billed to. | [optional] | +|**addressLine3** | **String** | The address line 3 the order will be billed to. | [optional] | +|**city** | **String** | The city the order will be billed to. | [optional] | +|**state** | **String** | The state the order will be billed to. | [optional] | +|**postalCode** | **String** | The zip or postal code the order will be billed to. | [optional] | +|**countryCode** | **String** | The two-character ISO country code the order will be billed to. | [optional] | +|**phoneNumber** | **String** | The company contact phone number. | [optional] | +|**email** | **String** | The company contact email address. | [optional] | + + + diff --git a/docs/OrderDetailB2BEndUserInfo.md b/docs/OrderDetailB2BEndUserInfo.md new file mode 100644 index 00000000..ae0d936c --- /dev/null +++ b/docs/OrderDetailB2BEndUserInfo.md @@ -0,0 +1,24 @@ + + +# OrderDetailB2BEndUserInfo + +The contact information for the end user/customer provided by the reseller. Used to determine pricing and discounts. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**contact** | **String** | The contact name for the end user/customer. | [optional] | +|**companyName** | **String** | The company name for the end user/customer. | [optional] | +|**addressLine1** | **String** | The address line 1 for the end user/customer. | [optional] | +|**addressLine2** | **String** | The address line 2 for the end user/customer. | [optional] | +|**addressLine3** | **String** | The address line 3 for the end user/customer. | [optional] | +|**city** | **String** | The end user/customer's city. | [optional] | +|**state** | **String** | The end user/customer's state. | [optional] | +|**postalCode** | **String** | The end user/customer's zip or postal code. | [optional] | +|**countryCode** | **String** | The end user/customer's two character ISO country code. | [optional] | +|**phoneNumber** | **String** | The end user/customer's phone number. | [optional] | +|**email** | **String** | The end user/customer's email. | [optional] | + + + diff --git a/docs/OrderDetailB2BLinesInner.md b/docs/OrderDetailB2BLinesInner.md new file mode 100644 index 00000000..c8ec93bb --- /dev/null +++ b/docs/OrderDetailB2BLinesInner.md @@ -0,0 +1,42 @@ + + +# OrderDetailB2BLinesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**subOrderNumber** | **String** | The sub order number. The two-digit prefix is the warehouse code of the warehouse nearest the reseller. The middle number is the order number. The two-digit suffix is the sub order number. | [optional] | +|**ingramOrderLineNumber** | **String** | Unique Ingram Micro line number. Starts with 001. | [optional] | +|**vendorSalesOrderLineNumber** | **String** | The vendor's sales order line number. | [optional] | +|**customerLineNumber** | **String** | The reseller's line item number for reference in their system. | [optional] | +|**lineStatus** | **String** | The status for the line item in the order. One of- Backordered, In Progress, Shipped, Delivered, Canceled, On Hold. | [optional] | +|**ingramPartNumber** | **String** | Unique IngramMicro part number. | [optional] | +|**vendorPartNumber** | **String** | The vendor's part number for the line item. | [optional] | +|**vendorName** | **String** | The vendor's name for the part in their system. | [optional] | +|**partDescription** | **String** | The vendor's description of the part in their system. | [optional] | +|**unitWeight** | **Double** | The unit weight of the line item. | [optional] | +|**weightUom** | **String** | The unit of measure for the line item. | [optional] | +|**unitPrice** | **Double** | The unit price of the line item. | [optional] | +|**upcCode** | **String** | The UPC code of a product. | [optional] | +|**extendedPrice** | **Double** | Unit price X quantity for the line item. | [optional] | +|**taxAmount** | **Double** | The tax amount for the line item. | [optional] | +|**currencyCode** | **String** | The country-specific three character ISO 4217 currency code for the line item. | [optional] | +|**quantityOrdered** | **Integer** | The quantity ordered of the line item. | [optional] | +|**quantityConfirmed** | **Integer** | The quantity confirmed for the line item. | [optional] | +|**quantityBackOrdered** | **Integer** | The quantity backordered for the line item. | [optional] | +|**specialBidNumber** | **String** | The line-level bid number provided to the reseller by the vendor for special pricing and discounts. Used to track the bid number in the case of split orders or where different line items have different bid numbers. Line-level bid numbers take precedence over header-level bid numbers. | [optional] | +|**requestedDeliverydate** | **String** | Reseller-requested delivery date. Delivery date is not guaranteed. | [optional] | +|**promisedDeliveryDate** | **String** | The delivery date promised by IngramMicro. | [optional] | +|**lineNotes** | **String** | Line-level notes for the order. | [optional] | +|**shipmentDetails** | [**List<OrderDetailB2BLinesInnerShipmentDetailsInner>**](OrderDetailB2BLinesInnerShipmentDetailsInner.md) | Shipping details for the line item. | [optional] | +|**serviceContractInfo** | [**OrderDetailB2BLinesInnerServiceContractInfo**](OrderDetailB2BLinesInnerServiceContractInfo.md) | | [optional] | +|**additionalAttributes** | [**List<OrderDetailB2BLinesInnerAdditionalAttributesInner>**](OrderDetailB2BLinesInnerAdditionalAttributesInner.md) | | [optional] | +|**links** | [**List<OrderDetailB2BLinesInnerLinksInner>**](OrderDetailB2BLinesInnerLinksInner.md) | | [optional] | +|**estimatedDates** | [**List<OrderDetailB2BLinesInnerEstimatedDatesInner>**](OrderDetailB2BLinesInnerEstimatedDatesInner.md) | | [optional] | +|**scheduleLines** | [**List<OrderDetailB2BLinesInnerScheduleLinesInner>**](OrderDetailB2BLinesInnerScheduleLinesInner.md) | | [optional] | +|**multipleShipments** | [**List<OrderDetailB2BLinesInnerMultipleShipmentsInner>**](OrderDetailB2BLinesInnerMultipleShipmentsInner.md) | | [optional] | + + + diff --git a/docs/OrderDetailB2BLinesInnerAdditionalAttributesInner.md b/docs/OrderDetailB2BLinesInnerAdditionalAttributesInner.md new file mode 100644 index 00000000..6011f9b5 --- /dev/null +++ b/docs/OrderDetailB2BLinesInnerAdditionalAttributesInner.md @@ -0,0 +1,14 @@ + + +# OrderDetailB2BLinesInnerAdditionalAttributesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeName** | **String** | Line level custom field names. | [optional] | +|**attributeValue** | **String** | Value of the custom fields. | [optional] | + + + diff --git a/docs/OrderDetailB2BLinesInnerEstimatedDatesInner.md b/docs/OrderDetailB2BLinesInnerEstimatedDatesInner.md new file mode 100644 index 00000000..f137325a --- /dev/null +++ b/docs/OrderDetailB2BLinesInnerEstimatedDatesInner.md @@ -0,0 +1,14 @@ + + +# OrderDetailB2BLinesInnerEstimatedDatesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ship** | [**OrderDetailB2BLinesInnerEstimatedDatesInnerShip**](OrderDetailB2BLinesInnerEstimatedDatesInnerShip.md) | | [optional] | +|**delivery** | [**OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery**](OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery.md) | | [optional] | + + + diff --git a/docs/OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery.md b/docs/OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery.md new file mode 100644 index 00000000..2157ceef --- /dev/null +++ b/docs/OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery.md @@ -0,0 +1,17 @@ + + +# OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**deliveryDateType** | **String** | Date type. Example Single or multiple dates. | [optional] | +|**deliveryDateRange** | [**OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange**](OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange.md) | | [optional] | +|**deliverySource** | **String** | Source of the delivery. | [optional] | +|**deliveryDescription** | **String** | Delivery description. | [optional] | +|**deliveredDate** | **String** | Delivery date. | [optional] | + + + diff --git a/docs/OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange.md b/docs/OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange.md new file mode 100644 index 00000000..3f83efc9 --- /dev/null +++ b/docs/OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange.md @@ -0,0 +1,15 @@ + + +# OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange + +Delivery date range. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**startDate** | **String** | Start Date. | [optional] | +|**endDate** | **String** | End Date. | [optional] | + + + diff --git a/docs/OrderDetailB2BLinesInnerEstimatedDatesInnerShip.md b/docs/OrderDetailB2BLinesInnerEstimatedDatesInnerShip.md new file mode 100644 index 00000000..ad964427 --- /dev/null +++ b/docs/OrderDetailB2BLinesInnerEstimatedDatesInnerShip.md @@ -0,0 +1,17 @@ + + +# OrderDetailB2BLinesInnerEstimatedDatesInnerShip + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shipDateType** | **String** | Date type. Example Single or multiple dates. | [optional] | +|**shipDateRange** | [**OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange**](OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange.md) | | [optional] | +|**shipSource** | **String** | Source of the shipment. | [optional] | +|**shipDescription** | **String** | Shipment description. | [optional] | +|**shipDate** | **String** | Ship date. | [optional] | + + + diff --git a/docs/OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange.md b/docs/OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange.md new file mode 100644 index 00000000..252d1bc3 --- /dev/null +++ b/docs/OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange.md @@ -0,0 +1,14 @@ + + +# OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**startDate** | **String** | Start Date. | [optional] | +|**endDate** | **String** | End Date. | [optional] | + + + diff --git a/docs/OrderDetailB2BLinesInnerLinksInner.md b/docs/OrderDetailB2BLinesInnerLinksInner.md new file mode 100644 index 00000000..1f870ef4 --- /dev/null +++ b/docs/OrderDetailB2BLinesInnerLinksInner.md @@ -0,0 +1,16 @@ + + +# OrderDetailB2BLinesInnerLinksInner + +Link to Order Details for the line item. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**topic** | **String** | Provides the details of the line item. | [optional] | +|**href** | **String** | The API endpoint for accessing the relevant data. | [optional] | +|**type** | **String** | The type of call that can be made to the href link(GET,POST etc). | [optional] | + + + diff --git a/docs/OrderDetailB2BLinesInnerMultipleShipmentsInner.md b/docs/OrderDetailB2BLinesInnerMultipleShipmentsInner.md new file mode 100644 index 00000000..61d9e4b5 --- /dev/null +++ b/docs/OrderDetailB2BLinesInnerMultipleShipmentsInner.md @@ -0,0 +1,21 @@ + + +# OrderDetailB2BLinesInnerMultipleShipmentsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**lineNumber** | **String** | Line number. | [optional] | +|**requestedQuantity** | **String** | Requested quantity. | [optional] | +|**confirmedQuantity** | **String** | Confirmed quantity. | [optional] | +|**dataType** | **String** | Date type. Example Single or multiple dates. | [optional] | +|**dateRange** | [**OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange**](OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange.md) | | [optional] | +|**source** | **String** | Source. | [optional] | +|**description** | **String** | Description. | [optional] | +|**date** | **String** | Date. | [optional] | +|**deliveryDate** | **String** | Delivery date. | [optional] | + + + diff --git a/docs/OrderDetailB2BLinesInnerScheduleLinesInner.md b/docs/OrderDetailB2BLinesInnerScheduleLinesInner.md new file mode 100644 index 00000000..2d82f59d --- /dev/null +++ b/docs/OrderDetailB2BLinesInnerScheduleLinesInner.md @@ -0,0 +1,17 @@ + + +# OrderDetailB2BLinesInnerScheduleLinesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**lineNumber** | **String** | Line number. | [optional] | +|**scheduleLineDate** | **String** | schedule Line Date. | [optional] | +|**requestedQuantity** | **String** | Requested quantity. | [optional] | +|**confirmedQuantity** | **String** | Confirmed quantity. | [optional] | +|**goodsIssueDate** | **String** | Date when good issued. | [optional] | + + + diff --git a/docs/OrderDetailB2BLinesInnerServiceContractInfo.md b/docs/OrderDetailB2BLinesInnerServiceContractInfo.md new file mode 100644 index 00000000..11890c01 --- /dev/null +++ b/docs/OrderDetailB2BLinesInnerServiceContractInfo.md @@ -0,0 +1,15 @@ + + +# OrderDetailB2BLinesInnerServiceContractInfo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**contractInfo** | [**OrderDetailB2BLinesInnerServiceContractInfoContractInfo**](OrderDetailB2BLinesInnerServiceContractInfoContractInfo.md) | | [optional] | +|**subscriptions** | [**OrderDetailB2BLinesInnerServiceContractInfoSubscriptions**](OrderDetailB2BLinesInnerServiceContractInfoSubscriptions.md) | | [optional] | +|**licenseInfo** | [**OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo**](OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo.md) | | [optional] | + + + diff --git a/docs/OrderDetailB2BLinesInnerServiceContractInfoContractInfo.md b/docs/OrderDetailB2BLinesInnerServiceContractInfoContractInfo.md new file mode 100644 index 00000000..bceab230 --- /dev/null +++ b/docs/OrderDetailB2BLinesInnerServiceContractInfoContractInfo.md @@ -0,0 +1,18 @@ + + +# OrderDetailB2BLinesInnerServiceContractInfoContractInfo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**contractDescription** | **String** | The description of the contract. | [optional] | +|**contractNumber** | **String** | Contract number. | [optional] | +|**contractStatus** | **String** | The status of the contract. | [optional] | +|**contractStartDate** | **String** | Start date of the contract. | [optional] | +|**contractEndDate** | **String** | End date of the contract. | [optional] | +|**contractDuration** | **String** | The duration of the contract. | [optional] | + + + diff --git a/docs/OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo.md b/docs/OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo.md new file mode 100644 index 00000000..f8e9a1b1 --- /dev/null +++ b/docs/OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo.md @@ -0,0 +1,17 @@ + + +# OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**licenseNumber** | **List<String>** | License numbers. | [optional] | +|**licenseStartDate** | **String** | Start Date of the license. | [optional] | +|**licenseEndDate** | **String** | End Date of the license. | [optional] | +|**description** | **String** | Description of the license. | [optional] | +|**quantity** | **String** | Quantity of the license. | [optional] | + + + diff --git a/docs/OrderDetailB2BLinesInnerServiceContractInfoSubscriptions.md b/docs/OrderDetailB2BLinesInnerServiceContractInfoSubscriptions.md new file mode 100644 index 00000000..c3244427 --- /dev/null +++ b/docs/OrderDetailB2BLinesInnerServiceContractInfoSubscriptions.md @@ -0,0 +1,18 @@ + + +# OrderDetailB2BLinesInnerServiceContractInfoSubscriptions + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**subscriptionId** | **String** | The ID of the subscription. | [optional] | +|**subscriptionTerm** | **String** | The term of the subscription. | [optional] | +|**renewalTerm** | **String** | The renewal term of the subscription. | [optional] | +|**billingModel** | **String** | The billing model of the billing. | [optional] | +|**subcriptionStartDate** | **String** | Start date of the subcription. | [optional] | +|**subcriptionEndDate** | **String** | End date of the subcription. | [optional] | + + + diff --git a/docs/OrderDetailB2BLinesInnerShipmentDetailsInner.md b/docs/OrderDetailB2BLinesInnerShipmentDetailsInner.md new file mode 100644 index 00000000..f00d22b6 --- /dev/null +++ b/docs/OrderDetailB2BLinesInnerShipmentDetailsInner.md @@ -0,0 +1,20 @@ + + +# OrderDetailB2BLinesInnerShipmentDetailsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quantity** | **Integer** | The quantity shipped of the line item. | [optional] | +|**deliveryNumber** | **String** | The actual date of delivery of the line item. | [optional] | +|**estimatedShipDate** | **String** | The date the line item is expected to be shipped. | [optional] | +|**shipFromWarehouseId** | **String** | The ID of the warehouse the product will ship from. | [optional] | +|**shipFromLocation** | **String** | The city and state the line item ships from. | [optional] | +|**invoiceNumber** | **String** | The Ingram Micro invoice number for the line item. | [optional] | +|**invoiceDate** | **String** | The date the IngramMicro invoice was created for the line item. | [optional] | +|**carrierDetails** | [**List<OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner>**](OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.md) | The shipment carrier details for the line item. | [optional] | + + + diff --git a/docs/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.md b/docs/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.md new file mode 100644 index 00000000..08f80de3 --- /dev/null +++ b/docs/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.md @@ -0,0 +1,20 @@ + + +# OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**carrierCode** | **String** | The carrier code for the shipment containing the line item. | [optional] | +|**carrierName** | **String** | The name of the carrier of the shipment containing the line item. | [optional] | +|**quantity** | **Integer** | The quantity shipped of the line item. | [optional] | +|**shippedDate** | **String** | The actual date when line item shipped. | [optional] | +|**estimatedDeliveryDate** | **String** | The date the line item is expected to be delivered. | [optional] | +|**deliveredDate** | **String** | The actual date of delivery of the line item. | [optional] | +|**carrierPickupDate** | **String** | The actual date when carrier picked up line item. | [optional] | +|**trackingDetails** | [**List<OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner>**](OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner.md) | The tracking details for the shipment containing the line item. | [optional] | + + + diff --git a/docs/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner.md b/docs/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner.md new file mode 100644 index 00000000..2eb13b2c --- /dev/null +++ b/docs/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner.md @@ -0,0 +1,18 @@ + + +# OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**trackingNumber** | **String** | The tracking number for the shipment containing the line item. | [optional] | +|**trackingUrl** | **String** | The tracking URL for the shipment containing the line item. | [optional] | +|**packageWeight** | **String** | The weight of the package for the line item. | [optional] | +|**cartonNumber** | **String** | The shipment carton number that contains the line item. | [optional] | +|**quantityInBox** | **String** | The quantity of line items in the box. | [optional] | +|**serialNumbers** | [**List<OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner>**](OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner.md) | A list of serial numbers of the line items contained in the shipment. | [optional] | + + + diff --git a/docs/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner.md b/docs/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner.md new file mode 100644 index 00000000..fbf73399 --- /dev/null +++ b/docs/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner.md @@ -0,0 +1,13 @@ + + +# OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**serialNumber** | **String** | The serial number for the line item. | [optional] | + + + diff --git a/docs/OrderDetailB2BMiscellaneousChargesInner.md b/docs/OrderDetailB2BMiscellaneousChargesInner.md new file mode 100644 index 00000000..0837f226 --- /dev/null +++ b/docs/OrderDetailB2BMiscellaneousChargesInner.md @@ -0,0 +1,16 @@ + + +# OrderDetailB2BMiscellaneousChargesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**subOrderNumber** | **String** | The sub order number. The two-digit prefix is the warehouse code of the warehouse nearest the reseller. The middle number is the order number. The two-digit suffix is the sub order number. | [optional] | +|**chargeLineReference** | **String** | Impulse line number for the miscellaneous charge. | [optional] | +|**chargeDescription** | **String** | Description of the miscellaneous charges. | [optional] | +|**chargeAmount** | **String** | The amount of miscellaneous charges. | [optional] | + + + diff --git a/docs/OrderDetailB2BShipToInfo.md b/docs/OrderDetailB2BShipToInfo.md new file mode 100644 index 00000000..cda32b44 --- /dev/null +++ b/docs/OrderDetailB2BShipToInfo.md @@ -0,0 +1,24 @@ + + +# OrderDetailB2BShipToInfo + +The shipping information provided by the reseller for order delivery. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**contact** | **String** | The company contact provided by the reseller. | [optional] | +|**companyName** | **String** | The name of the company the order will be shipped to. | [optional] | +|**addressLine1** | **String** | The address line 1 the order will be shipped to. | [optional] | +|**addressLine2** | **String** | The address line 2 the order will be shipped to. | [optional] | +|**addressLine3** | **String** | The address line 3 the order will be shipped to. | [optional] | +|**city** | **String** | The city the order will be shipped to. | [optional] | +|**state** | **String** | The state the order will be shipped to. | [optional] | +|**postalCode** | **String** | The zip or postal code the order will be shipped to. | [optional] | +|**countryCode** | **String** | The two-character ISO country code the order will be shipped to. | [optional] | +|**phoneNumber** | **String** | The company contact phone number. | [optional] | +|**email** | **String** | The company contact email address. | [optional] | + + + diff --git a/docs/OrderDetailRequest.md b/docs/OrderDetailRequest.md new file mode 100644 index 00000000..a13f57a9 --- /dev/null +++ b/docs/OrderDetailRequest.md @@ -0,0 +1,14 @@ + + +# OrderDetailRequest + +Request schema for order details endpoint + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**servicerequest** | [**OrderDetailRequestServicerequest**](OrderDetailRequestServicerequest.md) | | [optional] | + + + diff --git a/docs/OrderDetailRequestServicerequest.md b/docs/OrderDetailRequestServicerequest.md new file mode 100644 index 00000000..b3df43fb --- /dev/null +++ b/docs/OrderDetailRequestServicerequest.md @@ -0,0 +1,14 @@ + + +# OrderDetailRequestServicerequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**requestpreamble** | [**InvoiceDetailRequestServicerequestRequestpreamble**](InvoiceDetailRequestServicerequestRequestpreamble.md) | | | +|**orderdetailrequest** | [**OrderDetailRequestServicerequestOrderdetailrequest**](OrderDetailRequestServicerequestOrderdetailrequest.md) | | [optional] | + + + diff --git a/docs/OrderDetailRequestServicerequestOrderdetailrequest.md b/docs/OrderDetailRequestServicerequestOrderdetailrequest.md new file mode 100644 index 00000000..4855a0ef --- /dev/null +++ b/docs/OrderDetailRequestServicerequestOrderdetailrequest.md @@ -0,0 +1,16 @@ + + +# OrderDetailRequestServicerequestOrderdetailrequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ordernumber** | **String** | Ingram Micro Order Number | | +|**customerponumber** | **String** | | [optional] | +|**orderdate** | **String** | | [optional] | +|**systemid** | **String** | | [optional] | + + + diff --git a/docs/OrderDetailResponse.md b/docs/OrderDetailResponse.md new file mode 100644 index 00000000..d1bbfa46 --- /dev/null +++ b/docs/OrderDetailResponse.md @@ -0,0 +1,14 @@ + + +# OrderDetailResponse + +Response schema for order details endpoint + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**serviceresponse** | [**OrderDetailResponseServiceresponse**](OrderDetailResponseServiceresponse.md) | | [optional] | + + + diff --git a/docs/OrderDetailResponseBillToInfo.md b/docs/OrderDetailResponseBillToInfo.md new file mode 100644 index 00000000..cf823c72 --- /dev/null +++ b/docs/OrderDetailResponseBillToInfo.md @@ -0,0 +1,26 @@ + + +# OrderDetailResponseBillToInfo + +The billing information provided by the reseller. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**contact** | **String** | The company contact provided by the reseller. | [optional] | +|**companyName** | **String** | The name of the company the order will be billed to. | [optional] | +|**name1** | **String** | First name. | [optional] | +|**name2** | **String** | Last name. | [optional] | +|**addressLine1** | **String** | The street address and building or house number the order will be billed to. | [optional] | +|**addressLine2** | **String** | The apartment number the order will be billed to. | [optional] | +|**addressLine3** | **String** | Address line 3. | [optional] | +|**city** | **String** | The city the order will be billed to. | [optional] | +|**state** | **String** | The state the order will be billed to. | [optional] | +|**postalCode** | **String** | The zip or postal code the order will be billed to. | [optional] | +|**countryCode** | **String** | The two-character ISO country code the order will be billed to. | [optional] | +|**phoneNumber** | **String** | The company contact phone number. | [optional] | +|**email** | **String** | The company contact email address. | [optional] | + + + diff --git a/docs/OrderDetailResponseEndUserInfo.md b/docs/OrderDetailResponseEndUserInfo.md new file mode 100644 index 00000000..4d6f191e --- /dev/null +++ b/docs/OrderDetailResponseEndUserInfo.md @@ -0,0 +1,26 @@ + + +# OrderDetailResponseEndUserInfo + +The contact information for the end user/customer provided by the reseller. Used to determine pricing and discounts. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**contact** | **String** | The contact name for the end user/customer. | [optional] | +|**companyName** | **String** | The company name for the end user/customer. | [optional] | +|**name1** | **String** | First name. | [optional] | +|**name2** | **String** | Last name. | [optional] | +|**addressLine1** | **String** | The street adress and building or house number for the end user/customer. | [optional] | +|**addressLine2** | **String** | The apartment number for the end user/customer. | [optional] | +|**addressLine3** | **String** | Line 3 of the address for the end user/customer. | [optional] | +|**city** | **String** | The end user/customer's city. | [optional] | +|**state** | **String** | The end user/customer's state. | [optional] | +|**postalCode** | **String** | The end user/customer's zip or postal code. | [optional] | +|**countryCode** | **String** | The end user/customer's two character ISO country code. | [optional] | +|**phoneNumber** | **String** | The end user/customer's phone number. | [optional] | +|**email** | **String** | The end user/customer's email. | [optional] | + + + diff --git a/docs/OrderDetailResponseLinesInner.md b/docs/OrderDetailResponseLinesInner.md new file mode 100644 index 00000000..6d9359a6 --- /dev/null +++ b/docs/OrderDetailResponseLinesInner.md @@ -0,0 +1,38 @@ + + +# OrderDetailResponseLinesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**subOrderNumber** | **String** | The sub order number. The two-digit prefix is the warehouse code of the warehouse nearest the reseller. The middle number is the order number. The two-digit suffix is the sub order number. | [optional] | +|**ingramOrderLineNumber** | **String** | Unique Ingram Micro line number. Starts with 001. | [optional] | +|**vendorSalesOrderLineNumber** | **String** | The vendor's sales order line number. | [optional] | +|**customerLinenumber** | **String** | The reseller's line item number for reference in their system. | [optional] | +|**lineStatus** | **String** | The status for the line item in the order. One of- Backordered, In Progress, Shipped, Delivered, Canceled, On Hold | [optional] | +|**ingramPartNumber** | **String** | Unique IngramMicro part number. | [optional] | +|**vendorPartNumber** | **String** | The vendor's part number for the line item. | [optional] | +|**vendorName** | **String** | The vendor's name for the part in their system. | [optional] | +|**partDescription** | **String** | The vendor's description of the part in their system. | [optional] | +|**unitWeight** | **BigDecimal** | The unit weight of the line item. | [optional] | +|**weightUom** | **String** | The unit of measure for the line item. | [optional] | +|**unitPrice** | **Integer** | The unit price of the line item. | [optional] | +|**upcCode** | **String** | The UPC code of a product. | [optional] | +|**extendedPrice** | **BigDecimal** | Unit price X quantity for the line item. | [optional] | +|**taxAmount** | **BigDecimal** | The tax amount for the line item. | [optional] | +|**currencyCode** | **String** | The country-specific three character ISO 4217 currency code for the line item. | [optional] | +|**quantityOrdered** | **Integer** | The quantity ordered of the line item. | [optional] | +|**quantityConfirmed** | **Integer** | The quantity confirmed for the line item. | [optional] | +|**quantityBackOrdered** | **Integer** | The quantity backordered for the line item. | [optional] | +|**specialBidNumber** | **String** | The line-level bid number provided to the reseller by the vendor for special pricing and discounts. Used to track the bid number in the case of split orders or where different line items have different bid numbers. Line-level bid numbers take precedence over header-level bid numbers. | [optional] | +|**requestedDeliveryDate** | **LocalDate** | Reseller-requested delivery date. Delivery date is not guaranteed. | [optional] | +|**promisedDeliveryDate** | **LocalDate** | The delivery date promised by IngramMicro. | [optional] | +|**lineNotes** | **String** | Line-level notes for the order. | [optional] | +|**shipmentDetails** | [**List<OrderDetailResponseLinesInnerShipmentDetailsInner>**](OrderDetailResponseLinesInnerShipmentDetailsInner.md) | | [optional] | +|**additionalAttributes** | [**List<OrderDetailResponseLinesInnerAdditionalAttributesInner>**](OrderDetailResponseLinesInnerAdditionalAttributesInner.md) | | [optional] | +|**links** | [**List<OrderDetailResponseLinesInnerLinksInner>**](OrderDetailResponseLinesInnerLinksInner.md) | | [optional] | + + + diff --git a/docs/OrderDetailResponseLinesInnerAdditionalAttributesInner.md b/docs/OrderDetailResponseLinesInnerAdditionalAttributesInner.md new file mode 100644 index 00000000..6335310e --- /dev/null +++ b/docs/OrderDetailResponseLinesInnerAdditionalAttributesInner.md @@ -0,0 +1,14 @@ + + +# OrderDetailResponseLinesInnerAdditionalAttributesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeName** | **String** | Line level custom field names. | [optional] | +|**attributeValue** | **String** | Value of the custom fields. | [optional] | + + + diff --git a/docs/OrderDetailResponseLinesInnerLinksInner.md b/docs/OrderDetailResponseLinesInnerLinksInner.md new file mode 100644 index 00000000..c4b595a8 --- /dev/null +++ b/docs/OrderDetailResponseLinesInnerLinksInner.md @@ -0,0 +1,16 @@ + + +# OrderDetailResponseLinesInnerLinksInner + +Link to Order Details for the line item. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**topic** | **String** | Provides the details of the line item. | [optional] | +|**href** | **String** | The API endpoint for accessing the relevant data. | [optional] | +|**type** | **String** | The type of call that can be made to the href link(GET,POST etc). | [optional] | + + + diff --git a/docs/OrderDetailResponseLinesInnerShipmentDetailsInner.md b/docs/OrderDetailResponseLinesInnerShipmentDetailsInner.md new file mode 100644 index 00000000..f0c12cdb --- /dev/null +++ b/docs/OrderDetailResponseLinesInnerShipmentDetailsInner.md @@ -0,0 +1,23 @@ + + +# OrderDetailResponseLinesInnerShipmentDetailsInner + +Shipping details for the line item. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quantity** | **Integer** | The quantity shipped of the line item. | [optional] | +|**estimatedShipDate** | **LocalDate** | The estimated ship date for the line item. | [optional] | +|**shippedDate** | **LocalDate** | The date the line item was shipped. | [optional] | +|**estimatedDeliveryDate** | **LocalDate** | The date the line item is expected to be delivered. | [optional] | +|**deliveredDate** | **LocalDate** | The actual date of delivery of the line item. | [optional] | +|**shipFromWarehouseId** | **String** | The ID of the warehouse the product will ship from. | [optional] | +|**shipFromLocation** | **String** | The city and state the line item ships from. | [optional] | +|**invoiceNumber** | **String** | The Ingram Micro invoice number for the line item. | [optional] | +|**invoiceDate** | **LocalDate** | The date the IngramMicro invoice was created for the line item. | [optional] | +|**carrierDetails** | [**OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails**](OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails.md) | | [optional] | + + + diff --git a/docs/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails.md b/docs/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails.md new file mode 100644 index 00000000..aece78e9 --- /dev/null +++ b/docs/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails.md @@ -0,0 +1,16 @@ + + +# OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails + +The shipment carrier details for the line item. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**carrierCode** | **String** | The carrier code for the shipment containing the line item. | [optional] | +|**carrierName** | **String** | The name of the carrier of the shipment containing the line item. | [optional] | +|**trackingDetails** | [**List<OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner>**](OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner.md) | | [optional] | + + + diff --git a/docs/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner.md b/docs/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner.md new file mode 100644 index 00000000..66ac1728 --- /dev/null +++ b/docs/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner.md @@ -0,0 +1,19 @@ + + +# OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner + +The tracking details for the shipment containing the line item. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**trackingNumber** | **String** | The tracking number for the shipment containing the line item. | [optional] | +|**trackingUrl** | **String** | The tracking URL for the shipment containing the line item. | [optional] | +|**packageWeight** | **String** | The weight of the package for the line item. | [optional] | +|**cartonNumber** | **String** | The shipment carton number that contains the line item. | [optional] | +|**quantityInBox** | **String** | The quantity of line items in the box. | [optional] | +|**serialNumbers** | [**List<OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner>**](OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner.md) | | [optional] | + + + diff --git a/docs/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner.md b/docs/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner.md new file mode 100644 index 00000000..533b02d0 --- /dev/null +++ b/docs/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner.md @@ -0,0 +1,14 @@ + + +# OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner + +A list of serial numbers of the line items contained in the shipment. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**serialNumber** | **String** | The serial number for the line item. | [optional] | + + + diff --git a/docs/OrderDetailResponseMiscellaneousChargesInner.md b/docs/OrderDetailResponseMiscellaneousChargesInner.md new file mode 100644 index 00000000..21c82923 --- /dev/null +++ b/docs/OrderDetailResponseMiscellaneousChargesInner.md @@ -0,0 +1,16 @@ + + +# OrderDetailResponseMiscellaneousChargesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**subOrderNumber** | **String** | The sub order number. The two-digit prefix is the warehouse code of the warehouse nearest the reseller. The middle number is the order number. The two-digit suffix is the sub order number. | [optional] | +|**chargeLineReference** | **String** | Impulse line number for the miscellaneous charge. | [optional] | +|**chargeDescription** | **String** | Description of the miscellaneous charges. | [optional] | +|**chargeAmount** | **Double** | The amount of miscellaneous charges. | [optional] | + + + diff --git a/docs/OrderDetailResponseServiceresponse.md b/docs/OrderDetailResponseServiceresponse.md new file mode 100644 index 00000000..3a798777 --- /dev/null +++ b/docs/OrderDetailResponseServiceresponse.md @@ -0,0 +1,14 @@ + + +# OrderDetailResponseServiceresponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responsepreamble** | [**InvoiceDetailResponseServiceresponseResponsepreamble**](InvoiceDetailResponseServiceresponseResponsepreamble.md) | | [optional] | +|**orderdetailresponse** | [**OrderDetailResponseServiceresponseOrderdetailresponse**](OrderDetailResponseServiceresponseOrderdetailresponse.md) | | [optional] | + + + diff --git a/docs/OrderDetailResponseServiceresponseOrderdetailresponse.md b/docs/OrderDetailResponseServiceresponseOrderdetailresponse.md new file mode 100644 index 00000000..8f8ebc24 --- /dev/null +++ b/docs/OrderDetailResponseServiceresponseOrderdetailresponse.md @@ -0,0 +1,32 @@ + + +# OrderDetailResponseServiceresponseOrderdetailresponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ordernumber** | **String** | | [optional] | +|**ordertype** | **String** | Order Type B - BRANCH TRANSFER C - CASH ORDER D - DIRECT ORDER F - FUTURE ORDER P - SPECIAL ORDER Q - QUOTE ORDER S - STOCK ORDER M - MEMO ORDER | [optional] | +|**customerordernumber** | **String** | Customer PO number | [optional] | +|**enduserponumber** | **String** | End User PO number | [optional] | +|**orderstatus** | **String** | Status of order within Ingram system S - SALES HOLD H - TAG HOLD I - INVOICED P - PENDING E - BILLING ERROR F - FORCE BILLING V - VOIDED T - TRANSFERRED D - HOLD SHIPMENT R - RELEASED O - IM ONLINE HOLD U - BILL FOR HISTORY ONLY W - ORDER NOT PRINTED A - DROP SHIP HOLD B - INTERNET CUST ORIG HOLD 1 - PICKED 2 - INSPECTED 3 - PACKED 4 - SHIPPED C - CREDIT HOLD 9 - CISCO 3A6 Q - RMA HOLD G - CREDIT HOLD N - CREDIT HOLD | [optional] | +|**entrytimestamp** | **String** | Time stamp of the order placed | [optional] | +|**entrymethoddescription** | **String** | Description of the entry method | [optional] | +|**ordertotalvalue** | **BigDecimal** | Total order value | [optional] | +|**ordersubtotal** | **BigDecimal** | Subtotal order value | [optional] | +|**freightamount** | **String** | Freight charges | [optional] | +|**currencycode** | **String** | Country specific currency code | [optional] | +|**totalweight** | **String** | Total order weight. unit -- North america - Pounds , other countries will be KG | [optional] | +|**totaltax** | **String** | total tax on the orders placed | [optional] | +|**billtoaddress** | [**OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress**](OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.md) | | [optional] | +|**shiptoaddress** | [**OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress**](OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.md) | | [optional] | +|**enduserinfo** | [**OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo**](OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo.md) | | [optional] | +|**lines** | [**List<OrderDetailResponseServiceresponseOrderdetailresponseLinesInner>**](OrderDetailResponseServiceresponseOrderdetailresponseLinesInner.md) | | [optional] | +|**commentlines** | [**List<OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner>**](OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner.md) | | [optional] | +|**miscfeeline** | [**List<OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner>**](OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner.md) | | [optional] | +|**extendedspecs** | [**List<OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner>**](OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner.md) | | [optional] | + + + diff --git a/docs/OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.md b/docs/OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.md new file mode 100644 index 00000000..13c55248 --- /dev/null +++ b/docs/OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.md @@ -0,0 +1,22 @@ + + +# OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**suffix** | **String** | | [optional] | +|**name** | **String** | | [optional] | +|**attention** | **String** | | [optional] | +|**addressline1** | **String** | | [optional] | +|**addressline2** | **String** | | [optional] | +|**addressline3** | **String** | | [optional] | +|**city** | **String** | | [optional] | +|**state** | **String** | | [optional] | +|**postalcode** | **String** | | [optional] | +|**countrycode** | **String** | | [optional] | + + + diff --git a/docs/OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner.md b/docs/OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner.md new file mode 100644 index 00000000..773a798a --- /dev/null +++ b/docs/OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner.md @@ -0,0 +1,14 @@ + + +# OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**commenttext1** | **String** | | [optional] | +|**commenttext2** | **String** | | [optional] | + + + diff --git a/docs/OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo.md b/docs/OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo.md new file mode 100644 index 00000000..0fd0ce94 --- /dev/null +++ b/docs/OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo.md @@ -0,0 +1,13 @@ + + +# OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enduserid** | **String** | | [optional] | + + + diff --git a/docs/OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner.md b/docs/OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner.md new file mode 100644 index 00000000..86c2fb2d --- /dev/null +++ b/docs/OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner.md @@ -0,0 +1,14 @@ + + +# OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributename** | **String** | termscode' | 'termsdescription' | 'commenttext' are the atrribute name | [optional] | +|**attributevalue** | **String** | values of these fields are send . termscode' | 'termsdescription' | 'commenttext' are the atrribute name | [optional] | + + + diff --git a/docs/OrderDetailResponseServiceresponseOrderdetailresponseLinesInner.md b/docs/OrderDetailResponseServiceresponseOrderdetailresponseLinesInner.md new file mode 100644 index 00000000..7eb24b6d --- /dev/null +++ b/docs/OrderDetailResponseServiceresponseOrderdetailresponseLinesInner.md @@ -0,0 +1,35 @@ + + +# OrderDetailResponseServiceresponseOrderdetailresponseLinesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**linenumber** | **String** | Impulse line number | [optional] | +|**globallinenumber** | **String** | Line of the Globel Sku / Customer Line Number | [optional] | +|**ordersuffix** | **String** | Order Suffix | [optional] | +|**erpordernumber** | **String** | Sales order number | [optional] | +|**linestatus** | **String** | Status of the line | [optional] | +|**partnumber** | **String** | Ingram part number | [optional] | +|**manufacturerpartnumber** | **String** | manufacture number of the product | [optional] | +|**vendorname** | **String** | name of the vendor | [optional] | +|**vendorcode** | **String** | Ingram Micro assigned code for the vendor | [optional] | +|**partdescription1** | **String** | | [optional] | +|**partdescription2** | **String** | | [optional] | +|**unitweight** | **String** | weight of the product unit | [optional] | +|**unitprice** | **BigDecimal** | Customer price of the unit | [optional] | +|**extendedprice** | **BigDecimal** | extended price of the order | [optional] | +|**taxamount** | **BigDecimal** | tax amount for the order | [optional] | +|**requestedquantity** | **String** | no. of units requested | [optional] | +|**confirmedquantity** | **String** | no. of units confirmed available | [optional] | +|**backorderquantity** | **String** | quantity of back order | [optional] | +|**serialnumberdetails** | [**List<OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner>**](OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner.md) | | [optional] | +|**trackingnumber** | **List<String>** | | [optional] | +|**shipmentdetails** | [**List<OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner>**](OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.md) | | [optional] | +|**productextendedspecs** | [**List<InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner>**](InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner.md) | | [optional] | +|**backorderetadate** | **String** | estimated date of back order | [optional] | + + + diff --git a/docs/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner.md b/docs/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner.md new file mode 100644 index 00000000..eda63769 --- /dev/null +++ b/docs/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner.md @@ -0,0 +1,13 @@ + + +# OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**serialnumber** | **String** | serial number of the ordered SKU | [optional] | + + + diff --git a/docs/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.md b/docs/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.md new file mode 100644 index 00000000..1321b43e --- /dev/null +++ b/docs/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.md @@ -0,0 +1,28 @@ + + +# OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quantity** | **BigDecimal** | quantity shipped | [optional] | +|**shipmentdate** | **String** | date of shipment | [optional] | +|**shipfromwarehouseid** | **String** | Warehouse product was shipped from | [optional] | +|**warehousename** | **String** | name of the warehouse | [optional] | +|**invoicenumber** | **String** | Invoice Number | [optional] | +|**invoicedate** | **String** | date on the invoice generated | [optional] | +|**status** | **String** | code for current Status of the order | [optional] | +|**statusdescription** | **String** | Description of status | [optional] | +|**shippeddate** | **String** | date of shipment | [optional] | +|**holdreasoncodedescription** | **String** | Description of the code if the order is on hold | [optional] | +|**ponumber** | **String** | Ingram PO Number to vendors for direct ship orders | [optional] | +|**carriertype** | **String** | Helps to determine shipment type. for e.g. LTL is used for heavy shipment. SML is used for light shipment | [optional] | +|**carriercode** | **String** | | [optional] | +|**carriername** | **String** | Name of the carrier. If carriername is LTL then the tracking info is in the \"pronumber\" data field | [optional] | +|**pronumber** | **String** | | [optional] | +|**packagedetails** | [**OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails**](OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails.md) | | [optional] | + + + diff --git a/docs/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails.md b/docs/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails.md new file mode 100644 index 00000000..dd859dd7 --- /dev/null +++ b/docs/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails.md @@ -0,0 +1,16 @@ + + +# OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**trackingnumber** | **String** | | [optional] | +|**packageweight** | **String** | | [optional] | +|**cartonnumber** | **String** | | [optional] | +|**quantityinbox** | **String** | | [optional] | + + + diff --git a/docs/OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner.md b/docs/OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner.md new file mode 100644 index 00000000..2281fc8c --- /dev/null +++ b/docs/OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner.md @@ -0,0 +1,14 @@ + + +# OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**description** | **String** | Handling charges/Miscellaneous Fee description | [optional] | +|**chargeamount** | **String** | Handling charges/ Miscelaneous fee amount | [optional] | + + + diff --git a/docs/OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.md b/docs/OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.md new file mode 100644 index 00000000..a06832fa --- /dev/null +++ b/docs/OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.md @@ -0,0 +1,22 @@ + + +# OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**suffix** | **String** | | [optional] | +|**attention** | **String** | | [optional] | +|**name** | **String** | | [optional] | +|**addressline1** | **String** | | [optional] | +|**addressline2** | **String** | | [optional] | +|**addressline3** | **String** | | [optional] | +|**city** | **String** | | [optional] | +|**state** | **String** | | [optional] | +|**postalcode** | **String** | | [optional] | +|**countrycode** | **String** | | [optional] | + + + diff --git a/docs/OrderDetailResponseShipToInfo.md b/docs/OrderDetailResponseShipToInfo.md new file mode 100644 index 00000000..6f58afb4 --- /dev/null +++ b/docs/OrderDetailResponseShipToInfo.md @@ -0,0 +1,26 @@ + + +# OrderDetailResponseShipToInfo + +The shipping information provided by the reseller for order delivery. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**contact** | **String** | The company contact provided by the reseller. | [optional] | +|**companyName** | **String** | The name of the company the order will be shipped to. | [optional] | +|**name1** | **String** | First name. | [optional] | +|**name2** | **String** | Last name. | [optional] | +|**addressLine1** | **String** | The street address the order will be shipped to. | [optional] | +|**addressLine2** | **String** | The building or apartment number the order will be shipped to. | [optional] | +|**addressLine3** | **String** | Line 3 of the address the order will be shipped to. | [optional] | +|**city** | **String** | The city the order will be shipped to. | [optional] | +|**state** | **String** | The state the order will be shipped to. | [optional] | +|**postalCode** | **String** | The zip or postal code the order will be shipped to. | [optional] | +|**countryCode** | **String** | The two-character ISO country code the order will be shipped to. | [optional] | +|**phoneNumber** | **String** | The company contact phone number. | [optional] | +|**email** | **String** | The company contact email address. | [optional] | + + + diff --git a/docs/OrderModifyRequest.md b/docs/OrderModifyRequest.md new file mode 100644 index 00000000..e53bb1ad --- /dev/null +++ b/docs/OrderModifyRequest.md @@ -0,0 +1,14 @@ + + +# OrderModifyRequest + +Request schema for order modify endpoint + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**servicerequest** | [**OrderModifyRequestServicerequest**](OrderModifyRequestServicerequest.md) | | [optional] | + + + diff --git a/docs/OrderModifyRequestAdditionalAttributesInner.md b/docs/OrderModifyRequestAdditionalAttributesInner.md new file mode 100644 index 00000000..ceb18c35 --- /dev/null +++ b/docs/OrderModifyRequestAdditionalAttributesInner.md @@ -0,0 +1,14 @@ + + +# OrderModifyRequestAdditionalAttributesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeName** | **String** | Example values are 'entryMethod', 'enableCommentsAsLines', 'regionCode' | [optional] | +|**attributeValue** | **String** | Attribute Value | [optional] | + + + diff --git a/docs/OrderModifyRequestLinesInner.md b/docs/OrderModifyRequestLinesInner.md new file mode 100644 index 00000000..d4641bdc --- /dev/null +++ b/docs/OrderModifyRequestLinesInner.md @@ -0,0 +1,28 @@ + + +# OrderModifyRequestLinesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ingramPartNumber** | **String** | The unique IngramMicro part number. | [optional] | +|**ingramLineNumber** | **String** | The IngramMicro line number. | [optional] | +|**customerLineNumber** | **String** | The reseller's line number for reference in their system. | [optional] | +|**addUpdateDeleteLine** | [**AddUpdateDeleteLineEnum**](#AddUpdateDeleteLineEnum) | The line number that was added, updated, or deleted. | [optional] | +|**quantity** | **Integer** | The quantity of the line item. | [optional] | +|**notes** | **String** | The line-level notes. | [optional] | + + + +## Enum: AddUpdateDeleteLineEnum + +| Name | Value | +|---- | -----| +| UPDATE | "UPDATE" | +| DELETE | "DELETE" | +| ADD | "ADD" | + + + diff --git a/docs/OrderModifyRequestServicerequest.md b/docs/OrderModifyRequestServicerequest.md new file mode 100644 index 00000000..ace4f3a1 --- /dev/null +++ b/docs/OrderModifyRequestServicerequest.md @@ -0,0 +1,14 @@ + + +# OrderModifyRequestServicerequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**requestpreamble** | [**OrderModifyRequestServicerequestRequestpreamble**](OrderModifyRequestServicerequestRequestpreamble.md) | | [optional] | +|**ordermodifyrequest** | [**OrderModifyRequestServicerequestOrdermodifyrequest**](OrderModifyRequestServicerequestOrdermodifyrequest.md) | | [optional] | + + + diff --git a/docs/OrderModifyRequestServicerequestOrdermodifyrequest.md b/docs/OrderModifyRequestServicerequestOrdermodifyrequest.md new file mode 100644 index 00000000..9181b0e9 --- /dev/null +++ b/docs/OrderModifyRequestServicerequestOrdermodifyrequest.md @@ -0,0 +1,20 @@ + + +# OrderModifyRequestServicerequestOrdermodifyrequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ingramorderbranch** | **String** | | [optional] | +|**ingramordernumber** | **String** | | [optional] | +|**ingramorderdist** | **String** | | [optional] | +|**ingramordership** | **String** | | [optional] | +|**customerponumber** | **String** | | [optional] | +|**shipto** | [**OrderModifyRequestServicerequestOrdermodifyrequestShipto**](OrderModifyRequestServicerequestOrdermodifyrequestShipto.md) | | [optional] | +|**headerdata** | [**OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata**](OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata.md) | | [optional] | +|**linedata** | [**List<OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner>**](OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner.md) | | [optional] | + + + diff --git a/docs/OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata.md b/docs/OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata.md new file mode 100644 index 00000000..b0859241 --- /dev/null +++ b/docs/OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata.md @@ -0,0 +1,14 @@ + + +# OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**actioncode** | **String** | | [optional] | +|**shipviacode** | **String** | | [optional] | + + + diff --git a/docs/OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner.md b/docs/OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner.md new file mode 100644 index 00000000..f950cb47 --- /dev/null +++ b/docs/OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner.md @@ -0,0 +1,19 @@ + + +# OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**addlineorupdateline** | **String** | | [optional] | +|**linenumber** | **String** | | [optional] | +|**customerlinenumber** | **String** | | [optional] | +|**ingrampartnumber** | **String** | | [optional] | +|**quantityordered** | **Integer** | | [optional] | +|**customerpartnumber** | **String** | | [optional] | +|**linetype** | **String** | | [optional] | + + + diff --git a/docs/OrderModifyRequestServicerequestOrdermodifyrequestShipto.md b/docs/OrderModifyRequestServicerequestOrdermodifyrequestShipto.md new file mode 100644 index 00000000..5868388f --- /dev/null +++ b/docs/OrderModifyRequestServicerequestOrdermodifyrequestShipto.md @@ -0,0 +1,19 @@ + + +# OrderModifyRequestServicerequestOrdermodifyrequestShipto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | [optional] | +|**name** | **String** | | [optional] | +|**addressline** | **String** | | [optional] | +|**city** | **String** | | [optional] | +|**state** | **String** | | [optional] | +|**postalcode** | **String** | | [optional] | +|**countrycode** | **String** | | [optional] | + + + diff --git a/docs/OrderModifyRequestServicerequestRequestpreamble.md b/docs/OrderModifyRequestServicerequestRequestpreamble.md new file mode 100644 index 00000000..d6ea804a --- /dev/null +++ b/docs/OrderModifyRequestServicerequestRequestpreamble.md @@ -0,0 +1,14 @@ + + +# OrderModifyRequestServicerequestRequestpreamble + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**isocountrycode** | **String** | | [optional] | +|**customernumber** | **String** | | [optional] | + + + diff --git a/docs/OrderModifyRequestShipToInfo.md b/docs/OrderModifyRequestShipToInfo.md new file mode 100644 index 00000000..b0a31c95 --- /dev/null +++ b/docs/OrderModifyRequestShipToInfo.md @@ -0,0 +1,27 @@ + + +# OrderModifyRequestShipToInfo + +The shipping information provided by the reseller. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**addressId** | **String** | Suffix used to identify billing address. Created during onboarding. Resellers are provided with one or more address IDs depending on how many bill to addresses they need for various flooring companies they are using for credit. | [optional] | +|**contact** | **String** | The company contact provided by the reseller. | [optional] | +|**companyName** | **String** | The name of the company the order will be shipped to. | [optional] | +|**name1** | **String** | name1. | [optional] | +|**name2** | **String** | name2. | [optional] | +|**addressLine1** | **String** | The street address and building or house number the order will be shipped to. | [optional] | +|**addressLine2** | **String** | The apartment number the order will be shipped to. | [optional] | +|**addressLine3** | **String** | Line 3 of the address the order will be shipped to. | [optional] | +|**city** | **String** | The city the order will be shipped to. | [optional] | +|**state** | **String** | The state the order will be shipped to. | [optional] | +|**postalCode** | **String** | The zip or postal code the order will be shipped to. | [optional] | +|**countryCode** | **String** | The two-character ISO country code the order will be shipped to. | [optional] | +|**phoneNumber** | **String** | The company contact phone number. | [optional] | +|**email** | **String** | The company contact email address. | [optional] | + + + diff --git a/docs/OrderModifyResponse.md b/docs/OrderModifyResponse.md new file mode 100644 index 00000000..86596f0f --- /dev/null +++ b/docs/OrderModifyResponse.md @@ -0,0 +1,14 @@ + + +# OrderModifyResponse + +Response schema for order modify endpoint + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**serviceresponse** | [**OrderModifyResponseServiceresponse**](OrderModifyResponseServiceresponse.md) | | [optional] | + + + diff --git a/docs/OrderModifyResponseLinesInner.md b/docs/OrderModifyResponseLinesInner.md new file mode 100644 index 00000000..70abf549 --- /dev/null +++ b/docs/OrderModifyResponseLinesInner.md @@ -0,0 +1,23 @@ + + +# OrderModifyResponseLinesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**subOrderNumber** | **String** | The sub order number. The two-digit prefix is the warehouse code of the warehouse nearest the reseller. The middle number is the order number. The two-digit suffix is the sub order number. | [optional] | +|**ingramLineNumber** | **String** | The IngramMicro line number. | [optional] | +|**customerLineNumber** | **String** | The reseller's line number for reference in their system. | [optional] | +|**ingramPartNumber** | **String** | The unique IngramMicro part number for the line item. | [optional] | +|**vendorPartNumber** | **String** | The vendor's part number for the line item. | [optional] | +|**quantityOrdered** | **Integer** | The quantity ordered of the line item. | [optional] | +|**quantityConfirmed** | **Integer** | The quantity confirmed of the line item. | [optional] | +|**quantityBackOrdered** | **Integer** | The quantity backordered of the line item. | [optional] | +|**shipmentDetails** | [**OrderModifyResponseLinesInnerShipmentDetails**](OrderModifyResponseLinesInnerShipmentDetails.md) | | [optional] | +|**additionalAttributes** | [**List<OrderModifyResponseLinesInnerAdditionalAttributesInner>**](OrderModifyResponseLinesInnerAdditionalAttributesInner.md) | SAP requested and country-specific line level details. | [optional] | +|**notes** | **String** | Line-level notes for the order. | [optional] | + + + diff --git a/docs/OrderModifyResponseLinesInnerAdditionalAttributesInner.md b/docs/OrderModifyResponseLinesInnerAdditionalAttributesInner.md new file mode 100644 index 00000000..ab5c1561 --- /dev/null +++ b/docs/OrderModifyResponseLinesInnerAdditionalAttributesInner.md @@ -0,0 +1,14 @@ + + +# OrderModifyResponseLinesInnerAdditionalAttributesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeName** | **String** | Attribute Name. | [optional] | +|**attributeValue** | **String** | Attribute Value. | [optional] | + + + diff --git a/docs/OrderModifyResponseLinesInnerShipmentDetails.md b/docs/OrderModifyResponseLinesInnerShipmentDetails.md new file mode 100644 index 00000000..bdb6f09f --- /dev/null +++ b/docs/OrderModifyResponseLinesInnerShipmentDetails.md @@ -0,0 +1,16 @@ + + +# OrderModifyResponseLinesInnerShipmentDetails + +Shipping details for the order provided by the reseller. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**carrierCode** | **String** | The carrier code for the shipment containing the line item. | [optional] | +|**carrierName** | **String** | The name of the carrier of the shipment containing the line item. | [optional] | +|**freightAccountNumber** | **String** | The reseller's shipping account number with carrier. Used to bill the shipping carrier directly from the reseller's account with the carrier. | [optional] | + + + diff --git a/docs/OrderModifyResponseRejectedLineItemsInner.md b/docs/OrderModifyResponseRejectedLineItemsInner.md new file mode 100644 index 00000000..0e43b4c9 --- /dev/null +++ b/docs/OrderModifyResponseRejectedLineItemsInner.md @@ -0,0 +1,19 @@ + + +# OrderModifyResponseRejectedLineItemsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ingramLineNumber** | **String** | The IngramMicro line number for the failed line item. | [optional] | +|**customerLineNumber** | **String** | The reseller's line number of the failed line item for reference in their system. | [optional] | +|**ingramPartNumber** | **String** | The IngramMicro part number for the failed line item. | [optional] | +|**vendorPartNumber** | **String** | The vendor's part number for the failed line item. | [optional] | +|**quantityOrdered** | **Integer** | The quantity ordered of the failed line item. | [optional] | +|**rejectCode** | **String** | The rejection code for the failed line item. | [optional] | +|**rejectReason** | **String** | The rejection reason for the failed line item. | [optional] | + + + diff --git a/docs/OrderModifyResponseServiceresponse.md b/docs/OrderModifyResponseServiceresponse.md new file mode 100644 index 00000000..baa0d45b --- /dev/null +++ b/docs/OrderModifyResponseServiceresponse.md @@ -0,0 +1,14 @@ + + +# OrderModifyResponseServiceresponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responsepreamble** | [**OrderModifyResponseServiceresponseResponsepreamble**](OrderModifyResponseServiceresponseResponsepreamble.md) | | [optional] | +|**ordermodifyresponse** | [**OrderModifyResponseServiceresponseOrdermodifyresponse**](OrderModifyResponseServiceresponseOrdermodifyresponse.md) | | [optional] | + + + diff --git a/docs/OrderModifyResponseServiceresponseOrdermodifyresponse.md b/docs/OrderModifyResponseServiceresponseOrdermodifyresponse.md new file mode 100644 index 00000000..872607e1 --- /dev/null +++ b/docs/OrderModifyResponseServiceresponseOrdermodifyresponse.md @@ -0,0 +1,17 @@ + + +# OrderModifyResponseServiceresponseOrdermodifyresponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responseflag** | **String** | | [optional] | +|**errortype** | **String** | | [optional] | +|**acktriggered** | **String** | | [optional] | +|**warncode** | **String** | | [optional] | +|**headerresponse** | **String** | | [optional] | + + + diff --git a/docs/OrderModifyResponseServiceresponseResponsepreamble.md b/docs/OrderModifyResponseServiceresponseResponsepreamble.md new file mode 100644 index 00000000..5dddc0b4 --- /dev/null +++ b/docs/OrderModifyResponseServiceresponseResponsepreamble.md @@ -0,0 +1,14 @@ + + +# OrderModifyResponseServiceresponseResponsepreamble + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responsestatus** | **String** | | [optional] | +|**responsemessage** | **String** | | [optional] | + + + diff --git a/docs/OrderModifyResponseShipToInfo.md b/docs/OrderModifyResponseShipToInfo.md new file mode 100644 index 00000000..3972a708 --- /dev/null +++ b/docs/OrderModifyResponseShipToInfo.md @@ -0,0 +1,25 @@ + + +# OrderModifyResponseShipToInfo + +The shipping information for the order provided by the reseller. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**addressId** | **String** | Suffix used to identify shipping address. Created during onboarding. Resellers are provided with one or more address IDs depending on how many bill to addresses they need for various flooring companies they are using for credit. | [optional] | +|**contact** | **String** | The company contact provided by the reseller. | [optional] | +|**companyName** | **String** | The name of the company the order will be shipped to. | [optional] | +|**addressLine1** | **String** | The street address and building or house number the order will be shipped to. | [optional] | +|**addressLine2** | **String** | The apartment number the order will be shipped to. | [optional] | +|**addressLine3** | **String** | Line 3 of the address the order will be shipped to. | [optional] | +|**city** | **String** | The city the order will be shipped to. | [optional] | +|**state** | **String** | The state the order will be shipped to. | [optional] | +|**postalCode** | **String** | The zip or postal code the order will be shipped to. | [optional] | +|**countryCode** | **String** | The two-character ISO country code the order will be shipped to. | [optional] | +|**phoneNumber** | **String** | The company contact phone number. | [optional] | +|**email** | **String** | The company contact email address. | [optional] | + + + diff --git a/docs/OrderSearchRequest.md b/docs/OrderSearchRequest.md new file mode 100644 index 00000000..9dd98e44 --- /dev/null +++ b/docs/OrderSearchRequest.md @@ -0,0 +1,14 @@ + + +# OrderSearchRequest + +Request schema for order search endpoint + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**servicerequest** | [**OrderSearchRequestServicerequest**](OrderSearchRequestServicerequest.md) | | [optional] | + + + diff --git a/docs/OrderSearchRequestServicerequest.md b/docs/OrderSearchRequestServicerequest.md new file mode 100644 index 00000000..40ebb466 --- /dev/null +++ b/docs/OrderSearchRequestServicerequest.md @@ -0,0 +1,14 @@ + + +# OrderSearchRequestServicerequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**requestpreamble** | [**OrderSearchRequestServicerequestRequestpreamble**](OrderSearchRequestServicerequestRequestpreamble.md) | | | +|**orderLookupRequest** | [**OrderSearchRequestServicerequestOrderLookupRequest**](OrderSearchRequestServicerequestOrderLookupRequest.md) | | [optional] | + + + diff --git a/docs/OrderSearchRequestServicerequestOrderLookupRequest.md b/docs/OrderSearchRequestServicerequestOrderLookupRequest.md new file mode 100644 index 00000000..0c411a71 --- /dev/null +++ b/docs/OrderSearchRequestServicerequestOrderLookupRequest.md @@ -0,0 +1,14 @@ + + +# OrderSearchRequestServicerequestOrderLookupRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**orderNumber** | [**OrderSearchRequestServicerequestOrderLookupRequestOrderNumber**](OrderSearchRequestServicerequestOrderLookupRequestOrderNumber.md) | | [optional] | +|**customerOrderNumber** | [**OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber**](OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber.md) | | [optional] | + + + diff --git a/docs/OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber.md b/docs/OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber.md new file mode 100644 index 00000000..f8fb6cab --- /dev/null +++ b/docs/OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber.md @@ -0,0 +1,13 @@ + + +# OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**customerOrderNumber** | **String** | | [optional] | + + + diff --git a/docs/OrderSearchRequestServicerequestOrderLookupRequestOrderNumber.md b/docs/OrderSearchRequestServicerequestOrderLookupRequestOrderNumber.md new file mode 100644 index 00000000..b89dc875 --- /dev/null +++ b/docs/OrderSearchRequestServicerequestOrderLookupRequestOrderNumber.md @@ -0,0 +1,17 @@ + + +# OrderSearchRequestServicerequestOrderLookupRequestOrderNumber + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**entryDate** | **String** | | | +|**orderBranch** | **String** | | | +|**orderNumber** | **String** | | [optional] | +|**distributionNumber** | **String** | | [optional] | +|**shipmentNumber** | **String** | | [optional] | + + + diff --git a/docs/OrderSearchRequestServicerequestRequestpreamble.md b/docs/OrderSearchRequestServicerequestRequestpreamble.md new file mode 100644 index 00000000..1f51eaca --- /dev/null +++ b/docs/OrderSearchRequestServicerequestRequestpreamble.md @@ -0,0 +1,14 @@ + + +# OrderSearchRequestServicerequestRequestpreamble + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**isoCountryCode** | **String** | | | +|**customerNumber** | **String** | | | + + + diff --git a/docs/OrderSearchResponse.md b/docs/OrderSearchResponse.md new file mode 100644 index 00000000..214655b0 --- /dev/null +++ b/docs/OrderSearchResponse.md @@ -0,0 +1,14 @@ + + +# OrderSearchResponse + +Response schema for order search endpoint + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**serviceResponse** | [**OrderSearchResponseServiceResponse**](OrderSearchResponseServiceResponse.md) | | [optional] | + + + diff --git a/docs/OrderSearchResponseOrdersInner.md b/docs/OrderSearchResponseOrdersInner.md new file mode 100644 index 00000000..644897dc --- /dev/null +++ b/docs/OrderSearchResponseOrdersInner.md @@ -0,0 +1,22 @@ + + +# OrderSearchResponseOrdersInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ingramOrderNumber** | **String** | The Ingram Micro order number. | [optional] | +|**ingramOrderDate** | **String** | The date the order was created(UTC). | [optional] | +|**customerOrderNumber** | **String** | The reseller's order number for reference in their system. | [optional] | +|**vendorSalesOrderNumber** | **String** | The vendor's order number.(only for D-Type Orders) | [optional] | +|**vendorName** | **String** | The name of the vendor. | [optional] | +|**endUserCompanyName** | **String** | The company name of the end user/customer. | [optional] | +|**orderTotal** | **BigDecimal** | The total of the order. | [optional] | +|**orderStatus** | **String** | The header-level status of the order.(OPEN/CLOSED/CANCELLED) | [optional] | +|**subOrders** | [**List<OrderSearchResponseOrdersInnerSubOrdersInner>**](OrderSearchResponseOrdersInnerSubOrdersInner.md) | Individual Ingram Micro order numbers associated with a single reseller PO. | [optional] | +|**links** | [**OrderSearchResponseOrdersInnerLinks**](OrderSearchResponseOrdersInnerLinks.md) | | [optional] | + + + diff --git a/docs/OrderSearchResponseOrdersInnerLinks.md b/docs/OrderSearchResponseOrdersInnerLinks.md new file mode 100644 index 00000000..c7e5a462 --- /dev/null +++ b/docs/OrderSearchResponseOrdersInnerLinks.md @@ -0,0 +1,16 @@ + + +# OrderSearchResponseOrdersInnerLinks + +Link to Order Details for the order(s). + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**topic** | **String** | Provides the details of the orders. | [optional] | +|**href** | **String** | The URL endpoint for accessing the relevant data. | [optional] | +|**type** | **String** | The type of call that can be made to the href link (GET, POST, Etc.). | [optional] | + + + diff --git a/docs/OrderSearchResponseOrdersInnerSubOrdersInner.md b/docs/OrderSearchResponseOrdersInnerSubOrdersInner.md new file mode 100644 index 00000000..f3f777dd --- /dev/null +++ b/docs/OrderSearchResponseOrdersInnerSubOrdersInner.md @@ -0,0 +1,16 @@ + + +# OrderSearchResponseOrdersInnerSubOrdersInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**subOrderNumber** | **String** | The sub order number. The two-digit prefix is the warehouse code of the warehouse nearest to the reseller. The middle number is the order number. The two-digit suffix is the sub order number. | [optional] | +|**subOrderTotal** | **BigDecimal** | The total for the suborder. | [optional] | +|**subOrderStatus** | **String** | The status of the suborder. One of:- Shipped, Canceled, Backordered, Processing, On Hold, Delivered | [optional] | +|**links** | [**List<OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner>**](OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner.md) | Link to Order Details for the sub order(s). | [optional] | + + + diff --git a/docs/OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner.md b/docs/OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner.md new file mode 100644 index 00000000..dbebb81b --- /dev/null +++ b/docs/OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner.md @@ -0,0 +1,15 @@ + + +# OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**topic** | **String** | For orders or invoices. For orders the link provides details of the order. For invoices the link provides details of the invoice. | [optional] | +|**href** | **String** | The URL endpoint for accessing the relevant data. | [optional] | +|**type** | **String** | The type of call that can be made to the href link (GET, POST, Etc.). | [optional] | + + + diff --git a/docs/OrderSearchResponseServiceResponse.md b/docs/OrderSearchResponseServiceResponse.md new file mode 100644 index 00000000..c781f833 --- /dev/null +++ b/docs/OrderSearchResponseServiceResponse.md @@ -0,0 +1,14 @@ + + +# OrderSearchResponseServiceResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responsepreamble** | [**OrderSearchResponseServiceResponseResponsepreamble**](OrderSearchResponseServiceResponseResponsepreamble.md) | | [optional] | +|**ordersearchresponse** | [**OrderSearchResponseServiceResponseOrdersearchresponse**](OrderSearchResponseServiceResponseOrdersearchresponse.md) | | [optional] | + + + diff --git a/docs/OrderSearchResponseServiceResponseOrdersearchresponse.md b/docs/OrderSearchResponseServiceResponseOrdersearchresponse.md new file mode 100644 index 00000000..84e5c843 --- /dev/null +++ b/docs/OrderSearchResponseServiceResponseOrdersearchresponse.md @@ -0,0 +1,16 @@ + + +# OrderSearchResponseServiceResponseOrdersearchresponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ordersfound** | **String** | Number of records found in the search result | | +|**pagesize** | **String** | The submitted pagesize, default is 25 | [optional] | +|**pagenumber** | **String** | The submitted pager number, default is 1 | [optional] | +|**orders** | [**List<OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner>**](OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner.md) | An array of orders in the search result | [optional] | + + + diff --git a/docs/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner.md b/docs/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner.md new file mode 100644 index 00000000..80487261 --- /dev/null +++ b/docs/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner.md @@ -0,0 +1,17 @@ + + +# OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ordernumber** | **String** | Ingram micro sales order number | | +|**entrytimestamp** | **String** | The order creation date-time in UTC format | | +|**customerordernumber** | **String** | PO/Order number submitted while creating the order | [optional] | +|**suborders** | [**List<OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner>**](OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner.md) | An order MAY get divided into various sub orders, for example if the SKUs are being shipped from different warehouse. | [optional] | +|**links** | [**OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks**](OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks.md) | | [optional] | + + + diff --git a/docs/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks.md b/docs/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks.md new file mode 100644 index 00000000..eb01745c --- /dev/null +++ b/docs/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks.md @@ -0,0 +1,35 @@ + + +# OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks + +HATEOAS links for the main order + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**topic** | [**TopicEnum**](#TopicEnum) | Topic being orders in this case, if it is orders then the link will provide details of the order. | [optional] | +|**href** | **URI** | The API endpoint for accessing the relevant data | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | The type of call that can be made to the href link | [optional] | + + + +## Enum: TopicEnum + +| Name | Value | +|---- | -----| +| ORDERS | "orders" | +| INVOICES | "invoices" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| GET | "GET" | +| POST | "POST" | +| PUT | "PUT" | + + + diff --git a/docs/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner.md b/docs/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner.md new file mode 100644 index 00000000..83721381 --- /dev/null +++ b/docs/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner.md @@ -0,0 +1,18 @@ + + +# OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**subordernumber** | **String** | A sub order number | [optional] | +|**statuscode** | **String** | Order status code | [optional] | +|**status** | **String** | Details of the order statuscode - i.e. statuscode = 4 then status = SHIPPED | [optional] | +|**holdreasoncode** | **String** | Will be returned in case of order on hold | [optional] | +|**holdreason** | **String** | Reason for order hold - will be returned if the order is on hold | [optional] | +|**links** | [**List<OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner>**](OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner.md) | HATEOAS links for the details and invoices of the sub-orders if available | [optional] | + + + diff --git a/docs/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner.md b/docs/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner.md new file mode 100644 index 00000000..d898372e --- /dev/null +++ b/docs/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner.md @@ -0,0 +1,34 @@ + + +# OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**topic** | [**TopicEnum**](#TopicEnum) | topic being orders or invoices, if it is orders then the link will provide details of the order. If its invoices then the link provides details of the invoice | [optional] | +|**href** | **URI** | The API endpoint for accessing the relevant data | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | The type of call that can be made to the href link | [optional] | + + + +## Enum: TopicEnum + +| Name | Value | +|---- | -----| +| ORDERS | "orders" | +| INVOICES | "invoices" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| GET | "GET" | +| POST | "POST" | +| PUT | "PUT" | + + + diff --git a/docs/OrderSearchResponseServiceResponseResponsepreamble.md b/docs/OrderSearchResponseServiceResponseResponsepreamble.md new file mode 100644 index 00000000..f7024fad --- /dev/null +++ b/docs/OrderSearchResponseServiceResponseResponsepreamble.md @@ -0,0 +1,14 @@ + + +# OrderSearchResponseServiceResponseResponsepreamble + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**requeststatus** | **String** | | | +|**returnmessage** | **String** | | | + + + diff --git a/docs/OrderStatusApi.md b/docs/OrderStatusApi.md new file mode 100644 index 00000000..c1da29d3 --- /dev/null +++ b/docs/OrderStatusApi.md @@ -0,0 +1,78 @@ +# OrderStatusApi + +All URIs are relative to *https://api.ingrammicro.com:443/sandbox* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**resellersV1WebhooksOrderstatuseventPost**](OrderStatusApi.md#resellersV1WebhooksOrderstatuseventPost) | **POST** /resellers/v1/webhooks/orderstatusevent | Order Status | + + + +# **resellersV1WebhooksOrderstatuseventPost** +> resellersV1WebhooksOrderstatuseventPost(targeturl, xHubSignature, orderStatusAsyncNotificationRequest) + +Order Status + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.OrderStatusApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + OrderStatusApi apiInstance = new OrderStatusApi(defaultClient); + String targeturl = "https://59a2dc5368073ab42fd9a92e210a9fdb.m.pipedream.net/"; // String | The webhook url where the request needs to sent. + String xHubSignature = "3LeaTfLE5FLj1FcYflwdwFosH4ADHmMbds6thtirGC3e9lEkF9/1pt4T2fQQGlxf40EznDBER0b60M75K6ZW0A=="; // String | Ingram Micro creates a signature token by use of a secret key + Event ID. The algorithm to generate the secret ley is given at link https://developer.ingrammicro.com/reseller/article/how-use-webhook-secret-key. Use the event Id in the below sample along with your secret key to generate the key. Alternatively, to send try this out, use a random text to see how it works. + OrderStatusAsyncNotificationRequest orderStatusAsyncNotificationRequest = new OrderStatusAsyncNotificationRequest(); // OrderStatusAsyncNotificationRequest | + try { + apiInstance.resellersV1WebhooksOrderstatuseventPost(targeturl, xHubSignature, orderStatusAsyncNotificationRequest); + } catch (ApiException e) { + System.err.println("Exception when calling OrderStatusApi#resellersV1WebhooksOrderstatuseventPost"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **targeturl** | **String**| The webhook url where the request needs to sent. | | +| **xHubSignature** | **String**| Ingram Micro creates a signature token by use of a secret key + Event ID. The algorithm to generate the secret ley is given at link https://developer.ingrammicro.com/reseller/article/how-use-webhook-secret-key. Use the event Id in the below sample along with your secret key to generate the key. Alternatively, to send try this out, use a random text to see how it works. | | +| **orderStatusAsyncNotificationRequest** | [**OrderStatusAsyncNotificationRequest**](OrderStatusAsyncNotificationRequest.md)| | | + +### Return type + +null (empty response body) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **500** | Internal Server Error | - | + diff --git a/docs/OrderStatusAsyncNotificationRequest.md b/docs/OrderStatusAsyncNotificationRequest.md new file mode 100644 index 00000000..c7af4165 --- /dev/null +++ b/docs/OrderStatusAsyncNotificationRequest.md @@ -0,0 +1,17 @@ + + +# OrderStatusAsyncNotificationRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**topic** | **String** | Field for identifying whether it is a reseller or vendor event. For eg, resellers/orders | [optional] | +|**event** | **String** | The event sent in the request. For eg, im::create. | [optional] | +|**eventTimeStamp** | **String** | The timestamp at which the event was sent. | [optional] | +|**eventId** | **String** | A unique id used as identifier for the sepcific event and used for generating the x-hub signature. | [optional] | +|**resource** | [**List<OrderStatusAsyncNotificationRequestResourceInner>**](OrderStatusAsyncNotificationRequestResourceInner.md) | | [optional] | + + + diff --git a/docs/OrderStatusAsyncNotificationRequestResourceInner.md b/docs/OrderStatusAsyncNotificationRequestResourceInner.md new file mode 100644 index 00000000..c168468a --- /dev/null +++ b/docs/OrderStatusAsyncNotificationRequestResourceInner.md @@ -0,0 +1,18 @@ + + +# OrderStatusAsyncNotificationRequestResourceInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eventType** | **String** | The event name sent in the event request. | [optional] | +|**orderNumber** | **String** | The Ingram Micro order number. | [optional] | +|**customerOrderNumber** | **String** | The reseller's unique PO/Order number. | [optional] | +|**orderEntryTimeStamp** | **String** | The timestamp at which the order was created. | [optional] | +|**lines** | [**List<OrderStatusAsyncNotificationRequestResourceInnerLinesInner>**](OrderStatusAsyncNotificationRequestResourceInnerLinesInner.md) | The line-level details for the order. | [optional] | +|**links** | [**List<OrderStatusAsyncNotificationRequestResourceInnerLinksInner>**](OrderStatusAsyncNotificationRequestResourceInnerLinksInner.md) | Link to Order Details for the order(s). | [optional] | + + + diff --git a/docs/OrderStatusAsyncNotificationRequestResourceInnerLinesInner.md b/docs/OrderStatusAsyncNotificationRequestResourceInnerLinesInner.md new file mode 100644 index 00000000..b202d487 --- /dev/null +++ b/docs/OrderStatusAsyncNotificationRequestResourceInnerLinesInner.md @@ -0,0 +1,22 @@ + + +# OrderStatusAsyncNotificationRequestResourceInnerLinesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**lineNumber** | **String** | The Ingram Micro line number for the product | [optional] | +|**subOrderNumber** | **String** | The sub order number. The two-digit prefix is the warehouse code of the warehouse nearest the reseller. The middle number is the order number. The two-digit suffix is the sub order number. | [optional] | +|**lineStatus** | **String** | The status for the line item in the order. One of: Backordered, Open, Shipped | [optional] | +|**ingramPartNumber** | **String** | The Ingram Micro part number for the line item. | [optional] | +|**vendorPartNumber** | **String** | The vendor part number for the line item. | [optional] | +|**requestedQuantity** | **String** | The quantity of the line item requested. | [optional] | +|**shippedQuantity** | **String** | The quantity of the line item that has been shipped. | [optional] | +|**backorderedQuantity** | **String** | The quantity of the line item that is backordered. | [optional] | +|**shipmentDetails** | [**List<OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner>**](OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner.md) | | [optional] | +|**serialNumberDetails** | [**List<OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner>**](OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner.md) | | [optional] | + + + diff --git a/docs/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner.md b/docs/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner.md new file mode 100644 index 00000000..4a4874a9 --- /dev/null +++ b/docs/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner.md @@ -0,0 +1,13 @@ + + +# OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**serialNumber** | **String** | The serial number for the line item. | [optional] | + + + diff --git a/docs/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner.md b/docs/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner.md new file mode 100644 index 00000000..d9000857 --- /dev/null +++ b/docs/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner.md @@ -0,0 +1,18 @@ + + +# OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shipmentDate** | **String** | The date the line item was shipped. | [optional] | +|**shipFromWarehouseId** | **String** | The ID of the warehouse the product will ship from. | [optional] | +|**warehouseName** | **String** | \"\" | [optional] | +|**carrierCode** | **String** | The carrier code for the shipment containing the line item. | [optional] | +|**carrierName** | **String** | The name of the carrier of the shipment containing the line item. | [optional] | +|**packageDetails** | [**List<OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner>**](OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner.md) | | [optional] | + + + diff --git a/docs/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner.md b/docs/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner.md new file mode 100644 index 00000000..89161a69 --- /dev/null +++ b/docs/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner.md @@ -0,0 +1,15 @@ + + +# OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**cartonNumber** | **String** | The shipment carton number that contains the line item. | [optional] | +|**quantityInbox** | **String** | The quantity of line items in the box. | [optional] | +|**trackingNumber** | **String** | The tracking number for the shipment containing the line item. | [optional] | + + + diff --git a/docs/OrderStatusAsyncNotificationRequestResourceInnerLinksInner.md b/docs/OrderStatusAsyncNotificationRequestResourceInnerLinksInner.md new file mode 100644 index 00000000..f38034e9 --- /dev/null +++ b/docs/OrderStatusAsyncNotificationRequestResourceInnerLinksInner.md @@ -0,0 +1,15 @@ + + +# OrderStatusAsyncNotificationRequestResourceInnerLinksInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**topic** | **String** | Provides the details of the orders. | [optional] | +|**href** | **String** | The URL endpoint for accessing the relevant data. | [optional] | +|**type** | **String** | The type of call that can be made to the href link (GET, POST, Etc.). | [optional] | + + + diff --git a/docs/OrdersApi.md b/docs/OrdersApi.md new file mode 100644 index 00000000..3ccbdf89 --- /dev/null +++ b/docs/OrdersApi.md @@ -0,0 +1,456 @@ +# OrdersApi + +All URIs are relative to *https://api.ingrammicro.com:443/sandbox* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**deleteOrdercancel**](OrdersApi.md#deleteOrdercancel) | **DELETE** /resellers/v6/orders/{OrderNumber} | Cancel your Order | +| [**getOrderdetailsV61**](OrdersApi.md#getOrderdetailsV61) | **GET** /resellers/v6.1/orders/{ordernumber} | Get Order Details v6.1 | +| [**getResellersV6Ordersearch**](OrdersApi.md#getResellersV6Ordersearch) | **GET** /resellers/v6/orders/search | Search your Orders | +| [**postCreateorderV6**](OrdersApi.md#postCreateorderV6) | **POST** /resellers/v6/orders | Create your Order | +| [**putOrdermodify**](OrdersApi.md#putOrdermodify) | **PUT** /resellers/v6/orders/{orderNumber} | Modify your Order | + + + +# **deleteOrdercancel** +> deleteOrdercancel(orderNumber, imCustomerNumber, imCountryCode, imCorrelationID, regionCode, imSenderID) + +Cancel your Order + +This call must be submitted before the order is released to Ingram Micro’s warehouse. The order cannot be canceled once it is released to the warehouse. Order should be on customer hold to delete any order from Ingram system. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.OrdersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + OrdersApi apiInstance = new OrdersApi(defaultClient); + String orderNumber = "20-RD128"; // String | Ingram Micro sales order number. + String imCustomerNumber = "20-222222"; // String | Your unique Ingram Micro customer number. + String imCountryCode = "US"; // String | Two-character ISO country code. + String imCorrelationID = "fbac82ba-cf0a-4bcf-fc03-0c5084"; // String | Unique transaction number to identify each transaction accross all the systems. + String regionCode = "CS"; // String | Region code for sandbox testing - Not for use in production. + String imSenderID = "MyCompany"; // String | Unique value used to identify the sender of the transaction. Example: MyCompany + try { + apiInstance.deleteOrdercancel(orderNumber, imCustomerNumber, imCountryCode, imCorrelationID, regionCode, imSenderID); + } catch (ApiException e) { + System.err.println("Exception when calling OrdersApi#deleteOrdercancel"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderNumber** | **String**| Ingram Micro sales order number. | | +| **imCustomerNumber** | **String**| Your unique Ingram Micro customer number. | | +| **imCountryCode** | **String**| Two-character ISO country code. | | +| **imCorrelationID** | **String**| Unique transaction number to identify each transaction accross all the systems. | | +| **regionCode** | **String**| Region code for sandbox testing - Not for use in production. | [optional] | +| **imSenderID** | **String**| Unique value used to identify the sender of the transaction. Example: MyCompany | [optional] | + +### Return type + +null (empty response body) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    | +| **400** | Bad Request | * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    | +| **404** | Not Found | * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    | +| **405** | Method Not Allowed | * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    | +| **500** | Internal Server Error | * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    | + + +# **getOrderdetailsV61** +> OrderDetailB2B getOrderdetailsV61(ordernumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, ingramOrderDate, vendorNumber, simulateStatus, isIml, regionCode) + +Get Order Details v6.1 + +The Orders details API endpoint allows a customer to retrieve their Ingram Micro orders details by using the Ingram Micro sales order number as a path parameter. The sales order number, IM-CustomerNumber, IM-CountryCode, and IM-CorrelationID are required parameters.<br><br>*Service contracts, subscriptions, and license information are unavailable at the moment, this information will be available in the future. <br><br> Recent bug fixes: - Fixed duplication of serial numbers in the API response. - Fixed API time-out issues - Fixed missing tracking information. - Implemented enhanced order status. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.OrdersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + OrdersApi apiInstance = new OrdersApi(defaultClient); + String ordernumber = "20-RD3QV"; // String | The Ingram Micro sales order number. + String imCustomerNumber = "20-222222"; // String | Your unique Ingram Micro customer number. + String imCountryCode = "US"; // String | Two-character ISO country code. + String imCorrelationID = "fbac82ba-cf0a-4bcf-fc03-0c5084"; // String | Unique transaction number to identify each transaction accross all the systems. + String imSenderID = "MyCompany"; // String | Unique value used to identify the sender of the transaction. Example: MyCompany. + LocalDate ingramOrderDate = LocalDate.parse("Wed May 13 00:00:00 UTC 2020"); // LocalDate | The date and time in UTC format that the order was created. + String vendorNumber = "vendorNumber_example"; // String | Vendor Number. + String simulateStatus = "IM::SHIPPED"; // String | Order response for various order statuses. Not for use in production. + Boolean isIml = true; // Boolean | True/False only for IML customers. + String regionCode = "regionCode_example"; // String | Region code for sandbox testing - Not for use in production. + try { + OrderDetailB2B result = apiInstance.getOrderdetailsV61(ordernumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, ingramOrderDate, vendorNumber, simulateStatus, isIml, regionCode); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrdersApi#getOrderdetailsV61"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **ordernumber** | **String**| The Ingram Micro sales order number. | | +| **imCustomerNumber** | **String**| Your unique Ingram Micro customer number. | | +| **imCountryCode** | **String**| Two-character ISO country code. | | +| **imCorrelationID** | **String**| Unique transaction number to identify each transaction accross all the systems. | | +| **imSenderID** | **String**| Unique value used to identify the sender of the transaction. Example: MyCompany. | [optional] | +| **ingramOrderDate** | **LocalDate**| The date and time in UTC format that the order was created. | [optional] | +| **vendorNumber** | **String**| Vendor Number. | [optional] | +| **simulateStatus** | **String**| Order response for various order statuses. Not for use in production. | [optional] [enum: IM::SHIPPED, IM::PARTIALLY_SHIPPED, IM::HOLD, IM::INVOICED] | +| **isIml** | **Boolean**| True/False only for IML customers. | [optional] | +| **regionCode** | **String**| Region code for sandbox testing - Not for use in production. | [optional] | + +### Return type + +[**OrderDetailB2B**](OrderDetailB2B.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **500** | Server Error | - | + + +# **getResellersV6Ordersearch** +> OrderSearchResponse getResellersV6Ordersearch(imCustomerNumber, imCountryCode, imCorrelationID, ingramOrderNumber, orderStatus, orderStatusIn, ingramOrderDate, ingramOrderDateBt, imSenderID, customerOrderNumber, pageSize, pageNumber, endCustomerOrderNumber, invoiceDateBt, shipDateBt, deliveryDateBt, ingramPartNumber, vendorPartNumber, serialNumber, trackingNumber, vendorName, specialBidNumber) + +Search your Orders + +The Orders Search API endpoint allows a customer to search their Ingram Micro orders by using any of the available query string parameters, customer can search their order by using single query string parameters or combining them together. This endpoint supports the pagination of results. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.OrdersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + OrdersApi apiInstance = new OrdersApi(defaultClient); + String imCustomerNumber = "20-222222"; // String | Your unique Ingram Micro customer number. + String imCountryCode = "US"; // String | Two-character ISO country code. + String imCorrelationID = "fbac82ba-cf0a-4bcf-fc03-0c5084"; // String | Unique transaction number to identify each transaction accross all the systems. + String ingramOrderNumber = "ingramOrderNumber_example"; // String | The Ingram Micro order number. + String orderStatus = "SHIPPED"; // String | Ingram Micro order status. + List orderStatusIn = Arrays.asList(); // List | Ingram Micro order status(can use it for multiple entries). + String ingramOrderDate = "2021-04-23"; // String | Search by Order date(yyyy-MM-dd). + List ingramOrderDateBt = Arrays.asList(); // List | Search with the start and end date(only 2 entries allowed). + String imSenderID = "MyCompany"; // String | Unique value used to identify the sender of the transaction. Example: MyCompany + String customerOrderNumber = "customerOrderNumber_example"; // String | Search using your PO/Order number. + Integer pageSize = 56; // Integer | The number of records required in the call - max records 100 per page. + Integer pageNumber = 56; // Integer | The page number reference. + String endCustomerOrderNumber = "endCustomerOrderNumber_example"; // String | End customer/user purchase order number. + List invoiceDateBt = Arrays.asList(); // List | Invoice date of order, search with the start and end date(only 2 entries allowed).*Currently, this feature is not available in Australia. + List shipDateBt = Arrays.asList(); // List | Shipment date of order, search with the start and end date(only 2 entries allowed). + List deliveryDateBt = Arrays.asList(); // List | The delivery date of the order, search with the start and end date(only 2 entries allowed).*Currently, this feature is not available in Australia + String ingramPartNumber = "ingramPartNumber_example"; // String | Ingram Micro unique part number for the product. + String vendorPartNumber = "vendorPartNumber_example"; // String | Vendor’s part number for the product. + String serialNumber = "serialNumber_example"; // String | A serial number of the product. + String trackingNumber = "trackingNumber_example"; // String | The tracking number of the order.*Currently, this feature is not available in Australia + String vendorName = "vendorName_example"; // String | Name of the vendor. + String specialBidNumber = "specialBidNumber_example"; // String | The bid number provided to the reseller by the vendor for special pricing and discounts. Line-level bid numbers take precedence over header-level bid numbers.*Currently, this feature is not available in Australia + try { + OrderSearchResponse result = apiInstance.getResellersV6Ordersearch(imCustomerNumber, imCountryCode, imCorrelationID, ingramOrderNumber, orderStatus, orderStatusIn, ingramOrderDate, ingramOrderDateBt, imSenderID, customerOrderNumber, pageSize, pageNumber, endCustomerOrderNumber, invoiceDateBt, shipDateBt, deliveryDateBt, ingramPartNumber, vendorPartNumber, serialNumber, trackingNumber, vendorName, specialBidNumber); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrdersApi#getResellersV6Ordersearch"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **imCustomerNumber** | **String**| Your unique Ingram Micro customer number. | | +| **imCountryCode** | **String**| Two-character ISO country code. | | +| **imCorrelationID** | **String**| Unique transaction number to identify each transaction accross all the systems. | | +| **ingramOrderNumber** | **String**| The Ingram Micro order number. | [optional] | +| **orderStatus** | **String**| Ingram Micro order status. | [optional] [enum: SHIPPED, PROCESSING, ON HOLD, BACKORDERED, CANCELLED] | +| **orderStatusIn** | [**List<String>**](String.md)| Ingram Micro order status(can use it for multiple entries). | [optional] | +| **ingramOrderDate** | **String**| Search by Order date(yyyy-MM-dd). | [optional] | +| **ingramOrderDateBt** | [**List<String>**](String.md)| Search with the start and end date(only 2 entries allowed). | [optional] | +| **imSenderID** | **String**| Unique value used to identify the sender of the transaction. Example: MyCompany | [optional] | +| **customerOrderNumber** | **String**| Search using your PO/Order number. | [optional] | +| **pageSize** | **Integer**| The number of records required in the call - max records 100 per page. | [optional] | +| **pageNumber** | **Integer**| The page number reference. | [optional] | +| **endCustomerOrderNumber** | **String**| End customer/user purchase order number. | [optional] | +| **invoiceDateBt** | [**List<String>**](String.md)| Invoice date of order, search with the start and end date(only 2 entries allowed).*Currently, this feature is not available in Australia. | [optional] | +| **shipDateBt** | [**List<String>**](String.md)| Shipment date of order, search with the start and end date(only 2 entries allowed). | [optional] | +| **deliveryDateBt** | [**List<String>**](String.md)| The delivery date of the order, search with the start and end date(only 2 entries allowed).*Currently, this feature is not available in Australia | [optional] | +| **ingramPartNumber** | **String**| Ingram Micro unique part number for the product. | [optional] | +| **vendorPartNumber** | **String**| Vendor’s part number for the product. | [optional] | +| **serialNumber** | **String**| A serial number of the product. | [optional] | +| **trackingNumber** | **String**| The tracking number of the order.*Currently, this feature is not available in Australia | [optional] | +| **vendorName** | **String**| Name of the vendor. | [optional] | +| **specialBidNumber** | **String**| The bid number provided to the reseller by the vendor for special pricing and discounts. Line-level bid numbers take precedence over header-level bid numbers.*Currently, this feature is not available in Australia | [optional] | + +### Return type + +[**OrderSearchResponse**](OrderSearchResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OrderSearch_Response to be returned | - | +| **204** | No Content | * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    | +| **400** | Bad Request | - | +| **500** | Internal Server Error | - | + + +# **postCreateorderV6** +> OrderCreateResponse postCreateorderV6(imCustomerNumber, imCountryCode, imCorrelationID, orderCreateRequest, imSenderID) + +Create your Order + +Instantly create and place orders. The POST API supports stocked SKUs as well as licensing and warranties SKUs. IM-CustomerNumber, IM-CountryCode, IM-SenderID and IM-CorrelationID are required parameters. Ingram Micro recommends that you provide the ingrampartnumber for each SKU contained in each order. NOTE: You must have net terms to use the Ingram Micro Order Create API. Ingram Micro offers trade credit when using our APIs, and repayment is based on net terms. For example, if your net terms agreement is net-30, you will have 30 days to make a full payment. Ingram Micro does not allow credit card transactions for API ordering. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.OrdersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + OrdersApi apiInstance = new OrdersApi(defaultClient); + String imCustomerNumber = "20-222222"; // String | Your unique Ingram Micro customer number. + String imCountryCode = "US"; // String | Two-character ISO country code. + String imCorrelationID = "fbac82ba-cf0a-4bcf-fc03-0c5084"; // String | Unique transaction number to identify each transaction accross all the systems. + OrderCreateRequest orderCreateRequest = new OrderCreateRequest(); // OrderCreateRequest | + String imSenderID = "MyCompany"; // String | Unique value used to identify the sender of the transaction. Example: MyCompany + try { + OrderCreateResponse result = apiInstance.postCreateorderV6(imCustomerNumber, imCountryCode, imCorrelationID, orderCreateRequest, imSenderID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrdersApi#postCreateorderV6"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **imCustomerNumber** | **String**| Your unique Ingram Micro customer number. | | +| **imCountryCode** | **String**| Two-character ISO country code. | | +| **imCorrelationID** | **String**| Unique transaction number to identify each transaction accross all the systems. | | +| **orderCreateRequest** | [**OrderCreateRequest**](OrderCreateRequest.md)| | | +| **imSenderID** | **String**| Unique value used to identify the sender of the transaction. Example: MyCompany | [optional] | + +### Return type + +[**OrderCreateResponse**](OrderCreateResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    | +| **207** | Multi-Status | * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    | +| **400** | Bad Request | * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    | +| **500** | Internal Server Error | * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    | + + +# **putOrdermodify** +> OrderModifyResponse putOrdermodify(orderNumber, imCustomerNumber, imCountryCode, imCorrelationID, orderModifyRequest, actionCode, regionCode, imSenderID) + +Modify your Order + +The Order Modify API endpoint allows for changes to be made to an order after the order creation process as long as the order was created with the customer hold flag. * Orders can be modified within 24hrs of being placed with the customer hold flag, after 24hrs they are voided if they are not released by the customer. * Modifying orders that were placed without the customer hold flag is not possible + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.OrdersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + OrdersApi apiInstance = new OrdersApi(defaultClient); + String orderNumber = "20-RC1RD"; // String | Ingram sales order number. + String imCustomerNumber = "20-222222"; // String | Your unique Ingram Micro customer number. + String imCountryCode = "US"; // String | Two-character ISO country code. + String imCorrelationID = "fbac82ba-cf0a-4bcf-fc03-0c5084"; // String | Unique transaction number to identify each transaction across all the systems. + OrderModifyRequest orderModifyRequest = new OrderModifyRequest(); // OrderModifyRequest | + String actionCode = "release"; // String | Action code to be used for order release. + String regionCode = "CS"; // String | Region code paramter to be used only for order release functionality.Region code is only for sandbox not for production + String imSenderID = "MyCompany"; // String | Unique value used to identify the sender of the transaction. Example: MyCompany + try { + OrderModifyResponse result = apiInstance.putOrdermodify(orderNumber, imCustomerNumber, imCountryCode, imCorrelationID, orderModifyRequest, actionCode, regionCode, imSenderID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrdersApi#putOrdermodify"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderNumber** | **String**| Ingram sales order number. | | +| **imCustomerNumber** | **String**| Your unique Ingram Micro customer number. | | +| **imCountryCode** | **String**| Two-character ISO country code. | | +| **imCorrelationID** | **String**| Unique transaction number to identify each transaction across all the systems. | | +| **orderModifyRequest** | [**OrderModifyRequest**](OrderModifyRequest.md)| | | +| **actionCode** | **String**| Action code to be used for order release. | [optional] | +| **regionCode** | **String**| Region code paramter to be used only for order release functionality.Region code is only for sandbox not for production | [optional] | +| **imSenderID** | **String**| Unique value used to identify the sender of the transaction. Example: MyCompany | [optional] | + +### Return type + +[**OrderModifyResponse**](OrderModifyResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    | +| **201** | Created | * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    | +| **207** | Multi-Status | * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    | +| **400** | Bad Request | * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    | +| **401** | Unauthorized | - | +| **404** | Not Found | - | +| **500** | Internal Server Error | * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    | + diff --git a/docs/OrdersV4Api.md b/docs/OrdersV4Api.md new file mode 100644 index 00000000..2aaba47f --- /dev/null +++ b/docs/OrdersV4Api.md @@ -0,0 +1,348 @@ +# OrdersV4Api + +All URIs are relative to *https://api.ingrammicro.com:443/sandbox* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**postV4Ordercreate**](OrdersV4Api.md#postV4Ordercreate) | **POST** /orders/v4/ordercreate | Create a new Order | +| [**postV4Orderdelete**](OrdersV4Api.md#postV4Orderdelete) | **POST** /orders/v4/orderdelete | Delete an Order | +| [**postV4Orderdetails**](OrdersV4Api.md#postV4Orderdetails) | **POST** /orders/v4/orderdetails | Get Order Details | +| [**postV4Ordermodify**](OrdersV4Api.md#postV4Ordermodify) | **POST** /orders/v4/ordermodify | Modify an Existing Order | +| [**postV4Ordersearch**](OrdersV4Api.md#postV4Ordersearch) | **POST** /orders/v4/orderlookup | Order Search | + + + +# **postV4Ordercreate** +> OrderCreateResponse postV4Ordercreate(orderCreateRequest) + +Create a new Order + +The order create transaction is a real-time transaction that allows customers to place standard product and direct ship (licensing and warranties) orders with Ingram Micro using API. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.OrdersV4Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + OrdersV4Api apiInstance = new OrdersV4Api(defaultClient); + OrderCreateRequest orderCreateRequest = new OrderCreateRequest(); // OrderCreateRequest | + try { + OrderCreateResponse result = apiInstance.postV4Ordercreate(orderCreateRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrdersV4Api#postV4Ordercreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderCreateRequest** | [**OrderCreateRequest**](OrderCreateRequest.md)| | [optional] | + +### Return type + +[**OrderCreateResponse**](OrderCreateResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + + +# **postV4Orderdelete** +> OrderDeleteResponse postV4Orderdelete(orderDeleteRequest) + +Delete an Order + +A real-time request to delete a previously accepted order must be submitted before the order is released to Ingram Micro’s warehouse. After release the order is no longer eligible for deletion. Order delete transaction submitted after the order is released will be rejected and will not be applied. *Direct ship orders cannot be deleted. Contact your sales rep for assistance. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.OrdersV4Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + OrdersV4Api apiInstance = new OrdersV4Api(defaultClient); + OrderDeleteRequest orderDeleteRequest = new OrderDeleteRequest(); // OrderDeleteRequest | + try { + OrderDeleteResponse result = apiInstance.postV4Orderdelete(orderDeleteRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrdersV4Api#postV4Orderdelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderDeleteRequest** | [**OrderDeleteRequest**](OrderDeleteRequest.md)| | [optional] | + +### Return type + +[**OrderDeleteResponse**](OrderDeleteResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + + +# **postV4Orderdetails** +> OrderDetailResponse postV4Orderdetails(orderDetailRequest) + +Get Order Details + +A real-time request that allows the customer to query Ingram Micro for detailed information for a specific open or shipped order. Orders are searched using Ingram Micro Sales Order Number. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.OrdersV4Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + OrdersV4Api apiInstance = new OrdersV4Api(defaultClient); + OrderDetailRequest orderDetailRequest = new OrderDetailRequest(); // OrderDetailRequest | + try { + OrderDetailResponse result = apiInstance.postV4Orderdetails(orderDetailRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrdersV4Api#postV4Orderdetails"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderDetailRequest** | [**OrderDetailRequest**](OrderDetailRequest.md)| | [optional] | + +### Return type + +[**OrderDetailResponse**](OrderDetailResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + + +# **postV4Ordermodify** +> OrderModifyResponse postV4Ordermodify(orderModifyRequest) + +Modify an Existing Order + +The order modify transaction allows for changes to be made after the order creation process but before the order is released to Ingram Micro’s warehouse system. Order modify transaction submitted after the order is released will be rejected and will not be applied. Types of modifications allowable: Order release, add comment, and carrier change. NOTE - Direct Ship orders cannot be modified. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.OrdersV4Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + OrdersV4Api apiInstance = new OrdersV4Api(defaultClient); + OrderModifyRequest orderModifyRequest = new OrderModifyRequest(); // OrderModifyRequest | + try { + OrderModifyResponse result = apiInstance.postV4Ordermodify(orderModifyRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrdersV4Api#postV4Ordermodify"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderModifyRequest** | [**OrderModifyRequest**](OrderModifyRequest.md)| | [optional] | + +### Return type + +[**OrderModifyResponse**](OrderModifyResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + + +# **postV4Ordersearch** +> OrderSearchResponse postV4Ordersearch(orderSearchRequest) + +Order Search + +Search your orders using various search parameters + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.OrdersV4Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + OrdersV4Api apiInstance = new OrdersV4Api(defaultClient); + OrderSearchRequest orderSearchRequest = new OrderSearchRequest(); // OrderSearchRequest | + try { + OrderSearchResponse result = apiInstance.postV4Ordersearch(orderSearchRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrdersV4Api#postV4Ordersearch"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderSearchRequest** | [**OrderSearchRequest**](OrderSearchRequest.md)| | [optional] | + +### Return type + +[**OrderSearchResponse**](OrderSearchResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + diff --git a/docs/OrdersV5Api.md b/docs/OrdersV5Api.md new file mode 100644 index 00000000..f2237173 --- /dev/null +++ b/docs/OrdersV5Api.md @@ -0,0 +1,314 @@ +# OrdersV5Api + +All URIs are relative to *https://api.ingrammicro.com:443/sandbox* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**deleteOrdersOrderNumber**](OrdersV5Api.md#deleteOrdersOrderNumber) | **DELETE** /resellers/v5/Orders/{ordernumber} | Cancel an Existing Order | +| [**getOrdersSearch**](OrdersV5Api.md#getOrdersSearch) | **GET** /resellers/v5/Orders/search | Search your Orders | +| [**getV5OrdersDetails**](OrdersV5Api.md#getV5OrdersDetails) | **GET** /resellers/v5/Orders/{ordernumber} | Get Order Details | +| [**postV5OrdersCreate**](OrdersV5Api.md#postV5OrdersCreate) | **POST** /resellers/v5/Orders | Create a New Order | + + + +# **deleteOrdersOrderNumber** +> OrderCancelResponse deleteOrdersOrderNumber(ordernumber, customerNumber, isoCountryCode, entryDate) + +Cancel an Existing Order + +This endpoint is a request to cancel a previously accepted order. Use your Ingram Micro sales order number to cancel an order. The <strong>orderNumber, isoCountryCode, customerNumber</strong> and <strong>entryDate</strong> parameters are required. This call must be submitted <strong>before</strong> the order is released to Ingram Micro’s warehouse. The order cannot be canceled once it is released to the warehouse. Direct ship orders cannot be canceled. Contact your Ingram Micro sales rep for assistance. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.OrdersV5Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + OrdersV5Api apiInstance = new OrdersV5Api(defaultClient); + String ordernumber = "20-RD128"; // String | Ingram Micro sales order number + String customerNumber = "customerNumber_example"; // String | Your unique Ingram Micro customer number + String isoCountryCode = "isoCountryCode_example"; // String | 2 chars ISO country code + String entryDate = "2020-04-03"; // String | Order entry date (yyyy-mm-dd) + try { + OrderCancelResponse result = apiInstance.deleteOrdersOrderNumber(ordernumber, customerNumber, isoCountryCode, entryDate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrdersV5Api#deleteOrdersOrderNumber"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **ordernumber** | **String**| Ingram Micro sales order number | | +| **customerNumber** | **String**| Your unique Ingram Micro customer number | | +| **isoCountryCode** | **String**| 2 chars ISO country code | | +| **entryDate** | **String**| Order entry date (yyyy-mm-dd) | [default to 2020-04-03] | + +### Return type + +[**OrderCancelResponse**](OrderCancelResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + + +# **getOrdersSearch** +> OrderSearchResponse getOrdersSearch(customerNumber, isocountrycode, ordernumber, customerordernumber, orderstatus, startcreatetimestamp, endcreatetimestamp, pagesize, pagenumber) + +Search your Orders + +Search your Ingram Micro orders. This endpoint searches by multiple order parameters and supports pagination of results. Search using one or more of the parameters below: <ul><li>ordernumber — Ingram Micro sales order number</li><li>customerordernumber — The PO or order number provided by you when creating an order</li><li>orderstatus — user order status codes for the search, default is set to \"any\"</li><li>startcreatetimestamp and endcreatetimestamp — Order create date range</li></ul> For pagination, please use these parameters: <ul><li>pagesize — default 25, max 100</li><li>pagenumber — default 1</li></ul> Order Status Values: <ul><li>P – PENDING</li><li>R – RELEASED</li><li>4 – SHIPPED</li><li>I – INVOICED</li><li>V – VOIDED</li></ul> The search endpoint also returns HATEOAS links for order details and invoice details, if applicable. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.OrdersV5Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + OrdersV5Api apiInstance = new OrdersV5Api(defaultClient); + String customerNumber = "20-222222"; // String | Your unique Ingram Micro customer number + String isocountrycode = "US"; // String | 2 char iso country code + String ordernumber = "ordernumber_example"; // String | Ingram sales order number + String customerordernumber = "ZENPO1"; // String | Search using your PO/Order number + String orderstatus = "P"; // String | Ingram Micro order status + OffsetDateTime startcreatetimestamp = OffsetDateTime.now(); // OffsetDateTime | Search start date/time in UTC format + OffsetDateTime endcreatetimestamp = OffsetDateTime.now(); // OffsetDateTime | Search end date/time in UTC format + Integer pagesize = 56; // Integer | Number of records required in the call + Integer pagenumber = 1; // Integer | the page number reference + try { + OrderSearchResponse result = apiInstance.getOrdersSearch(customerNumber, isocountrycode, ordernumber, customerordernumber, orderstatus, startcreatetimestamp, endcreatetimestamp, pagesize, pagenumber); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrdersV5Api#getOrdersSearch"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **customerNumber** | **String**| Your unique Ingram Micro customer number | | +| **isocountrycode** | **String**| 2 char iso country code | | +| **ordernumber** | **String**| Ingram sales order number | [optional] | +| **customerordernumber** | **String**| Search using your PO/Order number | [optional] | +| **orderstatus** | **String**| Ingram Micro order status | [optional] [default to any] [enum: P, R, 4, I, V, any] | +| **startcreatetimestamp** | **OffsetDateTime**| Search start date/time in UTC format | [optional] | +| **endcreatetimestamp** | **OffsetDateTime**| Search end date/time in UTC format | [optional] | +| **pagesize** | **Integer**| Number of records required in the call | [optional] | +| **pagenumber** | **Integer**| the page number reference | [optional] [default to 1] | + +### Return type + +[**OrderSearchResponse**](OrderSearchResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + + +# **getV5OrdersDetails** +> OrderDetailResponse getV5OrdersDetails(ordernumber, customernumber, isocountrycode, customerordernumber, startcreatetimestamp, endcreatetimestamp, simulate) + +Get Order Details + +Use your Ingram Micro sales order number to search for existing orders or retrieve existing order details. <b>The sales order number, customer number and isoCountryCode are required parameters.</b> The sales order number is returned in the Order Create POST response. Ingram Micro recommends that you save this number for future uses. The IM sales order number can also be retrieved by searching for your existing order using the Order Search GET endpoint. You will need the customer PO number or order number that was provided at the time of order creation. In a case when the IM sales order number is repeated, you can refine the result by providing customer order number for additional filtering or using the date range to filter orders by creation date. Use the \"simulate\" query parameter to test the GET order response for various order statuses. This parameter is only available in the sandbox to help with development and testing of the GET order endpoint. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.OrdersV5Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + OrdersV5Api apiInstance = new OrdersV5Api(defaultClient); + String ordernumber = "20-RD128"; // String | Ingram Micro sales order number + String customernumber = "20-222222"; // String | Your unique Ingram Micro customer number + String isocountrycode = "US"; // String | 2 chars ISO country code + String customerordernumber = "customerordernumber_example"; // String | Your PO/Order Number provide at the time of order creation + LocalDate startcreatetimestamp = LocalDate.parse("Sun Mar 15 00:00:00 UTC 2020"); // LocalDate | Filter start date - format YYYY-MM-DD + String endcreatetimestamp = "2020-04-20"; // String | Filter end date - format YYYY-MM-DD + String simulate = "IM::shipped"; // String | Order response for various order statuses. Not for use in production. + try { + OrderDetailResponse result = apiInstance.getV5OrdersDetails(ordernumber, customernumber, isocountrycode, customerordernumber, startcreatetimestamp, endcreatetimestamp, simulate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrdersV5Api#getV5OrdersDetails"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **ordernumber** | **String**| Ingram Micro sales order number | | +| **customernumber** | **String**| Your unique Ingram Micro customer number | [default to 20-222222] | +| **isocountrycode** | **String**| 2 chars ISO country code | [default to US] | +| **customerordernumber** | **String**| Your PO/Order Number provide at the time of order creation | [optional] | +| **startcreatetimestamp** | **LocalDate**| Filter start date - format YYYY-MM-DD | [optional] | +| **endcreatetimestamp** | **String**| Filter end date - format YYYY-MM-DD | [optional] | +| **simulate** | **String**| Order response for various order statuses. Not for use in production. | [optional] [enum: IM::shipped, IM::invoiced, IM::hold, IM::partially_shipped] | + +### Return type + +[**OrderDetailResponse**](OrderDetailResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + + +# **postV5OrdersCreate** +> OrderCreateResponse postV5OrdersCreate(orderCreateRequest) + +Create a New Order + +Instantly create and place orders. The POST API supports stocked SKUs as well as licensing and warranties SKUs. Every order to be created with this API must complete these validations to be placed and processed:<ul><li>SKU, shipping address, product authorization and stock allocations must clear validation.</li><li>Ingram Micro Sales validates pricing, stock or other processing parameters. Ingram Micro sales may place an order a hold if revision is necessary.</li><li>Credit validation confirms available credit prior to processing an order. If an order does not clear credit validation, the Ingram Micro sales rep or accounts receivable manager will contact you for next steps.</li><li>Warehouse validation selects the location closest to the destination zip code. If the stock is not available in any of the warehouses, Ingram Micro places a backorder in the warehouse closest to the destination zip code.</li></ul> Ingram Micro recommends that you provide the <strong>ingrampartnumber</strong> for each SKU contained in each order. When using <strong>vendorpartnumber</strong> to place an order, please use the product search endpoint to find the <strong>ingrampartnumber</strong> for a specific <strong>vendorpartnumber</strong>, and then supply the <strong>ingrampartnumber</strong> to place an order. <strong>NOTE:</strong> You must have net terms to use the <strong>Ingram Micro Order Create API</strong>. Ingram Micro offers trade credit when using our APIs, and repayment is based on net terms. For example, if your net terms agreement is net-30, you will have 30 days to make a full payment. Ingram Micro does not allow credit card transactions for API ordering. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.OrdersV5Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + OrdersV5Api apiInstance = new OrdersV5Api(defaultClient); + OrderCreateRequest orderCreateRequest = new OrderCreateRequest(); // OrderCreateRequest | + try { + OrderCreateResponse result = apiInstance.postV5OrdersCreate(orderCreateRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrdersV5Api#postV5OrdersCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orderCreateRequest** | [**OrderCreateRequest**](OrderCreateRequest.md)| | [optional] | + +### Return type + +[**OrderCreateResponse**](OrderCreateResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + diff --git a/docs/OrdersV6Api.md b/docs/OrdersV6Api.md new file mode 100644 index 00000000..d9ab2ea0 --- /dev/null +++ b/docs/OrdersV6Api.md @@ -0,0 +1,97 @@ +# OrdersV6Api + +All URIs are relative to *https://api.ingrammicro.com:443/sandbox* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getOrderdetailsV6**](OrdersV6Api.md#getOrderdetailsV6) | **GET** /resellers/v6/orders/{ordernumber} | Get Order Details v6 | + + + +# **getOrderdetailsV6** +> OrderDetailResponse getOrderdetailsV6(ordernumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, ingramOrderDate, vendorNumber, simulateStatus, isIml, regionCode) + +Get Order Details v6 + +Use your Ingram Micro sales order number to search for existing orders or retrieve existing order details. The sales order number, IM-CustomerNumber, IM-CountryCode, IM-SenderID and IM-CorrelationID are required parameters. In a case when the IM sales order number is repeated, you can refine the result by providing for additional filtering. Use the \"simulateStatus\" query parameter to test the GET order response for various order statuses. This parameter is only available in the sandbox to help with development and testing of the GET order endpoint. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.OrdersV6Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + OrdersV6Api apiInstance = new OrdersV6Api(defaultClient); + String ordernumber = "20-RD3QV"; // String | The Ingram Micro sales order number. + String imCustomerNumber = "20-222222"; // String | Your unique Ingram Micro customer number. + String imCountryCode = "US"; // String | Two-character ISO country code. + String imCorrelationID = "fbac82ba-cf0a-4bcf-fc03-0c5084"; // String | Unique transaction number to identify each transaction accross all the systems. + String imSenderID = "MyCompany"; // String | Unique value used to identify the sender of the transaction. Example: MyCompany. + LocalDate ingramOrderDate = LocalDate.parse("Wed May 13 00:00:00 UTC 2020"); // LocalDate | The date and time in UTC format that the order was created. + String vendorNumber = "vendorNumber_example"; // String | Vendor Number. + String simulateStatus = "IM::SHIPPED"; // String | Order response for various order statuses. Not for use in production. + Boolean isIml = true; // Boolean | True/False only for IML customers. + String regionCode = "regionCode_example"; // String | Region code for sandbox testing - Not for use in production. + try { + OrderDetailResponse result = apiInstance.getOrderdetailsV6(ordernumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, ingramOrderDate, vendorNumber, simulateStatus, isIml, regionCode); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrdersV6Api#getOrderdetailsV6"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **ordernumber** | **String**| The Ingram Micro sales order number. | | +| **imCustomerNumber** | **String**| Your unique Ingram Micro customer number. | | +| **imCountryCode** | **String**| Two-character ISO country code. | | +| **imCorrelationID** | **String**| Unique transaction number to identify each transaction accross all the systems. | | +| **imSenderID** | **String**| Unique value used to identify the sender of the transaction. Example: MyCompany. | [optional] | +| **ingramOrderDate** | **LocalDate**| The date and time in UTC format that the order was created. | [optional] | +| **vendorNumber** | **String**| Vendor Number. | [optional] | +| **simulateStatus** | **String**| Order response for various order statuses. Not for use in production. | [optional] [enum: IM::SHIPPED, IM::PARTIALLY_SHIPPED, IM::HOLD, IM::INVOICED] | +| **isIml** | **Boolean**| True/False only for IML customers. | [optional] | +| **regionCode** | **String**| Region code for sandbox testing - Not for use in production. | [optional] | + +### Return type + +[**OrderDetailResponse**](OrderDetailResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    | +| **204** | No Content | - | +| **400** | Bad Request | - | +| **500** | Internal Server Error | - | + diff --git a/docs/PostQuoteToOrderV6400Response.md b/docs/PostQuoteToOrderV6400Response.md new file mode 100644 index 00000000..99f7aad7 --- /dev/null +++ b/docs/PostQuoteToOrderV6400Response.md @@ -0,0 +1,16 @@ + + +# PostQuoteToOrderV6400Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**traceid** | **String** | A unique trace id to identify the issue. | [optional] | +|**type** | **String** | Type of the error message. | [optional] | +|**message** | **String** | A detailed error message. | [optional] | +|**fields** | [**List<PostQuoteToOrderV6400ResponseFieldsInner>**](PostQuoteToOrderV6400ResponseFieldsInner.md) | | [optional] | + + + diff --git a/docs/PostQuoteToOrderV6400ResponseFieldsInner.md b/docs/PostQuoteToOrderV6400ResponseFieldsInner.md new file mode 100644 index 00000000..023401c1 --- /dev/null +++ b/docs/PostQuoteToOrderV6400ResponseFieldsInner.md @@ -0,0 +1,15 @@ + + +# PostQuoteToOrderV6400ResponseFieldsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**field** | **String** | Name of the field. | [optional] | +|**message** | **String** | A filed level error message. | [optional] | +|**value** | **String** | Value of the message. | [optional] | + + + diff --git a/docs/PostRenewalssearch400Response.md b/docs/PostRenewalssearch400Response.md new file mode 100644 index 00000000..9b8fda2b --- /dev/null +++ b/docs/PostRenewalssearch400Response.md @@ -0,0 +1,15 @@ + + +# PostRenewalssearch400Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**traceid** | **String** | Unique Id to identify error. | [optional] | +|**type** | **String** | Describes the type of the error. | [optional] | +|**fields** | [**List<GetResellerV6ValidateQuote400ResponseFieldsInner>**](GetResellerV6ValidateQuote400ResponseFieldsInner.md) | | [optional] | + + + diff --git a/docs/PriceAndAvailabilityRequest.md b/docs/PriceAndAvailabilityRequest.md new file mode 100644 index 00000000..95451222 --- /dev/null +++ b/docs/PriceAndAvailabilityRequest.md @@ -0,0 +1,14 @@ + + +# PriceAndAvailabilityRequest + +Request object model for the multi sku price and stock API endpoint + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**servicerequest** | [**PriceAndAvailabilityRequestServicerequest**](PriceAndAvailabilityRequestServicerequest.md) | | [optional] | + + + diff --git a/docs/PriceAndAvailabilityRequestAdditionalAttributesInner.md b/docs/PriceAndAvailabilityRequestAdditionalAttributesInner.md new file mode 100644 index 00000000..0f5bed61 --- /dev/null +++ b/docs/PriceAndAvailabilityRequestAdditionalAttributesInner.md @@ -0,0 +1,14 @@ + + +# PriceAndAvailabilityRequestAdditionalAttributesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeName** | **String** | key value pair -key Name. | [optional] | +|**attributeValue** | **String** | key value pair -key value. | [optional] | + + + diff --git a/docs/PriceAndAvailabilityRequestAvailabilityByWarehouseInner.md b/docs/PriceAndAvailabilityRequestAvailabilityByWarehouseInner.md new file mode 100644 index 00000000..c5aea472 --- /dev/null +++ b/docs/PriceAndAvailabilityRequestAvailabilityByWarehouseInner.md @@ -0,0 +1,14 @@ + + +# PriceAndAvailabilityRequestAvailabilityByWarehouseInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**availabilityByWarehouseId** | **String** | Plant/warehouse Id of a particular location in order to get just the inventory of that location. | [optional] | +|**availabilityForAllLocation** | **Boolean** | Pass boolean value as input, if true the response will contain warehouse location details, if false the response will not hold warehouse location details. By default value is true. | [optional] | + + + diff --git a/docs/PriceAndAvailabilityRequestProductsInner.md b/docs/PriceAndAvailabilityRequestProductsInner.md new file mode 100644 index 00000000..c77e0056 --- /dev/null +++ b/docs/PriceAndAvailabilityRequestProductsInner.md @@ -0,0 +1,18 @@ + + +# PriceAndAvailabilityRequestProductsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ingramPartNumber** | **String** | Ingram Micro unique part number for the product. | [optional] | +|**vendorPartNumber** | **String** | Vendor’s part number for the product. | [optional] | +|**customerPartNumber** | **String** | Reseller/end-user’s part number for the product. | [optional] | +|**upc** | **String** | The UPC code for the product. Consists of 12 numeric digits that are uniquely assigned to each trade item. | [optional] | +|**quantityRequested** | **String** | Number of quantity of the Product. | [optional] | +|**additionalAttributes** | [**List<PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner>**](PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner.md) | | [optional] | + + + diff --git a/docs/PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner.md b/docs/PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner.md new file mode 100644 index 00000000..1eaf3b65 --- /dev/null +++ b/docs/PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner.md @@ -0,0 +1,14 @@ + + +# PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeName** | **String** | governmentprogramcode: Special Discount details will be provided based on the governmentprogramcode if available. shiptostatebrazil: Attribute Specific to Brazil. shipfrombranchnumber: If provided, displays only the availability of the specified branch number. | [optional] | +|**attributeValue** | **String** | key value pair -key value. | [optional] | + + + diff --git a/docs/PriceAndAvailabilityRequestServicerequest.md b/docs/PriceAndAvailabilityRequestServicerequest.md new file mode 100644 index 00000000..84f6b740 --- /dev/null +++ b/docs/PriceAndAvailabilityRequestServicerequest.md @@ -0,0 +1,14 @@ + + +# PriceAndAvailabilityRequestServicerequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**requestpreamble** | [**PriceAndAvailabilityRequestServicerequestRequestpreamble**](PriceAndAvailabilityRequestServicerequestRequestpreamble.md) | | [optional] | +|**priceandstockrequest** | [**PriceAndAvailabilityRequestServicerequestPriceandstockrequest**](PriceAndAvailabilityRequestServicerequestPriceandstockrequest.md) | | [optional] | + + + diff --git a/docs/PriceAndAvailabilityRequestServicerequestPriceandstockrequest.md b/docs/PriceAndAvailabilityRequestServicerequestPriceandstockrequest.md new file mode 100644 index 00000000..851c4aae --- /dev/null +++ b/docs/PriceAndAvailabilityRequestServicerequestPriceandstockrequest.md @@ -0,0 +1,16 @@ + + +# PriceAndAvailabilityRequestServicerequestPriceandstockrequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**showwarehouseavailability** | **String** | True/false to show the availability of individual warehouses | [optional] | +|**extravailabilityflag** | **String** | Y/N to show extra availability flag | [optional] | +|**includeallsystems** | **Boolean** | Flag to indicate if the price and stock information is required for all Ingram Micro systems. | [optional] | +|**item** | [**List<PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner>**](PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.md) | | [optional] | + + + diff --git a/docs/PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.md b/docs/PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.md new file mode 100644 index 00000000..79ee9a46 --- /dev/null +++ b/docs/PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.md @@ -0,0 +1,24 @@ + + +# PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**index** | **Integer** | | [optional] | +|**ingrampartnumber** | **String** | Ingram Micro SKU number | [optional] | +|**vendorpartnumber** | **String** | Vendor/Manufacture Part Number | [optional] | +|**upc** | **String** | Universal Product code | [optional] | +|**customerpartnumber** | **String** | Unique identoifier for the customer, needs custom setup. | [optional] | +|**warehouseidlist** | **List<String>** | Unique identity for Ingram Micro warehouses against which stock details are returned. | [optional] | +|**extendedvendorpartnumber** | **String** | | [optional] | +|**quantity** | **BigDecimal** | | [optional] | +|**enduserid** | **String** | | [optional] | +|**govtprogramtype** | **String** | | [optional] | +|**govtendusertype** | **String** | | [optional] | +|**specialbidnumber** | **String** | | [optional] | + + + diff --git a/docs/PriceAndAvailabilityRequestServicerequestRequestpreamble.md b/docs/PriceAndAvailabilityRequestServicerequestRequestpreamble.md new file mode 100644 index 00000000..9a35e02f --- /dev/null +++ b/docs/PriceAndAvailabilityRequestServicerequestRequestpreamble.md @@ -0,0 +1,14 @@ + + +# PriceAndAvailabilityRequestServicerequestRequestpreamble + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**isocountrycode** | **String** | 2 Digit ISO country code | | +|**customernumber** | **String** | Your Ingram Micro customer number | | + + + diff --git a/docs/PriceAndAvailabilityResponse.md b/docs/PriceAndAvailabilityResponse.md new file mode 100644 index 00000000..eaddcd46 --- /dev/null +++ b/docs/PriceAndAvailabilityResponse.md @@ -0,0 +1,14 @@ + + +# PriceAndAvailabilityResponse + +Response object model for the multi sku price and stock API endpoint + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**serviceresponse** | [**PriceAndAvailabilityResponseServiceresponse**](PriceAndAvailabilityResponseServiceresponse.md) | | [optional] | + + + diff --git a/docs/PriceAndAvailabilityResponseInner.md b/docs/PriceAndAvailabilityResponseInner.md new file mode 100644 index 00000000..d751f058 --- /dev/null +++ b/docs/PriceAndAvailabilityResponseInner.md @@ -0,0 +1,39 @@ + + +# PriceAndAvailabilityResponseInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**productStatusCode** | **String** | Codes signifying whether the sku is active or not. | [optional] | +|**productStatusMessage** | **String** | Message returned saying whether sku is active. | [optional] | +|**ingramPartNumber** | **String** | Ingram Micro unique part number for the product. | [optional] | +|**vendorPartNumber** | **String** | Vendor’s part number for the product. | [optional] | +|**extendedVendorPartNumber** | **String** | Extended Vendor Part Number. *Currently, this feature is not available in these countries (Mexico, Turkey, New Zealand, Colombia, Chile, Brazil, Peru, Western Sahara). | [optional] | +|**customerPartNumber** | **String** | Reseller / end-user’s part number for the product. | [optional] | +|**upc** | **String** | The UPC code for the product. Consists of 12 numeric digits that are uniquely assigned to each trade item. | [optional] | +|**partNumberType** | **String** | Number type of the part. | [optional] | +|**vendorNumber** | **String** | Vendor number that identifies the product. | [optional] | +|**vendorName** | **String** | Vendor name for the order. | [optional] | +|**description** | **String** | The description given for the product. | [optional] | +|**productClass** | **String** | Indicates whether the product is directly shipped from the vendor’s warehouse or if the product ships from Ingram Micro’s warehouse. Class Codes are Ingram classifications on how skus are stocked A = Product that is stocked usually in all IM warehouses and replenished on a regular basis. B = Product that is stocked in limited IM warehouses and replenished on a regular basis C = Product that is stocked in fewer IM warehouses and replenished on a regular basis. D = Product that Ingram Micro has elected to discontinue. E = Product that will be phased out later, according to the vendor. You may not want to replenish this product, but instead sell down what is in stock. F = Product that we carry for a specific customer or supplier under a contractual agreement. N = New Sku. Classification before first receipt O = Discontinued product to be liquidated S= Order for Specialized Demand (Order to backorder) X= direct ship from Vendor V = product that vendor has elected to discontinue. | [optional] | +|**uom** | **String** | The description given for the product. | [optional] | +|**productStatus** | **String** | Status that gives whether the product is Active. | [optional] | +|**acceptBackOrder** | **Boolean** | Boolean that indicates if the product accepts backorder. | [optional] | +|**productAuthorized** | **Boolean** | Boolean that indicates whether a product is authorized. | [optional] | +|**returnableProduct** | **Boolean** | Boolean that indicates if the product can be returned. | [optional] | +|**endUserInfoRequired** | **Boolean** | Boolean that indicates if end user information is required. | [optional] | +|**govtSpecialPriceAvailable** | **Boolean** | Boolean that indicates if special pricing is available for the product. | [optional] | +|**govtProgramType** | **String** | Program type, “PA” for government orders, “ED” for education order. | [optional] | +|**govtEndUserType** | **String** | Type of end user of the program. F = Federal, S = State, E = Local, K = K-12 school, and H = Higher Education. | [optional] | +|**availability** | [**PriceAndAvailabilityResponseInnerAvailability**](PriceAndAvailabilityResponseInnerAvailability.md) | | [optional] | +|**reserveInventoryDetails** | [**List<PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner>**](PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner.md) | | [optional] | +|**pricing** | [**PriceAndAvailabilityResponseInnerPricing**](PriceAndAvailabilityResponseInnerPricing.md) | | [optional] | +|**discounts** | [**List<PriceAndAvailabilityResponseInnerDiscountsInner>**](PriceAndAvailabilityResponseInnerDiscountsInner.md) | | [optional] | +|**bundlePartIndicator** | **Boolean** | True of false value to indicate whether it’s bundle part. *Currently, this feature is not available in these countries (Mexico, Turkey, New Zealand, Colombia, Chile, Brazil, Peru, Western Sahara). | [optional] | +|**serviceFees** | [**List<PriceAndAvailabilityResponseInnerServiceFeesInner>**](PriceAndAvailabilityResponseInnerServiceFeesInner.md) | *Currently, this feature is not available in these countries (Mexico, Turkey, New Zealand, Colombia, Chile, Brazil, Peru, Western Sahara). | [optional] | + + + diff --git a/docs/PriceAndAvailabilityResponseInnerAvailability.md b/docs/PriceAndAvailabilityResponseInnerAvailability.md new file mode 100644 index 00000000..8c9f6302 --- /dev/null +++ b/docs/PriceAndAvailabilityResponseInnerAvailability.md @@ -0,0 +1,15 @@ + + +# PriceAndAvailabilityResponseInnerAvailability + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**available** | **Boolean** | Boolean that indicates if the product ordered is available | [optional] | +|**totalAvailability** | **Integer** | The total amount of available products | [optional] | +|**availabilityByWarehouse** | [**List<PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner>**](PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner.md) | | [optional] | + + + diff --git a/docs/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner.md b/docs/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner.md new file mode 100644 index 00000000..a3c6c53b --- /dev/null +++ b/docs/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner.md @@ -0,0 +1,18 @@ + + +# PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**location** | **String** | Indicates where (location) the product is available. | [optional] | +|**warehouseId** | **String** | Indicates where (Ingram Warehouse Id) the product is available. | [optional] | +|**quantityAvailable** | **Integer** | The quantity of the product available in a given warehouse. | [optional] | +|**quantityBackordered** | **Integer** | The quantity of a product backordered in a given warehouse. | [optional] | +|**quantityBackorderedEta** | **String** | The estimated time of arrival of a product that has been backordered in a given warehouse. | [optional] | +|**backOrderInfo** | [**List<PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner>**](PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner.md) | *Currently, this feature is not available in these countries (Mexico, Turkey, New Zealand, Colombia, Chile, Brazil, Peru, Western Sahara). | [optional] | + + + diff --git a/docs/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner.md b/docs/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner.md new file mode 100644 index 00000000..10509229 --- /dev/null +++ b/docs/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner.md @@ -0,0 +1,14 @@ + + +# PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quantity** | **Integer** | Quantity backordered. | [optional] | +|**etaDate** | **String** | Expected availability date. | [optional] | + + + diff --git a/docs/PriceAndAvailabilityResponseInnerDiscountsInner.md b/docs/PriceAndAvailabilityResponseInnerDiscountsInner.md new file mode 100644 index 00000000..97cc14af --- /dev/null +++ b/docs/PriceAndAvailabilityResponseInnerDiscountsInner.md @@ -0,0 +1,14 @@ + + +# PriceAndAvailabilityResponseInnerDiscountsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**specialPricing** | [**List<PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner>**](PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.md) | | [optional] | +|**quantityDiscounts** | [**List<PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner>**](PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner.md) | | [optional] | + + + diff --git a/docs/PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner.md b/docs/PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner.md new file mode 100644 index 00000000..852789ce --- /dev/null +++ b/docs/PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner.md @@ -0,0 +1,17 @@ + + +# PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**conditionType** | **String** | Indicates when the discount is applied after ordering the product. | [optional] | +|**currencyCode** | **String** | The country-specific three digit ISO 4217 currency code for the order. | [optional] | +|**currencyType** | **String** | Type of currency. | [optional] | +|**quantity** | **Integer** | The total discounted quantity of the product. | [optional] | +|**amount** | **BigDecimal** | The total price of all the discounts applied. | [optional] | + + + diff --git a/docs/PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.md b/docs/PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.md new file mode 100644 index 00000000..4b8e4cef --- /dev/null +++ b/docs/PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.md @@ -0,0 +1,21 @@ + + +# PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**discountType** | **String** | The type of discount being given to the customer. | [optional] | +|**specialBidNumer** | **String** | Pre-approved special pricing/bid number provided to the reseller by the vendor for special pricing and discounts. Used to track the bid number where different line items have different bid numbers. Line-level bid numbers take precedence over header-level bid numbers. | [optional] | +|**specialPricingDiscount** | **BigDecimal** | Special pricing discount amount given to the customer. | [optional] | +|**specialPricingEffectiveDate** | **LocalDate** | The effective date of the special pricing available to the customer. | [optional] | +|**specialPricingExpirationDate** | **LocalDate** | The expiration date of the special pricing available to the customer. | [optional] | +|**specialPricingAvailableQuantity** | **Integer** | The available quantity of products with discounts. | [optional] | +|**specialPricingMinQuantity** | **Integer** | The minimum quantity of products that have to be purchased to ensure the discount is applied. | [optional] | +|**governmentDiscountType** | **String** | Type of Government Discount. *Currently, this discount is only available in the USA. | [optional] | +|**governmentDiscountedCustomerPrice** | **BigDecimal** | Government Discounted Customer Price. *Currently, this discount is only available in the USA. | [optional] | + + + diff --git a/docs/PriceAndAvailabilityResponseInnerPricing.md b/docs/PriceAndAvailabilityResponseInnerPricing.md new file mode 100644 index 00000000..6dbb84b9 --- /dev/null +++ b/docs/PriceAndAvailabilityResponseInnerPricing.md @@ -0,0 +1,18 @@ + + +# PriceAndAvailabilityResponseInnerPricing + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**currencyCode** | **String** | The 3-digit ISO currency code. | [optional] | +|**retailPrice** | **BigDecimal** | The retail price of the product. | [optional] | +|**mapPrice** | **BigDecimal** | Minimum Advertised Price (MAP). If required by the vendor, resellers can not sell below MAP price. | [optional] | +|**customerPrice** | **BigDecimal** | The price customer pays after all special pricing and discounts have been applied. | [optional] | +|**specialBidPricingAvailable** | **Boolean** | Boolean values specifies whether special Bid discounts are available for the product. | [optional] | +|**webDiscountsAvailable** | **Boolean** | Boolean values specifies whether web Discounts are available for the product. | [optional] | + + + diff --git a/docs/PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner.md b/docs/PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner.md new file mode 100644 index 00000000..d08f8d83 --- /dev/null +++ b/docs/PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner.md @@ -0,0 +1,16 @@ + + +# PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quantityReserved** | **Integer** | The quantity of the product reserved for the customer. | [optional] | +|**quantityAvailable** | **Integer** | The availability of the product reserved. | [optional] | +|**effectivedate** | **String** | The reservation date for the product in UTC format. | [optional] | +|**expirydate** | **String** | The expiration date for the reservation of the product in UTC format. | [optional] | + + + diff --git a/docs/PriceAndAvailabilityResponseInnerServiceFeesInner.md b/docs/PriceAndAvailabilityResponseInnerServiceFeesInner.md new file mode 100644 index 00000000..7e2217aa --- /dev/null +++ b/docs/PriceAndAvailabilityResponseInnerServiceFeesInner.md @@ -0,0 +1,17 @@ + + +# PriceAndAvailabilityResponseInnerServiceFeesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**conditionType** | **String** | Condition Type of the service fees. | [optional] | +|**description** | **String** | Description of the service fees. | [optional] | +|**amount** | **BigDecimal** | Amount of the service fees. | [optional] | +|**endDate** | **String** | End Date of the service fees. | [optional] | +|**currencyCode** | **String** | Currency Code of the service fees. | [optional] | + + + diff --git a/docs/PriceAndAvailabilityResponseServiceresponse.md b/docs/PriceAndAvailabilityResponseServiceresponse.md new file mode 100644 index 00000000..b52caf9d --- /dev/null +++ b/docs/PriceAndAvailabilityResponseServiceresponse.md @@ -0,0 +1,14 @@ + + +# PriceAndAvailabilityResponseServiceresponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responsepreamble** | [**PriceAndAvailabilityResponseServiceresponseResponsepreamble**](PriceAndAvailabilityResponseServiceresponseResponsepreamble.md) | | [optional] | +|**priceandstockresponse** | [**PriceAndAvailabilityResponseServiceresponsePriceandstockresponse**](PriceAndAvailabilityResponseServiceresponsePriceandstockresponse.md) | | [optional] | + + + diff --git a/docs/PriceAndAvailabilityResponseServiceresponsePriceandstockresponse.md b/docs/PriceAndAvailabilityResponseServiceresponsePriceandstockresponse.md new file mode 100644 index 00000000..11b7a5e3 --- /dev/null +++ b/docs/PriceAndAvailabilityResponseServiceresponsePriceandstockresponse.md @@ -0,0 +1,13 @@ + + +# PriceAndAvailabilityResponseServiceresponsePriceandstockresponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**details** | [**List<PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner>**](PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.md) | | [optional] | + + + diff --git a/docs/PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.md b/docs/PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.md new file mode 100644 index 00000000..ac5a1667 --- /dev/null +++ b/docs/PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.md @@ -0,0 +1,87 @@ + + +# PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**itemstatus** | [**ItemstatusEnum**](#ItemstatusEnum) | SUCCESS or FAILED | [optional] | +|**statusmessage** | **String** | Description of itemstatus | [optional] | +|**ingrampartnumber** | **String** | Ingram Micro part number | [optional] | +|**vendorpartnumber** | **String** | Manufacturer/Vendor part number | [optional] | +|**globalskuid** | **String** | | [optional] | +|**customerprice** | **BigDecimal** | Customer specific price for the product, excluding taxes | [optional] | +|**partdescription1** | **String** | Product description part 1 | [optional] | +|**partdescription2** | **String** | Product description part 2 | [optional] | +|**vendornumber** | **String** | | [optional] | +|**vendorname** | **String** | Name of the vendor | [optional] | +|**cpucode** | **String** | | [optional] | +|**propertyClass** | [**PropertyClassEnum**](#PropertyClassEnum) | Ingram Micro assigned product classification - A-Stocked product in all IM warehouses, B-Limited stock in IM warehouses, C-Stocked in fewer wareshouses, D-Ingram discontinued, E-Planned to be phased out as per the vendor, F-Carried for specific customer as per the contract, N-New SKU, O-Discontinued to be liquidated, S-Order for specialized demand, V-Discontinued by vendor, X-Direct Ship products from vendor | [optional] | +|**skustatus** | [**SkustatusEnum**](#SkustatusEnum) | Identifies if the SKU has been discontinued. | [optional] | +|**mediacpu** | **String** | | [optional] | +|**categorysubcategory** | **String** | | [optional] | +|**retailprice** | **BigDecimal** | | [optional] | +|**newmedia** | **String** | | [optional] | +|**enduserrequired** | [**EnduserrequiredEnum**](#EnduserrequiredEnum) | Y - End user required N - Not required End user | [optional] | +|**backorderflag** | [**BackorderflagEnum**](#BackorderflagEnum) | Y- Allow Backorder Flag N- Not allowed | [optional] | +|**skuauthorized** | **String** | | [optional] | +|**extendedvendorpartnumber** | **String** | | [optional] | +|**warehousedetails** | [**List<WarehouseListType>**](WarehouseListType.md) | | [optional] | + + + +## Enum: ItemstatusEnum + +| Name | Value | +|---- | -----| +| SUCCESS | "SUCCESS" | +| FAILED | "FAILED" | + + + +## Enum: PropertyClassEnum + +| Name | Value | +|---- | -----| +| A | "A" | +| B | "B" | +| C | "C" | +| D | "D" | +| E | "E" | +| F | "F" | +| N | "N" | +| O | "O" | +| S | "S" | +| V | "V" | +| X | "X" | + + + +## Enum: SkustatusEnum + +| Name | Value | +|---- | -----| +| ACTIVE | "ACTIVE" | + + + +## Enum: EnduserrequiredEnum + +| Name | Value | +|---- | -----| +| Y | "Y" | +| N | "N" | + + + +## Enum: BackorderflagEnum + +| Name | Value | +|---- | -----| +| Y | "Y" | +| N | "N" | + + + diff --git a/docs/PriceAndAvailabilityResponseServiceresponseResponsepreamble.md b/docs/PriceAndAvailabilityResponseServiceresponseResponsepreamble.md new file mode 100644 index 00000000..98de8361 --- /dev/null +++ b/docs/PriceAndAvailabilityResponseServiceresponseResponsepreamble.md @@ -0,0 +1,15 @@ + + +# PriceAndAvailabilityResponseServiceresponseResponsepreamble + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responsestatus** | **String** | SUCCESS or FAILED, sometimes PARTIAL SUCCESS if connection to 1 of the systems fails | [optional] | +|**responsemessage** | **String** | Overall status message including error message | [optional] | +|**statuscode** | **String** | Statuscode Message | [optional] | + + + diff --git a/docs/ProductCatalogApi.md b/docs/ProductCatalogApi.md new file mode 100644 index 00000000..f4a362c2 --- /dev/null +++ b/docs/ProductCatalogApi.md @@ -0,0 +1,272 @@ +# ProductCatalogApi + +All URIs are relative to *https://api.ingrammicro.com:443/sandbox* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getResellerV6Productdetail**](ProductCatalogApi.md#getResellerV6Productdetail) | **GET** /resellers/v6/catalog/details/{ingramPartNumber} | Product Details | +| [**getResellerV6Productsearch**](ProductCatalogApi.md#getResellerV6Productsearch) | **GET** /resellers/v6/catalog | Search Products | +| [**postPriceandavailability**](ProductCatalogApi.md#postPriceandavailability) | **POST** /resellers/v6/catalog/priceandavailability | Price and Availability | + + + +# **getResellerV6Productdetail** +> ProductDetailResponse getResellerV6Productdetail(ingramPartNumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID) + +Product Details + +Search all the product-related details using a unique Ingram Part Number. Currently, this API is available in the USA, India, and Netherlands. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.ProductCatalogApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + ProductCatalogApi apiInstance = new ProductCatalogApi(defaultClient); + String ingramPartNumber = "6YE881"; // String | Ingram Micro unique part number for the product + String imCustomerNumber = "20-222222"; // String | Your unique Ingram Micro customer number + String imCountryCode = "US"; // String | Two-character ISO country code. + String imCorrelationID = "fbac82ba-cf0a-4bcf-fc03-0c5084"; // String | Unique transaction number to identify each transaction accross all the systems + String imSenderID = "MyCompany"; // String | Sender Identification text + try { + ProductDetailResponse result = apiInstance.getResellerV6Productdetail(ingramPartNumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ProductCatalogApi#getResellerV6Productdetail"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **ingramPartNumber** | **String**| Ingram Micro unique part number for the product | | +| **imCustomerNumber** | **String**| Your unique Ingram Micro customer number | | +| **imCountryCode** | **String**| Two-character ISO country code. | | +| **imCorrelationID** | **String**| Unique transaction number to identify each transaction accross all the systems | | +| **imSenderID** | **String**| Sender Identification text | [optional] | + +### Return type + +[**ProductDetailResponse**](ProductDetailResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **400** | Bad Request | - | +| **404** | No Content | - | +| **500** | Internal Server Error | - | + + +# **getResellerV6Productsearch** +> ProductSearchResponse getResellerV6Productsearch(imCustomerNumber, imCorrelationID, imCountryCode, pageNumber, pageSize, imSenderID, type, hasDiscounts, vendor, vendorPartNumber, acceptLanguage, vendorNumber, keyword, category, skipAuthorisation) + +Search Products + +Search the Ingram Micro product catalog by providing any of the information in the keyword(Ingram part number / vendor part number/ product description / UPC + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.ProductCatalogApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + ProductCatalogApi apiInstance = new ProductCatalogApi(defaultClient); + String imCustomerNumber = "20-222222"; // String | Your unique Ingram Micro customer number + String imCorrelationID = "fbac82ba-cf0a-4bcf-fc03-0c5084"; // String | Unique transaction number to identify each transaction accross all the systems + String imCountryCode = "US"; // String | Two-character ISO country code. + Integer pageNumber = 56; // Integer | Current page number. Default is 1 + Integer pageSize = 56; // Integer | Number of records required in the call - max records 100 per page + String imSenderID = "MyCompany"; // String | Sender Identification text + String type = "IM::physical"; // String | The SKU type of product. One of Physical, Digital, or Any. + String hasDiscounts = "true"; // String | Specifies if there are discounts available for the product. + List vendor = Arrays.asList(); // List | The name of the vendor/manufacturer of the product. + List vendorPartNumber = Arrays.asList(); // List | The vendors part number for the product. + String acceptLanguage = "en"; // String | Header to the API calls, the content will help us identify the response language. + String vendorNumber = "vendorNumber_example"; // String | Vendor number of the product + List keyword = Arrays.asList(); // List | Keyword search,can be ingram part number or vendor part number or product title or vendor nameKeyword search. Can be Ingram Micro part number, vender part number, product title, or vendor name. + String category = "Accessories"; // String | The category of the product. Example: Displays. + String skipAuthorisation = "true"; // String | This parameter is True when you want Skip the authorization, so template will work like current B2b template. + try { + ProductSearchResponse result = apiInstance.getResellerV6Productsearch(imCustomerNumber, imCorrelationID, imCountryCode, pageNumber, pageSize, imSenderID, type, hasDiscounts, vendor, vendorPartNumber, acceptLanguage, vendorNumber, keyword, category, skipAuthorisation); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ProductCatalogApi#getResellerV6Productsearch"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **imCustomerNumber** | **String**| Your unique Ingram Micro customer number | | +| **imCorrelationID** | **String**| Unique transaction number to identify each transaction accross all the systems | | +| **imCountryCode** | **String**| Two-character ISO country code. | | +| **pageNumber** | **Integer**| Current page number. Default is 1 | [optional] | +| **pageSize** | **Integer**| Number of records required in the call - max records 100 per page | [optional] | +| **imSenderID** | **String**| Sender Identification text | [optional] | +| **type** | **String**| The SKU type of product. One of Physical, Digital, or Any. | [optional] [enum: IM::physical, IM::digital, IM::any] | +| **hasDiscounts** | **String**| Specifies if there are discounts available for the product. | [optional] | +| **vendor** | [**List<String>**](String.md)| The name of the vendor/manufacturer of the product. | [optional] | +| **vendorPartNumber** | [**List<String>**](String.md)| The vendors part number for the product. | [optional] | +| **acceptLanguage** | **String**| Header to the API calls, the content will help us identify the response language. | [optional] [default to en] | +| **vendorNumber** | **String**| Vendor number of the product | [optional] | +| **keyword** | [**List<String>**](String.md)| Keyword search,can be ingram part number or vendor part number or product title or vendor nameKeyword search. Can be Ingram Micro part number, vender part number, product title, or vendor name. | [optional] | +| **category** | **String**| The category of the product. Example: Displays. | [optional] | +| **skipAuthorisation** | **String**| This parameter is True when you want Skip the authorization, so template will work like current B2b template. | [optional] | + +### Return type + +[**ProductSearchResponse**](ProductSearchResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | a ProductSearchv6ResponseElement to be returned | * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Sender Identification text .
    | +| **400** | Bad Request | * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Sender Identification text .
    | +| **404** | No Content | - | +| **500** | Internal Server Error | * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Sender Identification text .
    | + + +# **postPriceandavailability** +> List<PriceAndAvailabilityResponseInner> postPriceandavailability(includeAvailability, includePricing, imCustomerNumber, imCountryCode, imCorrelationID, priceAndAvailabilityRequest, includeProductAttributes, imSenderID) + +Price and Availability + +The PriceAndAvailability API, will retrieve Pricing, Availability, discounts, Inventory Location, Reserve Inventory for the products upto 50 products. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.ProductCatalogApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + ProductCatalogApi apiInstance = new ProductCatalogApi(defaultClient); + List includeAvailability = Arrays.asList(); // List | Pass boolean value as input, if true the response will contain warehouse availability details, if false the response will not hold warehouse availability details + Boolean includePricing = true; // Boolean | Pass boolean value as input, if true the response will contain Pricing details of the Product, if false the response will not hold Pricing details. + String imCustomerNumber = "20-222222"; // String | Your unique Ingram Micro customer number. + String imCountryCode = "US"; // String | Two-character ISO country code. + String imCorrelationID = "fbac82ba-cf0a-4bcf-fc03-0c5084"; // String | Unique transaction number to identify each transaction across all the systems. + PriceAndAvailabilityRequest priceAndAvailabilityRequest = new PriceAndAvailabilityRequest(); // PriceAndAvailabilityRequest | + Boolean includeProductAttributes = true; // Boolean | Pass boolean value as input, if true the response will contain detailed attributes related to the Product, if false or not sent the response will contain very few Product details. + String imSenderID = "MyCompany"; // String | Unique value used to identify the sender of the transaction. Example: MyCompany + try { + List result = apiInstance.postPriceandavailability(includeAvailability, includePricing, imCustomerNumber, imCountryCode, imCorrelationID, priceAndAvailabilityRequest, includeProductAttributes, imSenderID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ProductCatalogApi#postPriceandavailability"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **includeAvailability** | [**List<Boolean>**](Boolean.md)| Pass boolean value as input, if true the response will contain warehouse availability details, if false the response will not hold warehouse availability details | | +| **includePricing** | **Boolean**| Pass boolean value as input, if true the response will contain Pricing details of the Product, if false the response will not hold Pricing details. | | +| **imCustomerNumber** | **String**| Your unique Ingram Micro customer number. | | +| **imCountryCode** | **String**| Two-character ISO country code. | | +| **imCorrelationID** | **String**| Unique transaction number to identify each transaction across all the systems. | | +| **priceAndAvailabilityRequest** | [**PriceAndAvailabilityRequest**](PriceAndAvailabilityRequest.md)| | | +| **includeProductAttributes** | **Boolean**| Pass boolean value as input, if true the response will contain detailed attributes related to the Product, if false or not sent the response will contain very few Product details. | [optional] | +| **imSenderID** | **String**| Unique value used to identify the sender of the transaction. Example: MyCompany | [optional] | + +### Return type + +[**List<PriceAndAvailabilityResponseInner>**](PriceAndAvailabilityResponseInner.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **207** | Multi Status | - | +| **400** | Bad Request | * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    | +| **401** | Unauthorized | - | +| **500** | Internal Server Error | - | + diff --git a/docs/ProductCatalogV4Api.md b/docs/ProductCatalogV4Api.md new file mode 100644 index 00000000..3f975631 --- /dev/null +++ b/docs/ProductCatalogV4Api.md @@ -0,0 +1,144 @@ +# ProductCatalogV4Api + +All URIs are relative to *https://api.ingrammicro.com:443/sandbox* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**postV4Multiskupriceandstock**](ProductCatalogV4Api.md#postV4Multiskupriceandstock) | **POST** /products/v4/multiskupriceandstock | Product availability for upto 50 SKUs | +| [**postV4Productsearch**](ProductCatalogV4Api.md#postV4Productsearch) | **POST** /products/v4/productsearch | Real-time Product Search | + + + +# **postV4Multiskupriceandstock** +> MultiSKUPriceAndStockResponse postV4Multiskupriceandstock(multiSKUPriceAndStockRequest) + +Product availability for upto 50 SKUs + +Find price and availability of up to 50 SKUs in a single request. As you increase the number of items in the request response time will be extended. This transaction must not be used as a continuous cyclical call to populate availability and pricing for your full catalog. Customers that perform this activity will lose access to price and availability. Ingram can provide a Price catalog file and an Inventory file in flat file format, which can be obtained through FTP download. Please contact 1800-616-4665 or Electronic.Services@ingrammicro.com for more information on these files. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.ProductCatalogV4Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + ProductCatalogV4Api apiInstance = new ProductCatalogV4Api(defaultClient); + MultiSKUPriceAndStockRequest multiSKUPriceAndStockRequest = new MultiSKUPriceAndStockRequest(); // MultiSKUPriceAndStockRequest | + try { + MultiSKUPriceAndStockResponse result = apiInstance.postV4Multiskupriceandstock(multiSKUPriceAndStockRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ProductCatalogV4Api#postV4Multiskupriceandstock"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **multiSKUPriceAndStockRequest** | [**MultiSKUPriceAndStockRequest**](MultiSKUPriceAndStockRequest.md)| | [optional] | + +### Return type + +[**MultiSKUPriceAndStockResponse**](MultiSKUPriceAndStockResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +# **postV4Productsearch** +> ProductSearchResponse postV4Productsearch(productSearchRequest) + +Real-time Product Search + +A real time search that provides the Ingram Micro part number using the manufacturer part number. This API is helpful to eliminate any errors when a manufactuer has the same part number and Ingram Micro has had to create multiple sku numbers + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.ProductCatalogV4Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + ProductCatalogV4Api apiInstance = new ProductCatalogV4Api(defaultClient); + ProductSearchRequest productSearchRequest = new ProductSearchRequest(); // ProductSearchRequest | + try { + ProductSearchResponse result = apiInstance.postV4Productsearch(productSearchRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ProductCatalogV4Api#postV4Productsearch"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **productSearchRequest** | [**ProductSearchRequest**](ProductSearchRequest.md)| | [optional] | + +### Return type + +[**ProductSearchResponse**](ProductSearchResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + diff --git a/docs/ProductCatalogV5Api.md b/docs/ProductCatalogV5Api.md new file mode 100644 index 00000000..9bf97928 --- /dev/null +++ b/docs/ProductCatalogV5Api.md @@ -0,0 +1,148 @@ +# ProductCatalogV5Api + +All URIs are relative to *https://api.ingrammicro.com:443/sandbox* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getV5CatalogProductsearch**](ProductCatalogV5Api.md#getV5CatalogProductsearch) | **GET** /resellers/v5/Catalog | Search Product Catalog | +| [**multiSKUPriceAndStock**](ProductCatalogV5Api.md#multiSKUPriceAndStock) | **POST** /resellers/v5/Catalog/priceandavailability | Find availability of upto 50 SKUs | + + + +# **getV5CatalogProductsearch** +> ProductSearchResponse getV5CatalogProductsearch(customerNumber, isoCountryCode, partNumber) + +Search Product Catalog + +Search the Ingram Micro product catalog using customerNumber, isoCountryCode and partNumber.<ul><li>customerNumber and isoCountryCode fields are required.</li><li>The PartNumber field accepts the following:<ul><li>Ingram part number</li><li>Vendor part number</li><li>Customer part number</li><li>UPC (Universal Product Code)</li></ul></li></ul> + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.ProductCatalogV5Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + ProductCatalogV5Api apiInstance = new ProductCatalogV5Api(defaultClient); + String customerNumber = "20-222222"; // String | Your unique Ingram Micro customer number + String isoCountryCode = "US"; // String | 2 chars country code + String partNumber = "1AQ821"; // String | Part Number can be ingram part number or vendor part number or customer part number or UPC + try { + ProductSearchResponse result = apiInstance.getV5CatalogProductsearch(customerNumber, isoCountryCode, partNumber); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ProductCatalogV5Api#getV5CatalogProductsearch"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **customerNumber** | **String**| Your unique Ingram Micro customer number | [default to 20-222222] | +| **isoCountryCode** | **String**| 2 chars country code | [default to US] | +| **partNumber** | **String**| Part Number can be ingram part number or vendor part number or customer part number or UPC | [default to 1AQ821] | + +### Return type + +[**ProductSearchResponse**](ProductSearchResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + + +# **multiSKUPriceAndStock** +> PriceAndAvailabilityResponse multiSKUPriceAndStock(priceAndAvailabilityRequest) + +Find availability of upto 50 SKUs + +Search the product catalog for the price and availability for up to 50 SKUs at one time. This endpoint helps to confirm the details just prior to placing a real-time call.<ul><li>You may request visibility for reserve stock if you participate in reserved inventory, in addition to the stock that is open to all the partners. Please see the details in the endpoint model below.</li><li>Follow these guidelines when using this endpoint:<ul><li>This endpoint is not for refreshing the full catalog with availability and pricing information. Ingram Micro applies rate limits on this endpoint. Continuous cyclical calls will error out. Customers that perform this activity may lose access to the endpoint.</li><li>For the full catalog refresh, Ingram Micro can provide a Price and Inventory file in flat file format, made available through FTP download. Please contact your Ingram Micro sales rep for details.</li></ul></li></ul> + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.ProductCatalogV5Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + ProductCatalogV5Api apiInstance = new ProductCatalogV5Api(defaultClient); + PriceAndAvailabilityRequest priceAndAvailabilityRequest = new PriceAndAvailabilityRequest(); // PriceAndAvailabilityRequest | + try { + PriceAndAvailabilityResponse result = apiInstance.multiSKUPriceAndStock(priceAndAvailabilityRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ProductCatalogV5Api#multiSKUPriceAndStock"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **priceAndAvailabilityRequest** | [**PriceAndAvailabilityRequest**](PriceAndAvailabilityRequest.md)| | [optional] | + +### Return type + +[**PriceAndAvailabilityResponse**](PriceAndAvailabilityResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + diff --git a/docs/ProductDetailResponse.md b/docs/ProductDetailResponse.md new file mode 100644 index 00000000..90406c74 --- /dev/null +++ b/docs/ProductDetailResponse.md @@ -0,0 +1,30 @@ + + +# ProductDetailResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ingramPartNumber** | **String** | Ingram Micro unique part number for the product. | [optional] | +|**vendorPartNumber** | **String** | Vendor’s part number for the product. | [optional] | +|**productAuthorized** | **Boolean** | Boolean that indicates whether a product is authorized. | [optional] | +|**description** | **String** | The description given for the product. | [optional] | +|**productDetailDescription** | **String** | The detailed description given for the product. | [optional] | +|**upc** | **String** | The UPC code for the product. Consists of 12 numeric digits that are uniquely assigned to each trade item. | [optional] | +|**productCategory** | **String** | The category of the product. | [optional] | +|**productSubcategory** | **String** | The sub-category of the product. | [optional] | +|**vendorName** | **String** | Vendor name for the order. | [optional] | +|**vendorNumber** | **String** | Vendor number that identifies the product. | [optional] | +|**productStatusCode** | **String** | Status code of the product. | [optional] | +|**productClass** | **String** | Indicates whether the product is directly shipped from the vendor’s warehouse or if the product ships from Ingram Micro’s warehouse. Class Codes are Ingram classifications on how skus are stocked A = Product that is stocked usually in all IM warehouses and replenished on a regular basis. B = Product that is stocked in limited IM warehouses and replenished on a regular basis C = Product that is stocked in fewer IM warehouses and replenished on a regular basis. D = Product that Ingram Micro has elected to discontinue. E = Product that will be phased out later, according to the vendor. You may not want to replenish this product, but instead sell down what is in stock. F = Product that we carry for a specific customer or supplier under a contractual agreement. N = New Sku. Classification before first receipt O = Discontinued product to be liquidated S= Order for Specialized Demand (Order to backorder) X= direct ship from Vendor V = product that vendor has elected to discontinue. | [optional] | +|**customerPartNumber** | **String** | Reseller / end-user’s part number for the product. | [optional] | +|**indicators** | [**List<ProductDetailResponseIndicatorsInner>**](ProductDetailResponseIndicatorsInner.md) | Indicators of the Product | [optional] | +|**ciscoFields** | [**List<ProductDetailResponseCiscoFieldsInner>**](ProductDetailResponseCiscoFieldsInner.md) | Cisco product related information. | [optional] | +|**technicalSpecifications** | [**List<ProductDetailResponseTechnicalSpecificationsInner>**](ProductDetailResponseTechnicalSpecificationsInner.md) | Technical specifications of the product. | [optional] | +|**warrantyInformation** | **List<Object>** | Warranty information related to the product. | [optional] | +|**additionalInformation** | [**ProductDetailResponseAdditionalInformation**](ProductDetailResponseAdditionalInformation.md) | | [optional] | + + + diff --git a/docs/ProductDetailResponseAdditionalInformation.md b/docs/ProductDetailResponseAdditionalInformation.md new file mode 100644 index 00000000..103a5df1 --- /dev/null +++ b/docs/ProductDetailResponseAdditionalInformation.md @@ -0,0 +1,20 @@ + + +# ProductDetailResponseAdditionalInformation + +Additional Information related to the product. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**productWeight** | [**List<ProductDetailResponseAdditionalInformationProductWeightInner>**](ProductDetailResponseAdditionalInformationProductWeightInner.md) | Weight information related to the product. | [optional] | +|**isBulkFreight** | **Boolean** | Example : true or false | [optional] | +|**height** | **String** | Example : '5.2 Inches' | [optional] | +|**width** | **String** | Example : '13 inches' | [optional] | +|**length** | **String** | Example : '20.4 inches' | [optional] | +|**netWeight** | **String** | Example : '10 lb' | [optional] | +|**dimensionUnit** | **String** | Example : 'Unit value' | [optional] | + + + diff --git a/docs/ProductDetailResponseAdditionalInformationProductWeightInner.md b/docs/ProductDetailResponseAdditionalInformationProductWeightInner.md new file mode 100644 index 00000000..947b379a --- /dev/null +++ b/docs/ProductDetailResponseAdditionalInformationProductWeightInner.md @@ -0,0 +1,15 @@ + + +# ProductDetailResponseAdditionalInformationProductWeightInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**plantId** | **String** | ID of the plant. Example : 'US01' | [optional] | +|**weight** | **BigDecimal** | Weight of the product. Example : 2 | [optional] | +|**weightUnit** | **String** | Weight unit of the product. Example : 'LB' | [optional] | + + + diff --git a/docs/ProductDetailResponseCiscoFieldsInner.md b/docs/ProductDetailResponseCiscoFieldsInner.md new file mode 100644 index 00000000..423b2e6c --- /dev/null +++ b/docs/ProductDetailResponseCiscoFieldsInner.md @@ -0,0 +1,19 @@ + + +# ProductDetailResponseCiscoFieldsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**productSubGroup** | **String** | Cisco product sub-group | [optional] | +|**serviceProgramName** | **String** | Cisco service program name | [optional] | +|**itemCatalogCategory** | **String** | Cisco item catalog category | [optional] | +|**configurationIndicator** | **String** | Cisco configuration indicator | [optional] | +|**internalBusinessEntity** | **String** | Cisco internal business entity | [optional] | +|**itemType** | **String** | Cisco item type | [optional] | +|**globalListPrice** | **String** | Cisco global list price | [optional] | + + + diff --git a/docs/ProductDetailResponseIndicatorsInner.md b/docs/ProductDetailResponseIndicatorsInner.md new file mode 100644 index 00000000..19421218 --- /dev/null +++ b/docs/ProductDetailResponseIndicatorsInner.md @@ -0,0 +1,43 @@ + + +# ProductDetailResponseIndicatorsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**hasWarranty** | **Boolean** | Boolean that indicates whether product has a warranty. | [optional] | +|**isNewProduct** | **Boolean** | Boolean that indicates whether it’s a new product. | [optional] | +|**hasReturnLimits** | **Boolean** | Boolean that indicates whether there is any limit to return the product. | [optional] | +|**isBackOrderAllowed** | **Boolean** | Boolean that indicates whether back order is allowed for the product. | [optional] | +|**isShippedFromPartner** | **Boolean** | Boolean that indicates whether product is shipped from the partner. | [optional] | +|**isReplacementProduct** | **Boolean** | Boolean that indicates whether product is a replacement product. | [optional] | +|**isDirectship** | **Boolean** | Boolean that indicates whether it’s a direct ship product. | [optional] | +|**isDownloadable** | **Boolean** | Boolean that indicates whether product is downloadable. | [optional] | +|**isDigitalType** | **Boolean** | Boolean that indicates whether it’s a digital product. | [optional] | +|**skuType** | **String** | skutype | [optional] | +|**hasStdSpecialPrice** | **Boolean** | Boolean that indicates whether product has any standard special price. | [optional] | +|**hasAcopSpecialPrice** | **Boolean** | Boolean that indicates whether product has any ACOP special price. | [optional] | +|**hasAcopQuantityBreak** | **Boolean** | Boolean that indicates whether product has any ACOP quantity break. | [optional] | +|**hasStdWebDiscount** | **Boolean** | Boolean that indicates whether product has any standard web discount. | [optional] | +|**hasSpecialBid** | **Boolean** | Boolean that indicates whether product has any special bid. | [optional] | +|**isExportableToCountry** | **Boolean** | Boolean that indicates whether product is exportable. | [optional] | +|**isDiscontinuedProduct** | **Boolean** | Boolean that indicates whether it’s a discontinued product. | [optional] | +|**isRefurbishedProduct** | **Boolean** | Boolean that indicates whether product is refurbished. | [optional] | +|**isReturnableProduct** | **Boolean** | Boolean that indicates if the product can be returned. | [optional] | +|**isIngramShip** | **Boolean** | Boolean that indicates whether it’s a Ingram shipped product. | [optional] | +|**isEnduserRequired** | **Boolean** | Do vendor requires Enduser name required to create an order. | [optional] | +|**isHeavyWeight** | **Boolean** | Boolean that indicates whether it’s heavy weight product. | [optional] | +|**hasLtl** | **Boolean** | Boolean that indicates whether it hasLtl or not. | [optional] | +|**isClearanceProduct** | **Boolean** | Boolean that indicates whether it’s clearnce product. | [optional] | +|**hasBundle** | **Boolean** | Boolean that indicates whether it’s a bundled product. | [optional] | +|**isOversizeProduct** | **Boolean** | Boolean that indicates whether it’s oversized product. | [optional] | +|**isPreorderProduct** | **Boolean** | Boolean that indicates whether it’s a preorder product. | [optional] | +|**isLicenseProduct** | **Boolean** | Boolean that indicates whether it’s a licened product. | [optional] | +|**isDirectshipOrderable** | **Boolean** | Boolean that indicates whether product is directship orderable. | [optional] | +|**isServiceSku** | **Boolean** | Boolean that indicates whether product is service SKU. | [optional] | +|**isConfigurable** | **Boolean** | Boolean that indicates whether product is configurable. | [optional] | + + + diff --git a/docs/ProductDetailResponseTechnicalSpecificationsInner.md b/docs/ProductDetailResponseTechnicalSpecificationsInner.md new file mode 100644 index 00000000..f32b800d --- /dev/null +++ b/docs/ProductDetailResponseTechnicalSpecificationsInner.md @@ -0,0 +1,16 @@ + + +# ProductDetailResponseTechnicalSpecificationsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**headername** | **String** | Example : 'Basic' | [optional] | +|**attributevalue** | **String** | Example : 'LCD Monitor' | [optional] | +|**attributedisplay** | **String** | Example : 'Basic|Product Type|LCD Monitor' | [optional] | +|**attributename** | **String** | Example : 'Product Type' | [optional] | + + + diff --git a/docs/ProductLineType.md b/docs/ProductLineType.md new file mode 100644 index 00000000..5a6a006d --- /dev/null +++ b/docs/ProductLineType.md @@ -0,0 +1,33 @@ + + +# ProductLineType + +Product line items object under each invoice + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**linenumber** | **String** | | [optional] | +|**linetype** | **String** | | [optional] | +|**partnumber** | **String** | | [optional] | +|**vendorpartnumber** | **String** | | [optional] | +|**partdescription** | **String** | | [optional] | +|**shipfrombranch** | **String** | | [optional] | +|**shippedquantity** | **String** | | [optional] | +|**orderedquantity** | **String** | | [optional] | +|**marginpercent** | **String** | | [optional] | +|**backorderquantity** | **String** | | [optional] | +|**backorderetadate** | **LocalDate** | | [optional] | +|**extendedprice** | **String** | | [optional] | +|**specialbidnumber** | **String** | | [optional] | +|**ordersuffix** | **String** | | [optional] | +|**isacopapplied** | **String** | | [optional] | +|**unitprice** | **String** | | [optional] | +|**unitofmeasure** | **String** | | [optional] | +|**serialnumberdetails** | [**List<ProductLineTypeSerialnumberdetailsInner>**](ProductLineTypeSerialnumberdetailsInner.md) | | [optional] | +|**trackingnumberdetails** | [**List<ProductLineTypeTrackingnumberdetailsInner>**](ProductLineTypeTrackingnumberdetailsInner.md) | | [optional] | +|**productextendedspecs** | [**List<InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner>**](InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner.md) | | [optional] | + + + diff --git a/docs/ProductLineTypeSerialnumberdetailsInner.md b/docs/ProductLineTypeSerialnumberdetailsInner.md new file mode 100644 index 00000000..44fdbc18 --- /dev/null +++ b/docs/ProductLineTypeSerialnumberdetailsInner.md @@ -0,0 +1,14 @@ + + +# ProductLineTypeSerialnumberdetailsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**serialnumber** | **String** | | [optional] | +|**deliverynumber** | **String** | | [optional] | + + + diff --git a/docs/ProductLineTypeTrackingnumberdetailsInner.md b/docs/ProductLineTypeTrackingnumberdetailsInner.md new file mode 100644 index 00000000..503a1321 --- /dev/null +++ b/docs/ProductLineTypeTrackingnumberdetailsInner.md @@ -0,0 +1,13 @@ + + +# ProductLineTypeTrackingnumberdetailsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**trackingnumber** | **String** | | [optional] | + + + diff --git a/docs/ProductSearchRequest.md b/docs/ProductSearchRequest.md new file mode 100644 index 00000000..70521129 --- /dev/null +++ b/docs/ProductSearchRequest.md @@ -0,0 +1,14 @@ + + +# ProductSearchRequest + +Request object model for the product search endpoint + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**servicerequest** | [**ProductSearchRequestServicerequest**](ProductSearchRequestServicerequest.md) | | [optional] | + + + diff --git a/docs/ProductSearchRequestServicerequest.md b/docs/ProductSearchRequestServicerequest.md new file mode 100644 index 00000000..f1d2843c --- /dev/null +++ b/docs/ProductSearchRequestServicerequest.md @@ -0,0 +1,14 @@ + + +# ProductSearchRequestServicerequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**requestpreamble** | [**ProductSearchRequestServicerequestRequestpreamble**](ProductSearchRequestServicerequestRequestpreamble.md) | | [optional] | +|**productsearchrequest** | [**ProductSearchRequestServicerequestProductsearchrequest**](ProductSearchRequestServicerequestProductsearchrequest.md) | | [optional] | + + + diff --git a/docs/ProductSearchRequestServicerequestProductsearchrequest.md b/docs/ProductSearchRequestServicerequestProductsearchrequest.md new file mode 100644 index 00000000..e590093b --- /dev/null +++ b/docs/ProductSearchRequestServicerequestProductsearchrequest.md @@ -0,0 +1,13 @@ + + +# ProductSearchRequestServicerequestProductsearchrequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**searchcriteria** | [**ProductSearchRequestServicerequestProductsearchrequestSearchcriteria**](ProductSearchRequestServicerequestProductsearchrequestSearchcriteria.md) | | [optional] | + + + diff --git a/docs/ProductSearchRequestServicerequestProductsearchrequestSearchcriteria.md b/docs/ProductSearchRequestServicerequestProductsearchrequestSearchcriteria.md new file mode 100644 index 00000000..4ec31d14 --- /dev/null +++ b/docs/ProductSearchRequestServicerequestProductsearchrequestSearchcriteria.md @@ -0,0 +1,17 @@ + + +# ProductSearchRequestServicerequestProductsearchrequestSearchcriteria + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**vendor** | **String** | Name of the vendor or manufacturer or brand of the product | [optional] | +|**vendorpartnumber** | **String** | Vendor provided part number | [optional] | +|**partdescription** | **String** | This field seraches the decriptioon of the product. | [optional] | +|**UPC** | **String** | Universal Product Code | [optional] | +|**customerpartnumber** | **String** | Customer’s designated part number | [optional] | + + + diff --git a/docs/ProductSearchRequestServicerequestRequestpreamble.md b/docs/ProductSearchRequestServicerequestRequestpreamble.md new file mode 100644 index 00000000..097bbadb --- /dev/null +++ b/docs/ProductSearchRequestServicerequestRequestpreamble.md @@ -0,0 +1,15 @@ + + +# ProductSearchRequestServicerequestRequestpreamble + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**isocountrycode** | **String** | | | +|**customernumber** | **String** | | | +|**vendornumber** | **String** | | [optional] | + + + diff --git a/docs/ProductSearchResponse.md b/docs/ProductSearchResponse.md new file mode 100644 index 00000000..3c978216 --- /dev/null +++ b/docs/ProductSearchResponse.md @@ -0,0 +1,14 @@ + + +# ProductSearchResponse + +Response object model for the product search endpoint + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**serviceresponse** | [**ProductSearchResponseServiceresponse**](ProductSearchResponseServiceresponse.md) | | [optional] | + + + diff --git a/docs/ProductSearchResponseCatalogInner.md b/docs/ProductSearchResponseCatalogInner.md new file mode 100644 index 00000000..fcf73bc8 --- /dev/null +++ b/docs/ProductSearchResponseCatalogInner.md @@ -0,0 +1,31 @@ + + +# ProductSearchResponseCatalogInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**description** | **String** | The description of the product. | [optional] | +|**category** | **String** | The category of the product. Example: Displays. | [optional] | +|**subCategory** | **String** | The sub category for the product. Example: ComputernMonitors. | [optional] | +|**productType** | **String** | The product type of the product. Example: LCD Monitors. | [optional] | +|**ingramPartNumber** | **String** | The Unique IngramMicro part number for the product. | [optional] | +|**vendorPartNumber** | **String** | The vendor part number for the product. | [optional] | +|**upcCode** | **String** | The UPC code for the product. Consists of 12 numeric digits that are uniquly assigned to each trade item. | [optional] | +|**vendorName** | **String** | The name of the vendor/manufacturer of the product. | [optional] | +|**endUserRequired** | **String** | Indicates whether the contact information for the end user/customer is required, which determines pricing and discounts. | [optional] | +|**hasDiscounts** | **String** | Specifies if there are discounts available for the product. | [optional] | +|**type** | **String** | The SKU type of product. One of Physical, Digital, or Any. | [optional] | +|**discontinued** | **String** | Indicates if the product has been discontinued. | [optional] | +|**newProduct** | **String** | Indicates if the product is new. For digital products, newer than 10 days. For physical products, newer than 150 days. | [optional] | +|**directShip** | **String** | Indicates if the product will be shipped directly to the reseller or end user from the vendor/manufacturer. | [optional] | +|**hasWarranty** | **String** | Indicates if the product has a warranty. | [optional] | +|**links** | [**List<ProductSearchResponseCatalogInnerLinksInner>**](ProductSearchResponseCatalogInnerLinksInner.md) | | [optional] | +|**extraDescription** | **String** | The extended description of the product. | [optional] | +|**replacementSku** | **String** | Identifies a SKU that is a comparable subsititution of the current SKU if available. | [optional] | +|**authorizedToPurchase** | **String** | It is true when it exists in matched queries field of ealstic search API. | [optional] | + + + diff --git a/docs/ProductSearchResponseCatalogInnerLinksInner.md b/docs/ProductSearchResponseCatalogInnerLinksInner.md new file mode 100644 index 00000000..86519903 --- /dev/null +++ b/docs/ProductSearchResponseCatalogInnerLinksInner.md @@ -0,0 +1,16 @@ + + +# ProductSearchResponseCatalogInnerLinksInner + +HATEOAS links for the price and availability of the sku. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**topic** | **String** | Provides the details of the product. | [optional] | +|**href** | **String** | The URL endpoint for accessing the relevant data.. | [optional] | +|**type** | **String** | The type of call that can be made to the href link(GET) | [optional] | + + + diff --git a/docs/ProductSearchResponseServiceresponse.md b/docs/ProductSearchResponseServiceresponse.md new file mode 100644 index 00000000..969b0713 --- /dev/null +++ b/docs/ProductSearchResponseServiceresponse.md @@ -0,0 +1,14 @@ + + +# ProductSearchResponseServiceresponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responsepreamble** | [**ProductSearchResponseServiceresponseResponsepreamble**](ProductSearchResponseServiceresponseResponsepreamble.md) | | [optional] | +|**productsearchresponse** | [**List<ProductSearchResponseServiceresponseProductsearchresponseInner>**](ProductSearchResponseServiceresponseProductsearchresponseInner.md) | | [optional] | + + + diff --git a/docs/ProductSearchResponseServiceresponseProductsearchresponseInner.md b/docs/ProductSearchResponseServiceresponseProductsearchresponseInner.md new file mode 100644 index 00000000..652687be --- /dev/null +++ b/docs/ProductSearchResponseServiceresponseProductsearchresponseInner.md @@ -0,0 +1,14 @@ + + +# ProductSearchResponseServiceresponseProductsearchresponseInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responseflag** | **String** | Number of records in the search result. | [optional] | +|**partnumbers** | [**List<ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner>**](ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner.md) | | [optional] | + + + diff --git a/docs/ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner.md b/docs/ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner.md new file mode 100644 index 00000000..5c846c7b --- /dev/null +++ b/docs/ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner.md @@ -0,0 +1,18 @@ + + +# ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ingrampartnumber** | **String** | Ingram Part Number | [optional] | +|**manufacturerpartnumber** | **String** | Vendor or Manufacturer Part Number | [optional] | +|**upccode** | **String** | UPC | [optional] | +|**productdescription** | **String** | Product description | [optional] | +|**currency** | **String** | | [optional] | +|**haswarranty** | **String** | | [optional] | + + + diff --git a/docs/ProductSearchResponseServiceresponseResponsepreamble.md b/docs/ProductSearchResponseServiceresponseResponsepreamble.md new file mode 100644 index 00000000..9c5f3f7f --- /dev/null +++ b/docs/ProductSearchResponseServiceresponseResponsepreamble.md @@ -0,0 +1,15 @@ + + +# ProductSearchResponseServiceresponseResponsepreamble + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**requeststatus** | **String** | | [optional] | +|**returncode** | **String** | | [optional] | +|**returnmessage** | **String** | | [optional] | + + + diff --git a/docs/QuoteDetails.md b/docs/QuoteDetails.md new file mode 100644 index 00000000..fd41d9b6 --- /dev/null +++ b/docs/QuoteDetails.md @@ -0,0 +1,14 @@ + + +# QuoteDetails + +Response schema for quote details + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quoteDetailResponse** | [**QuoteDetailsQuoteDetailResponse**](QuoteDetailsQuoteDetailResponse.md) | | [optional] | + + + diff --git a/docs/QuoteDetailsQuoteDetailResponse.md b/docs/QuoteDetailsQuoteDetailResponse.md new file mode 100644 index 00000000..97e94822 --- /dev/null +++ b/docs/QuoteDetailsQuoteDetailResponse.md @@ -0,0 +1,19 @@ + + +# QuoteDetailsQuoteDetailResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responsePreamble** | [**QuoteDetailsQuoteDetailResponseResponsePreamble**](QuoteDetailsQuoteDetailResponseResponsePreamble.md) | | [optional] | +|**retrieveQuoteResponse** | [**QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse**](QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse.md) | | [optional] | +|**quoteProductList** | [**List<QuoteProductList>**](QuoteProductList.md) | | [optional] | +|**totalQuoteProductCount** | **String** | | [optional] | +|**totalExtendedMsrp** | **String** | | [optional] | +|**totalQuantity** | **Integer** | | [optional] | +|**totalExtendedQuotePrice** | **String** | | [optional] | + + + diff --git a/docs/QuoteDetailsQuoteDetailResponseResponsePreamble.md b/docs/QuoteDetailsQuoteDetailResponseResponsePreamble.md new file mode 100644 index 00000000..884ee26c --- /dev/null +++ b/docs/QuoteDetailsQuoteDetailResponseResponsePreamble.md @@ -0,0 +1,15 @@ + + +# QuoteDetailsQuoteDetailResponseResponsePreamble + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responseStatus** | **String** | | [optional] | +|**statusCode** | **String** | | [optional] | +|**responseMessage** | **String** | | [optional] | + + + diff --git a/docs/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse.md b/docs/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse.md new file mode 100644 index 00000000..7e27d9f7 --- /dev/null +++ b/docs/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse.md @@ -0,0 +1,35 @@ + + +# QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quoteGuid** | **String** | | [optional] | +|**quoteName** | **String** | | [optional] | +|**quoteNumber** | **String** | | [optional] | +|**quoteExpiryDate** | **LocalDate** | | [optional] | +|**revisionNumber** | **String** | | [optional] | +|**introPreamble** | **String** | | [optional] | +|**purchaseInstructions** | **String** | | [optional] | +|**legalTerms** | **String** | | [optional] | +|**currencyCode** | **String** | | [optional] | +|**priceDeviationId** | **String** | | [optional] | +|**priceDeviationStartDate** | **LocalDate** | | [optional] | +|**priceDeviationExpiryDate** | **LocalDate** | | [optional] | +|**customerNeed** | **String** | | [optional] | +|**solutionProposed** | **String** | | [optional] | +|**status** | **String** | | [optional] | +|**created** | **LocalDate** | | [optional] | +|**modified** | **LocalDate** | | [optional] | +|**leasingCalculations** | **String** | | [optional] | +|**leasingInstructions** | **String** | | [optional] | +|**accountInfo** | [**QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo**](QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo.md) | | [optional] | +|**contactInfo** | [**QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo**](QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo.md) | | [optional] | +|**vendorAttributes** | [**QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes**](QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes.md) | | [optional] | +|**endUser** | [**QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser**](QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.md) | | [optional] | + + + diff --git a/docs/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo.md b/docs/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo.md new file mode 100644 index 00000000..b6aebaf8 --- /dev/null +++ b/docs/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo.md @@ -0,0 +1,15 @@ + + +# QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**accountName** | **String** | | [optional] | +|**bcn** | **String** | | [optional] | +|**phone** | **String** | | [optional] | + + + diff --git a/docs/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo.md b/docs/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo.md new file mode 100644 index 00000000..6febeae9 --- /dev/null +++ b/docs/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo.md @@ -0,0 +1,14 @@ + + +# QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**contactEmail** | **String** | | [optional] | +|**contactName** | **String** | | [optional] | + + + diff --git a/docs/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.md b/docs/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.md new file mode 100644 index 00000000..23502ed8 --- /dev/null +++ b/docs/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.md @@ -0,0 +1,23 @@ + + +# QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**endUserName** | **String** | | [optional] | +|**endUserAddress** | **String** | | [optional] | +|**endUserAddress2** | **String** | | [optional] | +|**endUserAddress3** | **String** | | [optional] | +|**endUserCity** | **String** | | [optional] | +|**endUserState** | **String** | | [optional] | +|**endUserEmail** | **String** | | [optional] | +|**endUserPhone** | **String** | | [optional] | +|**endUserZipCode** | **String** | | [optional] | +|**endUserContactName** | **String** | | [optional] | +|**endUserMarketSegment** | **String** | | [optional] | + + + diff --git a/docs/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes.md b/docs/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes.md new file mode 100644 index 00000000..832a90c2 --- /dev/null +++ b/docs/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes.md @@ -0,0 +1,16 @@ + + +# QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**estimateId** | **String** | | [optional] | +|**dealId** | **String** | | [optional] | +|**vendorName** | **String** | | [optional] | +|**vendorSettingMessage** | **String** | | [optional] | + + + diff --git a/docs/QuoteDetailsRequest.md b/docs/QuoteDetailsRequest.md new file mode 100644 index 00000000..0bfd594c --- /dev/null +++ b/docs/QuoteDetailsRequest.md @@ -0,0 +1,14 @@ + + +# QuoteDetailsRequest + +Request schema for get quote details endpoint + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quoteProductsRequest** | [**QuoteDetailsRequestQuoteProductsRequest**](QuoteDetailsRequestQuoteProductsRequest.md) | | [optional] | + + + diff --git a/docs/QuoteDetailsRequestQuoteProductsRequest.md b/docs/QuoteDetailsRequestQuoteProductsRequest.md new file mode 100644 index 00000000..6cb7b332 --- /dev/null +++ b/docs/QuoteDetailsRequestQuoteProductsRequest.md @@ -0,0 +1,14 @@ + + +# QuoteDetailsRequestQuoteProductsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**requestpreamble** | [**QuoteDetailsRequestQuoteProductsRequestRequestpreamble**](QuoteDetailsRequestQuoteProductsRequestRequestpreamble.md) | | [optional] | +|**retrieveQuoteProductsRequest** | [**QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest**](QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest.md) | | [optional] | + + + diff --git a/docs/QuoteDetailsRequestQuoteProductsRequestRequestpreamble.md b/docs/QuoteDetailsRequestQuoteProductsRequestRequestpreamble.md new file mode 100644 index 00000000..c7505b6d --- /dev/null +++ b/docs/QuoteDetailsRequestQuoteProductsRequestRequestpreamble.md @@ -0,0 +1,14 @@ + + +# QuoteDetailsRequestQuoteProductsRequestRequestpreamble + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**customerNumber** | **String** | Reseller Number (referred to as the account BCN) is the unique identifier for an Ingram Micro customer account. | | +|**isoCountryCode** | **String** | The ISO country codes are internationally recognized codes designated for each country represented by a two-letter combination (alpha-2). | | + + + diff --git a/docs/QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest.md b/docs/QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest.md new file mode 100644 index 00000000..d0556f00 --- /dev/null +++ b/docs/QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest.md @@ -0,0 +1,14 @@ + + +# QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quoteNumber** | **String** | Unique identifier generated by Ingram Micro's CRM specific to each quote. When applying a filter to the quoteNumber and including a partial quote number in the filter, all quotes containing any information included in the filter can be retrieved as a subset of all available customer quotes. | [optional] | +|**thirdPartySource** | **String** | Unique identifier used to identify the third party source accessing the services. | [optional] | + + + diff --git a/docs/QuoteDetailsResponse.md b/docs/QuoteDetailsResponse.md new file mode 100644 index 00000000..ebf143f5 --- /dev/null +++ b/docs/QuoteDetailsResponse.md @@ -0,0 +1,13 @@ + + +# QuoteDetailsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quoteDetailResponse** | [**QuoteDetailsResponseQuoteDetailResponse**](QuoteDetailsResponseQuoteDetailResponse.md) | | [optional] | + + + diff --git a/docs/QuoteDetailsResponseAdditionalAttributesInner.md b/docs/QuoteDetailsResponseAdditionalAttributesInner.md new file mode 100644 index 00000000..244a3c2b --- /dev/null +++ b/docs/QuoteDetailsResponseAdditionalAttributesInner.md @@ -0,0 +1,14 @@ + + +# QuoteDetailsResponseAdditionalAttributesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeName** | **String** | estimateId - is the identification number for an estimate provided by Cisco for a quote. dealId - is the identification number for the specific deal pricing related to a Cisco quote vendorName - Name of Vendor associated with the quote. vendorMessage - Vendor Message is associated with primary vendor in the quote. In cases where a vendor requires a message be presented in the quote, the vendor name and message will be retreived and must be included in the quote vendor message fields. | [optional] | +|**attributeValue** | **String** | The attribute field data. | [optional] | + + + diff --git a/docs/QuoteDetailsResponseEndUserInfo.md b/docs/QuoteDetailsResponseEndUserInfo.md new file mode 100644 index 00000000..08bf3656 --- /dev/null +++ b/docs/QuoteDetailsResponseEndUserInfo.md @@ -0,0 +1,23 @@ + + +# QuoteDetailsResponseEndUserInfo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**contact** | **String** | End User Name | [optional] | +|**companyName** | **String** | Contact name of end user associated with the quote. | [optional] | +|**addressLine1** | **String** | Address line 1 for end user associated with the quote | [optional] | +|**addressLine2** | **String** | Address line 2 for end user associated with the quote. | [optional] | +|**addressLine3** | **String** | Address line 3 for end user associated with the quote. | [optional] | +|**city** | **String** | City for end user associated with the quote | [optional] | +|**state** | **String** | Two letter state abreviation for end user associated with the quote | [optional] | +|**email** | **String** | Email of end user the quote associated with the quote. | [optional] | +|**phoneNumber** | **String** | Phone number of end user associated with the quote. | [optional] | +|**postalCode** | **String** | Zip code of end user associated with the quote. | [optional] | +|**marketSegment** | **String** | Market Segment of end user associated with the quote. End user market segment is included when end user is included in specific market segments like Educational, Government, Military, Medical - that may receive special pricing due to their segmentation. | [optional] | + + + diff --git a/docs/QuoteDetailsResponseProductsInner.md b/docs/QuoteDetailsResponseProductsInner.md new file mode 100644 index 00000000..1d50fcc8 --- /dev/null +++ b/docs/QuoteDetailsResponseProductsInner.md @@ -0,0 +1,29 @@ + + +# QuoteDetailsResponseProductsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quoteProductGuid** | **String** | Quote Product GUID is the primary quote key in Ingram Micro's CRM - needed to retrieve quote details. | [optional] | +|**lineNumber** | **String** | Line number which the product will appear in the quote. Line number is manditory when unique configurations are included in a quote and mainting the item line order is required. | [optional] | +|**quantity** | **Integer** | Quantity of product line item quoted. | [optional] | +|**notes** | **String** | Product line item comments. | [optional] | +|**EAN** | **String** | EANUPC | [optional] | +|**coO** | **String** | Country of Origin. | [optional] | +|**ingramPartNumber** | **String** | Ingram Micro SKU (stock keeping unit). An identification, usually alphanumeric, of a particular product that allows it to be tracked for inventory purposes | [optional] | +|**vendorPartNumber** | **String** | Vendor Part Number | [optional] | +|**description** | **String** | Product description. Note - The quote view api returns only the product short description as maintained in Ingram Micro's crm system. For long descriptions, please refer to alternative information sources. | [optional] | +|**weight** | **Integer** | Weight is provided based on country standard. For countries following Imperial standards - weight is presented as pounds with decimal. In countries following metric standards, weight is provided as kilograms with decimal. | [optional] | +|**weightUom** | **String** | Unit of measure | [optional] | +|**isSuggestionProduct** | **Boolean** | Flag to indicate if a product line item is a suggested product. The suggested product is provided in addition to the requested quoted products and a suggested option. Suggested products are grouped together for subtotal and total calculations. | [optional] | +|**vpnCategory** | **String** | Vendor product category specific to Cisco. HWDW (hardware) or service. | [optional] | +|**quoteProductsSupplierPartAuxiliaryId** | **String** | Vendor product configuration ID specific to Cisco. | [optional] | +|**vendorName** | **String** | Vendor name of the product | [optional] | +|**terms** | **String** | Terms of the quote | [optional] | +|**price** | [**QuoteDetailsResponseProductsInnerPrice**](QuoteDetailsResponseProductsInnerPrice.md) | | [optional] | + + + diff --git a/docs/QuoteDetailsResponseProductsInnerPrice.md b/docs/QuoteDetailsResponseProductsInnerPrice.md new file mode 100644 index 00000000..e0bee033 --- /dev/null +++ b/docs/QuoteDetailsResponseProductsInnerPrice.md @@ -0,0 +1,17 @@ + + +# QuoteDetailsResponseProductsInnerPrice + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quotePrice** | **Integer** | Ingram Micro quoted price specific to the reseller and quote. | [optional] | +|**msrp** | **Integer** | Manufacturer Suggested Retail Price | [optional] | +|**extendedMsrp** | **Integer** | Extended MSRP - Manufacturer Suggested Retail Price X Quantity | [optional] | +|**extendedQuotePrice** | **Integer** | Extended reseller quoted price (cost to reseller) X Quantity | [optional] | +|**discountOffList** | **BigDecimal** | Discount off list percentage | [optional] | + + + diff --git a/docs/QuoteDetailsResponseQuoteDetailResponse.md b/docs/QuoteDetailsResponseQuoteDetailResponse.md new file mode 100644 index 00000000..852c2914 --- /dev/null +++ b/docs/QuoteDetailsResponseQuoteDetailResponse.md @@ -0,0 +1,14 @@ + + +# QuoteDetailsResponseQuoteDetailResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responsePreamble** | [**QuoteDetailsQuoteDetailResponseResponsePreamble**](QuoteDetailsQuoteDetailResponseResponsePreamble.md) | | [optional] | +|**retrieveQuoteResponse** | [**QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse**](QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.md) | | [optional] | + + + diff --git a/docs/QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.md b/docs/QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.md new file mode 100644 index 00000000..ae338b74 --- /dev/null +++ b/docs/QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.md @@ -0,0 +1,40 @@ + + +# QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quoteGuid** | **String** | | [optional] | +|**quoteName** | **String** | | [optional] | +|**quoteNumber** | **String** | | [optional] | +|**quoteExpiryDate** | **String** | | [optional] | +|**revisionNumber** | **String** | | [optional] | +|**introPreamble** | **String** | | [optional] | +|**purchaseInstructions** | **String** | | [optional] | +|**legalTerms** | **String** | | [optional] | +|**currencyCode** | **String** | | [optional] | +|**priceDeviationId** | **String** | | [optional] | +|**priceDeviationStartDate** | **String** | | [optional] | +|**priceDeviationExpiryDate** | **String** | | [optional] | +|**customerNeed** | **String** | | [optional] | +|**solutionProposed** | **String** | | [optional] | +|**status** | **String** | | [optional] | +|**created** | **String** | | [optional] | +|**modified** | **String** | | [optional] | +|**leasingCalculations** | **String** | | [optional] | +|**leasingInstructions** | **String** | | [optional] | +|**accountInfo** | [**QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo**](QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo.md) | | [optional] | +|**contactInfo** | [**QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo**](QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo.md) | | [optional] | +|**vendorAttributes** | [**QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes**](QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes.md) | | [optional] | +|**endUser** | [**QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser**](QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.md) | | [optional] | +|**quoteProductList** | [**List<QuoteProductList>**](QuoteProductList.md) | | [optional] | +|**totalQuoteProductCount** | **String** | | [optional] | +|**totalExtendedMsrp** | **String** | | [optional] | +|**totalQuantity** | **String** | | [optional] | +|**totalExtendedQuotePrice** | **String** | | [optional] | + + + diff --git a/docs/QuoteDetailsResponseResellerInfo.md b/docs/QuoteDetailsResponseResellerInfo.md new file mode 100644 index 00000000..e20736e4 --- /dev/null +++ b/docs/QuoteDetailsResponseResellerInfo.md @@ -0,0 +1,17 @@ + + +# QuoteDetailsResponseResellerInfo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**contact** | **String** | Contact Name | [optional] | +|**companyName** | **String** | Ingram Micro Customer's Account Name | [optional] | +|**email** | **String** | Account Contact Email Address | [optional] | +|**phoneNumber** | **String** | Account Phone Number | [optional] | +|**customerNumber** | **String** | Reseller account number | [optional] | + + + diff --git a/docs/QuoteListRequest.md b/docs/QuoteListRequest.md new file mode 100644 index 00000000..e732596f --- /dev/null +++ b/docs/QuoteListRequest.md @@ -0,0 +1,14 @@ + + +# QuoteListRequest + +Request schema for get quote list endpoint + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quoteSearchRequest** | [**QuoteListRequestQuoteSearchRequest**](QuoteListRequestQuoteSearchRequest.md) | | [optional] | + + + diff --git a/docs/QuoteListRequestQuoteSearchRequest.md b/docs/QuoteListRequestQuoteSearchRequest.md new file mode 100644 index 00000000..6916c354 --- /dev/null +++ b/docs/QuoteListRequestQuoteSearchRequest.md @@ -0,0 +1,14 @@ + + +# QuoteListRequestQuoteSearchRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**requestPreamble** | [**QuoteListRequestQuoteSearchRequestRequestPreamble**](QuoteListRequestQuoteSearchRequestRequestPreamble.md) | | [optional] | +|**retrieveQuoteRequest** | [**QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest**](QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest.md) | | [optional] | + + + diff --git a/docs/QuoteListRequestQuoteSearchRequestRequestPreamble.md b/docs/QuoteListRequestQuoteSearchRequestRequestPreamble.md new file mode 100644 index 00000000..b012af9b --- /dev/null +++ b/docs/QuoteListRequestQuoteSearchRequestRequestPreamble.md @@ -0,0 +1,15 @@ + + +# QuoteListRequestQuoteSearchRequestRequestPreamble + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**customerNumber** | **String** | Reseller Number (referred to as the account BCN) is the unique identifier for an Ingram Micro customer account. | | +|**customerContact** | **String** | Logged in User's email address. | [optional] | +|**isoCountryCode** | **String** | The ISO country codes are internationally recognized codes designated for each country represented by a two-letter combination (alpha-2). | | + + + diff --git a/docs/QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest.md b/docs/QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest.md new file mode 100644 index 00000000..f25a8284 --- /dev/null +++ b/docs/QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest.md @@ -0,0 +1,31 @@ + + +# QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quoteNumber** | **String** | Unique identifier generated by Ingram Micro's CRM specific to each quote. When applying a filter to the quoteNumber and including a partial quote number in the filter, all quotes containing any information included in the filter can be retrieved as a subset of all available customer quotes. | [optional] | +|**bidNumber** | **String** | Special Pricing Bid Number, also referred to as a Dart Number by some vendors, is a unique identifier associated with vendor specific products and discounts. | [optional] | +|**endUserName** | **String** | End User Name is the end customer name that is associated with a quote in Ingram Micro's CRM | [optional] | +|**fromDate** | **LocalDate** | Filter to select the beginning date of a desired date range. The default filter is set to the date the user is logged-in to request quotes. Date format: YYYY-MM-DD - An incorrect date input will result in a message \"Date must be entered as YYYY-MM-DD\" | [optional] | +|**toDate** | **LocalDate** | Filter to select the end date of a desired date range. The default number of days to request is the previous 30 days from the date user has logged in. Date format: YYYY-MM-DD - An incorrect date input will result in a message \"Date must be entered as YYYY-MM-DD\" | [optional] | +|**pageIndex** | **String** | Page index or page number for the list of quotes being returned. When less than 25 quotes are returned, the page number will be \"1\". In cases where more than 25 quotes are returned, and the default quotes per page are 25 (see recordPerPage), then the list will continue on subsequent pages. | [optional] | +|**recordsPerPage** | **String** | Number of records (quotes) to display per page in the quote list. The default is 25, but may be increased using the filter by up to 100 records per page. If more than 100 records are requested a message will be returned \"The number of records requested exceeds the 100 record limit.\" | [optional] | +|**sorting** | [**SortingEnum**](#SortingEnum) | Sort applies to the selected column (sortingColumnName) and may be specified in Ascending (asc) or Descending (desc) order. The default sort is Descending (desc) - most recent first. | [optional] | +|**sortingColumnName** | **String** | Refers to the column selected to apply the sorting criteria. The default column is dateCreated and will sort by the most recently created quote first with the following in descending order. The default filter retrieves quotes created within the last 30 days. Filtering allows user to select a specific column to sort: quoteNumber, createdDate, lastModifiedDate, expiryDate, and endUserName. | [optional] | +|**thirdPartySource** | **String** | Unique identifier used to identify the third party source accessing the services. | [optional] | + + + +## Enum: SortingEnum + +| Name | Value | +|---- | -----| +| ASC | "asc" | +| DESC | "desc" | + + + diff --git a/docs/QuoteListResponse.md b/docs/QuoteListResponse.md new file mode 100644 index 00000000..513595d0 --- /dev/null +++ b/docs/QuoteListResponse.md @@ -0,0 +1,14 @@ + + +# QuoteListResponse + +Response schema for get quote list endpoint + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quoteSearchResponse** | [**QuoteListResponseQuoteSearchResponse**](QuoteListResponseQuoteSearchResponse.md) | | [optional] | + + + diff --git a/docs/QuoteListResponseQuoteSearchResponse.md b/docs/QuoteListResponseQuoteSearchResponse.md new file mode 100644 index 00000000..1f8f4b9c --- /dev/null +++ b/docs/QuoteListResponseQuoteSearchResponse.md @@ -0,0 +1,15 @@ + + +# QuoteListResponseQuoteSearchResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responsePreamble** | [**QuoteListResponseQuoteSearchResponseResponsePreamble**](QuoteListResponseQuoteSearchResponseResponsePreamble.md) | | [optional] | +|**quoteList** | [**List<QuoteListResponseQuoteSearchResponseQuoteListInner>**](QuoteListResponseQuoteSearchResponseQuoteListInner.md) | | [optional] | +|**totalCount** | **Integer** | Total count of quotes retrieved in the request response. | [optional] | + + + diff --git a/docs/QuoteListResponseQuoteSearchResponseQuoteListInner.md b/docs/QuoteListResponseQuoteSearchResponseQuoteListInner.md new file mode 100644 index 00000000..ae0d48a5 --- /dev/null +++ b/docs/QuoteListResponseQuoteSearchResponseQuoteListInner.md @@ -0,0 +1,22 @@ + + +# QuoteListResponseQuoteSearchResponseQuoteListInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quoteName** | **String** | Quote Name given to quote by sales team or system generated. Generally used as a reference to identify the quote. | [optional] | +|**quoteNumber** | **String** | Unique identifier generated by Ingram Micro's CRM specific to each quote. When applying a filter to the quoteNumber and including a partial quote number in the filter, all quotes containing any information included in the filter can be retrieved as a subset of all available customer quotes. | [optional] | +|**revisionNumber** | **Integer** | When a quote has been revised and updated, the quote number remains the same throughout the lifecycle of the quote, however, a Revision number is updated for each revision of the quote. The revision numbers is associated with the Unique Quote Number. | [optional] | +|**endUserName** | **String** | End User Name is the end customer name that is associated with a quote in Ingram Micro's CRM | [optional] | +|**bidNumber** | **String** | Special Pricing Bid Number, also refers to as Dart Number relates to a unique pricing deal associated with a vendor for the quote. | [optional] | +|**totalAmount** | **String** | Total amount of quoted price for all products in the quote. | [optional] | +|**quoteStatus** | **String** | This refers to the primary status of the quote. API responses will return: Active | [optional] | +|**createdDate** | **LocalDate** | Date the Quote was initially Created | [optional] | +|**lastModifiedDate** | **LocalDate** | Date the Quote was last updated or modified. | [optional] | +|**quoteExpiryDate** | **LocalDate** | Date the Quote Expires | [optional] | + + + diff --git a/docs/QuoteListResponseQuoteSearchResponseResponsePreamble.md b/docs/QuoteListResponseQuoteSearchResponseResponsePreamble.md new file mode 100644 index 00000000..fe06c5ac --- /dev/null +++ b/docs/QuoteListResponseQuoteSearchResponseResponsePreamble.md @@ -0,0 +1,15 @@ + + +# QuoteListResponseQuoteSearchResponseResponsePreamble + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responseStatus** | **String** | Status of the Request - \"Passed\", \"Failed\" | [optional] | +|**responseStatusCode** | **String** | responseStatusCode is the code returned in response to a request. The following Codes are returned: 200 400 500 | [optional] | +|**responseMessage** | **String** | 200 = Action was successfully received, understood and accepted. 400 = The request contains bad syntax or can not be fullfilled. This means there is a problem with the request. 500 = The server failed to fulfill an apparently valid request. This is a temporary problem, the request should be resubmitted. | [optional] | + + + diff --git a/docs/QuoteProductList.md b/docs/QuoteProductList.md new file mode 100644 index 00000000..bdbe3875 --- /dev/null +++ b/docs/QuoteProductList.md @@ -0,0 +1,28 @@ + + +# QuoteProductList + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quoteProductGuid** | **String** | | [optional] | +|**quantity** | **String** | | [optional] | +|**comments** | **String** | | [optional] | +|**bidStartDate** | **String** | | [optional] | +|**bidExpiryDate** | **String** | | [optional] | +|**sku** | **String** | | [optional] | +|**lineNumber** | **String** | | [optional] | +|**description** | **String** | | [optional] | +|**vendorPartNumber** | **String** | | [optional] | +|**weight** | **String** | | [optional] | +|**isSuggestionProduct** | **String** | | [optional] | +|**vpnCategory** | **String** | | [optional] | +|**quoteProductsSupplierPartAuxiliaryId** | **String** | | [optional] | +|**quoteProductsVendor** | **String** | | [optional] | +|**price** | [**QuoteProductListPrice**](QuoteProductListPrice.md) | | [optional] | + + + diff --git a/docs/QuoteProductListPrice.md b/docs/QuoteProductListPrice.md new file mode 100644 index 00000000..a9477b26 --- /dev/null +++ b/docs/QuoteProductListPrice.md @@ -0,0 +1,16 @@ + + +# QuoteProductListPrice + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quotePrice** | **BigDecimal** | | [optional] | +|**msrp** | **BigDecimal** | | [optional] | +|**extendedMsrp** | **BigDecimal** | | [optional] | +|**extendedQuotePrice** | **BigDecimal** | | [optional] | + + + diff --git a/docs/QuoteSearchResponse.md b/docs/QuoteSearchResponse.md new file mode 100644 index 00000000..e34b7abb --- /dev/null +++ b/docs/QuoteSearchResponse.md @@ -0,0 +1,16 @@ + + +# QuoteSearchResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**recordsFound** | **Integer** | Total count of quotes retrieved in the request response. | [optional] | +|**pageSize** | **Integer** | Number of records (quotes) displayed per page in the quote list. | [optional] | +|**pageNumber** | **Integer** | Page index or page number for the list of quotes being returned. | [optional] | +|**quotes** | [**List<QuoteSearchResponseQuotesInner>**](QuoteSearchResponseQuotesInner.md) | The quote details for the requested criteria. | [optional] | + + + diff --git a/docs/QuoteSearchResponseQuotesInner.md b/docs/QuoteSearchResponseQuotesInner.md new file mode 100644 index 00000000..5808e50f --- /dev/null +++ b/docs/QuoteSearchResponseQuotesInner.md @@ -0,0 +1,24 @@ + + +# QuoteSearchResponseQuotesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quoteName** | **String** | Quote Name given to quote by sales team or system generated. Generally used as a reference to identify the quote. | [optional] | +|**quoteNumber** | **String** | Unique identifier generated by Ingram Micros CRM specific to each quote. When applying a filter to the quoteNumber and including a partial quote number in the filter, all quotes containing any information included in the filter can be retrieved as a subset of all available customer quotes. | [optional] | +|**revision** | **String** | When a quote has been revised and updated, the quote number remains the same throughout the lifecycle of the quote, however, a Revision number is updated for each revision of the quote. The revision numbers is associated with the Unique Quote Number. | [optional] | +|**endUserContact** | **String** | End User Name is the end customer name that is associated with a quote in Ingram Micros CRM. | [optional] | +|**specialBidNumber** | **String** | Special Pricing Bid Number, also refers to as Dart Number relates to a unique pricing deal associated with a vendor for the quote. | [optional] | +|**quoteTotal** | **BigDecimal** | Total amount of quoted price for all products in the quote. | [optional] | +|**quoteStatus** | **String** | This refers to the primary status of the quote. | [optional] | +|**ingramQuoteDate** | **String** | Date the Quote was initially Created. | [optional] | +|**lastModifiedDate** | **String** | Date the Quote was last updated or modified. | [optional] | +|**ingramQuoteExpiryDate** | **String** | Date when the Quote Expires. | [optional] | +|**vendor** | **String** | Name of the vendor. | [optional] | +|**createdBy** | **String** | Name of the end user/customer who created a quote. | [optional] | + + + diff --git a/docs/QuoteToOrderApi.md b/docs/QuoteToOrderApi.md new file mode 100644 index 00000000..cfe38e26 --- /dev/null +++ b/docs/QuoteToOrderApi.md @@ -0,0 +1,86 @@ +# QuoteToOrderApi + +All URIs are relative to *https://api.ingrammicro.com:443/sandbox* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**postQuoteToOrderV6**](QuoteToOrderApi.md#postQuoteToOrderV6) | **POST** /resellers/v6/q2o/orders | Quote To Order | + + + +# **postQuoteToOrderV6** +> QuoteToOrderResponse postQuoteToOrderV6(imCustomerNumber, imCountryCode, imCorrelationID, quoteToOrderDetailsDTO, imSenderID) + +Quote To Order + +The “Quote to Order” (QTO) endpoint allows a customer to create an order using the existing quote which is in “Ready to Order” status. A customer can create an order using Configure to order (CTO) quote or a non-configure to order (Non-CTO) quote. Upon successful submission of the order create request, a confirmation message will be returned as an API response. <br > <br >Ingram Micro offers webhooks as a method to send notifications to Resellers once the order creation request is received. All the updates related to Order creation will be pushed as a notification to the customer via a pre-defined callback URL as an HTTP post. <br > <br > **Prerequisite:** Pre-defined callback URL <br > <br > Before creating an order using the quote, it’s recommended to validate the quote using the “Validate Quote” endpoint. Validate Quote endpoint will not only validate the quote but also outline all the mandatory fields required by the vendor at a header level and at the line level which a customer need to pass to the Quote To Order endpoint request. For a detailed understanding of the “Validate Quote” endpoint, review the “Validate Quote” endpoint documentation. <br ><br > **How it works:** <br ><br > - The customer validates the quote with a quote number from Validate Quote endpoint. <br > - The customer copies all the mandatory fields required by the vendor and adds them to the QTO request body. <br > - The customer provides all the values for Vendor mandatory fields along with other required information for QTO to create an order. <br > - After the order creation request receipt acknowledgment from the QTO endpoint, all further order creation updates will be provided via webhook push notification. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.QuoteToOrderApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + QuoteToOrderApi apiInstance = new QuoteToOrderApi(defaultClient); + String imCustomerNumber = "20-222222"; // String | Your unique Ingram Micro customer number. + String imCountryCode = "US"; // String | Two-character ISO country code. + String imCorrelationID = "fbac82ba-cf0a-4bcf-fc03-0c5084"; // String | Unique transaction number to identify each transaction accross all the systems. + QuoteToOrderDetailsDTO quoteToOrderDetailsDTO = new QuoteToOrderDetailsDTO(); // QuoteToOrderDetailsDTO | + String imSenderID = "MyCompany"; // String | Unique value used to identify the sender of the transaction. + try { + QuoteToOrderResponse result = apiInstance.postQuoteToOrderV6(imCustomerNumber, imCountryCode, imCorrelationID, quoteToOrderDetailsDTO, imSenderID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QuoteToOrderApi#postQuoteToOrderV6"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **imCustomerNumber** | **String**| Your unique Ingram Micro customer number. | | +| **imCountryCode** | **String**| Two-character ISO country code. | | +| **imCorrelationID** | **String**| Unique transaction number to identify each transaction accross all the systems. | | +| **quoteToOrderDetailsDTO** | [**QuoteToOrderDetailsDTO**](QuoteToOrderDetailsDTO.md)| | | +| **imSenderID** | **String**| Unique value used to identify the sender of the transaction. | [optional] | + +### Return type + +[**QuoteToOrderResponse**](QuoteToOrderResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **400** | Bad Request | - | +| **500** | Server Error | - | + diff --git a/docs/QuoteToOrderDetailsDTO.md b/docs/QuoteToOrderDetailsDTO.md new file mode 100644 index 00000000..b46e4be2 --- /dev/null +++ b/docs/QuoteToOrderDetailsDTO.md @@ -0,0 +1,21 @@ + + +# QuoteToOrderDetailsDTO + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quoteNumber** | **String** | A unique identifier generated by Ingram Micro's CRM specific to each quote. | [optional] | +|**customerOrderNumber** | **String** | The reseller's order number for reference in their system. | [optional] | +|**enduserOrderNumber** | **String** | The end customer's order number for reference in their system. | [optional] | +|**billToAddressId** | **String** | Suffix used to identify billing address. Created during onboarding. Resellers are provided with one or more address IDs depending on how many bill to addresses they need for various flooring companies they are using for credit. | [optional] | +|**endUserInfo** | [**List<QuoteToOrderDetailsDTOEndUserInfoInner>**](QuoteToOrderDetailsDTOEndUserInfoInner.md) | The contact information for the end user/customer provided by the reseller. Used to determine pricing and discounts. | [optional] | +|**shipToInfo** | [**List<QuoteToOrderDetailsDTOShipToInfoInner>**](QuoteToOrderDetailsDTOShipToInfoInner.md) | The shipping information provided by the reseller for order delivery. | [optional] | +|**additionalAttributes** | [**List<QuoteToOrderDetailsDTOAdditionalAttributesInner>**](QuoteToOrderDetailsDTOAdditionalAttributesInner.md) | Additional order create attributes. | [optional] | +|**vmfadditionalAttributes** | [**List<QuoteToOrderDetailsDTOVmfadditionalAttributesInner>**](QuoteToOrderDetailsDTOVmfadditionalAttributesInner.md) | The object containing the list of fields required at a header level by the vendor. | [optional] | +|**lines** | [**List<QuoteToOrderDetailsDTOLinesInner>**](QuoteToOrderDetailsDTOLinesInner.md) | The object containing the lines that require vendor mandatory fields. | [optional] | + + + diff --git a/docs/QuoteToOrderDetailsDTOAdditionalAttributesInner.md b/docs/QuoteToOrderDetailsDTOAdditionalAttributesInner.md new file mode 100644 index 00000000..9080e107 --- /dev/null +++ b/docs/QuoteToOrderDetailsDTOAdditionalAttributesInner.md @@ -0,0 +1,14 @@ + + +# QuoteToOrderDetailsDTOAdditionalAttributesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeName** | **String** | The attribute name. allowDuplicateCustomerOrderNumber: Allow orders with duplicate customer PO numbers. Enables resellers to have the same PO number for multiple orders. enableCommentsAsLines: It will enable comments as lines. | [optional] | +|**attributeValue** | **String** | The attribute field data. | [optional] | + + + diff --git a/docs/QuoteToOrderDetailsDTOEndUserInfoInner.md b/docs/QuoteToOrderDetailsDTOEndUserInfoInner.md new file mode 100644 index 00000000..03c886c4 --- /dev/null +++ b/docs/QuoteToOrderDetailsDTOEndUserInfoInner.md @@ -0,0 +1,23 @@ + + +# QuoteToOrderDetailsDTOEndUserInfoInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**companyName** | **String** | The company name for the end user/customer. | [optional] | +|**contact** | **String** | The contact name for the end user/customer. | [optional] | +|**addressLine1** | **String** | The address line 1 for the end user/customer. | [optional] | +|**addressLine2** | **String** | The address line 2 for the end user/customer. | [optional] | +|**addressLine3** | **String** | The address line 3 for the end user/customer. | [optional] | +|**city** | **String** | The end user/customer's city. | [optional] | +|**state** | **String** | The end user/customer's state. | [optional] | +|**postalCode** | **String** | The end user/customer's zip or postal code. | [optional] | +|**countryCode** | **String** | The end user/customer's two character ISO country code. | [optional] | +|**email** | **String** | The end user/customer's phone number. | [optional] | +|**phoneNumber** | **String** | The end user/customer's phone number. | [optional] | + + + diff --git a/docs/QuoteToOrderDetailsDTOLinesInner.md b/docs/QuoteToOrderDetailsDTOLinesInner.md new file mode 100644 index 00000000..6d95d8fb --- /dev/null +++ b/docs/QuoteToOrderDetailsDTOLinesInner.md @@ -0,0 +1,16 @@ + + +# QuoteToOrderDetailsDTOLinesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**customerLineNumber** | **String** | The reseller's line item number for reference in their system. | [optional] | +|**ingramPartNumber** | **String** | Unique IngramMicro part number. | [optional] | +|**quantity** | **String** | The quantity of the line item. | [optional] | +|**vmfAdditionalAttributesLines** | [**List<ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner>**](ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner.md) | The object containing the list of fields required at a line level by the vendor. | [optional] | + + + diff --git a/docs/QuoteToOrderDetailsDTOShipToInfoInner.md b/docs/QuoteToOrderDetailsDTOShipToInfoInner.md new file mode 100644 index 00000000..3708d797 --- /dev/null +++ b/docs/QuoteToOrderDetailsDTOShipToInfoInner.md @@ -0,0 +1,23 @@ + + +# QuoteToOrderDetailsDTOShipToInfoInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**addressId** | **String** | The company contact provided by the reseller. | [optional] | +|**companyName** | **String** | The name of the company the order will be shipped to. | [optional] | +|**contact** | **String** | The contact name for the order will be shipped to. | [optional] | +|**addressLine1** | **String** | The address line 1 the order will be shipped to. | [optional] | +|**addressLine2** | **String** | The address line 2 the order will be shipped to. | [optional] | +|**addressLine3** | **String** | The address line 3 the order will be shipped to. | [optional] | +|**city** | **String** | The city the order will be shipped to. | [optional] | +|**state** | **String** | The state the order will be shipped to. | [optional] | +|**postalCode** | **String** | The zip or postal code the order will be shipped to. | [optional] | +|**countryCode** | **String** | The two-character ISO country code the order will be shipped to. | [optional] | +|**email** | **String** | The company contact email address. | [optional] | + + + diff --git a/docs/QuoteToOrderDetailsDTOVmfadditionalAttributesInner.md b/docs/QuoteToOrderDetailsDTOVmfadditionalAttributesInner.md new file mode 100644 index 00000000..4fdd524d --- /dev/null +++ b/docs/QuoteToOrderDetailsDTOVmfadditionalAttributesInner.md @@ -0,0 +1,15 @@ + + +# QuoteToOrderDetailsDTOVmfadditionalAttributesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeName** | **String** | The name of the header level field. | [optional] | +|**attributeValue** | **String** | The value of the header level field. | [optional] | +|**attributeDescription** | **String** | The description of the header level field. | [optional] | + + + diff --git a/docs/QuoteToOrderResponse.md b/docs/QuoteToOrderResponse.md new file mode 100644 index 00000000..328cc5f8 --- /dev/null +++ b/docs/QuoteToOrderResponse.md @@ -0,0 +1,15 @@ + + +# QuoteToOrderResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quoteNumber** | **String** | Unique identifier generated by Ingram Micro's CRM specific to each quote. | [optional] | +|**confirmationNumber** | **BigDecimal** | A unique confirmation number for tracking purposes. | [optional] | +|**message** | **String** | A confirmation message. | [optional] | + + + diff --git a/docs/QuotesApi.md b/docs/QuotesApi.md new file mode 100644 index 00000000..e2d63746 --- /dev/null +++ b/docs/QuotesApi.md @@ -0,0 +1,268 @@ +# QuotesApi + +All URIs are relative to *https://api.ingrammicro.com:443/sandbox* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getQuotessearchV6**](QuotesApi.md#getQuotessearchV6) | **GET** /resellers/v6/quotes/search | Quote Search | +| [**getResellerV6ValidateQuote**](QuotesApi.md#getResellerV6ValidateQuote) | **GET** /resellers/v6/q2o/validatequote | Validate Quote | +| [**getResellersV6Quotes**](QuotesApi.md#getResellersV6Quotes) | **GET** /resellers/v6/quotes/{quoteNumber} | Get Quote Details | + + + +# **getQuotessearchV6** +> QuoteSearchResponse getQuotessearchV6(imCustomerNumber, imCountryCode, imCustomerContact, imCorrelationID, ingramOrderDateBt, quoteNumber, specialBidNumber, endUserContact, sortingOrder, sortBy, pageSize, pageNumber, vendorName, quoteName, status, quoteCreateDateBt, imSenderID) + +Quote Search + +The Quote Search API, by default, will retrieve quotes modified or created within the last 30 days. Quotes older than 365 days are excluded by default. The date filters enable the retrieval of quotes older than 30 days and up to 365 days when using date range criteria. The Quote Search API enables the retrieval and filtering of relevant quote list key criteria data such as Quote Number, Special Bid Numbers, End User Name, Quote Status, and Date Ranges from Ingram Micros CRM system. Only Active quotes are avaiable through the API. Draft and Closed quotes are excluded and are not accessable through the Quote List Search API. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.QuotesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + QuotesApi apiInstance = new QuotesApi(defaultClient); + String imCustomerNumber = "20-222222"; // String | Your unique Ingram Micro customer number. + String imCountryCode = "US"; // String | Two-character ISO country code. + String imCustomerContact = "John.Doe@reseller.com"; // String | Logged in Users email address contact. + String imCorrelationID = "fbac82ba-cf0a-4bcf-fc03-0c5084"; // String | Unique transaction number to identify each transaction across all the systems. + List ingramOrderDateBt = Arrays.asList(); // List | Search with start and end date(only 2 entries allowed). + String quoteNumber = "QUO-10985-C4C3F7"; // String | Unique identifier generated by Ingram Micros CRM specific to each quote. When applying a filter to the quoteNumber and including a partial quote number in the filter, all quotes containing any information included in the filter can be retrieved as a subset of all available customer quotes. + String specialBidNumber = "9638445-1880"; // String | Special Pricing Bid Number, also referred to as a Dart Number by some vendors, is a unique identifier associated with vendor specific products and discounts. + String endUserContact = "JD Enterprises"; // String | End User Name is the end customer name that is associated with a quote in Ingram Micros CRM. + String sortingOrder = "desc"; // String | Sort applies to the selected column (sortingColumnName) and may be specified in Ascending (asc) or Descending (desc) order. The default sort is Descending (desc) - most recent first. + String sortBy = "quoteNumber"; // String | Refers to the column selected to apply the sorting criteria. The default column is dateCreated and will sort by the most recently created quote first with the following in descending order. The default filter retrieves quotes created within the last 30 days. Filtering allows user to select a specific column to sort: quoteNumber, createdDate, lastModifiedDate and expiryDate. + Integer pageSize = 25; // Integer | Number of records (quotes) to display per page in the quote list. The default is 25, but may be decreased using the filter . + Integer pageNumber = 1; // Integer | Page index or page number for the list of quotes being returned. + String vendorName = "Dell"; // String | The name of the vendor. + String quoteName = "MyQuote"; // String | The quote name was given by the customer while creating quote. + String status = "Ready to Order"; // String | The status of the quote. + String quoteCreateDateBt = "quoteCreateDateBt_example"; // String | Search with start and end date(only 2 entries allowed). + String imSenderID = "MyCompany"; // String | Unique value used to identify the sender of the transaction. Example: MyCompany + try { + QuoteSearchResponse result = apiInstance.getQuotessearchV6(imCustomerNumber, imCountryCode, imCustomerContact, imCorrelationID, ingramOrderDateBt, quoteNumber, specialBidNumber, endUserContact, sortingOrder, sortBy, pageSize, pageNumber, vendorName, quoteName, status, quoteCreateDateBt, imSenderID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QuotesApi#getQuotessearchV6"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **imCustomerNumber** | **String**| Your unique Ingram Micro customer number. | | +| **imCountryCode** | **String**| Two-character ISO country code. | | +| **imCustomerContact** | **String**| Logged in Users email address contact. | | +| **imCorrelationID** | **String**| Unique transaction number to identify each transaction across all the systems. | | +| **ingramOrderDateBt** | [**List<String>**](String.md)| Search with start and end date(only 2 entries allowed). | [optional] | +| **quoteNumber** | **String**| Unique identifier generated by Ingram Micros CRM specific to each quote. When applying a filter to the quoteNumber and including a partial quote number in the filter, all quotes containing any information included in the filter can be retrieved as a subset of all available customer quotes. | [optional] | +| **specialBidNumber** | **String**| Special Pricing Bid Number, also referred to as a Dart Number by some vendors, is a unique identifier associated with vendor specific products and discounts. | [optional] | +| **endUserContact** | **String**| End User Name is the end customer name that is associated with a quote in Ingram Micros CRM. | [optional] | +| **sortingOrder** | **String**| Sort applies to the selected column (sortingColumnName) and may be specified in Ascending (asc) or Descending (desc) order. The default sort is Descending (desc) - most recent first. | [optional] | +| **sortBy** | **String**| Refers to the column selected to apply the sorting criteria. The default column is dateCreated and will sort by the most recently created quote first with the following in descending order. The default filter retrieves quotes created within the last 30 days. Filtering allows user to select a specific column to sort: quoteNumber, createdDate, lastModifiedDate and expiryDate. | [optional] | +| **pageSize** | **Integer**| Number of records (quotes) to display per page in the quote list. The default is 25, but may be decreased using the filter . | [optional] | +| **pageNumber** | **Integer**| Page index or page number for the list of quotes being returned. | [optional] [default to 1] | +| **vendorName** | **String**| The name of the vendor. | [optional] | +| **quoteName** | **String**| The quote name was given by the customer while creating quote. | [optional] | +| **status** | **String**| The status of the quote. | [optional] | +| **quoteCreateDateBt** | **String**| Search with start and end date(only 2 entries allowed). | [optional] | +| **imSenderID** | **String**| Unique value used to identify the sender of the transaction. Example: MyCompany | [optional] | + +### Return type + +[**QuoteSearchResponse**](QuoteSearchResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    | +| **400** | Bad Request | * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    | +| **401** | Unauthorized | - | +| **404** | Not Found | * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    | +| **500** | Internal Server Error | * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    | + + +# **getResellerV6ValidateQuote** +> ValidateQuoteResponse getResellerV6ValidateQuote(quoteNumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID) + +Validate Quote + +The validate quote helps the customer validate the quote created in Ingram Micro's system. Apart from validating the quote, the endpoint also identifies all the mandatory fields that are required by the vendor at the header and line levels. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.QuotesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + QuotesApi apiInstance = new QuotesApi(defaultClient); + String quoteNumber = "QUO-14551943-D2Y9L9"; // String | A unique identifier generated by Ingram Micro's CRM specific to each quote. + String imCustomerNumber = "20-222222"; // String | Your Ingram Micro unique customer number. + String imCountryCode = "US"; // String | Two-character ISO country code. + String imCorrelationID = "fbac82ba-cf0a-4bcf-fc03-0c5084"; // String | Unique transaction number to identify each transaction accross all the systems. + String imSenderID = "MyCompany"; // String | Unique identifier used to identify the third party source accessing the services. + try { + ValidateQuoteResponse result = apiInstance.getResellerV6ValidateQuote(quoteNumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QuotesApi#getResellerV6ValidateQuote"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **quoteNumber** | **String**| A unique identifier generated by Ingram Micro's CRM specific to each quote. | | +| **imCustomerNumber** | **String**| Your Ingram Micro unique customer number. | | +| **imCountryCode** | **String**| Two-character ISO country code. | | +| **imCorrelationID** | **String**| Unique transaction number to identify each transaction accross all the systems. | | +| **imSenderID** | **String**| Unique identifier used to identify the third party source accessing the services. | [optional] | + +### Return type + +[**ValidateQuoteResponse**](ValidateQuoteResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **400** | Bad Request | - | +| **500** | Internal Server Error | - | + + +# **getResellersV6Quotes** +> QuoteDetailsResponse getResellersV6Quotes(imCustomerNumber, imCountryCode, imCorrelationID, quoteNumber, imSenderID) + +Get Quote Details + +The quote details API provides all quote details associated with the quote number provided. The **“quoteNumber”**, **“isoCountryCode”** and **“customerNumber”** parameters are required. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.QuotesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + QuotesApi apiInstance = new QuotesApi(defaultClient); + String imCustomerNumber = "20-222222"; // String | Your Ingram Micro unique customer number + String imCountryCode = "US"; // String | Two-character ISO country code. + String imCorrelationID = "ASJDasbjdn-asjnd12dalks-asjkn"; // String | Unique transaction number to identify each transaction accross all the systems. + String quoteNumber = "QUO-10926-Y8G1B3"; // String | Unique identifier generated by Ingram Micro's CRM specific to each quote. When applying a filter to the quoteNumber and including a partial quote number in the filter, all quotes containing any information included in the filter can be retrieved as a subset of all available customer quotes. + String imSenderID = "MyCompany"; // String | Unique identifier used to identify the third party source accessing the services. + try { + QuoteDetailsResponse result = apiInstance.getResellersV6Quotes(imCustomerNumber, imCountryCode, imCorrelationID, quoteNumber, imSenderID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QuotesApi#getResellersV6Quotes"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **imCustomerNumber** | **String**| Your Ingram Micro unique customer number | | +| **imCountryCode** | **String**| Two-character ISO country code. | | +| **imCorrelationID** | **String**| Unique transaction number to identify each transaction accross all the systems. | | +| **quoteNumber** | **String**| Unique identifier generated by Ingram Micro's CRM specific to each quote. When applying a filter to the quoteNumber and including a partial quote number in the filter, all quotes containing any information included in the filter can be retrieved as a subset of all available customer quotes. | | +| **imSenderID** | **String**| Unique identifier used to identify the third party source accessing the services. | [optional] | + +### Return type + +[**QuoteDetailsResponse**](QuoteDetailsResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | Bad Request | - | +| **500** | Internal Server Error | - | + diff --git a/docs/QuotesV4Api.md b/docs/QuotesV4Api.md new file mode 100644 index 00000000..298cf2e9 --- /dev/null +++ b/docs/QuotesV4Api.md @@ -0,0 +1,144 @@ +# QuotesV4Api + +All URIs are relative to *https://api.ingrammicro.com:443/sandbox* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**postV4Quotedetails**](QuotesV4Api.md#postV4Quotedetails) | **POST** /quotes/v1/quotedetails | Get Quote Details | +| [**postV4Quotesearch**](QuotesV4Api.md#postV4Quotesearch) | **POST** /quotes/v1/quotes | Get Quote List | + + + +# **postV4Quotedetails** +> QuoteDetailsResponse postV4Quotedetails(quoteDetailsRequest) + +Get Quote Details + +A real-time request to delete a previously accepted order must be submitted before the order is released to Ingram Micro’s warehouse. After release the order is no longer eligible for deletion. Order delete transaction submitted after the order is released will be rejected and will not be applied. *Direct ship orders cannot be deleted. Contact your sales rep for assistance. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.QuotesV4Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + QuotesV4Api apiInstance = new QuotesV4Api(defaultClient); + QuoteDetailsRequest quoteDetailsRequest = new QuoteDetailsRequest(); // QuoteDetailsRequest | + try { + QuoteDetailsResponse result = apiInstance.postV4Quotedetails(quoteDetailsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QuotesV4Api#postV4Quotedetails"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **quoteDetailsRequest** | [**QuoteDetailsRequest**](QuoteDetailsRequest.md)| | [optional] | + +### Return type + +[**QuoteDetailsResponse**](QuoteDetailsResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + + +# **postV4Quotesearch** +> QuoteListResponse postV4Quotesearch(quoteListRequest) + +Get Quote List + +A real-time request that allows the customer to query Ingram Micro for detailed information for a specific open or shipped order. Orders are searched using Ingram Micro Sales Order Number. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.QuotesV4Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + QuotesV4Api apiInstance = new QuotesV4Api(defaultClient); + QuoteListRequest quoteListRequest = new QuoteListRequest(); // QuoteListRequest | + try { + QuoteListResponse result = apiInstance.postV4Quotesearch(quoteListRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QuotesV4Api#postV4Quotesearch"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **quoteListRequest** | [**QuoteListRequest**](QuoteListRequest.md)| | [optional] | + +### Return type + +[**QuoteListResponse**](QuoteListResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + diff --git a/docs/QuotesV5Api.md b/docs/QuotesV5Api.md new file mode 100644 index 00000000..832623d1 --- /dev/null +++ b/docs/QuotesV5Api.md @@ -0,0 +1,150 @@ +# QuotesV5Api + +All URIs are relative to *https://api.ingrammicro.com:443/sandbox* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getV5QuotesDetails**](QuotesV5Api.md#getV5QuotesDetails) | **GET** /resellers/v5/quote/{quoteNumber} | Get Quote Details | +| [**postV5QuotesSearch**](QuotesV5Api.md#postV5QuotesSearch) | **POST** /resellers/v5/quote/search | Search Quotes | + + + +# **getV5QuotesDetails** +> QuoteDetails getV5QuotesDetails(quoteNumber, customerNumber, isoCountryCode, thirdPartySource) + +Get Quote Details + +The quote details API provides all quote details associated with the quote number provided. The “<strong>quoteNumber</strong>”, “<strong>isoCountryCode</strong>” and “<strong>customerNumber</strong>” parameters are required. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.QuotesV5Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + QuotesV5Api apiInstance = new QuotesV5Api(defaultClient); + String quoteNumber = "QUO-25576-C8S2W7"; // String | Ingram Micro Quote Number + String customerNumber = "20-222222"; // String | Your Ingram Micro unique customer number + String isoCountryCode = "US"; // String | + String thirdPartySource = "customer"; // String | Unique identifier used to identify the third party source accessing the services + try { + QuoteDetails result = apiInstance.getV5QuotesDetails(quoteNumber, customerNumber, isoCountryCode, thirdPartySource); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QuotesV5Api#getV5QuotesDetails"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **quoteNumber** | **String**| Ingram Micro Quote Number | [default to QUO-25576-C8S2W7] | +| **customerNumber** | **String**| Your Ingram Micro unique customer number | [default to 20-222222] | +| **isoCountryCode** | **String**| | [default to US] | +| **thirdPartySource** | **String**| Unique identifier used to identify the third party source accessing the services | [optional] [default to customer] | + +### Return type + +[**QuoteDetails**](QuoteDetails.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + + +# **postV5QuotesSearch** +> QuoteListResponse postV5QuotesSearch(quoteListRequest) + +Search Quotes + +This endpoint enables the retrieval and filtering of relevant quote list key criteria data, such as quote number, special bid numbers, end user name, status, and date ranges from the Ingram Micro system. By default, the Quotes endpoint retrieves quotes modified or created within the last 30 days. Observe these additional parameters:<ul><li>Only active quotes are available through this API.</li><li>Quotes older than 365 days are excluded by default.</li><li>You can use date range filters to retrieve quotes older than 30 days and up to 365 days.</li><li>Quotes that are in draft and closed states are excluded, and are not accessible through this API.</li></ul> + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.QuotesV5Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + QuotesV5Api apiInstance = new QuotesV5Api(defaultClient); + QuoteListRequest quoteListRequest = new QuoteListRequest(); // QuoteListRequest | + try { + QuoteListResponse result = apiInstance.postV5QuotesSearch(quoteListRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QuotesV5Api#postV5QuotesSearch"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **quoteListRequest** | [**QuoteListRequest**](QuoteListRequest.md)| | [optional] | + +### Return type + +[**QuoteListResponse**](QuoteListResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + diff --git a/docs/RenewalsApi.md b/docs/RenewalsApi.md new file mode 100644 index 00000000..8b855553 --- /dev/null +++ b/docs/RenewalsApi.md @@ -0,0 +1,178 @@ +# RenewalsApi + +All URIs are relative to *https://api.ingrammicro.com:443/sandbox* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getResellersV6Renewalsdetails**](RenewalsApi.md#getResellersV6Renewalsdetails) | **GET** /resellers/v6/renewals/{renewalId} | Renewals Details | +| [**postRenewalssearch**](RenewalsApi.md#postRenewalssearch) | **POST** /resellers/v6/renewals/search | Renewals Search | + + + +# **getResellersV6Renewalsdetails** +> RenewalsDetailsResponse getResellersV6Renewalsdetails(imCustomerNumber, imCountryCode, imCorrelationID, renewalId, imSenderID) + +Renewals Details + +The Renewal Details API endpoint will retrieve all the details related to the renewal. The customer is required to pass renewalId as a path parameter while sending a request. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.RenewalsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + RenewalsApi apiInstance = new RenewalsApi(defaultClient); + String imCustomerNumber = "20-222222"; // String | Your unique Ingram Micro customer number. + String imCountryCode = "US"; // String | Two-character ISO country code. + String imCorrelationID = "fbac82ba-cf0a-4bcf-fc03-0c5084"; // String | Unique transaction number to identify each transaction across all the systems. + String renewalId = "123456"; // String | Unique Ingram renewal ID. + String imSenderID = "MyCompany"; // String | Unique value used to identify the sender of the transaction. Example: MyCompany + try { + RenewalsDetailsResponse result = apiInstance.getResellersV6Renewalsdetails(imCustomerNumber, imCountryCode, imCorrelationID, renewalId, imSenderID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RenewalsApi#getResellersV6Renewalsdetails"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **imCustomerNumber** | **String**| Your unique Ingram Micro customer number. | | +| **imCountryCode** | **String**| Two-character ISO country code. | | +| **imCorrelationID** | **String**| Unique transaction number to identify each transaction across all the systems. | | +| **renewalId** | **String**| Unique Ingram renewal ID. | | +| **imSenderID** | **String**| Unique value used to identify the sender of the transaction. Example: MyCompany | [optional] | + +### Return type + +[**RenewalsDetailsResponse**](RenewalsDetailsResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | Bad Request | - | +| **500** | Internal Server Error | - | + + +# **postRenewalssearch** +> RenewalsSearchResponse postRenewalssearch(imCustomerNumber, imCountryCode, imCorrelationID, contentType, imSenderID, customerOrderNumber, ingramPurchaseOrderNumber, serialNumber, page, size, sort, renewalsSearchRequest) + +Renewals Search + +The Renewal Search API, by default, will retrieve all the renewals that are associated with the customer’s account. The customer will be able to search for renewals via basic search or advanced search. Basic search is available thru the query string parameters, whereas the advanced search is available thru the request body schema. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.RenewalsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + RenewalsApi apiInstance = new RenewalsApi(defaultClient); + String imCustomerNumber = "20-222222"; // String | Your unique Ingram Micro customer number. + String imCountryCode = "US"; // String | Two-character ISO country code. + String imCorrelationID = "fbac82ba-cf0a-4bcf-fc03-0c5084"; // String | Unique transaction number to identify each transaction across all the systems. + String contentType = "application/json"; // String | The media type for JSON Request. + String imSenderID = "MyCompany"; // String | Unique value used to identify the sender of the transaction. Example: MyCompany + String customerOrderNumber = "customerOrderNumber_example"; // String | The reseller's unique PO/Order number. + String ingramPurchaseOrderNumber = "ingramPurchaseOrderNumber_example"; // String | Sales order number. + String serialNumber = "serialNumber_example"; // String | A serial number of the product. + String page = "page_example"; // String | Number of page. + String size = "size_example"; // String | The submitted pagesize, default is 25. + String sort = "sort_example"; // String | Refers to the column selected to apply the sorting criteria. + RenewalsSearchRequest renewalsSearchRequest = new RenewalsSearchRequest(); // RenewalsSearchRequest | + try { + RenewalsSearchResponse result = apiInstance.postRenewalssearch(imCustomerNumber, imCountryCode, imCorrelationID, contentType, imSenderID, customerOrderNumber, ingramPurchaseOrderNumber, serialNumber, page, size, sort, renewalsSearchRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RenewalsApi#postRenewalssearch"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **imCustomerNumber** | **String**| Your unique Ingram Micro customer number. | | +| **imCountryCode** | **String**| Two-character ISO country code. | | +| **imCorrelationID** | **String**| Unique transaction number to identify each transaction across all the systems. | | +| **contentType** | **String**| The media type for JSON Request. | | +| **imSenderID** | **String**| Unique value used to identify the sender of the transaction. Example: MyCompany | [optional] | +| **customerOrderNumber** | **String**| The reseller's unique PO/Order number. | [optional] | +| **ingramPurchaseOrderNumber** | **String**| Sales order number. | [optional] | +| **serialNumber** | **String**| A serial number of the product. | [optional] | +| **page** | **String**| Number of page. | [optional] | +| **size** | **String**| The submitted pagesize, default is 25. | [optional] | +| **sort** | **String**| Refers to the column selected to apply the sorting criteria. | [optional] | +| **renewalsSearchRequest** | [**RenewalsSearchRequest**](RenewalsSearchRequest.md)| | [optional] | + +### Return type + +[**RenewalsSearchResponse**](RenewalsSearchResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | Error: Bad Request | - | +| **500** | Internal Server Error | - | + diff --git a/docs/RenewalsDetailsResponse.md b/docs/RenewalsDetailsResponse.md new file mode 100644 index 00000000..ef6bd624 --- /dev/null +++ b/docs/RenewalsDetailsResponse.md @@ -0,0 +1,27 @@ + + +# RenewalsDetailsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**renewalId** | **String** | Unique Ingram renewal ID. | [optional] | +|**ingramOrderNumber** | **String** | The IngramMicro sales order number. | [optional] | +|**ingramOrderDate** | **LocalDate** | The IngramMicro sales order date. | [optional] | +|**expirationDate** | **LocalDate** | Renewal expiration date. | [optional] | +|**ingramPurchaseOrderNumber** | **String** | Ingram purchase order number. | [optional] | +|**customerOrderNumber** | **String** | The reseller's order number for reference in their system. | [optional] | +|**endCustomerOrderNumber** | **String** | The end customer's order number for reference in their system. | [optional] | +|**renewalValue** | **BigDecimal** | The value of the renewal. | [optional] | +|**endUser** | **String** | The company name for the end user/customer. | [optional] | +|**vendor** | **String** | The name of the vendor. | [optional] | +|**status** | **String** | The status of the renewal. | [optional] | +|**endUserInfo** | [**List<RenewalsDetailsResponseEndUserInfoInner>**](RenewalsDetailsResponseEndUserInfoInner.md) | | [optional] | +|**referenceNumber** | [**List<RenewalsDetailsResponseReferenceNumberInner>**](RenewalsDetailsResponseReferenceNumberInner.md) | | [optional] | +|**products** | [**List<RenewalsDetailsResponseProductsInner>**](RenewalsDetailsResponseProductsInner.md) | | [optional] | +|**additionalAttributes** | [**List<RenewalsDetailsResponseAdditionalAttributesInner>**](RenewalsDetailsResponseAdditionalAttributesInner.md) | | [optional] | + + + diff --git a/docs/RenewalsDetailsResponseAdditionalAttributesInner.md b/docs/RenewalsDetailsResponseAdditionalAttributesInner.md new file mode 100644 index 00000000..3f3c21dd --- /dev/null +++ b/docs/RenewalsDetailsResponseAdditionalAttributesInner.md @@ -0,0 +1,17 @@ + + +# RenewalsDetailsResponseAdditionalAttributesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeDescription** | **String** | The description of the additional attribute. | [optional] | +|**attributeValue** | **String** | The value of the additional attribute. | [optional] | +|**startDate** | **LocalDate** | The attribute start date. | [optional] | +|**expirationDate** | **LocalDate** | The attribute expiration date. | [optional] | +|**isConsolidated** | **String** | Is the line item consolidated? Yes or No. | [optional] | + + + diff --git a/docs/RenewalsDetailsResponseEndUserInfoInner.md b/docs/RenewalsDetailsResponseEndUserInfoInner.md new file mode 100644 index 00000000..e88aaae9 --- /dev/null +++ b/docs/RenewalsDetailsResponseEndUserInfoInner.md @@ -0,0 +1,26 @@ + + +# RenewalsDetailsResponseEndUserInfoInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**contact** | **String** | The contact name for the end user/customer. | [optional] | +|**name1** | **String** | The name1 for the end user/customer. | [optional] | +|**name2** | **String** | The name2 for the end user/customer. | [optional] | +|**companyName** | **String** | The company name for the end user/customer. | [optional] | +|**addressLine1** | **String** | The address line 1 for the end user/customer. | [optional] | +|**addressLine2** | **String** | The address line 2 for the end user/customer. | [optional] | +|**addressLine3** | **String** | The address line 3 for the end user/customer. | [optional] | +|**addressLine4** | **String** | The address line 4 for the end user/customer. | [optional] | +|**city** | **String** | The end user/customer's city. | [optional] | +|**state** | **String** | The end user/customer's state. | [optional] | +|**postalCode** | **String** | The end user/customer's zip or postal code. | [optional] | +|**countryCode** | **String** | The end user/customer's two character ISO country code. | [optional] | +|**phoneNumber** | **String** | The end user/customer's phone number. | [optional] | +|**email** | **String** | The end user/customer's email. | [optional] | + + + diff --git a/docs/RenewalsDetailsResponseProductsInner.md b/docs/RenewalsDetailsResponseProductsInner.md new file mode 100644 index 00000000..92351910 --- /dev/null +++ b/docs/RenewalsDetailsResponseProductsInner.md @@ -0,0 +1,20 @@ + + +# RenewalsDetailsResponseProductsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ingramLineNumber** | **String** | Unique Ingram Micro line number. | [optional] | +|**productDescription** | **String** | The description of the product. | [optional] | +|**vendorPartNumber** | **String** | The vendor's part number for the line item. | [optional] | +|**ingramPartNumber** | **String** | Unique IngramMicro part number. | [optional] | +|**manufacturerPartNumber** | **String** | The manufacturer's part number for the line item. | [optional] | +|**quantity** | **String** | The quantity of the line item. | [optional] | +|**unitPrice** | **BigDecimal** | The unit price of the line item. | [optional] | +|**isConsolidated** | **String** | Is the line item consolidated? Yes or No. | [optional] | + + + diff --git a/docs/RenewalsDetailsResponseReferenceNumberInner.md b/docs/RenewalsDetailsResponseReferenceNumberInner.md new file mode 100644 index 00000000..83821200 --- /dev/null +++ b/docs/RenewalsDetailsResponseReferenceNumberInner.md @@ -0,0 +1,14 @@ + + +# RenewalsDetailsResponseReferenceNumberInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**notificationId** | **String** | Notification id of the communication sent from Ingram. | [optional] | +|**quoteNumber** | **String** | Quote number for the renewal. | [optional] | + + + diff --git a/docs/RenewalsSearchRequest.md b/docs/RenewalsSearchRequest.md new file mode 100644 index 00000000..a6795c95 --- /dev/null +++ b/docs/RenewalsSearchRequest.md @@ -0,0 +1,16 @@ + + +# RenewalsSearchRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | [**RenewalsSearchRequestStatus**](RenewalsSearchRequestStatus.md) | | [optional] | +|**dataType** | [**RenewalsSearchRequestDataType**](RenewalsSearchRequestDataType.md) | | [optional] | +|**vendor** | **String** | The name of the Vendor. | [optional] | +|**endUser** | **String** | The name of the enduser. | [optional] | + + + diff --git a/docs/RenewalsSearchRequestDataType.md b/docs/RenewalsSearchRequestDataType.md new file mode 100644 index 00000000..9f9dac28 --- /dev/null +++ b/docs/RenewalsSearchRequestDataType.md @@ -0,0 +1,16 @@ + + +# RenewalsSearchRequestDataType + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**startDate** | [**RenewalsSearchRequestDataTypeStartDate**](RenewalsSearchRequestDataTypeStartDate.md) | | [optional] | +|**endDate** | [**RenewalsSearchRequestDataTypeEndDate**](RenewalsSearchRequestDataTypeEndDate.md) | | [optional] | +|**invoiceDate** | [**RenewalsSearchRequestDataTypeInvoiceDate**](RenewalsSearchRequestDataTypeInvoiceDate.md) | | [optional] | +|**expirationDate** | [**RenewalsSearchRequestDataTypeExpirationDate**](RenewalsSearchRequestDataTypeExpirationDate.md) | | [optional] | + + + diff --git a/docs/RenewalsSearchRequestDataTypeEndDate.md b/docs/RenewalsSearchRequestDataTypeEndDate.md new file mode 100644 index 00000000..e6b571e5 --- /dev/null +++ b/docs/RenewalsSearchRequestDataTypeEndDate.md @@ -0,0 +1,14 @@ + + +# RenewalsSearchRequestDataTypeEndDate + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**customStartDate** | **String** | Custom from date for Renewal end date. | [optional] | +|**customEndDate** | **String** | Custom to date for Renewal end date. | [optional] | + + + diff --git a/docs/RenewalsSearchRequestDataTypeExpirationDate.md b/docs/RenewalsSearchRequestDataTypeExpirationDate.md new file mode 100644 index 00000000..ed8e8684 --- /dev/null +++ b/docs/RenewalsSearchRequestDataTypeExpirationDate.md @@ -0,0 +1,14 @@ + + +# RenewalsSearchRequestDataTypeExpirationDate + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**customStartDate** | **String** | Custom start date for expiration date. | [optional] | +|**customEndDate** | **String** | Custom end date for expiration date. | [optional] | + + + diff --git a/docs/RenewalsSearchRequestDataTypeInvoiceDate.md b/docs/RenewalsSearchRequestDataTypeInvoiceDate.md new file mode 100644 index 00000000..12ff6d75 --- /dev/null +++ b/docs/RenewalsSearchRequestDataTypeInvoiceDate.md @@ -0,0 +1,14 @@ + + +# RenewalsSearchRequestDataTypeInvoiceDate + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**customStartDate** | **String** | Custom start date for invoice date. | [optional] | +|**customEndDate** | **String** | Custom end date for invoice date. | [optional] | + + + diff --git a/docs/RenewalsSearchRequestDataTypeStartDate.md b/docs/RenewalsSearchRequestDataTypeStartDate.md new file mode 100644 index 00000000..8e4f0db8 --- /dev/null +++ b/docs/RenewalsSearchRequestDataTypeStartDate.md @@ -0,0 +1,14 @@ + + +# RenewalsSearchRequestDataTypeStartDate + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**customStartDate** | **String** | Custom from date for Renewal Start date. | [optional] | +|**customEndDate** | **String** | Custom to date for Renewal Start date. | [optional] | + + + diff --git a/docs/RenewalsSearchRequestStatus.md b/docs/RenewalsSearchRequestStatus.md new file mode 100644 index 00000000..5905dfc6 --- /dev/null +++ b/docs/RenewalsSearchRequestStatus.md @@ -0,0 +1,13 @@ + + +# RenewalsSearchRequestStatus + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**opporutinyStatus** | [**RenewalsSearchRequestStatusOpporutinyStatus**](RenewalsSearchRequestStatusOpporutinyStatus.md) | | [optional] | + + + diff --git a/docs/RenewalsSearchRequestStatusOpporutinyStatus.md b/docs/RenewalsSearchRequestStatusOpporutinyStatus.md new file mode 100644 index 00000000..3d57d1d8 --- /dev/null +++ b/docs/RenewalsSearchRequestStatusOpporutinyStatus.md @@ -0,0 +1,14 @@ + + +# RenewalsSearchRequestStatusOpporutinyStatus + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**value** | **String** | The value of opportunity status, it can be either Open or Closed. | [optional] | +|**subStatus** | **String** | The sub-status of Opportunity status. Possible sub-status values for Open opportunity status are Ready to order, Quote pending, Notification sent, Future, and Quote requested. Possible sub-status values for Closed opportunity status are All, Ordered, Quote closed-contract sales desk, Expired, Transition to new/upsell, Lost to competitior, Consolidated, Transitioned to cloud, Renewal went direct, EOL, End user out of business, Void, Other, and Cancelled. | [optional] | + + + diff --git a/docs/RenewalsSearchResponse.md b/docs/RenewalsSearchResponse.md new file mode 100644 index 00000000..57bb5b1a --- /dev/null +++ b/docs/RenewalsSearchResponse.md @@ -0,0 +1,18 @@ + + +# RenewalsSearchResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**recordsFound** | **Integer** | Number of records found. | [optional] | +|**pageSize** | **Integer** | Number of records in a page. | [optional] | +|**pageNumber** | **Integer** | Number of page. | [optional] | +|**renewals** | [**List<RenewalsSearchResponseRenewalsInner>**](RenewalsSearchResponseRenewalsInner.md) | | [optional] | +|**nextPage** | **String** | URL for the next page. | [optional] | +|**previousPage** | **String** | URL for the previous page. | [optional] | + + + diff --git a/docs/RenewalsSearchResponseRenewalsInner.md b/docs/RenewalsSearchResponseRenewalsInner.md new file mode 100644 index 00000000..2db7f235 --- /dev/null +++ b/docs/RenewalsSearchResponseRenewalsInner.md @@ -0,0 +1,21 @@ + + +# RenewalsSearchResponseRenewalsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**renewalId** | **String** | Unique renewal ID. | [optional] | +|**customerOrderNumber** | **String** | The reseller's order number for reference in their system. | [optional] | +|**referenceNumber** | **String** | Renewal reference number. It could be notification id or quote number. | [optional] | +|**endUser** | **String** | The company name for the end user/customer. | [optional] | +|**vendor** | **String** | The name of the vendor. | [optional] | +|**expirationDate** | **String** | Renewal expiration date. | [optional] | +|**renewalValue** | **String** | The value of the renewal. | [optional] | +|**status** | **String** | The status of the renewal. | [optional] | +|**links** | [**List<RenewalsSearchResponseRenewalsInnerLinksInner>**](RenewalsSearchResponseRenewalsInnerLinksInner.md) | | [optional] | + + + diff --git a/docs/RenewalsSearchResponseRenewalsInnerLinksInner.md b/docs/RenewalsSearchResponseRenewalsInnerLinksInner.md new file mode 100644 index 00000000..9185ef6c --- /dev/null +++ b/docs/RenewalsSearchResponseRenewalsInnerLinksInner.md @@ -0,0 +1,15 @@ + + +# RenewalsSearchResponseRenewalsInnerLinksInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**topic** | **String** | The topic of the link. | [optional] | +|**href** | **String** | The URL of the topic. | [optional] | +|**type** | **String** | Type of a call. | [optional] | + + + diff --git a/docs/ReturnsApi.md b/docs/ReturnsApi.md new file mode 100644 index 00000000..3735e82a --- /dev/null +++ b/docs/ReturnsApi.md @@ -0,0 +1,270 @@ +# ReturnsApi + +All URIs are relative to *https://api.ingrammicro.com:443/sandbox* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getResellersV6Returnsdetails**](ReturnsApi.md#getResellersV6Returnsdetails) | **GET** /resellers/v6/returns/{caseRequestNumber} | Returns Details | +| [**getResellersV6Returnssearch**](ReturnsApi.md#getResellersV6Returnssearch) | **GET** /resellers/v6/returns/search | Returns Search | +| [**postReturnscreate**](ReturnsApi.md#postReturnscreate) | **POST** /resellers/v6/returns/create | Returns Create | + + + +# **getResellersV6Returnsdetails** +> ReturnsDetailsResponse getResellersV6Returnsdetails(imCustomerNumber, imCountryCode, imCorrelationID, caseRequestNumber, imSenderID) + +Returns Details + +The Returns Details API will retrieve all the details related to the specific caseRequestNumber. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.ReturnsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + ReturnsApi apiInstance = new ReturnsApi(defaultClient); + String imCustomerNumber = "20-222222"; // String | Your unique Ingram Micro customer number. + String imCountryCode = "US"; // String | Two-character ISO country code. + String imCorrelationID = "fbac82ba-cf0a-4bcf-fc03-0c5084"; // String | Unique transaction number to identify each transaction across all the systems. + String caseRequestNumber = "12345678"; // String | A unique return request number. + String imSenderID = "MyCompany"; // String | Unique value used to identify the sender of the transaction. Example: MyCompany + try { + ReturnsDetailsResponse result = apiInstance.getResellersV6Returnsdetails(imCustomerNumber, imCountryCode, imCorrelationID, caseRequestNumber, imSenderID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ReturnsApi#getResellersV6Returnsdetails"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **imCustomerNumber** | **String**| Your unique Ingram Micro customer number. | | +| **imCountryCode** | **String**| Two-character ISO country code. | | +| **imCorrelationID** | **String**| Unique transaction number to identify each transaction across all the systems. | | +| **caseRequestNumber** | **String**| A unique return request number. | | +| **imSenderID** | **String**| Unique value used to identify the sender of the transaction. Example: MyCompany | [optional] | + +### Return type + +[**ReturnsDetailsResponse**](ReturnsDetailsResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | Bad Request | - | +| **500** | Internal Server Error | - | + + +# **getResellersV6Returnssearch** +> ReturnsSearchResponse getResellersV6Returnssearch(imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, caseRequestNumber, invoiceNumber, returnClaimId, referenceNumber, ingramPartNumber, vendorPartNumber, returnStatusIn, claimStatusIn, createdOnBt, modifiedOnBt, returnReasonIn, page, size, sort, sortingColumnName) + +Returns Search + +The Returns Search API, by default, will retrieve all the returns that are associated with the customer’s account. The customer will be able to search returns using the query parameters. The Returns Search response will return the following information: returnClaimId, caseRequestNumber, createdOn, referenceNumber, and returnReason. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.ReturnsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + ReturnsApi apiInstance = new ReturnsApi(defaultClient); + String imCustomerNumber = "20-222222"; // String | Your unique Ingram Micro customer number. + String imCountryCode = "US"; // String | Two-character ISO country code. + String imCorrelationID = "fbac82ba-cf0a-4bcf-fc03-0c5084"; // String | Unique transaction number to identify each transaction across all the systems. + String imSenderID = "MyCompany"; // String | Unique value used to identify the sender of the transaction. Example: MyCompany + String caseRequestNumber = "caseRequestNumber_example"; // String | A unique return request number. + String invoiceNumber = "invoiceNumber_example"; // String | The Invoice number for the order. + String returnClaimId = "returnClaimId_example"; // String | A unique return claim Id. + String referenceNumber = "referenceNumber_example"; // String | The reference number for the return. + String ingramPartNumber = "ingramPartNumber_example"; // String | Unique IngramMicro part number. + String vendorPartNumber = "vendorPartNumber_example"; // String | The vendor's part number. + String returnStatusIn = "returnStatusIn_example"; // String | Comma-separated values of pre-defined status. Open, Approved, Partially Approved, Denied, Voided. + String claimStatusIn = "claimStatusIn_example"; // String | Comma-separated values of pre-defined status. Open, Approved, Partially Approved, Denied, Voided. + String createdOnBt = "createdOnBt_example"; // String | The date on which the return request was created. + String modifiedOnBt = "modifiedOnBt_example"; // String | The date on which the return request was last updated. + String returnReasonIn = "returnReasonIn_example"; // String | Comma separated Pre-defined value. test, (EW) Express Warehousing, (AR) Account Receivables, (BB) Buy Back, (BE) Stock Balance Exception, (BO) Bill Only, (CE) Credit Dept Use - Credit Exception, (CF) Configuration Fee, (CS ) Customer Service Discretion, (CS1) Customer Service Discretion CS Error, (DE) Defective Exception, (DF) Defective Items, (DI) Direct Credit, (DM) Damaged from Carrier, (DN) Damaged Without Product, (DT) Direct/ Special Order, (DT1) Direct Ship billed, not shipped., (FO) Freight Out, (FX) No-Scan, (IN) Incomplete, (LS) Lost Shipment, (MN) Minimum Order Fee Credit, (OS) Over Shipment, (PR) Pricing Error, (RF) Refusal Credit, (RI) Re-Invoice, (RP) Return For Repair, (RT) Return Not Credited, (RTD) RCN, (SB) Stock Balance, (SD) Sales Discretion, (SH) Incorrect Shipping And Handling, (SS) Short Shipment, (SSK) Short Ship kit, (SW) Sales Writeoff, (TE) Opened Return, (TR) Training Refund, (TX) Tax Credit, (WS) Wrong Sales Sealed, (WW) Wrong Warehouse, (FS) Warehouse Failed Serial# Capture, Latin America Vebdor Credits, Select Source, ITAD - Trade-in Credit, Withholding Tax + String page = "page_example"; // String | Number of page. + String size = "size_example"; // String | The submitted pagesize, default is 25 + String sort = "sort_example"; // String | Refers to the column selected to apply the sorting criteria. + String sortingColumnName = "sortingColumnName_example"; // String | The column name which will be sorted on. + try { + ReturnsSearchResponse result = apiInstance.getResellersV6Returnssearch(imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, caseRequestNumber, invoiceNumber, returnClaimId, referenceNumber, ingramPartNumber, vendorPartNumber, returnStatusIn, claimStatusIn, createdOnBt, modifiedOnBt, returnReasonIn, page, size, sort, sortingColumnName); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ReturnsApi#getResellersV6Returnssearch"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **imCustomerNumber** | **String**| Your unique Ingram Micro customer number. | | +| **imCountryCode** | **String**| Two-character ISO country code. | | +| **imCorrelationID** | **String**| Unique transaction number to identify each transaction across all the systems. | | +| **imSenderID** | **String**| Unique value used to identify the sender of the transaction. Example: MyCompany | [optional] | +| **caseRequestNumber** | **String**| A unique return request number. | [optional] | +| **invoiceNumber** | **String**| The Invoice number for the order. | [optional] | +| **returnClaimId** | **String**| A unique return claim Id. | [optional] | +| **referenceNumber** | **String**| The reference number for the return. | [optional] | +| **ingramPartNumber** | **String**| Unique IngramMicro part number. | [optional] | +| **vendorPartNumber** | **String**| The vendor's part number. | [optional] | +| **returnStatusIn** | **String**| Comma-separated values of pre-defined status. Open, Approved, Partially Approved, Denied, Voided. | [optional] | +| **claimStatusIn** | **String**| Comma-separated values of pre-defined status. Open, Approved, Partially Approved, Denied, Voided. | [optional] | +| **createdOnBt** | **String**| The date on which the return request was created. | [optional] | +| **modifiedOnBt** | **String**| The date on which the return request was last updated. | [optional] | +| **returnReasonIn** | **String**| Comma separated Pre-defined value. test, (EW) Express Warehousing, (AR) Account Receivables, (BB) Buy Back, (BE) Stock Balance Exception, (BO) Bill Only, (CE) Credit Dept Use - Credit Exception, (CF) Configuration Fee, (CS ) Customer Service Discretion, (CS1) Customer Service Discretion CS Error, (DE) Defective Exception, (DF) Defective Items, (DI) Direct Credit, (DM) Damaged from Carrier, (DN) Damaged Without Product, (DT) Direct/ Special Order, (DT1) Direct Ship billed, not shipped., (FO) Freight Out, (FX) No-Scan, (IN) Incomplete, (LS) Lost Shipment, (MN) Minimum Order Fee Credit, (OS) Over Shipment, (PR) Pricing Error, (RF) Refusal Credit, (RI) Re-Invoice, (RP) Return For Repair, (RT) Return Not Credited, (RTD) RCN, (SB) Stock Balance, (SD) Sales Discretion, (SH) Incorrect Shipping And Handling, (SS) Short Shipment, (SSK) Short Ship kit, (SW) Sales Writeoff, (TE) Opened Return, (TR) Training Refund, (TX) Tax Credit, (WS) Wrong Sales Sealed, (WW) Wrong Warehouse, (FS) Warehouse Failed Serial# Capture, Latin America Vebdor Credits, Select Source, ITAD - Trade-in Credit, Withholding Tax | [optional] | +| **page** | **String**| Number of page. | [optional] | +| **size** | **String**| The submitted pagesize, default is 25 | [optional] | +| **sort** | **String**| Refers to the column selected to apply the sorting criteria. | [optional] | +| **sortingColumnName** | **String**| The column name which will be sorted on. | [optional] | + +### Return type + +[**ReturnsSearchResponse**](ReturnsSearchResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | Bad Request | - | +| **500** | Internal Server Error | - | + + +# **postReturnscreate** +> ReturnsCreateResponse postReturnscreate(imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, returnsCreateRequest) + +Returns Create + +Return create endpoint will allow customers to create a return request. In order to create a request, the customer must provide either ingramPartNumber or vendorPartNumber along with other required fields listed below. + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.ReturnsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + ReturnsApi apiInstance = new ReturnsApi(defaultClient); + String imCustomerNumber = "20-222222"; // String | Your unique Ingram Micro customer number. + String imCountryCode = "US"; // String | Two-character ISO country code. + String imCorrelationID = "fbac82ba-cf0a-4bcf-fc03-0c5084"; // String | Unique transaction number to identify each transaction across all the systems. + String imSenderID = "MyCompany"; // String | Unique value used to identify the sender of the transaction. Example: MyCompany + ReturnsCreateRequest returnsCreateRequest = new ReturnsCreateRequest(); // ReturnsCreateRequest | + try { + ReturnsCreateResponse result = apiInstance.postReturnscreate(imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, returnsCreateRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ReturnsApi#postReturnscreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **imCustomerNumber** | **String**| Your unique Ingram Micro customer number. | | +| **imCountryCode** | **String**| Two-character ISO country code. | | +| **imCorrelationID** | **String**| Unique transaction number to identify each transaction across all the systems. | | +| **imSenderID** | **String**| Unique value used to identify the sender of the transaction. Example: MyCompany | [optional] | +| **returnsCreateRequest** | [**ReturnsCreateRequest**](ReturnsCreateRequest.md)| | [optional] | + +### Return type + +[**ReturnsCreateResponse**](ReturnsCreateResponse.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | Error: Bad Request | - | +| **500** | Internal Server Error | - | + diff --git a/docs/ReturnsCreateRequest.md b/docs/ReturnsCreateRequest.md new file mode 100644 index 00000000..bdd31fee --- /dev/null +++ b/docs/ReturnsCreateRequest.md @@ -0,0 +1,13 @@ + + +# ReturnsCreateRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_list** | [**List<ReturnsCreateRequestListInner>**](ReturnsCreateRequestListInner.md) | | [optional] | + + + diff --git a/docs/ReturnsCreateRequestListInner.md b/docs/ReturnsCreateRequestListInner.md new file mode 100644 index 00000000..f3c50a95 --- /dev/null +++ b/docs/ReturnsCreateRequestListInner.md @@ -0,0 +1,26 @@ + + +# ReturnsCreateRequestListInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**invoiceNumber** | **String** | The Invoice number of the order. | | +|**invoiceDate** | **LocalDate** | Date of an Invoice. | | +|**customerOrderNumber** | **String** | The reseller's order number for reference in their system. | [optional] | +|**ingramPartNumber** | **String** | Unique line number from Ingram. | [optional] | +|**vendorPartNumber** | **String** | Vendor Part Number. | [optional] | +|**serialNumber** | **String** | Serial number of the product. | [optional] | +|**quantity** | **Integer** | Return quantity of the product. | | +|**primaryReason** | **String** | Primary reason to return the product. | | +|**secondaryReason** | **String** | Secondary reason to return the product. | | +|**notes** | **String** | Return notes. | [optional] | +|**referenceNumber** | **String** | Reference number to return the product. | [optional] | +|**billToAddressId** | **String** | Suffix used to identify billing address. | [optional] | +|**shipFromInfo** | [**List<ReturnsCreateRequestListInnerShipFromInfoInner>**](ReturnsCreateRequestListInnerShipFromInfoInner.md) | | | +|**numberOfBoxes** | **Integer** | Number of boxes to return. | | + + + diff --git a/docs/ReturnsCreateRequestListInnerShipFromInfoInner.md b/docs/ReturnsCreateRequestListInnerShipFromInfoInner.md new file mode 100644 index 00000000..a95346f4 --- /dev/null +++ b/docs/ReturnsCreateRequestListInnerShipFromInfoInner.md @@ -0,0 +1,23 @@ + + +# ReturnsCreateRequestListInnerShipFromInfoInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**companyName** | **String** | Name of the company from where the product will be shipped. | | +|**contact** | **String** | Contact name of the person from where the product will be shipped. | | +|**addressLine1** | **String** | Ship from Address Line1. | | +|**addressLine2** | **String** | Ship from Address Line2. | [optional] | +|**addressLine3** | **String** | Ship from Address Line3. | [optional] | +|**city** | **String** | Ship from City. | | +|**state** | **String** | Ship from state. | | +|**postalCode** | **String** | Ship from postal code. | | +|**countryCode** | **String** | ship from country code. | | +|**email** | **String** | Ship from email. | | +|**phoneNumber** | **String** | Ship from phone number. | [optional] | + + + diff --git a/docs/ReturnsCreateResponse.md b/docs/ReturnsCreateResponse.md new file mode 100644 index 00000000..a02beeb0 --- /dev/null +++ b/docs/ReturnsCreateResponse.md @@ -0,0 +1,13 @@ + + +# ReturnsCreateResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**returnsClaims** | [**List<ReturnsCreateResponseReturnsClaimsInner>**](ReturnsCreateResponseReturnsClaimsInner.md) | | [optional] | + + + diff --git a/docs/ReturnsCreateResponseReturnsClaimsInner.md b/docs/ReturnsCreateResponseReturnsClaimsInner.md new file mode 100644 index 00000000..65792281 --- /dev/null +++ b/docs/ReturnsCreateResponseReturnsClaimsInner.md @@ -0,0 +1,26 @@ + + +# ReturnsCreateResponseReturnsClaimsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rmaClaimId** | **String** | The rmaClaimId claim id. | [optional] | +|**caseRequestNumber** | **String** | A unique return request number. | [optional] | +|**referenceNumber** | **String** | The reference number for the return. | [optional] | +|**createdOn** | **LocalDate** | The date on which the return request was created. | [optional] | +|**type** | **String** | Type of request. | [optional] | +|**returnReason** | **String** | The reason for the return. | [optional] | +|**ingramPartNumber** | **String** | Unique line number from Ingram. | [optional] | +|**vendorPartNumber** | **String** | Vendor Part Number. | [optional] | +|**quantity** | **Integer** | Return quantity of the product. | [optional] | +|**notes** | **String** | Return notes. | [optional] | +|**estimatedTotalValue** | **BigDecimal** | The estimated total value of the return. | [optional] | +|**credit** | **BigDecimal** | The amount of credit. | [optional] | +|**status** | **String** | The status of the request. | [optional] | +|**links** | [**List<ReturnsSearchResponseReturnsClaimsInnerLinksInner>**](ReturnsSearchResponseReturnsClaimsInnerLinksInner.md) | | [optional] | + + + diff --git a/docs/ReturnsDetailsResponse.md b/docs/ReturnsDetailsResponse.md new file mode 100644 index 00000000..0a9c727b --- /dev/null +++ b/docs/ReturnsDetailsResponse.md @@ -0,0 +1,25 @@ + + +# ReturnsDetailsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**typeOfDetails** | **String** | The type of the details. Return or Claim. | [optional] | +|**rmaClaimId** | **String** | The rmaClaimId claim id. | [optional] | +|**caseRequestNumber** | **String** | A unique return request number. | [optional] | +|**createdOn** | **LocalDate** | The date on which the return request was created. | [optional] | +|**returnReason** | **String** | The reason for the return. | [optional] | +|**referenceNumber** | **String** | The reference number for the return. | [optional] | +|**status** | **String** | The status of the request. | [optional] | +|**returnWarehouseAddress** | **String** | The address of the return warehouse. | [optional] | +|**products** | [**List<ReturnsDetailsResponseProductsInner>**](ReturnsDetailsResponseProductsInner.md) | | [optional] | +|**subTotal** | **BigDecimal** | Sub total amount of the return request. | [optional] | +|**tax** | **BigDecimal** | The tax amount of the return request. | [optional] | +|**additionalFees** | **BigDecimal** | The additional fees for the return request. | [optional] | +|**estimatedTotal** | **BigDecimal** | The total estimated amount for the return request. | [optional] | + + + diff --git a/docs/ReturnsDetailsResponseProductsInner.md b/docs/ReturnsDetailsResponseProductsInner.md new file mode 100644 index 00000000..f694f304 --- /dev/null +++ b/docs/ReturnsDetailsResponseProductsInner.md @@ -0,0 +1,27 @@ + + +# ReturnsDetailsResponseProductsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ingramLineNumber** | **String** | Unique Ingram Micro line number. | [optional] | +|**description** | **String** | The description of the line item product. | [optional] | +|**ingramPartNumber** | **String** | Unique IngramMicro part number. | [optional] | +|**vendorPartNumber** | **String** | The vendor's part number for the line item. | [optional] | +|**upc** | **String** | The UPC code of a product. | [optional] | +|**invoiceDate** | **LocalDate** | The date of the invoice. | [optional] | +|**invoiceNumber** | **String** | Ingram micro Invoice number. | [optional] | +|**customerOrderNumber** | **Integer** | The reseller's order number for reference in their system. | [optional] | +|**requestDetails** | **Integer** | Request details. | [optional] | +|**quantity** | **Integer** | The quantity of the line item. | [optional] | +|**unitPrice** | **BigDecimal** | The unit price of the line item. | [optional] | +|**extendedPrice** | **BigDecimal** | Unit price X quantity for the line item. | [optional] | +|**status** | **String** | The status of the line item. | [optional] | +|**returnBranch** | **Integer** | The code of the return branch. | [optional] | +|**shipFromBranch** | **Integer** | The code of the ship from branch. | [optional] | + + + diff --git a/docs/ReturnsSearchResponse.md b/docs/ReturnsSearchResponse.md new file mode 100644 index 00000000..d7af2ca0 --- /dev/null +++ b/docs/ReturnsSearchResponse.md @@ -0,0 +1,18 @@ + + +# ReturnsSearchResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**recordsFound** | **Integer** | Number of records found. | [optional] | +|**pageSize** | **Integer** | Number of records in a page. | [optional] | +|**pageNumber** | **Integer** | Number of page. | [optional] | +|**returnsClaims** | [**List<ReturnsSearchResponseReturnsClaimsInner>**](ReturnsSearchResponseReturnsClaimsInner.md) | | [optional] | +|**nextPage** | **String** | URL for the next page. | [optional] | +|**previousPage** | **String** | URL for the previous page. | [optional] | + + + diff --git a/docs/ReturnsSearchResponseReturnsClaimsInner.md b/docs/ReturnsSearchResponseReturnsClaimsInner.md new file mode 100644 index 00000000..65b5c677 --- /dev/null +++ b/docs/ReturnsSearchResponseReturnsClaimsInner.md @@ -0,0 +1,23 @@ + + +# ReturnsSearchResponseReturnsClaimsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**returnClaimId** | **String** | A unique return claim Id. | [optional] | +|**caseRequestNumber** | **String** | A unique return request number. | [optional] | +|**createdOn** | **LocalDate** | The date on which the return request was created. | [optional] | +|**type** | **String** | Type of request. | [optional] | +|**returnReason** | **String** | The reason for the return. | [optional] | +|**referenceNumber** | **String** | The reference number for the return. | [optional] | +|**estimatedTotalValue** | **LocalDate** | The estimated total value of the return. | [optional] | +|**credit** | **BigDecimal** | The amount of credit. | [optional] | +|**modifiedOn** | **String** | The date on which the return request was last updated. | [optional] | +|**status** | **String** | The status of the request. | [optional] | +|**links** | [**List<ReturnsSearchResponseReturnsClaimsInnerLinksInner>**](ReturnsSearchResponseReturnsClaimsInnerLinksInner.md) | | [optional] | + + + diff --git a/docs/ReturnsSearchResponseReturnsClaimsInnerLinksInner.md b/docs/ReturnsSearchResponseReturnsClaimsInnerLinksInner.md new file mode 100644 index 00000000..c22eb31d --- /dev/null +++ b/docs/ReturnsSearchResponseReturnsClaimsInnerLinksInner.md @@ -0,0 +1,15 @@ + + +# ReturnsSearchResponseReturnsClaimsInnerLinksInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**topic** | **String** | Provides the details of the return. | [optional] | +|**href** | **String** | The URL endpoint for accessing the relevant data. | [optional] | +|**type** | **String** | The type of call that can be made to the href link (GET, POST, Etc.). | [optional] | + + + diff --git a/docs/StockUpdateApi.md b/docs/StockUpdateApi.md new file mode 100644 index 00000000..84345a8d --- /dev/null +++ b/docs/StockUpdateApi.md @@ -0,0 +1,78 @@ +# StockUpdateApi + +All URIs are relative to *https://api.ingrammicro.com:443/sandbox* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**resellersV1WebhooksAvailabilityupdatePost**](StockUpdateApi.md#resellersV1WebhooksAvailabilityupdatePost) | **POST** /resellers/v1/webhooks/availabilityupdate | Stock Update | + + + +# **resellersV1WebhooksAvailabilityupdatePost** +> resellersV1WebhooksAvailabilityupdatePost(targeturl, xHubSignature, availabilityAsyncNotificationRequest) + +Stock Update + +### Example +```java +// Import classes: +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.Configuration; +import xiresellers.client.auth.*; +import xiresellers.client.models.*; +import xiresellers.client.api.StockUpdateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.ingrammicro.com:443/sandbox"); + + // Configure OAuth2 access token for authorization: application + OAuth application = (OAuth) defaultClient.getAuthentication("application"); + application.setAccessToken("YOUR ACCESS TOKEN"); + + StockUpdateApi apiInstance = new StockUpdateApi(defaultClient); + String targeturl = "https://59a2dc5368073ab42fd9a92e210a9fdb.m.pipedream.net/"; // String | The webhook url where the request needs to sent. + String xHubSignature = "3LeaTfLE5FLj1FcYflwdwFosH4ADHmMbds6thtirGC3e9lEkF9/1pt4T2fQQGlxf40EznDBER0b60M75K6ZW0A=="; // String | Ingram Micro creates a signature token by use of a secret key + Event ID. The algorithm to generate the secret ley is given at link https://developer.ingrammicro.com/reseller/article/how-use-webhook-secret-key. Use the event Id in the below sample along with your secret key to generate the key. Alternatively, to send try this out, use a random text to see how it works. + AvailabilityAsyncNotificationRequest availabilityAsyncNotificationRequest = new AvailabilityAsyncNotificationRequest(); // AvailabilityAsyncNotificationRequest | + try { + apiInstance.resellersV1WebhooksAvailabilityupdatePost(targeturl, xHubSignature, availabilityAsyncNotificationRequest); + } catch (ApiException e) { + System.err.println("Exception when calling StockUpdateApi#resellersV1WebhooksAvailabilityupdatePost"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **targeturl** | **String**| The webhook url where the request needs to sent. | | +| **xHubSignature** | **String**| Ingram Micro creates a signature token by use of a secret key + Event ID. The algorithm to generate the secret ley is given at link https://developer.ingrammicro.com/reseller/article/how-use-webhook-secret-key. Use the event Id in the below sample along with your secret key to generate the key. Alternatively, to send try this out, use a random text to see how it works. | | +| **availabilityAsyncNotificationRequest** | [**AvailabilityAsyncNotificationRequest**](AvailabilityAsyncNotificationRequest.md)| | | + +### Return type + +null (empty response body) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **500** | Internal Server Error | - | + diff --git a/docs/ValidateQuoteResponse.md b/docs/ValidateQuoteResponse.md new file mode 100644 index 00000000..8d7ca3ab --- /dev/null +++ b/docs/ValidateQuoteResponse.md @@ -0,0 +1,16 @@ + + +# ValidateQuoteResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quoteNumber** | **String** | A unique identifier generated by Ingram Micro's CRM specific to each quote. | [optional] | +|**vendorName** | **String** | The name of the vendor. | [optional] | +|**vmfAdditionalAttributes** | [**List<ValidateQuoteResponseVmfAdditionalAttributesInner>**](ValidateQuoteResponseVmfAdditionalAttributesInner.md) | The object containing the list of fields required at a header level by the vendor. | [optional] | +|**lines** | [**List<ValidateQuoteResponseLinesInner>**](ValidateQuoteResponseLinesInner.md) | The object containing the lines from the quote. | [optional] | + + + diff --git a/docs/ValidateQuoteResponseLinesInner.md b/docs/ValidateQuoteResponseLinesInner.md new file mode 100644 index 00000000..8235fcf5 --- /dev/null +++ b/docs/ValidateQuoteResponseLinesInner.md @@ -0,0 +1,16 @@ + + +# ValidateQuoteResponseLinesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**customerLineNumber** | **String** | The reseller's line item number for reference in their system. | [optional] | +|**ingramPartNumber** | **String** | Unique Ingram Micro part number. | [optional] | +|**quantity** | **String** | The quantity of the line item. | [optional] | +|**vmfAdditionalAttributesLines** | [**List<ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner>**](ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner.md) | The object containing the list of fields required at a line level by the vendor. | [optional] | + + + diff --git a/docs/ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner.md b/docs/ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner.md new file mode 100644 index 00000000..d9c9ca4b --- /dev/null +++ b/docs/ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner.md @@ -0,0 +1,15 @@ + + +# ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeName** | **String** | The name of the line level field. | [optional] | +|**attributeValue** | **String** | The value of the line level field. | [optional] | +|**attributeDescription** | **String** | The description of the line level field. | [optional] | + + + diff --git a/docs/ValidateQuoteResponseVmfAdditionalAttributesInner.md b/docs/ValidateQuoteResponseVmfAdditionalAttributesInner.md new file mode 100644 index 00000000..1ca42492 --- /dev/null +++ b/docs/ValidateQuoteResponseVmfAdditionalAttributesInner.md @@ -0,0 +1,15 @@ + + +# ValidateQuoteResponseVmfAdditionalAttributesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributeName** | **String** | The name of the header level field. | [optional] | +|**attributeValue** | **String** | The value of the header level field. | [optional] | +|**attributeDescription** | **String** | The description of the header level field. | [optional] | + + + diff --git a/docs/WarehouseListType.md b/docs/WarehouseListType.md new file mode 100644 index 00000000..fa0c6208 --- /dev/null +++ b/docs/WarehouseListType.md @@ -0,0 +1,18 @@ + + +# WarehouseListType + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**warehouseid** | **String** | | [optional] | +|**warehousedescription** | **String** | City of the Ingram Micro warehouse location | [optional] | +|**availablequantity** | **Integer** | On hand available quantity | [optional] | +|**onorderquantity** | **Integer** | On Order quantity | [optional] | +|**onholdquantity** | **Integer** | On hold quantity | [optional] | +|**etadate** | **String** | | [optional] | + + + diff --git a/git_push.sh b/git_push.sh new file mode 100644 index 00000000..f53a75d4 --- /dev/null +++ b/git_push.sh @@ -0,0 +1,57 @@ +#!/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="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + 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/gradle.properties b/gradle.properties new file mode 100644 index 00000000..a3408578 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,6 @@ +# This file is automatically generated by OpenAPI Generator (https://github.com/openAPITools/openapi-generator). +# To include other gradle properties as part of the code generation process, please use the `gradleProperties` option. +# +# Gradle properties reference: https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties +# For example, uncomment below to build for Android +#target = android diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000..7454180f Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..ffed3a25 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100644 index 00000000..005bcde0 --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 00000000..6a68175e --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS=-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/pom.xml b/pom.xml new file mode 100644 index 00000000..ae52a0aa --- /dev/null +++ b/pom.xml @@ -0,0 +1,349 @@ + + 4.0.0 + xi.sdk.resellers + xi.sdk.resellers + jar + xi.sdk.resellers + 6.0 + https://github.com/openapitools/openapi-generator + OpenAPI Java + + scm:git:git@github.com:openapitools/openapi-generator.git + scm:git:git@github.com:openapitools/openapi-generator.git + https://github.com/openapitools/openapi-generator + + + + + Unlicense + http://unlicense.org + repo + + + + + + OpenAPI-Generator Contributors + team@openapitools.org + OpenAPITools.org + http://openapitools.org + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + true + 128m + 512m + + -Xlint:all + -J-Xss4m + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.1.0 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.2 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + 10 + + + + + org.junit.jupiter + junit-jupiter-engine + ${junit-version} + + + + + maven-dependency-plugin + 3.3.0 + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.3.0 + + + + test-jar + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.3.0 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.4.1 + + + attach-javadocs + + jar + + + + + none + + + http.response.details + a + Http Response Details: + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.2.1 + + + attach-sources + + jar-no-fork + + + + + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless.version} + + + + + + + .gitignore + + + + + + true + 4 + + + + + + + + + + 1.8 + + true + + + + + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.0.1 + + + sign-artifacts + verify + + sign + + + + + + + + + + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.squareup.okhttp3 + okhttp + ${okhttp-version} + + + com.squareup.okhttp3 + logging-interceptor + ${okhttp-version} + + + com.google.code.gson + gson + ${gson-version} + + + io.gsonfire + gson-fire + ${gson-fire-version} + + + org.apache.oltu.oauth2 + org.apache.oltu.oauth2.client + 1.0.2 + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + + javax.ws.rs + jsr311-api + ${jsr311-api-version} + + + javax.ws.rs + javax.ws.rs-api + ${javax.ws.rs-api-version} + + + + org.junit.jupiter + junit-jupiter-engine + ${junit-version} + test + + + org.junit.platform + junit-platform-runner + ${junit-platform-runner.version} + test + + + + 1.8 + ${java.version} + ${java.version} + 1.9.0 + 4.11.0 + 2.10.1 + 3.13.0 + 0.2.6 + 1.3.5 + 5.10.0 + 1.10.0 + 2.1.1 + 1.1.1 + UTF-8 + 2.27.2 + + diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 00000000..9eb46d63 --- /dev/null +++ b/settings.gradle @@ -0,0 +1 @@ +rootProject.name = "xi.sdk.resellers" \ No newline at end of file diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml new file mode 100644 index 00000000..286265ab --- /dev/null +++ b/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/src/main/java/xiresellers/client/ApiCallback.java b/src/main/java/xiresellers/client/ApiCallback.java new file mode 100644 index 00000000..a4fad262 --- /dev/null +++ b/src/main/java/xiresellers/client/ApiCallback.java @@ -0,0 +1,62 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client; + +import java.io.IOException; + +import java.util.Map; +import java.util.List; + +/** + * Callback for asynchronous API call. + * + * @param The return type + */ +public interface ApiCallback { + /** + * This is called when the API call fails. + * + * @param e The exception causing the failure + * @param statusCode Status code of the response if available, otherwise it would be 0 + * @param responseHeaders Headers of the response if available, otherwise it would be null + */ + void onFailure(ApiException e, int statusCode, Map> responseHeaders); + + /** + * This is called when the API call succeeded. + * + * @param result The result deserialized from response + * @param statusCode Status code of the response + * @param responseHeaders Headers of the response + */ + void onSuccess(T result, int statusCode, Map> responseHeaders); + + /** + * This is called when the API upload processing. + * + * @param bytesWritten bytes Written + * @param contentLength content length of request body + * @param done write end + */ + void onUploadProgress(long bytesWritten, long contentLength, boolean done); + + /** + * This is called when the API download processing. + * + * @param bytesRead bytes Read + * @param contentLength content length of the response + * @param done Read end + */ + void onDownloadProgress(long bytesRead, long contentLength, boolean done); +} diff --git a/src/main/java/xiresellers/client/ApiClient.java b/src/main/java/xiresellers/client/ApiClient.java new file mode 100644 index 00000000..1aff2aac --- /dev/null +++ b/src/main/java/xiresellers/client/ApiClient.java @@ -0,0 +1,1644 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client; + +import okhttp3.*; +import okhttp3.internal.http.HttpMethod; +import okhttp3.internal.tls.OkHostnameVerifier; +import okhttp3.logging.HttpLoggingInterceptor; +import okhttp3.logging.HttpLoggingInterceptor.Level; +import okio.Buffer; +import okio.BufferedSink; +import okio.Okio; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder; +import org.apache.oltu.oauth2.common.message.types.GrantType; + +import javax.net.ssl.*; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; +import java.lang.reflect.Type; +import java.net.URI; +import java.net.URLConnection; +import java.net.URLEncoder; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.security.GeneralSecurityException; +import java.security.KeyStore; +import java.security.SecureRandom; +import java.security.cert.Certificate; +import java.security.cert.CertificateException; +import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; +import java.text.DateFormat; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.*; +import java.util.Map.Entry; +import java.util.concurrent.TimeUnit; +import java.util.function.Supplier; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import xiresellers.client.auth.Authentication; +import xiresellers.client.auth.HttpBasicAuth; +import xiresellers.client.auth.HttpBearerAuth; +import xiresellers.client.auth.ApiKeyAuth; +import xiresellers.client.auth.OAuth; +import xiresellers.client.auth.RetryingOAuth; +import xiresellers.client.auth.OAuthFlow; + +/** + *

    ApiClient class.

    + */ +public class ApiClient { + + private String basePath = "https://api.ingrammicro.com:443/sandbox"; + protected List servers = new ArrayList(Arrays.asList( + new ServerConfiguration( + "https://api.ingrammicro.com:443/sandbox", + "Sandbox", + new HashMap() + ) + )); + protected Integer serverIndex = 0; + protected Map serverVariables = null; + private boolean debugging = false; + private Map defaultHeaderMap = new HashMap(); + private Map defaultCookieMap = new HashMap(); + private String tempFolderPath = null; + + private Map authentications; + + private DateFormat dateFormat; + private DateFormat datetimeFormat; + private boolean lenientDatetimeFormat; + private int dateLength; + + private InputStream sslCaCert; + private boolean verifyingSsl; + private KeyManager[] keyManagers; + + private OkHttpClient httpClient; + private JSON json; + + private HttpLoggingInterceptor loggingInterceptor; + + /** + * Basic constructor for ApiClient + */ + public ApiClient() { + init(); + initHttpClient(); + + // Setup authentications (key: authentication name, value: authentication). + authentications.put("application", new OAuth()); + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + /** + * Basic constructor with custom OkHttpClient + * + * @param client a {@link okhttp3.OkHttpClient} object + */ + public ApiClient(OkHttpClient client) { + init(); + + httpClient = client; + + // Setup authentications (key: authentication name, value: authentication). + authentications.put("application", new OAuth()); + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + /** + * Constructor for ApiClient to support access token retry on 401/403 configured with client ID + * + * @param clientId client ID + */ + public ApiClient(String clientId) { + this(clientId, null, null); + } + + /** + * Constructor for ApiClient to support access token retry on 401/403 configured with client ID and additional parameters + * + * @param clientId client ID + * @param parameters a {@link java.util.Map} of parameters + */ + public ApiClient(String clientId, Map parameters) { + this(clientId, null, parameters); + } + + /** + * Constructor for ApiClient to support access token retry on 401/403 configured with client ID, secret, and additional parameters + * + * @param clientId client ID + * @param clientSecret client secret + * @param parameters a {@link java.util.Map} of parameters + */ + public ApiClient(String clientId, String clientSecret, Map parameters) { + this(null, clientId, clientSecret, parameters); + } + + /** + * Constructor for ApiClient to support access token retry on 401/403 configured with base path, client ID, secret, and additional parameters + * + * @param basePath base path + * @param clientId client ID + * @param clientSecret client secret + * @param parameters a {@link java.util.Map} of parameters + */ + public ApiClient(String basePath, String clientId, String clientSecret, Map parameters) { + init(); + if (basePath != null) { + this.basePath = basePath; + } + + String tokenUrl = "https://api.ingrammicro.com:443/oauth/oauth30/token"; + if (!"".equals(tokenUrl) && !URI.create(tokenUrl).isAbsolute()) { + URI uri = URI.create(getBasePath()); + tokenUrl = uri.getScheme() + ":" + + (uri.getAuthority() != null ? "//" + uri.getAuthority() : "") + + tokenUrl; + if (!URI.create(tokenUrl).isAbsolute()) { + throw new IllegalArgumentException("OAuth2 token URL must be an absolute URL"); + } + } + RetryingOAuth retryingOAuth = new RetryingOAuth(tokenUrl, clientId, OAuthFlow.APPLICATION, clientSecret, parameters); + authentications.put( + "application", + retryingOAuth + ); + initHttpClient(Collections.singletonList(retryingOAuth)); + // Setup authentications (key: authentication name, value: authentication). + + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + private void initHttpClient() { + initHttpClient(Collections.emptyList()); + } + + private void initHttpClient(List interceptors) { + OkHttpClient.Builder builder = new OkHttpClient.Builder(); + builder.addNetworkInterceptor(getProgressInterceptor()); + for (Interceptor interceptor: interceptors) { + builder.addInterceptor(interceptor); + } + + httpClient = builder.build(); + } + + private void init() { + verifyingSsl = true; + + json = new JSON(); + + // Set default User-Agent. + setUserAgent("OpenAPI-Generator/6.0/java"); + + authentications = new HashMap(); + } + + /** + * Get base path + * + * @return Base path + */ + public String getBasePath() { + return basePath; + } + + /** + * Set base path + * + * @param basePath Base path of the URL (e.g https://api.ingrammicro.com:443/sandbox + * @return An instance of OkHttpClient + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + this.serverIndex = null; + return this; + } + + public List getServers() { + return servers; + } + + public ApiClient setServers(List servers) { + this.servers = servers; + return this; + } + + public Integer getServerIndex() { + return serverIndex; + } + + public ApiClient setServerIndex(Integer serverIndex) { + this.serverIndex = serverIndex; + return this; + } + + public Map getServerVariables() { + return serverVariables; + } + + public ApiClient setServerVariables(Map serverVariables) { + this.serverVariables = serverVariables; + return this; + } + + /** + * Get HTTP client + * + * @return An instance of OkHttpClient + */ + public OkHttpClient getHttpClient() { + return httpClient; + } + + /** + * Set HTTP client, which must never be null. + * + * @param newHttpClient An instance of OkHttpClient + * @return Api Client + * @throws java.lang.NullPointerException when newHttpClient is null + */ + public ApiClient setHttpClient(OkHttpClient newHttpClient) { + this.httpClient = Objects.requireNonNull(newHttpClient, "HttpClient must not be null!"); + return this; + } + + /** + * Get JSON + * + * @return JSON object + */ + public JSON getJSON() { + return json; + } + + /** + * Set JSON + * + * @param json JSON object + * @return Api client + */ + public ApiClient setJSON(JSON json) { + this.json = json; + return this; + } + + /** + * True if isVerifyingSsl flag is on + * + * @return True if isVerifySsl flag is on + */ + public boolean isVerifyingSsl() { + return verifyingSsl; + } + + /** + * Configure whether to verify certificate and hostname when making https requests. + * Default to true. + * NOTE: Do NOT set to false in production code, otherwise you would face multiple types of cryptographic attacks. + * + * @param verifyingSsl True to verify TLS/SSL connection + * @return ApiClient + */ + public ApiClient setVerifyingSsl(boolean verifyingSsl) { + this.verifyingSsl = verifyingSsl; + applySslSettings(); + return this; + } + + /** + * Get SSL CA cert. + * + * @return Input stream to the SSL CA cert + */ + public InputStream getSslCaCert() { + return sslCaCert; + } + + /** + * Configure the CA certificate to be trusted when making https requests. + * Use null to reset to default. + * + * @param sslCaCert input stream for SSL CA cert + * @return ApiClient + */ + public ApiClient setSslCaCert(InputStream sslCaCert) { + this.sslCaCert = sslCaCert; + applySslSettings(); + return this; + } + + /** + *

    Getter for the field keyManagers.

    + * + * @return an array of {@link javax.net.ssl.KeyManager} objects + */ + public KeyManager[] getKeyManagers() { + return keyManagers; + } + + /** + * Configure client keys to use for authorization in an SSL session. + * Use null to reset to default. + * + * @param managers The KeyManagers to use + * @return ApiClient + */ + public ApiClient setKeyManagers(KeyManager[] managers) { + this.keyManagers = managers; + applySslSettings(); + return this; + } + + /** + *

    Getter for the field dateFormat.

    + * + * @return a {@link java.text.DateFormat} object + */ + public DateFormat getDateFormat() { + return dateFormat; + } + + /** + *

    Setter for the field dateFormat.

    + * + * @param dateFormat a {@link java.text.DateFormat} object + * @return a {@link xiresellers.client.ApiClient} object + */ + public ApiClient setDateFormat(DateFormat dateFormat) { + JSON.setDateFormat(dateFormat); + return this; + } + + /** + *

    Set SqlDateFormat.

    + * + * @param dateFormat a {@link java.text.DateFormat} object + * @return a {@link xiresellers.client.ApiClient} object + */ + public ApiClient setSqlDateFormat(DateFormat dateFormat) { + JSON.setSqlDateFormat(dateFormat); + return this; + } + + /** + *

    Set OffsetDateTimeFormat.

    + * + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object + * @return a {@link xiresellers.client.ApiClient} object + */ + public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + JSON.setOffsetDateTimeFormat(dateFormat); + return this; + } + + /** + *

    Set LocalDateFormat.

    + * + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object + * @return a {@link xiresellers.client.ApiClient} object + */ + public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { + JSON.setLocalDateFormat(dateFormat); + return this; + } + + /** + *

    Set LenientOnJson.

    + * + * @param lenientOnJson a boolean + * @return a {@link xiresellers.client.ApiClient} object + */ + public ApiClient setLenientOnJson(boolean lenientOnJson) { + JSON.setLenientOnJson(lenientOnJson); + return this; + } + + /** + * Get authentications (key: authentication name, value: authentication). + * + * @return Map of authentication objects + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + + /** + * Helper method to set username for the first HTTP basic authentication. + * + * @param username Username + */ + public void setUsername(String username) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setUsername(username); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set password for the first HTTP basic authentication. + * + * @param password Password + */ + public void setPassword(String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setPassword(password); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set API key value for the first API key authentication. + * + * @param apiKey API key + */ + public void setApiKey(String apiKey) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKey(apiKey); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set API key prefix for the first API key authentication. + * + * @param apiKeyPrefix API key prefix + */ + public void setApiKeyPrefix(String apiKeyPrefix) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set access token for the first OAuth2 authentication. + * + * @param accessToken Access token + */ + public void setAccessToken(String accessToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setAccessToken(accessToken); + return; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration(String accessKey, String secretKey, String region, String service) { + throw new RuntimeException("No AWS4 authentication configured!"); + } + + /** + * Set the User-Agent header's value (by adding to the default header map). + * + * @param userAgent HTTP request's user agent + * @return ApiClient + */ + public ApiClient setUserAgent(String userAgent) { + addDefaultHeader("User-Agent", userAgent); + return this; + } + + /** + * Add a default header. + * + * @param key The header's key + * @param value The header's value + * @return ApiClient + */ + public ApiClient addDefaultHeader(String key, String value) { + defaultHeaderMap.put(key, value); + return this; + } + + /** + * Add a default cookie. + * + * @param key The cookie's key + * @param value The cookie's value + * @return ApiClient + */ + public ApiClient addDefaultCookie(String key, String value) { + defaultCookieMap.put(key, value); + return this; + } + + /** + * Check that whether debugging is enabled for this API client. + * + * @return True if debugging is enabled, false otherwise. + */ + public boolean isDebugging() { + return debugging; + } + + /** + * Enable/disable debugging for this API client. + * + * @param debugging To enable (true) or disable (false) debugging + * @return ApiClient + */ + public ApiClient setDebugging(boolean debugging) { + if (debugging != this.debugging) { + if (debugging) { + loggingInterceptor = new HttpLoggingInterceptor(); + loggingInterceptor.setLevel(Level.BODY); + httpClient = httpClient.newBuilder().addInterceptor(loggingInterceptor).build(); + } else { + final OkHttpClient.Builder builder = httpClient.newBuilder(); + builder.interceptors().remove(loggingInterceptor); + httpClient = builder.build(); + loggingInterceptor = null; + } + } + this.debugging = debugging; + return this; + } + + /** + * The path of temporary folder used to store downloaded files from endpoints + * with file response. The default value is null, i.e. using + * the system's default temporary folder. + * + * @see createTempFile + * @return Temporary folder path + */ + public String getTempFolderPath() { + return tempFolderPath; + } + + /** + * Set the temporary folder path (for downloading files) + * + * @param tempFolderPath Temporary folder path + * @return ApiClient + */ + public ApiClient setTempFolderPath(String tempFolderPath) { + this.tempFolderPath = tempFolderPath; + return this; + } + + /** + * Get connection timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public int getConnectTimeout() { + return httpClient.connectTimeoutMillis(); + } + + /** + * Sets the connect timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link java.lang.Integer#MAX_VALUE}. + * + * @param connectionTimeout connection timeout in milliseconds + * @return Api client + */ + public ApiClient setConnectTimeout(int connectionTimeout) { + httpClient = httpClient.newBuilder().connectTimeout(connectionTimeout, TimeUnit.MILLISECONDS).build(); + return this; + } + + /** + * Get read timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public int getReadTimeout() { + return httpClient.readTimeoutMillis(); + } + + /** + * Sets the read timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link java.lang.Integer#MAX_VALUE}. + * + * @param readTimeout read timeout in milliseconds + * @return Api client + */ + public ApiClient setReadTimeout(int readTimeout) { + httpClient = httpClient.newBuilder().readTimeout(readTimeout, TimeUnit.MILLISECONDS).build(); + return this; + } + + /** + * Get write timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public int getWriteTimeout() { + return httpClient.writeTimeoutMillis(); + } + + /** + * Sets the write timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link java.lang.Integer#MAX_VALUE}. + * + * @param writeTimeout connection timeout in milliseconds + * @return Api client + */ + public ApiClient setWriteTimeout(int writeTimeout) { + httpClient = httpClient.newBuilder().writeTimeout(writeTimeout, TimeUnit.MILLISECONDS).build(); + return this; + } + + /** + * Helper method to configure the token endpoint of the first oauth found in the apiAuthorizations (there should be only one) + * + * @return Token request builder + */ + public TokenRequestBuilder getTokenEndPoint() { + for (Authentication apiAuth : authentications.values()) { + if (apiAuth instanceof RetryingOAuth) { + RetryingOAuth retryingOAuth = (RetryingOAuth) apiAuth; + return retryingOAuth.getTokenRequestBuilder(); + } + } + return null; + } + + /** + * Format the given parameter object into string. + * + * @param param Parameter + * @return String representation of the parameter + */ + public String parameterToString(Object param) { + if (param == null) { + return ""; + } else if (param instanceof Date || param instanceof OffsetDateTime || param instanceof LocalDate) { + //Serialize to json string and remove the " enclosing characters + String jsonStr = JSON.serialize(param); + return jsonStr.substring(1, jsonStr.length() - 1); + } else if (param instanceof Collection) { + StringBuilder b = new StringBuilder(); + for (Object o : (Collection) param) { + if (b.length() > 0) { + b.append(","); + } + b.append(o); + } + return b.toString(); + } else { + return String.valueOf(param); + } + } + + /** + * Formats the specified query parameter to a list containing a single {@code Pair} object. + * + * Note that {@code value} must not be a collection. + * + * @param name The name of the parameter. + * @param value The value of the parameter. + * @return A list containing a single {@code Pair} object. + */ + public List parameterToPair(String name, Object value) { + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null || value instanceof Collection) { + return params; + } + + params.add(new Pair(name, parameterToString(value))); + return params; + } + + /** + * Formats the specified collection query parameters to a list of {@code Pair} objects. + * + * Note that the values of each of the returned Pair objects are percent-encoded. + * + * @param collectionFormat The collection format of the parameter. + * @param name The name of the parameter. + * @param value The value of the parameter. + * @return A list of {@code Pair} objects. + */ + public List parameterToPairs(String collectionFormat, String name, Collection value) { + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null || value.isEmpty()) { + return params; + } + + // create the params based on the collection format + if ("multi".equals(collectionFormat)) { + for (Object item : value) { + params.add(new Pair(name, escapeString(parameterToString(item)))); + } + return params; + } + + // collectionFormat is assumed to be "csv" by default + String delimiter = ","; + + // escape all delimiters except commas, which are URI reserved + // characters + if ("ssv".equals(collectionFormat)) { + delimiter = escapeString(" "); + } else if ("tsv".equals(collectionFormat)) { + delimiter = escapeString("\t"); + } else if ("pipes".equals(collectionFormat)) { + delimiter = escapeString("|"); + } + + StringBuilder sb = new StringBuilder(); + for (Object item : value) { + sb.append(delimiter); + sb.append(escapeString(parameterToString(item))); + } + + params.add(new Pair(name, sb.substring(delimiter.length()))); + + return params; + } + + /** + * Formats the specified collection path parameter to a string value. + * + * @param collectionFormat The collection format of the parameter. + * @param value The value of the parameter. + * @return String representation of the parameter + */ + public String collectionPathParameterToString(String collectionFormat, Collection value) { + // create the value based on the collection format + if ("multi".equals(collectionFormat)) { + // not valid for path params + return parameterToString(value); + } + + // collectionFormat is assumed to be "csv" by default + String delimiter = ","; + + if ("ssv".equals(collectionFormat)) { + delimiter = " "; + } else if ("tsv".equals(collectionFormat)) { + delimiter = "\t"; + } else if ("pipes".equals(collectionFormat)) { + delimiter = "|"; + } + + StringBuilder sb = new StringBuilder() ; + for (Object item : value) { + sb.append(delimiter); + sb.append(parameterToString(item)); + } + + return sb.substring(delimiter.length()); + } + + /** + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif + * + * @param filename The filename to be sanitized + * @return The sanitized filename + */ + public String sanitizeFilename(String filename) { + return filename.replaceAll(".*[/\\\\]", ""); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * "* / *" is also default to JSON + * @param mime MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public boolean isJsonMime(String mime) { + String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"; + return mime != null && (mime.matches(jsonMime) || mime.equals("*/*")); + } + + /** + * 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) + * + * @param accepts The accepts array to select from + * @return The Accept header to use. If the given array is empty, + * null will be returned (not to set the Accept header explicitly). + */ + public String selectHeaderAccept(String[] accepts) { + if (accepts.length == 0) { + return null; + } + for (String accept : accepts) { + if (isJsonMime(accept)) { + return accept; + } + } + return StringUtil.join(accepts, ","); + } + + /** + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. + * + * @param contentTypes The Content-Type array to select from + * @return The Content-Type header to use. If the given array is empty, + * returns null. If it matches "any", JSON will be used. + */ + public String selectHeaderContentType(String[] contentTypes) { + if (contentTypes.length == 0) { + return null; + } + + if (contentTypes[0].equals("*/*")) { + return "application/json"; + } + + for (String contentType : contentTypes) { + if (isJsonMime(contentType)) { + return contentType; + } + } + + return contentTypes[0]; + } + + /** + * Escape the given string to be used as URL query value. + * + * @param str String to be escaped + * @return Escaped string + */ + public String escapeString(String str) { + try { + return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); + } catch (UnsupportedEncodingException e) { + return str; + } + } + + /** + * Deserialize response body to Java object, according to the return type and + * the Content-Type response header. + * + * @param Type + * @param response HTTP response + * @param returnType The type of the Java object + * @return The deserialized Java object + * @throws xiresellers.client.ApiException If fail to deserialize response body, i.e. cannot read response body + * or the Content-Type of the response is not supported. + */ + @SuppressWarnings("unchecked") + public T deserialize(Response response, Type returnType) throws ApiException { + if (response == null || returnType == null) { + return null; + } + + if ("byte[]".equals(returnType.toString())) { + // Handle binary response (byte array). + try { + return (T) response.body().bytes(); + } catch (IOException e) { + throw new ApiException(e); + } + } else if (returnType.equals(File.class)) { + // Handle file downloading. + return (T) downloadFileFromResponse(response); + } + + String respBody; + try { + if (response.body() != null) + respBody = response.body().string(); + else + respBody = null; + } catch (IOException e) { + throw new ApiException(e); + } + + if (respBody == null || "".equals(respBody)) { + return null; + } + + String contentType = response.headers().get("Content-Type"); + if (contentType == null) { + // ensuring a default content type + contentType = "application/json"; + } + if (isJsonMime(contentType)) { + return JSON.deserialize(respBody, returnType); + } else if (returnType.equals(String.class)) { + // Expecting string, return the raw response body. + return (T) respBody; + } else { + throw new ApiException( + "Content type \"" + contentType + "\" is not supported for type: " + returnType, + response.code(), + response.headers().toMultimap(), + respBody); + } + } + + /** + * Serialize the given Java object into request body according to the object's + * class and the request Content-Type. + * + * @param obj The Java object + * @param contentType The request Content-Type + * @return The serialized request body + * @throws xiresellers.client.ApiException If fail to serialize the given object + */ + public RequestBody serialize(Object obj, String contentType) throws ApiException { + if (obj instanceof byte[]) { + // Binary (byte array) body parameter support. + return RequestBody.create((byte[]) obj, MediaType.parse(contentType)); + } else if (obj instanceof File) { + // File body parameter support. + return RequestBody.create((File) obj, MediaType.parse(contentType)); + } else if ("text/plain".equals(contentType) && obj instanceof String) { + return RequestBody.create((String) obj, MediaType.parse(contentType)); + } else if (isJsonMime(contentType)) { + String content; + if (obj != null) { + content = JSON.serialize(obj); + } else { + content = null; + } + return RequestBody.create(content, MediaType.parse(contentType)); + } else if (obj instanceof String) { + return RequestBody.create((String) obj, MediaType.parse(contentType)); + } else { + throw new ApiException("Content type \"" + contentType + "\" is not supported"); + } + } + + /** + * Download file from the given response. + * + * @param response An instance of the Response object + * @throws xiresellers.client.ApiException If fail to read file content from response and write to disk + * @return Downloaded file + */ + public File downloadFileFromResponse(Response response) throws ApiException { + try { + File file = prepareDownloadFile(response); + BufferedSink sink = Okio.buffer(Okio.sink(file)); + sink.writeAll(response.body().source()); + sink.close(); + return file; + } catch (IOException e) { + throw new ApiException(e); + } + } + + /** + * Prepare file for download + * + * @param response An instance of the Response object + * @return Prepared file for the download + * @throws java.io.IOException If fail to prepare file for download + */ + public File prepareDownloadFile(Response response) throws IOException { + String filename = null; + String contentDisposition = response.header("Content-Disposition"); + if (contentDisposition != null && !"".equals(contentDisposition)) { + // Get filename from the Content-Disposition header. + Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); + Matcher matcher = pattern.matcher(contentDisposition); + if (matcher.find()) { + filename = sanitizeFilename(matcher.group(1)); + } + } + + String prefix = null; + String suffix = null; + if (filename == null) { + prefix = "download-"; + suffix = ""; + } else { + int pos = filename.lastIndexOf("."); + if (pos == -1) { + prefix = filename + "-"; + } else { + prefix = filename.substring(0, pos) + "-"; + suffix = filename.substring(pos); + } + // Files.createTempFile requires the prefix to be at least three characters long + if (prefix.length() < 3) + prefix = "download-"; + } + + if (tempFolderPath == null) + return Files.createTempFile(prefix, suffix).toFile(); + else + return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); + } + + /** + * {@link #execute(Call, Type)} + * + * @param Type + * @param call An instance of the Call object + * @return ApiResponse<T> + * @throws xiresellers.client.ApiException If fail to execute the call + */ + public ApiResponse execute(Call call) throws ApiException { + return execute(call, null); + } + + /** + * Execute HTTP call and deserialize the HTTP response body into the given return type. + * + * @param returnType The return type used to deserialize HTTP response body + * @param The return type corresponding to (same with) returnType + * @param call Call + * @return ApiResponse object containing response status, headers and + * data, which is a Java object deserialized from response body and would be null + * when returnType is null. + * @throws xiresellers.client.ApiException If fail to execute the call + */ + public ApiResponse execute(Call call, Type returnType) throws ApiException { + try { + Response response = call.execute(); + T data = handleResponse(response, returnType); + return new ApiResponse(response.code(), response.headers().toMultimap(), data); + } catch (IOException e) { + throw new ApiException(e); + } + } + + /** + * {@link #executeAsync(Call, Type, ApiCallback)} + * + * @param Type + * @param call An instance of the Call object + * @param callback ApiCallback<T> + */ + public void executeAsync(Call call, ApiCallback callback) { + executeAsync(call, null, callback); + } + + /** + * Execute HTTP call asynchronously. + * + * @param Type + * @param call The callback to be executed when the API call finishes + * @param returnType Return type + * @param callback ApiCallback + * @see #execute(Call, Type) + */ + @SuppressWarnings("unchecked") + public void executeAsync(Call call, final Type returnType, final ApiCallback callback) { + call.enqueue(new Callback() { + @Override + public void onFailure(Call call, IOException e) { + callback.onFailure(new ApiException(e), 0, null); + } + + @Override + public void onResponse(Call call, Response response) throws IOException { + T result; + try { + result = (T) handleResponse(response, returnType); + } catch (ApiException e) { + callback.onFailure(e, response.code(), response.headers().toMultimap()); + return; + } catch (Exception e) { + callback.onFailure(new ApiException(e), response.code(), response.headers().toMultimap()); + return; + } + callback.onSuccess(result, response.code(), response.headers().toMultimap()); + } + }); + } + + /** + * Handle the given response, return the deserialized object when the response is successful. + * + * @param Type + * @param response Response + * @param returnType Return type + * @return Type + * @throws xiresellers.client.ApiException If the response has an unsuccessful status code or + * fail to deserialize the response body + */ + public T handleResponse(Response response, Type returnType) throws ApiException { + if (response.isSuccessful()) { + if (returnType == null || response.code() == 204) { + // returning null if the returnType is not defined, + // or the status code is 204 (No Content) + if (response.body() != null) { + try { + response.body().close(); + } catch (Exception e) { + throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); + } + } + return null; + } else { + return deserialize(response, returnType); + } + } else { + String respBody = null; + if (response.body() != null) { + try { + respBody = response.body().string(); + } catch (IOException e) { + throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); + } + } + throw new ApiException(response.message(), response.code(), response.headers().toMultimap(), respBody); + } + } + + /** + * Build HTTP call with the given options. + * + * @param baseUrl The base URL + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param cookieParams The cookie parameters + * @param formParams The form parameters + * @param authNames The authentications to apply + * @param callback Callback for upload/download progress + * @return The HTTP call + * @throws xiresellers.client.ApiException If fail to serialize the request body object + */ + public Call buildCall(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { + Request request = buildRequest(baseUrl, path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback); + + return httpClient.newCall(request); + } + + /** + * Build an HTTP request with the given options. + * + * @param baseUrl The base URL + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param cookieParams The cookie parameters + * @param formParams The form parameters + * @param authNames The authentications to apply + * @param callback Callback for upload/download progress + * @return The HTTP request + * @throws xiresellers.client.ApiException If fail to serialize the request body object + */ + public Request buildRequest(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { + // aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams + List allQueryParams = new ArrayList(queryParams); + allQueryParams.addAll(collectionQueryParams); + + final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams); + + // prepare HTTP request body + RequestBody reqBody; + String contentType = headerParams.get("Content-Type"); + String contentTypePure = contentType; + if (contentTypePure != null && contentTypePure.contains(";")) { + contentTypePure = contentType.substring(0, contentType.indexOf(";")); + } + if (!HttpMethod.permitsRequestBody(method)) { + reqBody = null; + } else if ("application/x-www-form-urlencoded".equals(contentTypePure)) { + reqBody = buildRequestBodyFormEncoding(formParams); + } else if ("multipart/form-data".equals(contentTypePure)) { + reqBody = buildRequestBodyMultipart(formParams); + } else if (body == null) { + if ("DELETE".equals(method)) { + // allow calling DELETE without sending a request body + reqBody = null; + } else { + // use an empty request body (for POST, PUT and PATCH) + reqBody = RequestBody.create("", contentType == null ? null : MediaType.parse(contentType)); + } + } else { + reqBody = serialize(body, contentType); + } + + // update parameters with authentication settings + updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url)); + + final Request.Builder reqBuilder = new Request.Builder().url(url); + processHeaderParams(headerParams, reqBuilder); + processCookieParams(cookieParams, reqBuilder); + + // Associate callback with request (if not null) so interceptor can + // access it when creating ProgressResponseBody + reqBuilder.tag(callback); + + Request request = null; + + if (callback != null && reqBody != null) { + ProgressRequestBody progressRequestBody = new ProgressRequestBody(reqBody, callback); + request = reqBuilder.method(method, progressRequestBody).build(); + } else { + request = reqBuilder.method(method, reqBody).build(); + } + + return request; + } + + /** + * Build full URL by concatenating base path, the given sub path and query parameters. + * + * @param baseUrl The base URL + * @param path The sub path + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @return The full URL + */ + public String buildUrl(String baseUrl, String path, List queryParams, List collectionQueryParams) { + final StringBuilder url = new StringBuilder(); + if (baseUrl != null) { + url.append(baseUrl).append(path); + } else { + String baseURL; + if (serverIndex != null) { + if (serverIndex < 0 || serverIndex >= servers.size()) { + throw new ArrayIndexOutOfBoundsException(String.format( + "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() + )); + } + baseURL = servers.get(serverIndex).URL(serverVariables); + } else { + baseURL = basePath; + } + url.append(baseURL).append(path); + } + + if (queryParams != null && !queryParams.isEmpty()) { + // support (constant) query string in `path`, e.g. "/posts?draft=1" + String prefix = path.contains("?") ? "&" : "?"; + for (Pair param : queryParams) { + if (param.getValue() != null) { + if (prefix != null) { + url.append(prefix); + prefix = null; + } else { + url.append("&"); + } + String value = parameterToString(param.getValue()); + url.append(escapeString(param.getName())).append("=").append(escapeString(value)); + } + } + } + + if (collectionQueryParams != null && !collectionQueryParams.isEmpty()) { + String prefix = url.toString().contains("?") ? "&" : "?"; + for (Pair param : collectionQueryParams) { + if (param.getValue() != null) { + if (prefix != null) { + url.append(prefix); + prefix = null; + } else { + url.append("&"); + } + String value = parameterToString(param.getValue()); + // collection query parameter value already escaped as part of parameterToPairs + url.append(escapeString(param.getName())).append("=").append(value); + } + } + } + + return url.toString(); + } + + /** + * Set header parameters to the request builder, including default headers. + * + * @param headerParams Header parameters in the form of Map + * @param reqBuilder Request.Builder + */ + public void processHeaderParams(Map headerParams, Request.Builder reqBuilder) { + for (Entry param : headerParams.entrySet()) { + reqBuilder.header(param.getKey(), parameterToString(param.getValue())); + } + for (Entry header : defaultHeaderMap.entrySet()) { + if (!headerParams.containsKey(header.getKey())) { + reqBuilder.header(header.getKey(), parameterToString(header.getValue())); + } + } + } + + /** + * Set cookie parameters to the request builder, including default cookies. + * + * @param cookieParams Cookie parameters in the form of Map + * @param reqBuilder Request.Builder + */ + public void processCookieParams(Map cookieParams, Request.Builder reqBuilder) { + for (Entry param : cookieParams.entrySet()) { + reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + } + for (Entry param : defaultCookieMap.entrySet()) { + if (!cookieParams.containsKey(param.getKey())) { + reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + } + } + } + + /** + * Update query and header parameters based on authentication settings. + * + * @param authNames The authentications to apply + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + * @param payload HTTP request body + * @param method HTTP method + * @param uri URI + * @throws xiresellers.client.ApiException If fails to update the parameters + */ + public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, + Map cookieParams, String payload, String method, URI uri) throws ApiException { + for (String authName : authNames) { + Authentication auth = authentications.get(authName); + if (auth == null) { + throw new RuntimeException("Authentication undefined: " + authName); + } + auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri); + } + } + + /** + * Build a form-encoding request body with the given form parameters. + * + * @param formParams Form parameters in the form of Map + * @return RequestBody + */ + public RequestBody buildRequestBodyFormEncoding(Map formParams) { + okhttp3.FormBody.Builder formBuilder = new okhttp3.FormBody.Builder(); + for (Entry param : formParams.entrySet()) { + formBuilder.add(param.getKey(), parameterToString(param.getValue())); + } + return formBuilder.build(); + } + + /** + * Build a multipart (file uploading) request body with the given form parameters, + * which could contain text fields and file fields. + * + * @param formParams Form parameters in the form of Map + * @return RequestBody + */ + public RequestBody buildRequestBodyMultipart(Map formParams) { + MultipartBody.Builder mpBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); + for (Entry param : formParams.entrySet()) { + if (param.getValue() instanceof File) { + File file = (File) param.getValue(); + addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); + } else if (param.getValue() instanceof List) { + List list = (List) param.getValue(); + for (Object item: list) { + if (item instanceof File) { + addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item); + } else { + addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue()); + } + } + } else { + addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue()); + } + } + return mpBuilder.build(); + } + + /** + * Guess Content-Type header from the given file (defaults to "application/octet-stream"). + * + * @param file The given file + * @return The guessed Content-Type + */ + public String guessContentTypeFromFile(File file) { + String contentType = URLConnection.guessContentTypeFromName(file.getName()); + if (contentType == null) { + return "application/octet-stream"; + } else { + return contentType; + } + } + + /** + * Add a Content-Disposition Header for the given key and file to the MultipartBody Builder. + * + * @param mpBuilder MultipartBody.Builder + * @param key The key of the Header element + * @param file The file to add to the Header + */ + private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) { + Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\"; filename=\"" + file.getName() + "\""); + MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); + mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType)); + } + + /** + * Add a Content-Disposition Header for the given key and complex object to the MultipartBody Builder. + * + * @param mpBuilder MultipartBody.Builder + * @param key The key of the Header element + * @param obj The complex object to add to the Header + */ + private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, Object obj) { + RequestBody requestBody; + if (obj instanceof String) { + requestBody = RequestBody.create((String) obj, MediaType.parse("text/plain")); + } else { + String content; + if (obj != null) { + content = JSON.serialize(obj); + } else { + content = null; + } + requestBody = RequestBody.create(content, MediaType.parse("application/json")); + } + + Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\""); + mpBuilder.addPart(partHeaders, requestBody); + } + + /** + * Get network interceptor to add it to the httpClient to track download progress for + * async requests. + */ + private Interceptor getProgressInterceptor() { + return new Interceptor() { + @Override + public Response intercept(Interceptor.Chain chain) throws IOException { + final Request request = chain.request(); + final Response originalResponse = chain.proceed(request); + if (request.tag() instanceof ApiCallback) { + final ApiCallback callback = (ApiCallback) request.tag(); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), callback)) + .build(); + } + return originalResponse; + } + }; + } + + /** + * Apply SSL related settings to httpClient according to the current values of + * verifyingSsl and sslCaCert. + */ + private void applySslSettings() { + try { + TrustManager[] trustManagers; + HostnameVerifier hostnameVerifier; + if (!verifyingSsl) { + trustManagers = new TrustManager[]{ + new X509TrustManager() { + @Override + public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { + } + + @Override + public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { + } + + @Override + public java.security.cert.X509Certificate[] getAcceptedIssuers() { + return new java.security.cert.X509Certificate[]{}; + } + } + }; + hostnameVerifier = new HostnameVerifier() { + @Override + public boolean verify(String hostname, SSLSession session) { + return true; + } + }; + } else { + TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); + + if (sslCaCert == null) { + trustManagerFactory.init((KeyStore) null); + } else { + char[] password = null; // Any password will work. + CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); + Collection certificates = certificateFactory.generateCertificates(sslCaCert); + if (certificates.isEmpty()) { + throw new IllegalArgumentException("expected non-empty set of trusted certificates"); + } + KeyStore caKeyStore = newEmptyKeyStore(password); + int index = 0; + for (Certificate certificate : certificates) { + String certificateAlias = "ca" + (index++); + caKeyStore.setCertificateEntry(certificateAlias, certificate); + } + trustManagerFactory.init(caKeyStore); + } + trustManagers = trustManagerFactory.getTrustManagers(); + hostnameVerifier = OkHostnameVerifier.INSTANCE; + } + + SSLContext sslContext = SSLContext.getInstance("TLS"); + sslContext.init(keyManagers, trustManagers, new SecureRandom()); + httpClient = httpClient.newBuilder() + .sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustManagers[0]) + .hostnameVerifier(hostnameVerifier) + .build(); + } catch (GeneralSecurityException e) { + throw new RuntimeException(e); + } + } + + private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { + try { + KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); + keyStore.load(null, password); + return keyStore; + } catch (IOException e) { + throw new AssertionError(e); + } + } + + /** + * Convert the HTTP request body to a string. + * + * @param requestBody The HTTP request object + * @return The string representation of the HTTP request body + * @throws xiresellers.client.ApiException If fail to serialize the request body object into a string + */ + private String requestBodyToString(RequestBody requestBody) throws ApiException { + if (requestBody != null) { + try { + final Buffer buffer = new Buffer(); + requestBody.writeTo(buffer); + return buffer.readUtf8(); + } catch (final IOException e) { + throw new ApiException(e); + } + } + + // empty http request body + return ""; + } +} diff --git a/src/main/java/xiresellers/client/ApiException.java b/src/main/java/xiresellers/client/ApiException.java new file mode 100644 index 00000000..8e9f4970 --- /dev/null +++ b/src/main/java/xiresellers/client/ApiException.java @@ -0,0 +1,165 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client; + +import java.util.Map; +import java.util.List; + + +/** + *

    ApiException class.

    + */ +@SuppressWarnings("serial") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ApiException extends Exception { + private int code = 0; + private Map> responseHeaders = null; + private String responseBody = null; + + /** + *

    Constructor for ApiException.

    + */ + public ApiException() {} + + /** + *

    Constructor for ApiException.

    + * + * @param throwable a {@link java.lang.Throwable} object + */ + public ApiException(Throwable throwable) { + super(throwable); + } + + /** + *

    Constructor for ApiException.

    + * + * @param message the error message + */ + public ApiException(String message) { + super(message); + } + + /** + *

    Constructor for ApiException.

    + * + * @param message the error message + * @param throwable a {@link java.lang.Throwable} object + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { + super(message, throwable); + this.code = code; + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + /** + *

    Constructor for ApiException.

    + * + * @param message the error message + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ + public ApiException(String message, int code, Map> responseHeaders, String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + /** + *

    Constructor for ApiException.

    + * + * @param message the error message + * @param throwable a {@link java.lang.Throwable} object + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + */ + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + /** + *

    Constructor for ApiException.

    + * + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ + public ApiException(int code, Map> responseHeaders, String responseBody) { + this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); + } + + /** + *

    Constructor for ApiException.

    + * + * @param code HTTP status code + * @param message a {@link java.lang.String} object + */ + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + /** + *

    Constructor for ApiException.

    + * + * @param code HTTP status code + * @param message the error message + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ + public ApiException(int code, String message, Map> responseHeaders, String responseBody) { + this(code, message); + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } + + /** + * Get the HTTP response headers. + * + * @return A map of list of string + */ + public Map> getResponseHeaders() { + return responseHeaders; + } + + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } + + /** + * Get the exception message including HTTP response data. + * + * @return The exception message + */ + public String getMessage() { + return String.format("Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s", + super.getMessage(), this.getCode(), this.getResponseBody(), this.getResponseHeaders()); + } +} diff --git a/src/main/java/xiresellers/client/ApiResponse.java b/src/main/java/xiresellers/client/ApiResponse.java new file mode 100644 index 00000000..318840ae --- /dev/null +++ b/src/main/java/xiresellers/client/ApiResponse.java @@ -0,0 +1,76 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client; + +import java.util.List; +import java.util.Map; + +/** + * API response returned by API call. + */ +public class ApiResponse { + final private int statusCode; + final private Map> headers; + final private T data; + + /** + *

    Constructor for ApiResponse.

    + * + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + */ + public ApiResponse(int statusCode, Map> headers) { + this(statusCode, headers, null); + } + + /** + *

    Constructor for ApiResponse.

    + * + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + * @param data The object deserialized from response bod + */ + public ApiResponse(int statusCode, Map> headers, T data) { + this.statusCode = statusCode; + this.headers = headers; + this.data = data; + } + + /** + *

    Get the status code.

    + * + * @return the status code + */ + public int getStatusCode() { + return statusCode; + } + + /** + *

    Get the headers.

    + * + * @return a {@link java.util.Map} of headers + */ + public Map> getHeaders() { + return headers; + } + + /** + *

    Get the data.

    + * + * @return the data + */ + public T getData() { + return data; + } +} diff --git a/src/main/java/xiresellers/client/Configuration.java b/src/main/java/xiresellers/client/Configuration.java new file mode 100644 index 00000000..52451571 --- /dev/null +++ b/src/main/java/xiresellers/client/Configuration.java @@ -0,0 +1,41 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class Configuration { + public static final String VERSION = "6.0"; + + private static ApiClient defaultApiClient = new ApiClient(); + + /** + * Get the default API client, which would be used when creating API + * instances without providing an API client. + * + * @return Default API client + */ + public static ApiClient getDefaultApiClient() { + return defaultApiClient; + } + + /** + * Set the default API client, which would be used when creating API + * instances without providing an API client. + * + * @param apiClient API client + */ + public static void setDefaultApiClient(ApiClient apiClient) { + defaultApiClient = apiClient; + } +} diff --git a/src/main/java/xiresellers/client/GzipRequestInterceptor.java b/src/main/java/xiresellers/client/GzipRequestInterceptor.java new file mode 100644 index 00000000..cb01964a --- /dev/null +++ b/src/main/java/xiresellers/client/GzipRequestInterceptor.java @@ -0,0 +1,85 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client; + +import okhttp3.*; +import okio.Buffer; +import okio.BufferedSink; +import okio.GzipSink; +import okio.Okio; + +import java.io.IOException; + +/** + * Encodes request bodies using gzip. + * + * Taken from https://github.com/square/okhttp/issues/350 + */ +class GzipRequestInterceptor implements Interceptor { + @Override + public Response intercept(Chain chain) throws IOException { + Request originalRequest = chain.request(); + if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) { + return chain.proceed(originalRequest); + } + + Request compressedRequest = originalRequest.newBuilder() + .header("Content-Encoding", "gzip") + .method(originalRequest.method(), forceContentLength(gzip(originalRequest.body()))) + .build(); + return chain.proceed(compressedRequest); + } + + private RequestBody forceContentLength(final RequestBody requestBody) throws IOException { + final Buffer buffer = new Buffer(); + requestBody.writeTo(buffer); + return new RequestBody() { + @Override + public MediaType contentType() { + return requestBody.contentType(); + } + + @Override + public long contentLength() { + return buffer.size(); + } + + @Override + public void writeTo(BufferedSink sink) throws IOException { + sink.write(buffer.snapshot()); + } + }; + } + + private RequestBody gzip(final RequestBody body) { + return new RequestBody() { + @Override + public MediaType contentType() { + return body.contentType(); + } + + @Override + public long contentLength() { + return -1; // We don't know the compressed length in advance! + } + + @Override + public void writeTo(BufferedSink sink) throws IOException { + BufferedSink gzipSink = Okio.buffer(new GzipSink(sink)); + body.writeTo(gzipSink); + gzipSink.close(); + } + }; + } +} diff --git a/src/main/java/xiresellers/client/JSON.java b/src/main/java/xiresellers/client/JSON.java new file mode 100644 index 00000000..413641a1 --- /dev/null +++ b/src/main/java/xiresellers/client/JSON.java @@ -0,0 +1,717 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.internal.bind.util.ISO8601Utils; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonElement; +import io.gsonfire.GsonFireBuilder; +import io.gsonfire.TypeSelector; + +import okio.ByteString; + +import java.io.IOException; +import java.io.StringReader; +import java.lang.reflect.Type; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.ParsePosition; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Date; +import java.util.Locale; +import java.util.Map; +import java.util.HashMap; + +/* + * A JSON utility class + * + * NOTE: in the future, this class may be converted to static, which may break + * backward-compatibility + */ +public class JSON { + private static Gson gson; + private static boolean isLenientOnJson = false; + private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); + private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); + private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); + private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); + private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); + + @SuppressWarnings("unchecked") + public static GsonBuilder createGson() { + GsonFireBuilder fireBuilder = new GsonFireBuilder() + ; + GsonBuilder builder = fireBuilder.createGsonBuilder(); + return builder; + } + + private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { + JsonElement element = readElement.getAsJsonObject().get(discriminatorField); + if (null == element) { + throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); + } + return element.getAsString(); + } + + /** + * Returns the Java class that implements the OpenAPI schema for the specified discriminator value. + * + * @param classByDiscriminatorValue The map of discriminator values to Java classes. + * @param discriminatorValue The value of the OpenAPI discriminator in the input data. + * @return The Java class that implements the OpenAPI schema + */ + private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) { + Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue); + if (null == clazz) { + throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); + } + return clazz; + } + + { + GsonBuilder gsonBuilder = createGson(); + gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter); + gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); + gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); + gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); + gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.AddressType.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.AvailabilityAsyncNotificationRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.AvailabilityAsyncNotificationRequestResourceInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.AvailabilityAsyncNotificationRequestResourceInnerLinksInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.DealsDetailsResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.DealsDetailsResponseProductsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.DealsSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.DealsSearchResponseDealsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.Error.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ErrorResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ErrorResponseDTO.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ErrorResponseErrorsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ErrorResponseErrorsInnerFieldsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.Fields.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.FreightRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.FreightRequestLinesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.FreightRequestShipToAddressInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.FreightResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.FreightResponseFreightEstimateResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.FreightResponseFreightEstimateResponseDistributionInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.FreightResponseFreightEstimateResponseLinesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.GetResellerV6ValidateQuote400Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.GetResellerV6ValidateQuote400ResponseFieldsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.GetResellerV6ValidateQuote500Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.InvoiceDetailRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.InvoiceDetailRequestServicerequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.InvoiceDetailRequestServicerequestInvoicedetailrequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.InvoiceDetailRequestServicerequestRequestpreamble.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.InvoiceDetailResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.InvoiceDetailResponseServiceresponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.InvoiceDetailResponseServiceresponseInvoicedetailresponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.InvoiceDetailResponseServiceresponseResponsepreamble.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.InvoiceDetails.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.InvoiceDetailsv61Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.InvoiceDetailsv61ResponseBillToInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.InvoiceDetailsv61ResponseFxRateInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.InvoiceDetailsv61ResponseLinesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.InvoiceDetailsv61ResponsePaymentTermsInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.InvoiceDetailsv61ResponseShipToInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.InvoiceDetailsv61ResponseSummary.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.InvoiceDetailsv61ResponseSummaryForeignFxTotals.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.InvoiceDetailsv61ResponseSummaryLines.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.InvoiceDetailsv61ResponseSummaryMiscChargesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.InvoiceDetailsv61ResponseSummaryTotals.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.InvoiceSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.InvoiceSearchResponseInvoicesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.MultiSKUPriceAndStockRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.MultiSKUPriceAndStockRequestServicerequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.MultiSKUPriceAndStockRequestServicerequestRequestpreamble.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.MultiSKUPriceAndStockResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.MultiSKUPriceAndStockResponseServiceresponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCancelResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCancelResponseServiceresponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCancelResponseServiceresponseResponsepreamble.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateRequestAdditionalAttributesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateRequestEndUserInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateRequestLinesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateRequestLinesInnerAdditionalAttributesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateRequestLinesInnerEndUserInfoInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateRequestLinesInnerWarrantyInfoInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateRequestOrdercreaterequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateRequestOrdercreaterequestOrdercreatedetails.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateRequestOrdercreaterequestRequestpreamble.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateRequestResellerInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateRequestShipToInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateRequestShipmentDetails.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateRequestVmf.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateResponseEndUserInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateResponseOrdersInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateResponseOrdersInnerAdditionalAttributesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateResponseOrdersInnerLinesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateResponseOrdersInnerLinksInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateResponseOrdersInnerMiscellaneousChargesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateResponseOrdersInnerRejectedLineItemsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateResponseServiceresponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateResponseServiceresponseOrdercreateresponseInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateResponseServiceresponseOrdersummary.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateResponseServiceresponseOrdersummaryShiptoaddress.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderCreateResponseShipToInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDeleteRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDeleteRequestServicerequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDeleteRequestServicerequestOrderDeleteRequestDetails.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDeleteRequestServicerequestRequestpreamble.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDeleteResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailB2B.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailB2BAdditionalAttributesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailB2BBillToInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailB2BEndUserInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailB2BLinesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailB2BLinesInnerAdditionalAttributesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailB2BLinesInnerEstimatedDatesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailB2BLinesInnerEstimatedDatesInnerShip.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailB2BLinesInnerLinksInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailB2BLinesInnerMultipleShipmentsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailB2BLinesInnerScheduleLinesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailB2BLinesInnerServiceContractInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailB2BLinesInnerServiceContractInfoContractInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailB2BLinesInnerServiceContractInfoSubscriptions.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailB2BLinesInnerShipmentDetailsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailB2BMiscellaneousChargesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailB2BShipToInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailRequestServicerequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailRequestServicerequestOrderdetailrequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailResponseBillToInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailResponseEndUserInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailResponseLinesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailResponseLinesInnerAdditionalAttributesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailResponseLinesInnerLinksInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailResponseLinesInnerShipmentDetailsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailResponseMiscellaneousChargesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailResponseServiceresponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseLinesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderDetailResponseShipToInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderModifyRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderModifyRequestAdditionalAttributesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderModifyRequestLinesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderModifyRequestServicerequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderModifyRequestServicerequestOrdermodifyrequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderModifyRequestServicerequestOrdermodifyrequestShipto.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderModifyRequestServicerequestRequestpreamble.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderModifyRequestShipToInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderModifyResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderModifyResponseLinesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderModifyResponseLinesInnerAdditionalAttributesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderModifyResponseLinesInnerShipmentDetails.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderModifyResponseRejectedLineItemsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderModifyResponseServiceresponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderModifyResponseServiceresponseOrdermodifyresponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderModifyResponseServiceresponseResponsepreamble.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderModifyResponseShipToInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderSearchRequestServicerequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderSearchRequestServicerequestOrderLookupRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderSearchRequestServicerequestOrderLookupRequestOrderNumber.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderSearchRequestServicerequestRequestpreamble.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderSearchResponseOrdersInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderSearchResponseOrdersInnerLinks.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderSearchResponseOrdersInnerSubOrdersInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderSearchResponseServiceResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderSearchResponseServiceResponseOrdersearchresponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderSearchResponseServiceResponseResponsepreamble.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderStatusAsyncNotificationRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderStatusAsyncNotificationRequestResourceInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderStatusAsyncNotificationRequestResourceInnerLinesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.OrderStatusAsyncNotificationRequestResourceInnerLinksInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PostQuoteToOrderV6400Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PostQuoteToOrderV6400ResponseFieldsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PostRenewalssearch400Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PriceAndAvailabilityRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PriceAndAvailabilityRequestAdditionalAttributesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PriceAndAvailabilityRequestAvailabilityByWarehouseInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PriceAndAvailabilityRequestProductsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PriceAndAvailabilityRequestServicerequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PriceAndAvailabilityRequestServicerequestPriceandstockrequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PriceAndAvailabilityRequestServicerequestRequestpreamble.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PriceAndAvailabilityResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PriceAndAvailabilityResponseInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PriceAndAvailabilityResponseInnerAvailability.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PriceAndAvailabilityResponseInnerDiscountsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PriceAndAvailabilityResponseInnerPricing.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PriceAndAvailabilityResponseInnerServiceFeesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PriceAndAvailabilityResponseServiceresponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PriceAndAvailabilityResponseServiceresponsePriceandstockresponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.PriceAndAvailabilityResponseServiceresponseResponsepreamble.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ProductDetailResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ProductDetailResponseAdditionalInformation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ProductDetailResponseAdditionalInformationProductWeightInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ProductDetailResponseCiscoFieldsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ProductDetailResponseIndicatorsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ProductDetailResponseTechnicalSpecificationsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ProductLineType.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ProductLineTypeSerialnumberdetailsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ProductLineTypeTrackingnumberdetailsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ProductSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ProductSearchRequestServicerequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ProductSearchRequestServicerequestProductsearchrequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ProductSearchRequestServicerequestProductsearchrequestSearchcriteria.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ProductSearchRequestServicerequestRequestpreamble.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ProductSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ProductSearchResponseCatalogInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ProductSearchResponseCatalogInnerLinksInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ProductSearchResponseServiceresponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ProductSearchResponseServiceresponseProductsearchresponseInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ProductSearchResponseServiceresponseResponsepreamble.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteDetails.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteDetailsQuoteDetailResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteDetailsQuoteDetailResponseResponsePreamble.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteDetailsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteDetailsRequestQuoteProductsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteDetailsRequestQuoteProductsRequestRequestpreamble.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteDetailsResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteDetailsResponseAdditionalAttributesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteDetailsResponseEndUserInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteDetailsResponseProductsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteDetailsResponseProductsInnerPrice.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteDetailsResponseQuoteDetailResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteDetailsResponseResellerInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteListRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteListRequestQuoteSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteListRequestQuoteSearchRequestRequestPreamble.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteListResponseQuoteSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteListResponseQuoteSearchResponseQuoteListInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteListResponseQuoteSearchResponseResponsePreamble.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteProductList.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteProductListPrice.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteSearchResponseQuotesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteToOrderDetailsDTO.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteToOrderDetailsDTOAdditionalAttributesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteToOrderDetailsDTOEndUserInfoInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteToOrderDetailsDTOLinesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteToOrderDetailsDTOShipToInfoInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteToOrderDetailsDTOVmfadditionalAttributesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.QuoteToOrderResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.RenewalsDetailsResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.RenewalsDetailsResponseAdditionalAttributesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.RenewalsDetailsResponseEndUserInfoInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.RenewalsDetailsResponseProductsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.RenewalsDetailsResponseReferenceNumberInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.RenewalsSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.RenewalsSearchRequestDataType.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.RenewalsSearchRequestDataTypeEndDate.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.RenewalsSearchRequestDataTypeExpirationDate.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.RenewalsSearchRequestDataTypeInvoiceDate.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.RenewalsSearchRequestDataTypeStartDate.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.RenewalsSearchRequestStatus.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.RenewalsSearchRequestStatusOpporutinyStatus.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.RenewalsSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.RenewalsSearchResponseRenewalsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.RenewalsSearchResponseRenewalsInnerLinksInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ReturnsCreateRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ReturnsCreateRequestListInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ReturnsCreateRequestListInnerShipFromInfoInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ReturnsCreateResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ReturnsCreateResponseReturnsClaimsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ReturnsDetailsResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ReturnsDetailsResponseProductsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ReturnsSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ReturnsSearchResponseReturnsClaimsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ReturnsSearchResponseReturnsClaimsInnerLinksInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ValidateQuoteResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ValidateQuoteResponseLinesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.ValidateQuoteResponseVmfAdditionalAttributesInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new xiresellers.client.model.WarehouseListType.CustomTypeAdapterFactory()); + gson = gsonBuilder.create(); + } + + /** + * Get Gson. + * + * @return Gson + */ + public static Gson getGson() { + return gson; + } + + /** + * Set Gson. + * + * @param gson Gson + */ + public static void setGson(Gson gson) { + JSON.gson = gson; + } + + public static void setLenientOnJson(boolean lenientOnJson) { + isLenientOnJson = lenientOnJson; + } + + /** + * Serialize the given Java object into JSON string. + * + * @param obj Object + * @return String representation of the JSON + */ + public static String serialize(Object obj) { + return gson.toJson(obj); + } + + /** + * Deserialize the given JSON string to Java object. + * + * @param Type + * @param body The JSON string + * @param returnType The type to deserialize into + * @return The deserialized Java object + */ + @SuppressWarnings("unchecked") + public static T deserialize(String body, Type returnType) { + try { + if (isLenientOnJson) { + JsonReader jsonReader = new JsonReader(new StringReader(body)); + // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) + jsonReader.setLenient(true); + return gson.fromJson(jsonReader, returnType); + } else { + return gson.fromJson(body, returnType); + } + } catch (JsonParseException e) { + // Fallback processing when failed to parse JSON form response body: + // return the response body string directly for the String return type; + if (returnType.equals(String.class)) { + return (T) body; + } else { + throw (e); + } + } + } + + /** + * Gson TypeAdapter for Byte Array type + */ + public static class ByteArrayAdapter extends TypeAdapter { + + @Override + public void write(JsonWriter out, byte[] value) throws IOException { + if (value == null) { + out.nullValue(); + } else { + out.value(ByteString.of(value).base64()); + } + } + + @Override + public byte[] read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String bytesAsBase64 = in.nextString(); + ByteString byteString = ByteString.decodeBase64(bytesAsBase64); + return byteString.toByteArray(); + } + } + } + + /** + * Gson TypeAdapter for JSR310 OffsetDateTime type + */ + public static class OffsetDateTimeTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public OffsetDateTimeTypeAdapter() { + this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); + } + + public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, OffsetDateTime date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public OffsetDateTime read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + if (date.endsWith("+0000")) { + date = date.substring(0, date.length()-5) + "Z"; + } + return OffsetDateTime.parse(date, formatter); + } + } + } + + /** + * Gson TypeAdapter for JSR310 LocalDate type + */ + public static class LocalDateTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public LocalDateTypeAdapter() { + this(DateTimeFormatter.ISO_LOCAL_DATE); + } + + public LocalDateTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, LocalDate date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public LocalDate read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + return LocalDate.parse(date, formatter); + } + } + } + + public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + offsetDateTimeTypeAdapter.setFormat(dateFormat); + } + + public static void setLocalDateFormat(DateTimeFormatter dateFormat) { + localDateTypeAdapter.setFormat(dateFormat); + } + + /** + * Gson TypeAdapter for java.sql.Date type + * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used + * (more efficient than SimpleDateFormat). + */ + public static class SqlDateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public SqlDateTypeAdapter() {} + + public SqlDateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, java.sql.Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = date.toString(); + } + out.value(value); + } + } + + @Override + public java.sql.Date read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return new java.sql.Date(dateFormat.parse(date).getTime()); + } + return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } + } + + /** + * Gson TypeAdapter for java.util.Date type + * If the dateFormat is null, ISO8601Utils will be used. + */ + public static class DateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public DateTypeAdapter() {} + + public DateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = ISO8601Utils.format(date, true); + } + out.value(value); + } + } + + @Override + public Date read(JsonReader in) throws IOException { + try { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return dateFormat.parse(date); + } + return ISO8601Utils.parse(date, new ParsePosition(0)); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } catch (IllegalArgumentException e) { + throw new JsonParseException(e); + } + } + } + + public static void setDateFormat(DateFormat dateFormat) { + dateTypeAdapter.setFormat(dateFormat); + } + + public static void setSqlDateFormat(DateFormat dateFormat) { + sqlDateTypeAdapter.setFormat(dateFormat); + } +} diff --git a/src/main/java/xiresellers/client/Pair.java b/src/main/java/xiresellers/client/Pair.java new file mode 100644 index 00000000..42edb19b --- /dev/null +++ b/src/main/java/xiresellers/client/Pair.java @@ -0,0 +1,57 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class Pair { + private String name = ""; + private String value = ""; + + public Pair (String name, String value) { + setName(name); + setValue(value); + } + + private void setName(String name) { + if (!isValidString(name)) { + return; + } + + this.name = name; + } + + private void setValue(String value) { + if (!isValidString(value)) { + return; + } + + this.value = value; + } + + public String getName() { + return this.name; + } + + public String getValue() { + return this.value; + } + + private boolean isValidString(String arg) { + if (arg == null) { + return false; + } + + return true; + } +} diff --git a/src/main/java/xiresellers/client/ProgressRequestBody.java b/src/main/java/xiresellers/client/ProgressRequestBody.java new file mode 100644 index 00000000..0dc7df5f --- /dev/null +++ b/src/main/java/xiresellers/client/ProgressRequestBody.java @@ -0,0 +1,73 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client; + +import okhttp3.MediaType; +import okhttp3.RequestBody; + +import java.io.IOException; + +import okio.Buffer; +import okio.BufferedSink; +import okio.ForwardingSink; +import okio.Okio; +import okio.Sink; + +public class ProgressRequestBody extends RequestBody { + + private final RequestBody requestBody; + + private final ApiCallback callback; + + public ProgressRequestBody(RequestBody requestBody, ApiCallback callback) { + this.requestBody = requestBody; + this.callback = callback; + } + + @Override + public MediaType contentType() { + return requestBody.contentType(); + } + + @Override + public long contentLength() throws IOException { + return requestBody.contentLength(); + } + + @Override + public void writeTo(BufferedSink sink) throws IOException { + BufferedSink bufferedSink = Okio.buffer(sink(sink)); + requestBody.writeTo(bufferedSink); + bufferedSink.flush(); + } + + private Sink sink(Sink sink) { + return new ForwardingSink(sink) { + + long bytesWritten = 0L; + long contentLength = 0L; + + @Override + public void write(Buffer source, long byteCount) throws IOException { + super.write(source, byteCount); + if (contentLength == 0) { + contentLength = contentLength(); + } + + bytesWritten += byteCount; + callback.onUploadProgress(bytesWritten, contentLength, bytesWritten == contentLength); + } + }; + } +} diff --git a/src/main/java/xiresellers/client/ProgressResponseBody.java b/src/main/java/xiresellers/client/ProgressResponseBody.java new file mode 100644 index 00000000..d7d1065e --- /dev/null +++ b/src/main/java/xiresellers/client/ProgressResponseBody.java @@ -0,0 +1,70 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client; + +import okhttp3.MediaType; +import okhttp3.ResponseBody; + +import java.io.IOException; + +import okio.Buffer; +import okio.BufferedSource; +import okio.ForwardingSource; +import okio.Okio; +import okio.Source; + +public class ProgressResponseBody extends ResponseBody { + + private final ResponseBody responseBody; + private final ApiCallback callback; + private BufferedSource bufferedSource; + + public ProgressResponseBody(ResponseBody responseBody, ApiCallback callback) { + this.responseBody = responseBody; + this.callback = callback; + } + + @Override + public MediaType contentType() { + return responseBody.contentType(); + } + + @Override + public long contentLength() { + return responseBody.contentLength(); + } + + @Override + public BufferedSource source() { + if (bufferedSource == null) { + bufferedSource = Okio.buffer(source(responseBody.source())); + } + return bufferedSource; + } + + private Source source(Source source) { + return new ForwardingSource(source) { + long totalBytesRead = 0L; + + @Override + public long read(Buffer sink, long byteCount) throws IOException { + long bytesRead = super.read(sink, byteCount); + // read() returns the number of bytes read, or -1 if this source is exhausted. + totalBytesRead += bytesRead != -1 ? bytesRead : 0; + callback.onDownloadProgress(totalBytesRead, responseBody.contentLength(), bytesRead == -1); + return bytesRead; + } + }; + } +} diff --git a/src/main/java/xiresellers/client/ServerConfiguration.java b/src/main/java/xiresellers/client/ServerConfiguration.java new file mode 100644 index 00000000..5f1aed47 --- /dev/null +++ b/src/main/java/xiresellers/client/ServerConfiguration.java @@ -0,0 +1,58 @@ +package xiresellers.client; + +import java.util.Map; + +/** + * Representing a Server configuration. + */ +public class ServerConfiguration { + public String URL; + public String description; + public Map variables; + + /** + * @param URL A URL to the target host. + * @param description A description of the host designated by the URL. + * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. + */ + public ServerConfiguration(String URL, String description, Map variables) { + this.URL = URL; + this.description = description; + this.variables = variables; + } + + /** + * Format URL template using given variables. + * + * @param variables A map between a variable name and its value. + * @return Formatted URL. + */ + public String URL(Map variables) { + String url = this.URL; + + // go through variables and replace placeholders + for (Map.Entry variable: this.variables.entrySet()) { + String name = variable.getKey(); + ServerVariable serverVariable = variable.getValue(); + String value = serverVariable.defaultValue; + + if (variables != null && variables.containsKey(name)) { + value = variables.get(name); + if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); + } + } + url = url.replace("{" + name + "}", value); + } + return url; + } + + /** + * Format URL template using default server variables. + * + * @return Formatted URL. + */ + public String URL() { + return URL(null); + } +} diff --git a/src/main/java/xiresellers/client/ServerVariable.java b/src/main/java/xiresellers/client/ServerVariable.java new file mode 100644 index 00000000..f231caed --- /dev/null +++ b/src/main/java/xiresellers/client/ServerVariable.java @@ -0,0 +1,23 @@ +package xiresellers.client; + +import java.util.HashSet; + +/** + * Representing a Server Variable for server URL template substitution. + */ +public class ServerVariable { + public String description; + public String defaultValue; + public HashSet enumValues = null; + + /** + * @param description A description for the server variable. + * @param defaultValue The default value to use for substitution. + * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. + */ + public ServerVariable(String description, String defaultValue, HashSet enumValues) { + this.description = description; + this.defaultValue = defaultValue; + this.enumValues = enumValues; + } +} diff --git a/src/main/java/xiresellers/client/StringUtil.java b/src/main/java/xiresellers/client/StringUtil.java new file mode 100644 index 00000000..c44caf7f --- /dev/null +++ b/src/main/java/xiresellers/client/StringUtil.java @@ -0,0 +1,83 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client; + +import java.util.Collection; +import java.util.Iterator; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class StringUtil { + /** + * Check if the given array contains the given value (with case-insensitive comparison). + * + * @param array The array + * @param value The value to search + * @return true if the array contains the value + */ + public static boolean containsIgnoreCase(String[] array, String value) { + for (String str : array) { + if (value == null && str == null) { + return true; + } + if (value != null && value.equalsIgnoreCase(str)) { + return true; + } + } + return false; + } + + /** + * Join an array of strings with the given separator. + *

    + * Note: This might be replaced by utility method from commons-lang or guava someday + * if one of those libraries is added as dependency. + *

    + * + * @param array The array of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(String[] array, String separator) { + int len = array.length; + if (len == 0) { + return ""; + } + + StringBuilder out = new StringBuilder(); + out.append(array[0]); + for (int i = 1; i < len; i++) { + out.append(separator).append(array[i]); + } + return out.toString(); + } + + /** + * Join a list of strings with the given separator. + * + * @param list The list of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(Collection list, String separator) { + Iterator iterator = list.iterator(); + StringBuilder out = new StringBuilder(); + if (iterator.hasNext()) { + out.append(iterator.next()); + } + while (iterator.hasNext()) { + out.append(separator).append(iterator.next()); + } + return out.toString(); + } +} diff --git a/src/main/java/xiresellers/client/api/DealsApi.java b/src/main/java/xiresellers/client/api/DealsApi.java new file mode 100644 index 00000000..efe82f33 --- /dev/null +++ b/src/main/java/xiresellers/client/api/DealsApi.java @@ -0,0 +1,448 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiCallback; +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.ApiResponse; +import xiresellers.client.Configuration; +import xiresellers.client.Pair; +import xiresellers.client.ProgressRequestBody; +import xiresellers.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import xiresellers.client.model.DealsDetailsResponse; +import xiresellers.client.model.DealsSearchResponse; +import xiresellers.client.model.GetResellerV6ValidateQuote500Response; +import xiresellers.client.model.PostRenewalssearch400Response; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class DealsApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public DealsApi() { + this(Configuration.getDefaultApiClient()); + } + + public DealsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getResellersV6Dealsdetails + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param dealId Unique deal ID. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call getResellersV6DealsdetailsCall(String imCustomerNumber, String imCountryCode, String imCorrelationID, String dealId, String imSenderID, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/resellers/v6/deals/{dealId}" + .replace("{" + "dealId" + "}", localVarApiClient.escapeString(dealId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (imCustomerNumber != null) { + localVarHeaderParams.put("IM-CustomerNumber", localVarApiClient.parameterToString(imCustomerNumber)); + } + + if (imCountryCode != null) { + localVarHeaderParams.put("IM-CountryCode", localVarApiClient.parameterToString(imCountryCode)); + } + + if (imCorrelationID != null) { + localVarHeaderParams.put("IM-CorrelationID", localVarApiClient.parameterToString(imCorrelationID)); + } + + if (imSenderID != null) { + localVarHeaderParams.put("IM-SenderID", localVarApiClient.parameterToString(imSenderID)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getResellersV6DealsdetailsValidateBeforeCall(String imCustomerNumber, String imCountryCode, String imCorrelationID, String dealId, String imSenderID, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'imCustomerNumber' is set + if (imCustomerNumber == null) { + throw new ApiException("Missing the required parameter 'imCustomerNumber' when calling getResellersV6Dealsdetails(Async)"); + } + + // verify the required parameter 'imCountryCode' is set + if (imCountryCode == null) { + throw new ApiException("Missing the required parameter 'imCountryCode' when calling getResellersV6Dealsdetails(Async)"); + } + + // verify the required parameter 'imCorrelationID' is set + if (imCorrelationID == null) { + throw new ApiException("Missing the required parameter 'imCorrelationID' when calling getResellersV6Dealsdetails(Async)"); + } + + // verify the required parameter 'dealId' is set + if (dealId == null) { + throw new ApiException("Missing the required parameter 'dealId' when calling getResellersV6Dealsdetails(Async)"); + } + + return getResellersV6DealsdetailsCall(imCustomerNumber, imCountryCode, imCorrelationID, dealId, imSenderID, _callback); + + } + + /** + * Deals Details + * The Deals Details API will retrieve all the details related to the specific deal id. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param dealId Unique deal ID. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @return DealsDetailsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public DealsDetailsResponse getResellersV6Dealsdetails(String imCustomerNumber, String imCountryCode, String imCorrelationID, String dealId, String imSenderID) throws ApiException { + ApiResponse localVarResp = getResellersV6DealsdetailsWithHttpInfo(imCustomerNumber, imCountryCode, imCorrelationID, dealId, imSenderID); + return localVarResp.getData(); + } + + /** + * Deals Details + * The Deals Details API will retrieve all the details related to the specific deal id. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param dealId Unique deal ID. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @return ApiResponse<DealsDetailsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public ApiResponse getResellersV6DealsdetailsWithHttpInfo(String imCustomerNumber, String imCountryCode, String imCorrelationID, String dealId, String imSenderID) throws ApiException { + okhttp3.Call localVarCall = getResellersV6DealsdetailsValidateBeforeCall(imCustomerNumber, imCountryCode, imCorrelationID, dealId, imSenderID, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Deals Details (asynchronously) + * The Deals Details API will retrieve all the details related to the specific deal id. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param dealId Unique deal ID. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call getResellersV6DealsdetailsAsync(String imCustomerNumber, String imCountryCode, String imCorrelationID, String dealId, String imSenderID, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getResellersV6DealsdetailsValidateBeforeCall(imCustomerNumber, imCountryCode, imCorrelationID, dealId, imSenderID, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getResellersV6Dealssearch + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param endUser The end user/customer's name. (optional) + * @param vendor The vendor's name. (optional) + * @param dealId Deal/Special bid number. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call getResellersV6DealssearchCall(String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, String endUser, String vendor, String dealId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/resellers/v6/deals/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (endUser != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("endUser", endUser)); + } + + if (vendor != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("vendor", vendor)); + } + + if (dealId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("dealId", dealId)); + } + + if (imCustomerNumber != null) { + localVarHeaderParams.put("IM-CustomerNumber", localVarApiClient.parameterToString(imCustomerNumber)); + } + + if (imCountryCode != null) { + localVarHeaderParams.put("IM-CountryCode", localVarApiClient.parameterToString(imCountryCode)); + } + + if (imCorrelationID != null) { + localVarHeaderParams.put("IM-CorrelationID", localVarApiClient.parameterToString(imCorrelationID)); + } + + if (imSenderID != null) { + localVarHeaderParams.put("IM-SenderID", localVarApiClient.parameterToString(imSenderID)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getResellersV6DealssearchValidateBeforeCall(String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, String endUser, String vendor, String dealId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'imCustomerNumber' is set + if (imCustomerNumber == null) { + throw new ApiException("Missing the required parameter 'imCustomerNumber' when calling getResellersV6Dealssearch(Async)"); + } + + // verify the required parameter 'imCountryCode' is set + if (imCountryCode == null) { + throw new ApiException("Missing the required parameter 'imCountryCode' when calling getResellersV6Dealssearch(Async)"); + } + + // verify the required parameter 'imCorrelationID' is set + if (imCorrelationID == null) { + throw new ApiException("Missing the required parameter 'imCorrelationID' when calling getResellersV6Dealssearch(Async)"); + } + + return getResellersV6DealssearchCall(imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, endUser, vendor, dealId, _callback); + + } + + /** + * Deals Search + * The Deals Search API, by default, will retrieve all the deals that are associated with the customer’s account. The customer will be able to search deals using the End-user name, Vendor name, or DealID. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param endUser The end user/customer's name. (optional) + * @param vendor The vendor's name. (optional) + * @param dealId Deal/Special bid number. (optional) + * @return DealsSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public DealsSearchResponse getResellersV6Dealssearch(String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, String endUser, String vendor, String dealId) throws ApiException { + ApiResponse localVarResp = getResellersV6DealssearchWithHttpInfo(imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, endUser, vendor, dealId); + return localVarResp.getData(); + } + + /** + * Deals Search + * The Deals Search API, by default, will retrieve all the deals that are associated with the customer’s account. The customer will be able to search deals using the End-user name, Vendor name, or DealID. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param endUser The end user/customer's name. (optional) + * @param vendor The vendor's name. (optional) + * @param dealId Deal/Special bid number. (optional) + * @return ApiResponse<DealsSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public ApiResponse getResellersV6DealssearchWithHttpInfo(String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, String endUser, String vendor, String dealId) throws ApiException { + okhttp3.Call localVarCall = getResellersV6DealssearchValidateBeforeCall(imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, endUser, vendor, dealId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Deals Search (asynchronously) + * The Deals Search API, by default, will retrieve all the deals that are associated with the customer’s account. The customer will be able to search deals using the End-user name, Vendor name, or DealID. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param endUser The end user/customer's name. (optional) + * @param vendor The vendor's name. (optional) + * @param dealId Deal/Special bid number. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call getResellersV6DealssearchAsync(String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, String endUser, String vendor, String dealId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getResellersV6DealssearchValidateBeforeCall(imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, endUser, vendor, dealId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/xiresellers/client/api/FreightEstimateApi.java b/src/main/java/xiresellers/client/api/FreightEstimateApi.java new file mode 100644 index 00000000..91066093 --- /dev/null +++ b/src/main/java/xiresellers/client/api/FreightEstimateApi.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiCallback; +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.ApiResponse; +import xiresellers.client.Configuration; +import xiresellers.client.Pair; +import xiresellers.client.ProgressRequestBody; +import xiresellers.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import xiresellers.client.model.FreightRequest; +import xiresellers.client.model.FreightResponse; +import xiresellers.client.model.GetResellerV6ValidateQuote500Response; +import xiresellers.client.model.PostRenewalssearch400Response; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class FreightEstimateApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public FreightEstimateApi() { + this(Configuration.getDefaultApiClient()); + } + + public FreightEstimateApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for postFreightestimate + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param imCustomerContact Logged in Users email address contact. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. (optional) + * @param freightRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Error: Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call postFreightestimateCall(String imCustomerNumber, String imCountryCode, String imCorrelationID, String imCustomerContact, String imSenderID, FreightRequest freightRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = freightRequest; + + // create path and map variables + String localVarPath = "/resellers/v6/freightestimate"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (imCustomerNumber != null) { + localVarHeaderParams.put("IM-CustomerNumber", localVarApiClient.parameterToString(imCustomerNumber)); + } + + if (imCountryCode != null) { + localVarHeaderParams.put("IM-CountryCode", localVarApiClient.parameterToString(imCountryCode)); + } + + if (imCorrelationID != null) { + localVarHeaderParams.put("IM-CorrelationID", localVarApiClient.parameterToString(imCorrelationID)); + } + + if (imCustomerContact != null) { + localVarHeaderParams.put("IM-CustomerContact", localVarApiClient.parameterToString(imCustomerContact)); + } + + if (imSenderID != null) { + localVarHeaderParams.put("IM-SenderID", localVarApiClient.parameterToString(imSenderID)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postFreightestimateValidateBeforeCall(String imCustomerNumber, String imCountryCode, String imCorrelationID, String imCustomerContact, String imSenderID, FreightRequest freightRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'imCustomerNumber' is set + if (imCustomerNumber == null) { + throw new ApiException("Missing the required parameter 'imCustomerNumber' when calling postFreightestimate(Async)"); + } + + // verify the required parameter 'imCountryCode' is set + if (imCountryCode == null) { + throw new ApiException("Missing the required parameter 'imCountryCode' when calling postFreightestimate(Async)"); + } + + // verify the required parameter 'imCorrelationID' is set + if (imCorrelationID == null) { + throw new ApiException("Missing the required parameter 'imCorrelationID' when calling postFreightestimate(Async)"); + } + + // verify the required parameter 'imCustomerContact' is set + if (imCustomerContact == null) { + throw new ApiException("Missing the required parameter 'imCustomerContact' when calling postFreightestimate(Async)"); + } + + return postFreightestimateCall(imCustomerNumber, imCountryCode, imCorrelationID, imCustomerContact, imSenderID, freightRequest, _callback); + + } + + /** + * Freight Estimate + * The freight estimator endpoint will allow customers to understand the freight cost for an order. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param imCustomerContact Logged in Users email address contact. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. (optional) + * @param freightRequest (optional) + * @return FreightResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Error: Bad Request -
    500 Internal Server Error -
    + */ + public FreightResponse postFreightestimate(String imCustomerNumber, String imCountryCode, String imCorrelationID, String imCustomerContact, String imSenderID, FreightRequest freightRequest) throws ApiException { + ApiResponse localVarResp = postFreightestimateWithHttpInfo(imCustomerNumber, imCountryCode, imCorrelationID, imCustomerContact, imSenderID, freightRequest); + return localVarResp.getData(); + } + + /** + * Freight Estimate + * The freight estimator endpoint will allow customers to understand the freight cost for an order. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param imCustomerContact Logged in Users email address contact. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. (optional) + * @param freightRequest (optional) + * @return ApiResponse<FreightResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Error: Bad Request -
    500 Internal Server Error -
    + */ + public ApiResponse postFreightestimateWithHttpInfo(String imCustomerNumber, String imCountryCode, String imCorrelationID, String imCustomerContact, String imSenderID, FreightRequest freightRequest) throws ApiException { + okhttp3.Call localVarCall = postFreightestimateValidateBeforeCall(imCustomerNumber, imCountryCode, imCorrelationID, imCustomerContact, imSenderID, freightRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Freight Estimate (asynchronously) + * The freight estimator endpoint will allow customers to understand the freight cost for an order. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param imCustomerContact Logged in Users email address contact. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. (optional) + * @param freightRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Error: Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call postFreightestimateAsync(String imCustomerNumber, String imCountryCode, String imCorrelationID, String imCustomerContact, String imSenderID, FreightRequest freightRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postFreightestimateValidateBeforeCall(imCustomerNumber, imCountryCode, imCorrelationID, imCustomerContact, imSenderID, freightRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/xiresellers/client/api/InvoicesApi.java b/src/main/java/xiresellers/client/api/InvoicesApi.java new file mode 100644 index 00000000..fe3a8913 --- /dev/null +++ b/src/main/java/xiresellers/client/api/InvoicesApi.java @@ -0,0 +1,633 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiCallback; +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.ApiResponse; +import xiresellers.client.Configuration; +import xiresellers.client.Pair; +import xiresellers.client.ProgressRequestBody; +import xiresellers.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import xiresellers.client.model.ErrorResponse; +import xiresellers.client.model.InvoiceDetailsv61Response; +import xiresellers.client.model.InvoiceSearchResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class InvoicesApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public InvoicesApi() { + this(Configuration.getDefaultApiClient()); + } + + public InvoicesApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getInvoicedetailsV61 + * @param invoiceNumber The Ingram Micro invoice number. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param imApplicationID Unique value used to identify the sender of the transaction. Example: MyCompany. (required) + * @param customerType it should be invoice or order (optional) + * @param includeSerialNumbers if serial in the response send as true or else false (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call getInvoicedetailsV61Call(String invoiceNumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imApplicationID, String customerType, Boolean includeSerialNumbers, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/resellers/v6.1/invoices/{invoiceNumber}" + .replace("{" + "invoiceNumber" + "}", localVarApiClient.escapeString(invoiceNumber.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (customerType != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("customerType", customerType)); + } + + if (includeSerialNumbers != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("includeSerialNumbers", includeSerialNumbers)); + } + + if (imCustomerNumber != null) { + localVarHeaderParams.put("IM-CustomerNumber", localVarApiClient.parameterToString(imCustomerNumber)); + } + + if (imCountryCode != null) { + localVarHeaderParams.put("IM-CountryCode", localVarApiClient.parameterToString(imCountryCode)); + } + + if (imCorrelationID != null) { + localVarHeaderParams.put("IM-CorrelationID", localVarApiClient.parameterToString(imCorrelationID)); + } + + if (imApplicationID != null) { + localVarHeaderParams.put("IM-ApplicationID", localVarApiClient.parameterToString(imApplicationID)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getInvoicedetailsV61ValidateBeforeCall(String invoiceNumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imApplicationID, String customerType, Boolean includeSerialNumbers, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'invoiceNumber' is set + if (invoiceNumber == null) { + throw new ApiException("Missing the required parameter 'invoiceNumber' when calling getInvoicedetailsV61(Async)"); + } + + // verify the required parameter 'imCustomerNumber' is set + if (imCustomerNumber == null) { + throw new ApiException("Missing the required parameter 'imCustomerNumber' when calling getInvoicedetailsV61(Async)"); + } + + // verify the required parameter 'imCountryCode' is set + if (imCountryCode == null) { + throw new ApiException("Missing the required parameter 'imCountryCode' when calling getInvoicedetailsV61(Async)"); + } + + // verify the required parameter 'imCorrelationID' is set + if (imCorrelationID == null) { + throw new ApiException("Missing the required parameter 'imCorrelationID' when calling getInvoicedetailsV61(Async)"); + } + + // verify the required parameter 'imApplicationID' is set + if (imApplicationID == null) { + throw new ApiException("Missing the required parameter 'imApplicationID' when calling getInvoicedetailsV61(Async)"); + } + + return getInvoicedetailsV61Call(invoiceNumber, imCustomerNumber, imCountryCode, imCorrelationID, imApplicationID, customerType, includeSerialNumbers, _callback); + + } + + /** + * Get Invoice Details v6.1 + * Use your Ingram Micro invoice number to search for existing invoices or retrieve existing invoice details. The invoice number, IM-CustomerNumber, IM-CountryCode, IM-ApplicationId and IM-CorrelationID are required parameters. . + * @param invoiceNumber The Ingram Micro invoice number. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param imApplicationID Unique value used to identify the sender of the transaction. Example: MyCompany. (required) + * @param customerType it should be invoice or order (optional) + * @param includeSerialNumbers if serial in the response send as true or else false (optional) + * @return InvoiceDetailsv61Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public InvoiceDetailsv61Response getInvoicedetailsV61(String invoiceNumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imApplicationID, String customerType, Boolean includeSerialNumbers) throws ApiException { + ApiResponse localVarResp = getInvoicedetailsV61WithHttpInfo(invoiceNumber, imCustomerNumber, imCountryCode, imCorrelationID, imApplicationID, customerType, includeSerialNumbers); + return localVarResp.getData(); + } + + /** + * Get Invoice Details v6.1 + * Use your Ingram Micro invoice number to search for existing invoices or retrieve existing invoice details. The invoice number, IM-CustomerNumber, IM-CountryCode, IM-ApplicationId and IM-CorrelationID are required parameters. . + * @param invoiceNumber The Ingram Micro invoice number. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param imApplicationID Unique value used to identify the sender of the transaction. Example: MyCompany. (required) + * @param customerType it should be invoice or order (optional) + * @param includeSerialNumbers if serial in the response send as true or else false (optional) + * @return ApiResponse<InvoiceDetailsv61Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public ApiResponse getInvoicedetailsV61WithHttpInfo(String invoiceNumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imApplicationID, String customerType, Boolean includeSerialNumbers) throws ApiException { + okhttp3.Call localVarCall = getInvoicedetailsV61ValidateBeforeCall(invoiceNumber, imCustomerNumber, imCountryCode, imCorrelationID, imApplicationID, customerType, includeSerialNumbers, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Invoice Details v6.1 (asynchronously) + * Use your Ingram Micro invoice number to search for existing invoices or retrieve existing invoice details. The invoice number, IM-CustomerNumber, IM-CountryCode, IM-ApplicationId and IM-CorrelationID are required parameters. . + * @param invoiceNumber The Ingram Micro invoice number. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param imApplicationID Unique value used to identify the sender of the transaction. Example: MyCompany. (required) + * @param customerType it should be invoice or order (optional) + * @param includeSerialNumbers if serial in the response send as true or else false (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call getInvoicedetailsV61Async(String invoiceNumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imApplicationID, String customerType, Boolean includeSerialNumbers, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getInvoicedetailsV61ValidateBeforeCall(invoiceNumber, imCustomerNumber, imCountryCode, imCorrelationID, imApplicationID, customerType, includeSerialNumbers, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getResellersV6Invoicesearch + * @param imApplicationID Unique value used to identify the sender of the transaction. Example: MyCompany (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param paymentTermsNetDate Search by payment terms net date(yyyy-MM-dd). (optional) + * @param invoiceDate Search by invoice date(yyyy-MM-dd). (optional) + * @param invoiceDueDate Search by invoice date from(yyyy-MM-dd). (optional) + * @param orderDate Search by OrderDate date(yyyy-MM-dd). (optional) + * @param orderFromDate Search by OrderFromDate date(yyyy-MM-dd). (optional) + * @param orderToDate Search by OrderToDate date(yyyy-MM-dd). (optional) + * @param orderNumber Search by order number (optional) + * @param deliveryNumber Search by delivery number. (optional) + * @param invoiceNumber The Ingram Micro invoice number. (optional) + * @param invoiceStatus Ingram Micro invoice status. (optional) + * @param invoiceType Ingram Micro InvoiceType. (optional) + * @param customerOrderNumber Ingram Micro CustomerOrderNumber. (optional) + * @param endCustomerOrderNumber Ingram Micro EndCustomerOrderNumber. (optional) + * @param specialBidNumber Ingram Micro SpecialBidNumber. (optional) + * @param invoiceFromDueDate Search by invoice due date from(yyyy-MM-dd). (optional) + * @param invoiceToDueDate Search by invoice due date to(yyyy-MM-dd). (optional) + * @param invoiceFromDate Search by invoice date from(yyyy-MM-dd). (optional) + * @param invoiceToDate Search by invoice date To(yyyy-MM-dd). (optional) + * @param pageSize Number of records required in the call - max records 100 per page. (optional) + * @param pageNumber The page number reference. (optional) + * @param orderby Column name with which we want to sort. (optional) + * @param direction asc or desc , along with orderby column result set will be sorted. (optional) + * @param serialNumber Serial number of the product. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 InvoiceSearchResponse to be returned -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call getResellersV6InvoicesearchCall(String imApplicationID, String imCustomerNumber, String imCountryCode, String imCorrelationID, String paymentTermsNetDate, String invoiceDate, String invoiceDueDate, String orderDate, String orderFromDate, String orderToDate, String orderNumber, String deliveryNumber, String invoiceNumber, String invoiceStatus, String invoiceType, String customerOrderNumber, String endCustomerOrderNumber, String specialBidNumber, String invoiceFromDueDate, String invoiceToDueDate, List invoiceFromDate, List invoiceToDate, Integer pageSize, Integer pageNumber, String orderby, String direction, String serialNumber, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/resellers/v6/invoices/"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (paymentTermsNetDate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("paymentTermsNetDate", paymentTermsNetDate)); + } + + if (invoiceDate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("invoiceDate", invoiceDate)); + } + + if (invoiceDueDate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("invoiceDueDate", invoiceDueDate)); + } + + if (orderDate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("orderDate", orderDate)); + } + + if (orderFromDate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("orderFromDate", orderFromDate)); + } + + if (orderToDate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("orderToDate", orderToDate)); + } + + if (orderNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("orderNumber", orderNumber)); + } + + if (deliveryNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("DeliveryNumber", deliveryNumber)); + } + + if (invoiceNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("invoiceNumber", invoiceNumber)); + } + + if (invoiceStatus != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("invoiceStatus", invoiceStatus)); + } + + if (invoiceType != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("invoiceType", invoiceType)); + } + + if (customerOrderNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("customerOrderNumber", customerOrderNumber)); + } + + if (endCustomerOrderNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("endCustomerOrderNumber", endCustomerOrderNumber)); + } + + if (specialBidNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("specialBidNumber", specialBidNumber)); + } + + if (invoiceFromDueDate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("invoiceFromDueDate", invoiceFromDueDate)); + } + + if (invoiceToDueDate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("invoiceToDueDate", invoiceToDueDate)); + } + + if (invoiceFromDate != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "invoiceFromDate", invoiceFromDate)); + } + + if (invoiceToDate != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "invoiceToDate", invoiceToDate)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + if (pageNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageNumber", pageNumber)); + } + + if (orderby != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("orderby", orderby)); + } + + if (direction != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("direction", direction)); + } + + if (serialNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("serialNumber", serialNumber)); + } + + if (imApplicationID != null) { + localVarHeaderParams.put("IM-ApplicationID ", localVarApiClient.parameterToString(imApplicationID)); + } + + if (imCustomerNumber != null) { + localVarHeaderParams.put("IM-CustomerNumber", localVarApiClient.parameterToString(imCustomerNumber)); + } + + if (imCountryCode != null) { + localVarHeaderParams.put("IM-CountryCode", localVarApiClient.parameterToString(imCountryCode)); + } + + if (imCorrelationID != null) { + localVarHeaderParams.put("IM-CorrelationID", localVarApiClient.parameterToString(imCorrelationID)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getResellersV6InvoicesearchValidateBeforeCall(String imApplicationID, String imCustomerNumber, String imCountryCode, String imCorrelationID, String paymentTermsNetDate, String invoiceDate, String invoiceDueDate, String orderDate, String orderFromDate, String orderToDate, String orderNumber, String deliveryNumber, String invoiceNumber, String invoiceStatus, String invoiceType, String customerOrderNumber, String endCustomerOrderNumber, String specialBidNumber, String invoiceFromDueDate, String invoiceToDueDate, List invoiceFromDate, List invoiceToDate, Integer pageSize, Integer pageNumber, String orderby, String direction, String serialNumber, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'imApplicationID' is set + if (imApplicationID == null) { + throw new ApiException("Missing the required parameter 'imApplicationID' when calling getResellersV6Invoicesearch(Async)"); + } + + // verify the required parameter 'imCustomerNumber' is set + if (imCustomerNumber == null) { + throw new ApiException("Missing the required parameter 'imCustomerNumber' when calling getResellersV6Invoicesearch(Async)"); + } + + // verify the required parameter 'imCountryCode' is set + if (imCountryCode == null) { + throw new ApiException("Missing the required parameter 'imCountryCode' when calling getResellersV6Invoicesearch(Async)"); + } + + // verify the required parameter 'imCorrelationID' is set + if (imCorrelationID == null) { + throw new ApiException("Missing the required parameter 'imCorrelationID' when calling getResellersV6Invoicesearch(Async)"); + } + + return getResellersV6InvoicesearchCall(imApplicationID, imCustomerNumber, imCountryCode, imCorrelationID, paymentTermsNetDate, invoiceDate, invoiceDueDate, orderDate, orderFromDate, orderToDate, orderNumber, deliveryNumber, invoiceNumber, invoiceStatus, invoiceType, customerOrderNumber, endCustomerOrderNumber, specialBidNumber, invoiceFromDueDate, invoiceToDueDate, invoiceFromDate, invoiceToDate, pageSize, pageNumber, orderby, direction, serialNumber, _callback); + + } + + /** + * Search your invoice + * Search your Ingram Micro invoices. This endpoint searches by multiple invoice parameters and supports pagination of results. + * @param imApplicationID Unique value used to identify the sender of the transaction. Example: MyCompany (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param paymentTermsNetDate Search by payment terms net date(yyyy-MM-dd). (optional) + * @param invoiceDate Search by invoice date(yyyy-MM-dd). (optional) + * @param invoiceDueDate Search by invoice date from(yyyy-MM-dd). (optional) + * @param orderDate Search by OrderDate date(yyyy-MM-dd). (optional) + * @param orderFromDate Search by OrderFromDate date(yyyy-MM-dd). (optional) + * @param orderToDate Search by OrderToDate date(yyyy-MM-dd). (optional) + * @param orderNumber Search by order number (optional) + * @param deliveryNumber Search by delivery number. (optional) + * @param invoiceNumber The Ingram Micro invoice number. (optional) + * @param invoiceStatus Ingram Micro invoice status. (optional) + * @param invoiceType Ingram Micro InvoiceType. (optional) + * @param customerOrderNumber Ingram Micro CustomerOrderNumber. (optional) + * @param endCustomerOrderNumber Ingram Micro EndCustomerOrderNumber. (optional) + * @param specialBidNumber Ingram Micro SpecialBidNumber. (optional) + * @param invoiceFromDueDate Search by invoice due date from(yyyy-MM-dd). (optional) + * @param invoiceToDueDate Search by invoice due date to(yyyy-MM-dd). (optional) + * @param invoiceFromDate Search by invoice date from(yyyy-MM-dd). (optional) + * @param invoiceToDate Search by invoice date To(yyyy-MM-dd). (optional) + * @param pageSize Number of records required in the call - max records 100 per page. (optional) + * @param pageNumber The page number reference. (optional) + * @param orderby Column name with which we want to sort. (optional) + * @param direction asc or desc , along with orderby column result set will be sorted. (optional) + * @param serialNumber Serial number of the product. (optional) + * @return InvoiceSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 InvoiceSearchResponse to be returned -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public InvoiceSearchResponse getResellersV6Invoicesearch(String imApplicationID, String imCustomerNumber, String imCountryCode, String imCorrelationID, String paymentTermsNetDate, String invoiceDate, String invoiceDueDate, String orderDate, String orderFromDate, String orderToDate, String orderNumber, String deliveryNumber, String invoiceNumber, String invoiceStatus, String invoiceType, String customerOrderNumber, String endCustomerOrderNumber, String specialBidNumber, String invoiceFromDueDate, String invoiceToDueDate, List invoiceFromDate, List invoiceToDate, Integer pageSize, Integer pageNumber, String orderby, String direction, String serialNumber) throws ApiException { + ApiResponse localVarResp = getResellersV6InvoicesearchWithHttpInfo(imApplicationID, imCustomerNumber, imCountryCode, imCorrelationID, paymentTermsNetDate, invoiceDate, invoiceDueDate, orderDate, orderFromDate, orderToDate, orderNumber, deliveryNumber, invoiceNumber, invoiceStatus, invoiceType, customerOrderNumber, endCustomerOrderNumber, specialBidNumber, invoiceFromDueDate, invoiceToDueDate, invoiceFromDate, invoiceToDate, pageSize, pageNumber, orderby, direction, serialNumber); + return localVarResp.getData(); + } + + /** + * Search your invoice + * Search your Ingram Micro invoices. This endpoint searches by multiple invoice parameters and supports pagination of results. + * @param imApplicationID Unique value used to identify the sender of the transaction. Example: MyCompany (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param paymentTermsNetDate Search by payment terms net date(yyyy-MM-dd). (optional) + * @param invoiceDate Search by invoice date(yyyy-MM-dd). (optional) + * @param invoiceDueDate Search by invoice date from(yyyy-MM-dd). (optional) + * @param orderDate Search by OrderDate date(yyyy-MM-dd). (optional) + * @param orderFromDate Search by OrderFromDate date(yyyy-MM-dd). (optional) + * @param orderToDate Search by OrderToDate date(yyyy-MM-dd). (optional) + * @param orderNumber Search by order number (optional) + * @param deliveryNumber Search by delivery number. (optional) + * @param invoiceNumber The Ingram Micro invoice number. (optional) + * @param invoiceStatus Ingram Micro invoice status. (optional) + * @param invoiceType Ingram Micro InvoiceType. (optional) + * @param customerOrderNumber Ingram Micro CustomerOrderNumber. (optional) + * @param endCustomerOrderNumber Ingram Micro EndCustomerOrderNumber. (optional) + * @param specialBidNumber Ingram Micro SpecialBidNumber. (optional) + * @param invoiceFromDueDate Search by invoice due date from(yyyy-MM-dd). (optional) + * @param invoiceToDueDate Search by invoice due date to(yyyy-MM-dd). (optional) + * @param invoiceFromDate Search by invoice date from(yyyy-MM-dd). (optional) + * @param invoiceToDate Search by invoice date To(yyyy-MM-dd). (optional) + * @param pageSize Number of records required in the call - max records 100 per page. (optional) + * @param pageNumber The page number reference. (optional) + * @param orderby Column name with which we want to sort. (optional) + * @param direction asc or desc , along with orderby column result set will be sorted. (optional) + * @param serialNumber Serial number of the product. (optional) + * @return ApiResponse<InvoiceSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 InvoiceSearchResponse to be returned -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public ApiResponse getResellersV6InvoicesearchWithHttpInfo(String imApplicationID, String imCustomerNumber, String imCountryCode, String imCorrelationID, String paymentTermsNetDate, String invoiceDate, String invoiceDueDate, String orderDate, String orderFromDate, String orderToDate, String orderNumber, String deliveryNumber, String invoiceNumber, String invoiceStatus, String invoiceType, String customerOrderNumber, String endCustomerOrderNumber, String specialBidNumber, String invoiceFromDueDate, String invoiceToDueDate, List invoiceFromDate, List invoiceToDate, Integer pageSize, Integer pageNumber, String orderby, String direction, String serialNumber) throws ApiException { + okhttp3.Call localVarCall = getResellersV6InvoicesearchValidateBeforeCall(imApplicationID, imCustomerNumber, imCountryCode, imCorrelationID, paymentTermsNetDate, invoiceDate, invoiceDueDate, orderDate, orderFromDate, orderToDate, orderNumber, deliveryNumber, invoiceNumber, invoiceStatus, invoiceType, customerOrderNumber, endCustomerOrderNumber, specialBidNumber, invoiceFromDueDate, invoiceToDueDate, invoiceFromDate, invoiceToDate, pageSize, pageNumber, orderby, direction, serialNumber, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Search your invoice (asynchronously) + * Search your Ingram Micro invoices. This endpoint searches by multiple invoice parameters and supports pagination of results. + * @param imApplicationID Unique value used to identify the sender of the transaction. Example: MyCompany (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param paymentTermsNetDate Search by payment terms net date(yyyy-MM-dd). (optional) + * @param invoiceDate Search by invoice date(yyyy-MM-dd). (optional) + * @param invoiceDueDate Search by invoice date from(yyyy-MM-dd). (optional) + * @param orderDate Search by OrderDate date(yyyy-MM-dd). (optional) + * @param orderFromDate Search by OrderFromDate date(yyyy-MM-dd). (optional) + * @param orderToDate Search by OrderToDate date(yyyy-MM-dd). (optional) + * @param orderNumber Search by order number (optional) + * @param deliveryNumber Search by delivery number. (optional) + * @param invoiceNumber The Ingram Micro invoice number. (optional) + * @param invoiceStatus Ingram Micro invoice status. (optional) + * @param invoiceType Ingram Micro InvoiceType. (optional) + * @param customerOrderNumber Ingram Micro CustomerOrderNumber. (optional) + * @param endCustomerOrderNumber Ingram Micro EndCustomerOrderNumber. (optional) + * @param specialBidNumber Ingram Micro SpecialBidNumber. (optional) + * @param invoiceFromDueDate Search by invoice due date from(yyyy-MM-dd). (optional) + * @param invoiceToDueDate Search by invoice due date to(yyyy-MM-dd). (optional) + * @param invoiceFromDate Search by invoice date from(yyyy-MM-dd). (optional) + * @param invoiceToDate Search by invoice date To(yyyy-MM-dd). (optional) + * @param pageSize Number of records required in the call - max records 100 per page. (optional) + * @param pageNumber The page number reference. (optional) + * @param orderby Column name with which we want to sort. (optional) + * @param direction asc or desc , along with orderby column result set will be sorted. (optional) + * @param serialNumber Serial number of the product. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 InvoiceSearchResponse to be returned -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call getResellersV6InvoicesearchAsync(String imApplicationID, String imCustomerNumber, String imCountryCode, String imCorrelationID, String paymentTermsNetDate, String invoiceDate, String invoiceDueDate, String orderDate, String orderFromDate, String orderToDate, String orderNumber, String deliveryNumber, String invoiceNumber, String invoiceStatus, String invoiceType, String customerOrderNumber, String endCustomerOrderNumber, String specialBidNumber, String invoiceFromDueDate, String invoiceToDueDate, List invoiceFromDate, List invoiceToDate, Integer pageSize, Integer pageNumber, String orderby, String direction, String serialNumber, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getResellersV6InvoicesearchValidateBeforeCall(imApplicationID, imCustomerNumber, imCountryCode, imCorrelationID, paymentTermsNetDate, invoiceDate, invoiceDueDate, orderDate, orderFromDate, orderToDate, orderNumber, deliveryNumber, invoiceNumber, invoiceStatus, invoiceType, customerOrderNumber, endCustomerOrderNumber, specialBidNumber, invoiceFromDueDate, invoiceToDueDate, invoiceFromDate, invoiceToDate, pageSize, pageNumber, orderby, direction, serialNumber, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/xiresellers/client/api/InvoicesV4Api.java b/src/main/java/xiresellers/client/api/InvoicesV4Api.java new file mode 100644 index 00000000..b0a85fb4 --- /dev/null +++ b/src/main/java/xiresellers/client/api/InvoicesV4Api.java @@ -0,0 +1,194 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiCallback; +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.ApiResponse; +import xiresellers.client.Configuration; +import xiresellers.client.Pair; +import xiresellers.client.ProgressRequestBody; +import xiresellers.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import xiresellers.client.model.InvoiceDetailRequest; +import xiresellers.client.model.InvoiceDetailResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class InvoicesV4Api { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public InvoicesV4Api() { + this(Configuration.getDefaultApiClient()); + } + + public InvoicesV4Api(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for postV4Invoicedetails + * @param invoiceDetailRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call postV4InvoicedetailsCall(InvoiceDetailRequest invoiceDetailRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = invoiceDetailRequest; + + // create path and map variables + String localVarPath = "/invoices/v4/invoicedetails"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postV4InvoicedetailsValidateBeforeCall(InvoiceDetailRequest invoiceDetailRequest, final ApiCallback _callback) throws ApiException { + return postV4InvoicedetailsCall(invoiceDetailRequest, _callback); + + } + + /** + * Get Invoice Details + * A real-time request that allows the customer to query Ingram Micro for Invoice information for a specific open or shipped order (in the past 9 months). Orders are searched using Ingram Micro Sales Order Number. + * @param invoiceDetailRequest (optional) + * @return InvoiceDetailResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public InvoiceDetailResponse postV4Invoicedetails(InvoiceDetailRequest invoiceDetailRequest) throws ApiException { + ApiResponse localVarResp = postV4InvoicedetailsWithHttpInfo(invoiceDetailRequest); + return localVarResp.getData(); + } + + /** + * Get Invoice Details + * A real-time request that allows the customer to query Ingram Micro for Invoice information for a specific open or shipped order (in the past 9 months). Orders are searched using Ingram Micro Sales Order Number. + * @param invoiceDetailRequest (optional) + * @return ApiResponse<InvoiceDetailResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public ApiResponse postV4InvoicedetailsWithHttpInfo(InvoiceDetailRequest invoiceDetailRequest) throws ApiException { + okhttp3.Call localVarCall = postV4InvoicedetailsValidateBeforeCall(invoiceDetailRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Invoice Details (asynchronously) + * A real-time request that allows the customer to query Ingram Micro for Invoice information for a specific open or shipped order (in the past 9 months). Orders are searched using Ingram Micro Sales Order Number. + * @param invoiceDetailRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call postV4InvoicedetailsAsync(InvoiceDetailRequest invoiceDetailRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postV4InvoicedetailsValidateBeforeCall(invoiceDetailRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/xiresellers/client/api/InvoicesV5Api.java b/src/main/java/xiresellers/client/api/InvoicesV5Api.java new file mode 100644 index 00000000..c05fd097 --- /dev/null +++ b/src/main/java/xiresellers/client/api/InvoicesV5Api.java @@ -0,0 +1,224 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiCallback; +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.ApiResponse; +import xiresellers.client.Configuration; +import xiresellers.client.Pair; +import xiresellers.client.ProgressRequestBody; +import xiresellers.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import xiresellers.client.model.InvoiceDetails; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class InvoicesV5Api { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public InvoicesV5Api() { + this(Configuration.getDefaultApiClient()); + } + + public InvoicesV5Api(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getInvoices + * @param invoiceNumber Ingram Micro Invoice Number (required) + * @param customerNumber Your unique Ingram Micro customer number (required) + * @param isoCountryCode ISO 2 char country code (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call getInvoicesCall(String invoiceNumber, String customerNumber, String isoCountryCode, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/resellers/v5/invoices/{invoiceNumber}" + .replace("{" + "invoiceNumber" + "}", localVarApiClient.escapeString(invoiceNumber.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (customerNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("customerNumber", customerNumber)); + } + + if (isoCountryCode != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("isoCountryCode", isoCountryCode)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getInvoicesValidateBeforeCall(String invoiceNumber, String customerNumber, String isoCountryCode, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'invoiceNumber' is set + if (invoiceNumber == null) { + throw new ApiException("Missing the required parameter 'invoiceNumber' when calling getInvoices(Async)"); + } + + // verify the required parameter 'customerNumber' is set + if (customerNumber == null) { + throw new ApiException("Missing the required parameter 'customerNumber' when calling getInvoices(Async)"); + } + + // verify the required parameter 'isoCountryCode' is set + if (isoCountryCode == null) { + throw new ApiException("Missing the required parameter 'isoCountryCode' when calling getInvoices(Async)"); + } + + return getInvoicesCall(invoiceNumber, customerNumber, isoCountryCode, _callback); + + } + + /** + * Get Invoice Details + * View invoice details. This is a request to query invoice details for a specific Ingram Micro order placed in the last 9 months, whether open or shipped. <strong>invoiceNumber</strong>, <strong>isoCountryCode</strong> and <strong>customerNumber</strong> parameters are required. + * @param invoiceNumber Ingram Micro Invoice Number (required) + * @param customerNumber Your unique Ingram Micro customer number (required) + * @param isoCountryCode ISO 2 char country code (required) + * @return InvoiceDetails + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public InvoiceDetails getInvoices(String invoiceNumber, String customerNumber, String isoCountryCode) throws ApiException { + ApiResponse localVarResp = getInvoicesWithHttpInfo(invoiceNumber, customerNumber, isoCountryCode); + return localVarResp.getData(); + } + + /** + * Get Invoice Details + * View invoice details. This is a request to query invoice details for a specific Ingram Micro order placed in the last 9 months, whether open or shipped. <strong>invoiceNumber</strong>, <strong>isoCountryCode</strong> and <strong>customerNumber</strong> parameters are required. + * @param invoiceNumber Ingram Micro Invoice Number (required) + * @param customerNumber Your unique Ingram Micro customer number (required) + * @param isoCountryCode ISO 2 char country code (required) + * @return ApiResponse<InvoiceDetails> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public ApiResponse getInvoicesWithHttpInfo(String invoiceNumber, String customerNumber, String isoCountryCode) throws ApiException { + okhttp3.Call localVarCall = getInvoicesValidateBeforeCall(invoiceNumber, customerNumber, isoCountryCode, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Invoice Details (asynchronously) + * View invoice details. This is a request to query invoice details for a specific Ingram Micro order placed in the last 9 months, whether open or shipped. <strong>invoiceNumber</strong>, <strong>isoCountryCode</strong> and <strong>customerNumber</strong> parameters are required. + * @param invoiceNumber Ingram Micro Invoice Number (required) + * @param customerNumber Your unique Ingram Micro customer number (required) + * @param isoCountryCode ISO 2 char country code (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call getInvoicesAsync(String invoiceNumber, String customerNumber, String isoCountryCode, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getInvoicesValidateBeforeCall(invoiceNumber, customerNumber, isoCountryCode, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/xiresellers/client/api/InvoicesV6Api.java b/src/main/java/xiresellers/client/api/InvoicesV6Api.java new file mode 100644 index 00000000..368cc64a --- /dev/null +++ b/src/main/java/xiresellers/client/api/InvoicesV6Api.java @@ -0,0 +1,288 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiCallback; +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.ApiResponse; +import xiresellers.client.Configuration; +import xiresellers.client.Pair; +import xiresellers.client.ProgressRequestBody; +import xiresellers.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import xiresellers.client.model.ErrorResponse; +import xiresellers.client.model.InvoiceDetailResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class InvoicesV6Api { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public InvoicesV6Api() { + this(Configuration.getDefaultApiClient()); + } + + public InvoicesV6Api(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getInvoicedetailsV6 + * @param invoicenumber The Ingram Micro invoice number. (required) + * @param version Version of codebase. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param imApplicationID Unique value used to identify the sender of the transaction. Example: MyCompany. (required) + * @param customerType it should be invoice or order (optional) + * @param includeSerialNumbers if serial in the response send as true or else false (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-ApplicationID - Unique value used to identify the sender of the transaction. Example: MyCompany
    400 Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call getInvoicedetailsV6Call(String invoicenumber, String version, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imApplicationID, String customerType, Boolean includeSerialNumbers, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/resellers/v6/invoices/{invoicenumber}" + .replace("{" + "invoicenumber" + "}", localVarApiClient.escapeString(invoicenumber.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (customerType != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("customerType", customerType)); + } + + if (includeSerialNumbers != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("includeSerialNumbers", includeSerialNumbers)); + } + + if (version != null) { + localVarHeaderParams.put("version", localVarApiClient.parameterToString(version)); + } + + if (imCustomerNumber != null) { + localVarHeaderParams.put("IM-CustomerNumber", localVarApiClient.parameterToString(imCustomerNumber)); + } + + if (imCountryCode != null) { + localVarHeaderParams.put("IM-CountryCode", localVarApiClient.parameterToString(imCountryCode)); + } + + if (imCorrelationID != null) { + localVarHeaderParams.put("IM-CorrelationID", localVarApiClient.parameterToString(imCorrelationID)); + } + + if (imApplicationID != null) { + localVarHeaderParams.put("IM-ApplicationID", localVarApiClient.parameterToString(imApplicationID)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getInvoicedetailsV6ValidateBeforeCall(String invoicenumber, String version, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imApplicationID, String customerType, Boolean includeSerialNumbers, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'invoicenumber' is set + if (invoicenumber == null) { + throw new ApiException("Missing the required parameter 'invoicenumber' when calling getInvoicedetailsV6(Async)"); + } + + // verify the required parameter 'version' is set + if (version == null) { + throw new ApiException("Missing the required parameter 'version' when calling getInvoicedetailsV6(Async)"); + } + + // verify the required parameter 'imCustomerNumber' is set + if (imCustomerNumber == null) { + throw new ApiException("Missing the required parameter 'imCustomerNumber' when calling getInvoicedetailsV6(Async)"); + } + + // verify the required parameter 'imCountryCode' is set + if (imCountryCode == null) { + throw new ApiException("Missing the required parameter 'imCountryCode' when calling getInvoicedetailsV6(Async)"); + } + + // verify the required parameter 'imCorrelationID' is set + if (imCorrelationID == null) { + throw new ApiException("Missing the required parameter 'imCorrelationID' when calling getInvoicedetailsV6(Async)"); + } + + // verify the required parameter 'imApplicationID' is set + if (imApplicationID == null) { + throw new ApiException("Missing the required parameter 'imApplicationID' when calling getInvoicedetailsV6(Async)"); + } + + return getInvoicedetailsV6Call(invoicenumber, version, imCustomerNumber, imCountryCode, imCorrelationID, imApplicationID, customerType, includeSerialNumbers, _callback); + + } + + /** + * Get Invoice Details v6 + * Use your Ingram Micro invoice number to search for existing invoices or retrieve existing invoice details. The invoice number, IM-CustomerNumber, IM-CountryCode, IM-ApplicationId and IM-CorrelationID are required parameters. . + * @param invoicenumber The Ingram Micro invoice number. (required) + * @param version Version of codebase. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param imApplicationID Unique value used to identify the sender of the transaction. Example: MyCompany. (required) + * @param customerType it should be invoice or order (optional) + * @param includeSerialNumbers if serial in the response send as true or else false (optional) + * @return InvoiceDetailResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-ApplicationID - Unique value used to identify the sender of the transaction. Example: MyCompany
    400 Bad Request -
    500 Internal Server Error -
    + */ + public InvoiceDetailResponse getInvoicedetailsV6(String invoicenumber, String version, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imApplicationID, String customerType, Boolean includeSerialNumbers) throws ApiException { + ApiResponse localVarResp = getInvoicedetailsV6WithHttpInfo(invoicenumber, version, imCustomerNumber, imCountryCode, imCorrelationID, imApplicationID, customerType, includeSerialNumbers); + return localVarResp.getData(); + } + + /** + * Get Invoice Details v6 + * Use your Ingram Micro invoice number to search for existing invoices or retrieve existing invoice details. The invoice number, IM-CustomerNumber, IM-CountryCode, IM-ApplicationId and IM-CorrelationID are required parameters. . + * @param invoicenumber The Ingram Micro invoice number. (required) + * @param version Version of codebase. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param imApplicationID Unique value used to identify the sender of the transaction. Example: MyCompany. (required) + * @param customerType it should be invoice or order (optional) + * @param includeSerialNumbers if serial in the response send as true or else false (optional) + * @return ApiResponse<InvoiceDetailResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-ApplicationID - Unique value used to identify the sender of the transaction. Example: MyCompany
    400 Bad Request -
    500 Internal Server Error -
    + */ + public ApiResponse getInvoicedetailsV6WithHttpInfo(String invoicenumber, String version, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imApplicationID, String customerType, Boolean includeSerialNumbers) throws ApiException { + okhttp3.Call localVarCall = getInvoicedetailsV6ValidateBeforeCall(invoicenumber, version, imCustomerNumber, imCountryCode, imCorrelationID, imApplicationID, customerType, includeSerialNumbers, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Invoice Details v6 (asynchronously) + * Use your Ingram Micro invoice number to search for existing invoices or retrieve existing invoice details. The invoice number, IM-CustomerNumber, IM-CountryCode, IM-ApplicationId and IM-CorrelationID are required parameters. . + * @param invoicenumber The Ingram Micro invoice number. (required) + * @param version Version of codebase. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param imApplicationID Unique value used to identify the sender of the transaction. Example: MyCompany. (required) + * @param customerType it should be invoice or order (optional) + * @param includeSerialNumbers if serial in the response send as true or else false (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-ApplicationID - Unique value used to identify the sender of the transaction. Example: MyCompany
    400 Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call getInvoicedetailsV6Async(String invoicenumber, String version, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imApplicationID, String customerType, Boolean includeSerialNumbers, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getInvoicedetailsV6ValidateBeforeCall(invoicenumber, version, imCustomerNumber, imCountryCode, imCorrelationID, imApplicationID, customerType, includeSerialNumbers, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/xiresellers/client/api/OrderStatusApi.java b/src/main/java/xiresellers/client/api/OrderStatusApi.java new file mode 100644 index 00000000..626cba40 --- /dev/null +++ b/src/main/java/xiresellers/client/api/OrderStatusApi.java @@ -0,0 +1,223 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiCallback; +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.ApiResponse; +import xiresellers.client.Configuration; +import xiresellers.client.Pair; +import xiresellers.client.ProgressRequestBody; +import xiresellers.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import xiresellers.client.model.OrderStatusAsyncNotificationRequest; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class OrderStatusApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public OrderStatusApi() { + this(Configuration.getDefaultApiClient()); + } + + public OrderStatusApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for resellersV1WebhooksOrderstatuseventPost + * @param targeturl The webhook url where the request needs to sent. (required) + * @param xHubSignature Ingram Micro creates a signature token by use of a secret key + Event ID. The algorithm to generate the secret ley is given at link https://developer.ingrammicro.com/reseller/article/how-use-webhook-secret-key. Use the event Id in the below sample along with your secret key to generate the key. Alternatively, to send try this out, use a random text to see how it works. (required) + * @param orderStatusAsyncNotificationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
    Status Code Description Response Headers
    200 OK -
    500 Internal Server Error -
    + */ + public okhttp3.Call resellersV1WebhooksOrderstatuseventPostCall(String targeturl, String xHubSignature, OrderStatusAsyncNotificationRequest orderStatusAsyncNotificationRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = orderStatusAsyncNotificationRequest; + + // create path and map variables + String localVarPath = "/resellers/v1/webhooks/orderstatusevent"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (targeturl != null) { + localVarHeaderParams.put("targeturl", localVarApiClient.parameterToString(targeturl)); + } + + if (xHubSignature != null) { + localVarHeaderParams.put("x-hub-signature", localVarApiClient.parameterToString(xHubSignature)); + } + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call resellersV1WebhooksOrderstatuseventPostValidateBeforeCall(String targeturl, String xHubSignature, OrderStatusAsyncNotificationRequest orderStatusAsyncNotificationRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'targeturl' is set + if (targeturl == null) { + throw new ApiException("Missing the required parameter 'targeturl' when calling resellersV1WebhooksOrderstatuseventPost(Async)"); + } + + // verify the required parameter 'xHubSignature' is set + if (xHubSignature == null) { + throw new ApiException("Missing the required parameter 'xHubSignature' when calling resellersV1WebhooksOrderstatuseventPost(Async)"); + } + + // verify the required parameter 'orderStatusAsyncNotificationRequest' is set + if (orderStatusAsyncNotificationRequest == null) { + throw new ApiException("Missing the required parameter 'orderStatusAsyncNotificationRequest' when calling resellersV1WebhooksOrderstatuseventPost(Async)"); + } + + return resellersV1WebhooksOrderstatuseventPostCall(targeturl, xHubSignature, orderStatusAsyncNotificationRequest, _callback); + + } + + /** + * Order Status + * + * @param targeturl The webhook url where the request needs to sent. (required) + * @param xHubSignature Ingram Micro creates a signature token by use of a secret key + Event ID. The algorithm to generate the secret ley is given at link https://developer.ingrammicro.com/reseller/article/how-use-webhook-secret-key. Use the event Id in the below sample along with your secret key to generate the key. Alternatively, to send try this out, use a random text to see how it works. (required) + * @param orderStatusAsyncNotificationRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
    Status Code Description Response Headers
    200 OK -
    500 Internal Server Error -
    + */ + public void resellersV1WebhooksOrderstatuseventPost(String targeturl, String xHubSignature, OrderStatusAsyncNotificationRequest orderStatusAsyncNotificationRequest) throws ApiException { + resellersV1WebhooksOrderstatuseventPostWithHttpInfo(targeturl, xHubSignature, orderStatusAsyncNotificationRequest); + } + + /** + * Order Status + * + * @param targeturl The webhook url where the request needs to sent. (required) + * @param xHubSignature Ingram Micro creates a signature token by use of a secret key + Event ID. The algorithm to generate the secret ley is given at link https://developer.ingrammicro.com/reseller/article/how-use-webhook-secret-key. Use the event Id in the below sample along with your secret key to generate the key. Alternatively, to send try this out, use a random text to see how it works. (required) + * @param orderStatusAsyncNotificationRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
    Status Code Description Response Headers
    200 OK -
    500 Internal Server Error -
    + */ + public ApiResponse resellersV1WebhooksOrderstatuseventPostWithHttpInfo(String targeturl, String xHubSignature, OrderStatusAsyncNotificationRequest orderStatusAsyncNotificationRequest) throws ApiException { + okhttp3.Call localVarCall = resellersV1WebhooksOrderstatuseventPostValidateBeforeCall(targeturl, xHubSignature, orderStatusAsyncNotificationRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Order Status (asynchronously) + * + * @param targeturl The webhook url where the request needs to sent. (required) + * @param xHubSignature Ingram Micro creates a signature token by use of a secret key + Event ID. The algorithm to generate the secret ley is given at link https://developer.ingrammicro.com/reseller/article/how-use-webhook-secret-key. Use the event Id in the below sample along with your secret key to generate the key. Alternatively, to send try this out, use a random text to see how it works. (required) + * @param orderStatusAsyncNotificationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
    Status Code Description Response Headers
    200 OK -
    500 Internal Server Error -
    + */ + public okhttp3.Call resellersV1WebhooksOrderstatuseventPostAsync(String targeturl, String xHubSignature, OrderStatusAsyncNotificationRequest orderStatusAsyncNotificationRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = resellersV1WebhooksOrderstatuseventPostValidateBeforeCall(targeturl, xHubSignature, orderStatusAsyncNotificationRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/src/main/java/xiresellers/client/api/OrdersApi.java b/src/main/java/xiresellers/client/api/OrdersApi.java new file mode 100644 index 00000000..29f1af98 --- /dev/null +++ b/src/main/java/xiresellers/client/api/OrdersApi.java @@ -0,0 +1,1205 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiCallback; +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.ApiResponse; +import xiresellers.client.Configuration; +import xiresellers.client.Pair; +import xiresellers.client.ProgressRequestBody; +import xiresellers.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import xiresellers.client.model.ErrorResponse; +import xiresellers.client.model.ErrorResponseDTO; +import java.time.LocalDate; +import xiresellers.client.model.OrderCreateRequest; +import xiresellers.client.model.OrderCreateResponse; +import xiresellers.client.model.OrderDetailB2B; +import xiresellers.client.model.OrderModifyRequest; +import xiresellers.client.model.OrderModifyResponse; +import xiresellers.client.model.OrderSearchResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class OrdersApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public OrdersApi() { + this(Configuration.getDefaultApiClient()); + } + + public OrdersApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for deleteOrdercancel + * @param orderNumber Ingram Micro sales order number. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param regionCode Region code for sandbox testing - Not for use in production. (optional) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
    Status Code Description Response Headers
    200 Ok * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    400 Bad Request * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    404 Not Found * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    405 Method Not Allowed * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    500 Internal Server Error * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    + */ + public okhttp3.Call deleteOrdercancelCall(String orderNumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String regionCode, String imSenderID, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/resellers/v6/orders/{OrderNumber}" + .replace("{" + "OrderNumber" + "}", localVarApiClient.escapeString(orderNumber.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (regionCode != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("regionCode", regionCode)); + } + + if (imCustomerNumber != null) { + localVarHeaderParams.put("IM-CustomerNumber", localVarApiClient.parameterToString(imCustomerNumber)); + } + + if (imCountryCode != null) { + localVarHeaderParams.put("IM-CountryCode", localVarApiClient.parameterToString(imCountryCode)); + } + + if (imCorrelationID != null) { + localVarHeaderParams.put("IM-CorrelationID", localVarApiClient.parameterToString(imCorrelationID)); + } + + if (imSenderID != null) { + localVarHeaderParams.put("IM-SenderID", localVarApiClient.parameterToString(imSenderID)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteOrdercancelValidateBeforeCall(String orderNumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String regionCode, String imSenderID, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'orderNumber' is set + if (orderNumber == null) { + throw new ApiException("Missing the required parameter 'orderNumber' when calling deleteOrdercancel(Async)"); + } + + // verify the required parameter 'imCustomerNumber' is set + if (imCustomerNumber == null) { + throw new ApiException("Missing the required parameter 'imCustomerNumber' when calling deleteOrdercancel(Async)"); + } + + // verify the required parameter 'imCountryCode' is set + if (imCountryCode == null) { + throw new ApiException("Missing the required parameter 'imCountryCode' when calling deleteOrdercancel(Async)"); + } + + // verify the required parameter 'imCorrelationID' is set + if (imCorrelationID == null) { + throw new ApiException("Missing the required parameter 'imCorrelationID' when calling deleteOrdercancel(Async)"); + } + + return deleteOrdercancelCall(orderNumber, imCustomerNumber, imCountryCode, imCorrelationID, regionCode, imSenderID, _callback); + + } + + /** + * Cancel your Order + * This call must be submitted before the order is released to Ingram Micro’s warehouse. The order cannot be canceled once it is released to the warehouse. Order should be on customer hold to delete any order from Ingram system. + * @param orderNumber Ingram Micro sales order number. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param regionCode Region code for sandbox testing - Not for use in production. (optional) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
    Status Code Description Response Headers
    200 Ok * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    400 Bad Request * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    404 Not Found * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    405 Method Not Allowed * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    500 Internal Server Error * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    + */ + public void deleteOrdercancel(String orderNumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String regionCode, String imSenderID) throws ApiException { + deleteOrdercancelWithHttpInfo(orderNumber, imCustomerNumber, imCountryCode, imCorrelationID, regionCode, imSenderID); + } + + /** + * Cancel your Order + * This call must be submitted before the order is released to Ingram Micro’s warehouse. The order cannot be canceled once it is released to the warehouse. Order should be on customer hold to delete any order from Ingram system. + * @param orderNumber Ingram Micro sales order number. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param regionCode Region code for sandbox testing - Not for use in production. (optional) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
    Status Code Description Response Headers
    200 Ok * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    400 Bad Request * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    404 Not Found * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    405 Method Not Allowed * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    500 Internal Server Error * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    + */ + public ApiResponse deleteOrdercancelWithHttpInfo(String orderNumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String regionCode, String imSenderID) throws ApiException { + okhttp3.Call localVarCall = deleteOrdercancelValidateBeforeCall(orderNumber, imCustomerNumber, imCountryCode, imCorrelationID, regionCode, imSenderID, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Cancel your Order (asynchronously) + * This call must be submitted before the order is released to Ingram Micro’s warehouse. The order cannot be canceled once it is released to the warehouse. Order should be on customer hold to delete any order from Ingram system. + * @param orderNumber Ingram Micro sales order number. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param regionCode Region code for sandbox testing - Not for use in production. (optional) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + +
    Status Code Description Response Headers
    200 Ok * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    400 Bad Request * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    404 Not Found * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    405 Method Not Allowed * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    500 Internal Server Error * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    + */ + public okhttp3.Call deleteOrdercancelAsync(String orderNumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String regionCode, String imSenderID, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteOrdercancelValidateBeforeCall(orderNumber, imCustomerNumber, imCountryCode, imCorrelationID, regionCode, imSenderID, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for getOrderdetailsV61 + * @param ordernumber The Ingram Micro sales order number. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany. (optional) + * @param ingramOrderDate The date and time in UTC format that the order was created. (optional) + * @param vendorNumber Vendor Number. (optional) + * @param simulateStatus Order response for various order statuses. Not for use in production. (optional) + * @param isIml True/False only for IML customers. (optional) + * @param regionCode Region code for sandbox testing - Not for use in production. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
    Status Code Description Response Headers
    200 Success -
    500 Server Error -
    + */ + public okhttp3.Call getOrderdetailsV61Call(String ordernumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, LocalDate ingramOrderDate, String vendorNumber, String simulateStatus, Boolean isIml, String regionCode, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/resellers/v6.1/orders/{ordernumber}" + .replace("{" + "ordernumber" + "}", localVarApiClient.escapeString(ordernumber.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (ingramOrderDate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("ingramOrderDate", ingramOrderDate)); + } + + if (vendorNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("vendorNumber", vendorNumber)); + } + + if (simulateStatus != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("simulateStatus", simulateStatus)); + } + + if (isIml != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("isIml", isIml)); + } + + if (regionCode != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("regionCode", regionCode)); + } + + if (imCustomerNumber != null) { + localVarHeaderParams.put("IM-CustomerNumber", localVarApiClient.parameterToString(imCustomerNumber)); + } + + if (imCountryCode != null) { + localVarHeaderParams.put("IM-CountryCode", localVarApiClient.parameterToString(imCountryCode)); + } + + if (imCorrelationID != null) { + localVarHeaderParams.put("IM-CorrelationID", localVarApiClient.parameterToString(imCorrelationID)); + } + + if (imSenderID != null) { + localVarHeaderParams.put("IM-SenderID", localVarApiClient.parameterToString(imSenderID)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getOrderdetailsV61ValidateBeforeCall(String ordernumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, LocalDate ingramOrderDate, String vendorNumber, String simulateStatus, Boolean isIml, String regionCode, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'ordernumber' is set + if (ordernumber == null) { + throw new ApiException("Missing the required parameter 'ordernumber' when calling getOrderdetailsV61(Async)"); + } + + // verify the required parameter 'imCustomerNumber' is set + if (imCustomerNumber == null) { + throw new ApiException("Missing the required parameter 'imCustomerNumber' when calling getOrderdetailsV61(Async)"); + } + + // verify the required parameter 'imCountryCode' is set + if (imCountryCode == null) { + throw new ApiException("Missing the required parameter 'imCountryCode' when calling getOrderdetailsV61(Async)"); + } + + // verify the required parameter 'imCorrelationID' is set + if (imCorrelationID == null) { + throw new ApiException("Missing the required parameter 'imCorrelationID' when calling getOrderdetailsV61(Async)"); + } + + return getOrderdetailsV61Call(ordernumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, ingramOrderDate, vendorNumber, simulateStatus, isIml, regionCode, _callback); + + } + + /** + * Get Order Details v6.1 + * The Orders details API endpoint allows a customer to retrieve their Ingram Micro orders details by using the Ingram Micro sales order number as a path parameter. The sales order number, IM-CustomerNumber, IM-CountryCode, and IM-CorrelationID are required parameters.<br><br>*Service contracts, subscriptions, and license information are unavailable at the moment, this information will be available in the future. <br><br> Recent bug fixes: - Fixed duplication of serial numbers in the API response. - Fixed API time-out issues - Fixed missing tracking information. - Implemented enhanced order status. + * @param ordernumber The Ingram Micro sales order number. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany. (optional) + * @param ingramOrderDate The date and time in UTC format that the order was created. (optional) + * @param vendorNumber Vendor Number. (optional) + * @param simulateStatus Order response for various order statuses. Not for use in production. (optional) + * @param isIml True/False only for IML customers. (optional) + * @param regionCode Region code for sandbox testing - Not for use in production. (optional) + * @return OrderDetailB2B + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
    Status Code Description Response Headers
    200 Success -
    500 Server Error -
    + */ + public OrderDetailB2B getOrderdetailsV61(String ordernumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, LocalDate ingramOrderDate, String vendorNumber, String simulateStatus, Boolean isIml, String regionCode) throws ApiException { + ApiResponse localVarResp = getOrderdetailsV61WithHttpInfo(ordernumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, ingramOrderDate, vendorNumber, simulateStatus, isIml, regionCode); + return localVarResp.getData(); + } + + /** + * Get Order Details v6.1 + * The Orders details API endpoint allows a customer to retrieve their Ingram Micro orders details by using the Ingram Micro sales order number as a path parameter. The sales order number, IM-CustomerNumber, IM-CountryCode, and IM-CorrelationID are required parameters.<br><br>*Service contracts, subscriptions, and license information are unavailable at the moment, this information will be available in the future. <br><br> Recent bug fixes: - Fixed duplication of serial numbers in the API response. - Fixed API time-out issues - Fixed missing tracking information. - Implemented enhanced order status. + * @param ordernumber The Ingram Micro sales order number. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany. (optional) + * @param ingramOrderDate The date and time in UTC format that the order was created. (optional) + * @param vendorNumber Vendor Number. (optional) + * @param simulateStatus Order response for various order statuses. Not for use in production. (optional) + * @param isIml True/False only for IML customers. (optional) + * @param regionCode Region code for sandbox testing - Not for use in production. (optional) + * @return ApiResponse<OrderDetailB2B> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
    Status Code Description Response Headers
    200 Success -
    500 Server Error -
    + */ + public ApiResponse getOrderdetailsV61WithHttpInfo(String ordernumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, LocalDate ingramOrderDate, String vendorNumber, String simulateStatus, Boolean isIml, String regionCode) throws ApiException { + okhttp3.Call localVarCall = getOrderdetailsV61ValidateBeforeCall(ordernumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, ingramOrderDate, vendorNumber, simulateStatus, isIml, regionCode, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Order Details v6.1 (asynchronously) + * The Orders details API endpoint allows a customer to retrieve their Ingram Micro orders details by using the Ingram Micro sales order number as a path parameter. The sales order number, IM-CustomerNumber, IM-CountryCode, and IM-CorrelationID are required parameters.<br><br>*Service contracts, subscriptions, and license information are unavailable at the moment, this information will be available in the future. <br><br> Recent bug fixes: - Fixed duplication of serial numbers in the API response. - Fixed API time-out issues - Fixed missing tracking information. - Implemented enhanced order status. + * @param ordernumber The Ingram Micro sales order number. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany. (optional) + * @param ingramOrderDate The date and time in UTC format that the order was created. (optional) + * @param vendorNumber Vendor Number. (optional) + * @param simulateStatus Order response for various order statuses. Not for use in production. (optional) + * @param isIml True/False only for IML customers. (optional) + * @param regionCode Region code for sandbox testing - Not for use in production. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
    Status Code Description Response Headers
    200 Success -
    500 Server Error -
    + */ + public okhttp3.Call getOrderdetailsV61Async(String ordernumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, LocalDate ingramOrderDate, String vendorNumber, String simulateStatus, Boolean isIml, String regionCode, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getOrderdetailsV61ValidateBeforeCall(ordernumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, ingramOrderDate, vendorNumber, simulateStatus, isIml, regionCode, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getResellersV6Ordersearch + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param ingramOrderNumber The Ingram Micro order number. (optional) + * @param orderStatus Ingram Micro order status. (optional) + * @param orderStatusIn Ingram Micro order status(can use it for multiple entries). (optional) + * @param ingramOrderDate Search by Order date(yyyy-MM-dd). (optional) + * @param ingramOrderDateBt Search with the start and end date(only 2 entries allowed). (optional) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param customerOrderNumber Search using your PO/Order number. (optional) + * @param pageSize The number of records required in the call - max records 100 per page. (optional) + * @param pageNumber The page number reference. (optional) + * @param endCustomerOrderNumber End customer/user purchase order number. (optional) + * @param invoiceDateBt Invoice date of order, search with the start and end date(only 2 entries allowed).*Currently, this feature is not available in Australia. (optional) + * @param shipDateBt Shipment date of order, search with the start and end date(only 2 entries allowed). (optional) + * @param deliveryDateBt The delivery date of the order, search with the start and end date(only 2 entries allowed).*Currently, this feature is not available in Australia (optional) + * @param ingramPartNumber Ingram Micro unique part number for the product. (optional) + * @param vendorPartNumber Vendor’s part number for the product. (optional) + * @param serialNumber A serial number of the product. (optional) + * @param trackingNumber The tracking number of the order.*Currently, this feature is not available in Australia (optional) + * @param vendorName Name of the vendor. (optional) + * @param specialBidNumber The bid number provided to the reseller by the vendor for special pricing and discounts. Line-level bid numbers take precedence over header-level bid numbers.*Currently, this feature is not available in Australia (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
    Status Code Description Response Headers
    200 OrderSearch_Response to be returned -
    204 No Content * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    400 Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call getResellersV6OrdersearchCall(String imCustomerNumber, String imCountryCode, String imCorrelationID, String ingramOrderNumber, String orderStatus, List orderStatusIn, String ingramOrderDate, List ingramOrderDateBt, String imSenderID, String customerOrderNumber, Integer pageSize, Integer pageNumber, String endCustomerOrderNumber, List invoiceDateBt, List shipDateBt, List deliveryDateBt, String ingramPartNumber, String vendorPartNumber, String serialNumber, String trackingNumber, String vendorName, String specialBidNumber, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/resellers/v6/orders/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (ingramOrderNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("ingramOrderNumber", ingramOrderNumber)); + } + + if (orderStatus != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("orderStatus", orderStatus)); + } + + if (orderStatusIn != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "orderStatus-in", orderStatusIn)); + } + + if (ingramOrderDate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("ingramOrderDate", ingramOrderDate)); + } + + if (ingramOrderDateBt != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "ingramOrderDate-bt", ingramOrderDateBt)); + } + + if (customerOrderNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("customerOrderNumber", customerOrderNumber)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + if (pageNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageNumber", pageNumber)); + } + + if (endCustomerOrderNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("endCustomerOrderNumber", endCustomerOrderNumber)); + } + + if (invoiceDateBt != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "invoiceDate_bt", invoiceDateBt)); + } + + if (shipDateBt != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "shipDate_bt", shipDateBt)); + } + + if (deliveryDateBt != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "deliveryDate_bt", deliveryDateBt)); + } + + if (ingramPartNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("ingramPartNumber", ingramPartNumber)); + } + + if (vendorPartNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("vendorPartNumber", vendorPartNumber)); + } + + if (serialNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("serialNumber", serialNumber)); + } + + if (trackingNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("trackingNumber", trackingNumber)); + } + + if (vendorName != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("vendorName", vendorName)); + } + + if (specialBidNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("specialBidNumber", specialBidNumber)); + } + + if (imCustomerNumber != null) { + localVarHeaderParams.put("IM-CustomerNumber", localVarApiClient.parameterToString(imCustomerNumber)); + } + + if (imCountryCode != null) { + localVarHeaderParams.put("IM-CountryCode", localVarApiClient.parameterToString(imCountryCode)); + } + + if (imCorrelationID != null) { + localVarHeaderParams.put("IM-CorrelationID", localVarApiClient.parameterToString(imCorrelationID)); + } + + if (imSenderID != null) { + localVarHeaderParams.put("IM-SenderID", localVarApiClient.parameterToString(imSenderID)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getResellersV6OrdersearchValidateBeforeCall(String imCustomerNumber, String imCountryCode, String imCorrelationID, String ingramOrderNumber, String orderStatus, List orderStatusIn, String ingramOrderDate, List ingramOrderDateBt, String imSenderID, String customerOrderNumber, Integer pageSize, Integer pageNumber, String endCustomerOrderNumber, List invoiceDateBt, List shipDateBt, List deliveryDateBt, String ingramPartNumber, String vendorPartNumber, String serialNumber, String trackingNumber, String vendorName, String specialBidNumber, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'imCustomerNumber' is set + if (imCustomerNumber == null) { + throw new ApiException("Missing the required parameter 'imCustomerNumber' when calling getResellersV6Ordersearch(Async)"); + } + + // verify the required parameter 'imCountryCode' is set + if (imCountryCode == null) { + throw new ApiException("Missing the required parameter 'imCountryCode' when calling getResellersV6Ordersearch(Async)"); + } + + // verify the required parameter 'imCorrelationID' is set + if (imCorrelationID == null) { + throw new ApiException("Missing the required parameter 'imCorrelationID' when calling getResellersV6Ordersearch(Async)"); + } + + return getResellersV6OrdersearchCall(imCustomerNumber, imCountryCode, imCorrelationID, ingramOrderNumber, orderStatus, orderStatusIn, ingramOrderDate, ingramOrderDateBt, imSenderID, customerOrderNumber, pageSize, pageNumber, endCustomerOrderNumber, invoiceDateBt, shipDateBt, deliveryDateBt, ingramPartNumber, vendorPartNumber, serialNumber, trackingNumber, vendorName, specialBidNumber, _callback); + + } + + /** + * Search your Orders + * The Orders Search API endpoint allows a customer to search their Ingram Micro orders by using any of the available query string parameters, customer can search their order by using single query string parameters or combining them together. This endpoint supports the pagination of results. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param ingramOrderNumber The Ingram Micro order number. (optional) + * @param orderStatus Ingram Micro order status. (optional) + * @param orderStatusIn Ingram Micro order status(can use it for multiple entries). (optional) + * @param ingramOrderDate Search by Order date(yyyy-MM-dd). (optional) + * @param ingramOrderDateBt Search with the start and end date(only 2 entries allowed). (optional) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param customerOrderNumber Search using your PO/Order number. (optional) + * @param pageSize The number of records required in the call - max records 100 per page. (optional) + * @param pageNumber The page number reference. (optional) + * @param endCustomerOrderNumber End customer/user purchase order number. (optional) + * @param invoiceDateBt Invoice date of order, search with the start and end date(only 2 entries allowed).*Currently, this feature is not available in Australia. (optional) + * @param shipDateBt Shipment date of order, search with the start and end date(only 2 entries allowed). (optional) + * @param deliveryDateBt The delivery date of the order, search with the start and end date(only 2 entries allowed).*Currently, this feature is not available in Australia (optional) + * @param ingramPartNumber Ingram Micro unique part number for the product. (optional) + * @param vendorPartNumber Vendor’s part number for the product. (optional) + * @param serialNumber A serial number of the product. (optional) + * @param trackingNumber The tracking number of the order.*Currently, this feature is not available in Australia (optional) + * @param vendorName Name of the vendor. (optional) + * @param specialBidNumber The bid number provided to the reseller by the vendor for special pricing and discounts. Line-level bid numbers take precedence over header-level bid numbers.*Currently, this feature is not available in Australia (optional) + * @return OrderSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
    Status Code Description Response Headers
    200 OrderSearch_Response to be returned -
    204 No Content * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    400 Bad Request -
    500 Internal Server Error -
    + */ + public OrderSearchResponse getResellersV6Ordersearch(String imCustomerNumber, String imCountryCode, String imCorrelationID, String ingramOrderNumber, String orderStatus, List orderStatusIn, String ingramOrderDate, List ingramOrderDateBt, String imSenderID, String customerOrderNumber, Integer pageSize, Integer pageNumber, String endCustomerOrderNumber, List invoiceDateBt, List shipDateBt, List deliveryDateBt, String ingramPartNumber, String vendorPartNumber, String serialNumber, String trackingNumber, String vendorName, String specialBidNumber) throws ApiException { + ApiResponse localVarResp = getResellersV6OrdersearchWithHttpInfo(imCustomerNumber, imCountryCode, imCorrelationID, ingramOrderNumber, orderStatus, orderStatusIn, ingramOrderDate, ingramOrderDateBt, imSenderID, customerOrderNumber, pageSize, pageNumber, endCustomerOrderNumber, invoiceDateBt, shipDateBt, deliveryDateBt, ingramPartNumber, vendorPartNumber, serialNumber, trackingNumber, vendorName, specialBidNumber); + return localVarResp.getData(); + } + + /** + * Search your Orders + * The Orders Search API endpoint allows a customer to search their Ingram Micro orders by using any of the available query string parameters, customer can search their order by using single query string parameters or combining them together. This endpoint supports the pagination of results. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param ingramOrderNumber The Ingram Micro order number. (optional) + * @param orderStatus Ingram Micro order status. (optional) + * @param orderStatusIn Ingram Micro order status(can use it for multiple entries). (optional) + * @param ingramOrderDate Search by Order date(yyyy-MM-dd). (optional) + * @param ingramOrderDateBt Search with the start and end date(only 2 entries allowed). (optional) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param customerOrderNumber Search using your PO/Order number. (optional) + * @param pageSize The number of records required in the call - max records 100 per page. (optional) + * @param pageNumber The page number reference. (optional) + * @param endCustomerOrderNumber End customer/user purchase order number. (optional) + * @param invoiceDateBt Invoice date of order, search with the start and end date(only 2 entries allowed).*Currently, this feature is not available in Australia. (optional) + * @param shipDateBt Shipment date of order, search with the start and end date(only 2 entries allowed). (optional) + * @param deliveryDateBt The delivery date of the order, search with the start and end date(only 2 entries allowed).*Currently, this feature is not available in Australia (optional) + * @param ingramPartNumber Ingram Micro unique part number for the product. (optional) + * @param vendorPartNumber Vendor’s part number for the product. (optional) + * @param serialNumber A serial number of the product. (optional) + * @param trackingNumber The tracking number of the order.*Currently, this feature is not available in Australia (optional) + * @param vendorName Name of the vendor. (optional) + * @param specialBidNumber The bid number provided to the reseller by the vendor for special pricing and discounts. Line-level bid numbers take precedence over header-level bid numbers.*Currently, this feature is not available in Australia (optional) + * @return ApiResponse<OrderSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
    Status Code Description Response Headers
    200 OrderSearch_Response to be returned -
    204 No Content * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    400 Bad Request -
    500 Internal Server Error -
    + */ + public ApiResponse getResellersV6OrdersearchWithHttpInfo(String imCustomerNumber, String imCountryCode, String imCorrelationID, String ingramOrderNumber, String orderStatus, List orderStatusIn, String ingramOrderDate, List ingramOrderDateBt, String imSenderID, String customerOrderNumber, Integer pageSize, Integer pageNumber, String endCustomerOrderNumber, List invoiceDateBt, List shipDateBt, List deliveryDateBt, String ingramPartNumber, String vendorPartNumber, String serialNumber, String trackingNumber, String vendorName, String specialBidNumber) throws ApiException { + okhttp3.Call localVarCall = getResellersV6OrdersearchValidateBeforeCall(imCustomerNumber, imCountryCode, imCorrelationID, ingramOrderNumber, orderStatus, orderStatusIn, ingramOrderDate, ingramOrderDateBt, imSenderID, customerOrderNumber, pageSize, pageNumber, endCustomerOrderNumber, invoiceDateBt, shipDateBt, deliveryDateBt, ingramPartNumber, vendorPartNumber, serialNumber, trackingNumber, vendorName, specialBidNumber, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Search your Orders (asynchronously) + * The Orders Search API endpoint allows a customer to search their Ingram Micro orders by using any of the available query string parameters, customer can search their order by using single query string parameters or combining them together. This endpoint supports the pagination of results. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param ingramOrderNumber The Ingram Micro order number. (optional) + * @param orderStatus Ingram Micro order status. (optional) + * @param orderStatusIn Ingram Micro order status(can use it for multiple entries). (optional) + * @param ingramOrderDate Search by Order date(yyyy-MM-dd). (optional) + * @param ingramOrderDateBt Search with the start and end date(only 2 entries allowed). (optional) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param customerOrderNumber Search using your PO/Order number. (optional) + * @param pageSize The number of records required in the call - max records 100 per page. (optional) + * @param pageNumber The page number reference. (optional) + * @param endCustomerOrderNumber End customer/user purchase order number. (optional) + * @param invoiceDateBt Invoice date of order, search with the start and end date(only 2 entries allowed).*Currently, this feature is not available in Australia. (optional) + * @param shipDateBt Shipment date of order, search with the start and end date(only 2 entries allowed). (optional) + * @param deliveryDateBt The delivery date of the order, search with the start and end date(only 2 entries allowed).*Currently, this feature is not available in Australia (optional) + * @param ingramPartNumber Ingram Micro unique part number for the product. (optional) + * @param vendorPartNumber Vendor’s part number for the product. (optional) + * @param serialNumber A serial number of the product. (optional) + * @param trackingNumber The tracking number of the order.*Currently, this feature is not available in Australia (optional) + * @param vendorName Name of the vendor. (optional) + * @param specialBidNumber The bid number provided to the reseller by the vendor for special pricing and discounts. Line-level bid numbers take precedence over header-level bid numbers.*Currently, this feature is not available in Australia (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
    Status Code Description Response Headers
    200 OrderSearch_Response to be returned -
    204 No Content * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    400 Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call getResellersV6OrdersearchAsync(String imCustomerNumber, String imCountryCode, String imCorrelationID, String ingramOrderNumber, String orderStatus, List orderStatusIn, String ingramOrderDate, List ingramOrderDateBt, String imSenderID, String customerOrderNumber, Integer pageSize, Integer pageNumber, String endCustomerOrderNumber, List invoiceDateBt, List shipDateBt, List deliveryDateBt, String ingramPartNumber, String vendorPartNumber, String serialNumber, String trackingNumber, String vendorName, String specialBidNumber, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getResellersV6OrdersearchValidateBeforeCall(imCustomerNumber, imCountryCode, imCorrelationID, ingramOrderNumber, orderStatus, orderStatusIn, ingramOrderDate, ingramOrderDateBt, imSenderID, customerOrderNumber, pageSize, pageNumber, endCustomerOrderNumber, invoiceDateBt, shipDateBt, deliveryDateBt, ingramPartNumber, vendorPartNumber, serialNumber, trackingNumber, vendorName, specialBidNumber, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postCreateorderV6 + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param orderCreateRequest (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
    Status Code Description Response Headers
    201 Created * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    207 Multi-Status * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    400 Bad Request * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    500 Internal Server Error * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    + */ + public okhttp3.Call postCreateorderV6Call(String imCustomerNumber, String imCountryCode, String imCorrelationID, OrderCreateRequest orderCreateRequest, String imSenderID, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = orderCreateRequest; + + // create path and map variables + String localVarPath = "/resellers/v6/orders"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (imCustomerNumber != null) { + localVarHeaderParams.put("IM-CustomerNumber", localVarApiClient.parameterToString(imCustomerNumber)); + } + + if (imCountryCode != null) { + localVarHeaderParams.put("IM-CountryCode", localVarApiClient.parameterToString(imCountryCode)); + } + + if (imSenderID != null) { + localVarHeaderParams.put("IM-SenderID", localVarApiClient.parameterToString(imSenderID)); + } + + if (imCorrelationID != null) { + localVarHeaderParams.put("IM-CorrelationID", localVarApiClient.parameterToString(imCorrelationID)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postCreateorderV6ValidateBeforeCall(String imCustomerNumber, String imCountryCode, String imCorrelationID, OrderCreateRequest orderCreateRequest, String imSenderID, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'imCustomerNumber' is set + if (imCustomerNumber == null) { + throw new ApiException("Missing the required parameter 'imCustomerNumber' when calling postCreateorderV6(Async)"); + } + + // verify the required parameter 'imCountryCode' is set + if (imCountryCode == null) { + throw new ApiException("Missing the required parameter 'imCountryCode' when calling postCreateorderV6(Async)"); + } + + // verify the required parameter 'imCorrelationID' is set + if (imCorrelationID == null) { + throw new ApiException("Missing the required parameter 'imCorrelationID' when calling postCreateorderV6(Async)"); + } + + // verify the required parameter 'orderCreateRequest' is set + if (orderCreateRequest == null) { + throw new ApiException("Missing the required parameter 'orderCreateRequest' when calling postCreateorderV6(Async)"); + } + + return postCreateorderV6Call(imCustomerNumber, imCountryCode, imCorrelationID, orderCreateRequest, imSenderID, _callback); + + } + + /** + * Create your Order + * Instantly create and place orders. The POST API supports stocked SKUs as well as licensing and warranties SKUs. IM-CustomerNumber, IM-CountryCode, IM-SenderID and IM-CorrelationID are required parameters. Ingram Micro recommends that you provide the ingrampartnumber for each SKU contained in each order. NOTE: You must have net terms to use the Ingram Micro Order Create API. Ingram Micro offers trade credit when using our APIs, and repayment is based on net terms. For example, if your net terms agreement is net-30, you will have 30 days to make a full payment. Ingram Micro does not allow credit card transactions for API ordering. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param orderCreateRequest (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @return OrderCreateResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
    Status Code Description Response Headers
    201 Created * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    207 Multi-Status * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    400 Bad Request * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    500 Internal Server Error * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    + */ + public OrderCreateResponse postCreateorderV6(String imCustomerNumber, String imCountryCode, String imCorrelationID, OrderCreateRequest orderCreateRequest, String imSenderID) throws ApiException { + ApiResponse localVarResp = postCreateorderV6WithHttpInfo(imCustomerNumber, imCountryCode, imCorrelationID, orderCreateRequest, imSenderID); + return localVarResp.getData(); + } + + /** + * Create your Order + * Instantly create and place orders. The POST API supports stocked SKUs as well as licensing and warranties SKUs. IM-CustomerNumber, IM-CountryCode, IM-SenderID and IM-CorrelationID are required parameters. Ingram Micro recommends that you provide the ingrampartnumber for each SKU contained in each order. NOTE: You must have net terms to use the Ingram Micro Order Create API. Ingram Micro offers trade credit when using our APIs, and repayment is based on net terms. For example, if your net terms agreement is net-30, you will have 30 days to make a full payment. Ingram Micro does not allow credit card transactions for API ordering. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param orderCreateRequest (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @return ApiResponse<OrderCreateResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
    Status Code Description Response Headers
    201 Created * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    207 Multi-Status * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    400 Bad Request * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    500 Internal Server Error * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    + */ + public ApiResponse postCreateorderV6WithHttpInfo(String imCustomerNumber, String imCountryCode, String imCorrelationID, OrderCreateRequest orderCreateRequest, String imSenderID) throws ApiException { + okhttp3.Call localVarCall = postCreateorderV6ValidateBeforeCall(imCustomerNumber, imCountryCode, imCorrelationID, orderCreateRequest, imSenderID, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create your Order (asynchronously) + * Instantly create and place orders. The POST API supports stocked SKUs as well as licensing and warranties SKUs. IM-CustomerNumber, IM-CountryCode, IM-SenderID and IM-CorrelationID are required parameters. Ingram Micro recommends that you provide the ingrampartnumber for each SKU contained in each order. NOTE: You must have net terms to use the Ingram Micro Order Create API. Ingram Micro offers trade credit when using our APIs, and repayment is based on net terms. For example, if your net terms agreement is net-30, you will have 30 days to make a full payment. Ingram Micro does not allow credit card transactions for API ordering. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param orderCreateRequest (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
    Status Code Description Response Headers
    201 Created * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    207 Multi-Status * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    400 Bad Request * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    500 Internal Server Error * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    + */ + public okhttp3.Call postCreateorderV6Async(String imCustomerNumber, String imCountryCode, String imCorrelationID, OrderCreateRequest orderCreateRequest, String imSenderID, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postCreateorderV6ValidateBeforeCall(imCustomerNumber, imCountryCode, imCorrelationID, orderCreateRequest, imSenderID, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for putOrdermodify + * @param orderNumber Ingram sales order number. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param orderModifyRequest (required) + * @param actionCode Action code to be used for order release. (optional) + * @param regionCode Region code paramter to be used only for order release functionality.Region code is only for sandbox not for production (optional) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
    Status Code Description Response Headers
    200 OK * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    201 Created * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    207 Multi-Status * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    400 Bad Request * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    401 Unauthorized -
    404 Not Found -
    500 Internal Server Error * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    + */ + public okhttp3.Call putOrdermodifyCall(String orderNumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, OrderModifyRequest orderModifyRequest, String actionCode, String regionCode, String imSenderID, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = orderModifyRequest; + + // create path and map variables + String localVarPath = "/resellers/v6/orders/{orderNumber}" + .replace("{" + "orderNumber" + "}", localVarApiClient.escapeString(orderNumber.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (actionCode != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("actionCode", actionCode)); + } + + if (regionCode != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("regionCode", regionCode)); + } + + if (imCustomerNumber != null) { + localVarHeaderParams.put("IM-CustomerNumber", localVarApiClient.parameterToString(imCustomerNumber)); + } + + if (imCountryCode != null) { + localVarHeaderParams.put("IM-CountryCode", localVarApiClient.parameterToString(imCountryCode)); + } + + if (imCorrelationID != null) { + localVarHeaderParams.put("IM-CorrelationID", localVarApiClient.parameterToString(imCorrelationID)); + } + + if (imSenderID != null) { + localVarHeaderParams.put("IM-SenderID", localVarApiClient.parameterToString(imSenderID)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call putOrdermodifyValidateBeforeCall(String orderNumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, OrderModifyRequest orderModifyRequest, String actionCode, String regionCode, String imSenderID, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'orderNumber' is set + if (orderNumber == null) { + throw new ApiException("Missing the required parameter 'orderNumber' when calling putOrdermodify(Async)"); + } + + // verify the required parameter 'imCustomerNumber' is set + if (imCustomerNumber == null) { + throw new ApiException("Missing the required parameter 'imCustomerNumber' when calling putOrdermodify(Async)"); + } + + // verify the required parameter 'imCountryCode' is set + if (imCountryCode == null) { + throw new ApiException("Missing the required parameter 'imCountryCode' when calling putOrdermodify(Async)"); + } + + // verify the required parameter 'imCorrelationID' is set + if (imCorrelationID == null) { + throw new ApiException("Missing the required parameter 'imCorrelationID' when calling putOrdermodify(Async)"); + } + + // verify the required parameter 'orderModifyRequest' is set + if (orderModifyRequest == null) { + throw new ApiException("Missing the required parameter 'orderModifyRequest' when calling putOrdermodify(Async)"); + } + + return putOrdermodifyCall(orderNumber, imCustomerNumber, imCountryCode, imCorrelationID, orderModifyRequest, actionCode, regionCode, imSenderID, _callback); + + } + + /** + * Modify your Order + * The Order Modify API endpoint allows for changes to be made to an order after the order creation process as long as the order was created with the customer hold flag. * Orders can be modified within 24hrs of being placed with the customer hold flag, after 24hrs they are voided if they are not released by the customer. * Modifying orders that were placed without the customer hold flag is not possible + * @param orderNumber Ingram sales order number. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param orderModifyRequest (required) + * @param actionCode Action code to be used for order release. (optional) + * @param regionCode Region code paramter to be used only for order release functionality.Region code is only for sandbox not for production (optional) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @return OrderModifyResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
    Status Code Description Response Headers
    200 OK * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    201 Created * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    207 Multi-Status * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    400 Bad Request * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    401 Unauthorized -
    404 Not Found -
    500 Internal Server Error * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    + */ + public OrderModifyResponse putOrdermodify(String orderNumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, OrderModifyRequest orderModifyRequest, String actionCode, String regionCode, String imSenderID) throws ApiException { + ApiResponse localVarResp = putOrdermodifyWithHttpInfo(orderNumber, imCustomerNumber, imCountryCode, imCorrelationID, orderModifyRequest, actionCode, regionCode, imSenderID); + return localVarResp.getData(); + } + + /** + * Modify your Order + * The Order Modify API endpoint allows for changes to be made to an order after the order creation process as long as the order was created with the customer hold flag. * Orders can be modified within 24hrs of being placed with the customer hold flag, after 24hrs they are voided if they are not released by the customer. * Modifying orders that were placed without the customer hold flag is not possible + * @param orderNumber Ingram sales order number. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param orderModifyRequest (required) + * @param actionCode Action code to be used for order release. (optional) + * @param regionCode Region code paramter to be used only for order release functionality.Region code is only for sandbox not for production (optional) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @return ApiResponse<OrderModifyResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
    Status Code Description Response Headers
    200 OK * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    201 Created * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    207 Multi-Status * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    400 Bad Request * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    401 Unauthorized -
    404 Not Found -
    500 Internal Server Error * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    + */ + public ApiResponse putOrdermodifyWithHttpInfo(String orderNumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, OrderModifyRequest orderModifyRequest, String actionCode, String regionCode, String imSenderID) throws ApiException { + okhttp3.Call localVarCall = putOrdermodifyValidateBeforeCall(orderNumber, imCustomerNumber, imCountryCode, imCorrelationID, orderModifyRequest, actionCode, regionCode, imSenderID, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Modify your Order (asynchronously) + * The Order Modify API endpoint allows for changes to be made to an order after the order creation process as long as the order was created with the customer hold flag. * Orders can be modified within 24hrs of being placed with the customer hold flag, after 24hrs they are voided if they are not released by the customer. * Modifying orders that were placed without the customer hold flag is not possible + * @param orderNumber Ingram sales order number. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param orderModifyRequest (required) + * @param actionCode Action code to be used for order release. (optional) + * @param regionCode Region code paramter to be used only for order release functionality.Region code is only for sandbox not for production (optional) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
    Status Code Description Response Headers
    200 OK * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    201 Created * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    207 Multi-Status * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    400 Bad Request * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    401 Unauthorized -
    404 Not Found -
    500 Internal Server Error * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    + */ + public okhttp3.Call putOrdermodifyAsync(String orderNumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, OrderModifyRequest orderModifyRequest, String actionCode, String regionCode, String imSenderID, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = putOrdermodifyValidateBeforeCall(orderNumber, imCustomerNumber, imCountryCode, imCorrelationID, orderModifyRequest, actionCode, regionCode, imSenderID, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/xiresellers/client/api/OrdersV4Api.java b/src/main/java/xiresellers/client/api/OrdersV4Api.java new file mode 100644 index 00000000..60183367 --- /dev/null +++ b/src/main/java/xiresellers/client/api/OrdersV4Api.java @@ -0,0 +1,674 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiCallback; +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.ApiResponse; +import xiresellers.client.Configuration; +import xiresellers.client.Pair; +import xiresellers.client.ProgressRequestBody; +import xiresellers.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import xiresellers.client.model.OrderCreateRequest; +import xiresellers.client.model.OrderCreateResponse; +import xiresellers.client.model.OrderDeleteRequest; +import xiresellers.client.model.OrderDeleteResponse; +import xiresellers.client.model.OrderDetailRequest; +import xiresellers.client.model.OrderDetailResponse; +import xiresellers.client.model.OrderModifyRequest; +import xiresellers.client.model.OrderModifyResponse; +import xiresellers.client.model.OrderSearchRequest; +import xiresellers.client.model.OrderSearchResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class OrdersV4Api { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public OrdersV4Api() { + this(Configuration.getDefaultApiClient()); + } + + public OrdersV4Api(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for postV4Ordercreate + * @param orderCreateRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call postV4OrdercreateCall(OrderCreateRequest orderCreateRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = orderCreateRequest; + + // create path and map variables + String localVarPath = "/orders/v4/ordercreate"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postV4OrdercreateValidateBeforeCall(OrderCreateRequest orderCreateRequest, final ApiCallback _callback) throws ApiException { + return postV4OrdercreateCall(orderCreateRequest, _callback); + + } + + /** + * Create a new Order + * The order create transaction is a real-time transaction that allows customers to place standard product and direct ship (licensing and warranties) orders with Ingram Micro using API. + * @param orderCreateRequest (optional) + * @return OrderCreateResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public OrderCreateResponse postV4Ordercreate(OrderCreateRequest orderCreateRequest) throws ApiException { + ApiResponse localVarResp = postV4OrdercreateWithHttpInfo(orderCreateRequest); + return localVarResp.getData(); + } + + /** + * Create a new Order + * The order create transaction is a real-time transaction that allows customers to place standard product and direct ship (licensing and warranties) orders with Ingram Micro using API. + * @param orderCreateRequest (optional) + * @return ApiResponse<OrderCreateResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public ApiResponse postV4OrdercreateWithHttpInfo(OrderCreateRequest orderCreateRequest) throws ApiException { + okhttp3.Call localVarCall = postV4OrdercreateValidateBeforeCall(orderCreateRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create a new Order (asynchronously) + * The order create transaction is a real-time transaction that allows customers to place standard product and direct ship (licensing and warranties) orders with Ingram Micro using API. + * @param orderCreateRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call postV4OrdercreateAsync(OrderCreateRequest orderCreateRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postV4OrdercreateValidateBeforeCall(orderCreateRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postV4Orderdelete + * @param orderDeleteRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call postV4OrderdeleteCall(OrderDeleteRequest orderDeleteRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = orderDeleteRequest; + + // create path and map variables + String localVarPath = "/orders/v4/orderdelete"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postV4OrderdeleteValidateBeforeCall(OrderDeleteRequest orderDeleteRequest, final ApiCallback _callback) throws ApiException { + return postV4OrderdeleteCall(orderDeleteRequest, _callback); + + } + + /** + * Delete an Order + * A real-time request to delete a previously accepted order must be submitted before the order is released to Ingram Micro’s warehouse. After release the order is no longer eligible for deletion. Order delete transaction submitted after the order is released will be rejected and will not be applied. *Direct ship orders cannot be deleted. Contact your sales rep for assistance. + * @param orderDeleteRequest (optional) + * @return OrderDeleteResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public OrderDeleteResponse postV4Orderdelete(OrderDeleteRequest orderDeleteRequest) throws ApiException { + ApiResponse localVarResp = postV4OrderdeleteWithHttpInfo(orderDeleteRequest); + return localVarResp.getData(); + } + + /** + * Delete an Order + * A real-time request to delete a previously accepted order must be submitted before the order is released to Ingram Micro’s warehouse. After release the order is no longer eligible for deletion. Order delete transaction submitted after the order is released will be rejected and will not be applied. *Direct ship orders cannot be deleted. Contact your sales rep for assistance. + * @param orderDeleteRequest (optional) + * @return ApiResponse<OrderDeleteResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public ApiResponse postV4OrderdeleteWithHttpInfo(OrderDeleteRequest orderDeleteRequest) throws ApiException { + okhttp3.Call localVarCall = postV4OrderdeleteValidateBeforeCall(orderDeleteRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Delete an Order (asynchronously) + * A real-time request to delete a previously accepted order must be submitted before the order is released to Ingram Micro’s warehouse. After release the order is no longer eligible for deletion. Order delete transaction submitted after the order is released will be rejected and will not be applied. *Direct ship orders cannot be deleted. Contact your sales rep for assistance. + * @param orderDeleteRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call postV4OrderdeleteAsync(OrderDeleteRequest orderDeleteRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postV4OrderdeleteValidateBeforeCall(orderDeleteRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postV4Orderdetails + * @param orderDetailRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call postV4OrderdetailsCall(OrderDetailRequest orderDetailRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = orderDetailRequest; + + // create path and map variables + String localVarPath = "/orders/v4/orderdetails"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postV4OrderdetailsValidateBeforeCall(OrderDetailRequest orderDetailRequest, final ApiCallback _callback) throws ApiException { + return postV4OrderdetailsCall(orderDetailRequest, _callback); + + } + + /** + * Get Order Details + * A real-time request that allows the customer to query Ingram Micro for detailed information for a specific open or shipped order. Orders are searched using Ingram Micro Sales Order Number. + * @param orderDetailRequest (optional) + * @return OrderDetailResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public OrderDetailResponse postV4Orderdetails(OrderDetailRequest orderDetailRequest) throws ApiException { + ApiResponse localVarResp = postV4OrderdetailsWithHttpInfo(orderDetailRequest); + return localVarResp.getData(); + } + + /** + * Get Order Details + * A real-time request that allows the customer to query Ingram Micro for detailed information for a specific open or shipped order. Orders are searched using Ingram Micro Sales Order Number. + * @param orderDetailRequest (optional) + * @return ApiResponse<OrderDetailResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public ApiResponse postV4OrderdetailsWithHttpInfo(OrderDetailRequest orderDetailRequest) throws ApiException { + okhttp3.Call localVarCall = postV4OrderdetailsValidateBeforeCall(orderDetailRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Order Details (asynchronously) + * A real-time request that allows the customer to query Ingram Micro for detailed information for a specific open or shipped order. Orders are searched using Ingram Micro Sales Order Number. + * @param orderDetailRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call postV4OrderdetailsAsync(OrderDetailRequest orderDetailRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postV4OrderdetailsValidateBeforeCall(orderDetailRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postV4Ordermodify + * @param orderModifyRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call postV4OrdermodifyCall(OrderModifyRequest orderModifyRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = orderModifyRequest; + + // create path and map variables + String localVarPath = "/orders/v4/ordermodify"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postV4OrdermodifyValidateBeforeCall(OrderModifyRequest orderModifyRequest, final ApiCallback _callback) throws ApiException { + return postV4OrdermodifyCall(orderModifyRequest, _callback); + + } + + /** + * Modify an Existing Order + * The order modify transaction allows for changes to be made after the order creation process but before the order is released to Ingram Micro’s warehouse system. Order modify transaction submitted after the order is released will be rejected and will not be applied. Types of modifications allowable: Order release, add comment, and carrier change. NOTE - Direct Ship orders cannot be modified. + * @param orderModifyRequest (optional) + * @return OrderModifyResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public OrderModifyResponse postV4Ordermodify(OrderModifyRequest orderModifyRequest) throws ApiException { + ApiResponse localVarResp = postV4OrdermodifyWithHttpInfo(orderModifyRequest); + return localVarResp.getData(); + } + + /** + * Modify an Existing Order + * The order modify transaction allows for changes to be made after the order creation process but before the order is released to Ingram Micro’s warehouse system. Order modify transaction submitted after the order is released will be rejected and will not be applied. Types of modifications allowable: Order release, add comment, and carrier change. NOTE - Direct Ship orders cannot be modified. + * @param orderModifyRequest (optional) + * @return ApiResponse<OrderModifyResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public ApiResponse postV4OrdermodifyWithHttpInfo(OrderModifyRequest orderModifyRequest) throws ApiException { + okhttp3.Call localVarCall = postV4OrdermodifyValidateBeforeCall(orderModifyRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Modify an Existing Order (asynchronously) + * The order modify transaction allows for changes to be made after the order creation process but before the order is released to Ingram Micro’s warehouse system. Order modify transaction submitted after the order is released will be rejected and will not be applied. Types of modifications allowable: Order release, add comment, and carrier change. NOTE - Direct Ship orders cannot be modified. + * @param orderModifyRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call postV4OrdermodifyAsync(OrderModifyRequest orderModifyRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postV4OrdermodifyValidateBeforeCall(orderModifyRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postV4Ordersearch + * @param orderSearchRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call postV4OrdersearchCall(OrderSearchRequest orderSearchRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = orderSearchRequest; + + // create path and map variables + String localVarPath = "/orders/v4/orderlookup"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postV4OrdersearchValidateBeforeCall(OrderSearchRequest orderSearchRequest, final ApiCallback _callback) throws ApiException { + return postV4OrdersearchCall(orderSearchRequest, _callback); + + } + + /** + * Order Search + * Search your orders using various search parameters + * @param orderSearchRequest (optional) + * @return OrderSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public OrderSearchResponse postV4Ordersearch(OrderSearchRequest orderSearchRequest) throws ApiException { + ApiResponse localVarResp = postV4OrdersearchWithHttpInfo(orderSearchRequest); + return localVarResp.getData(); + } + + /** + * Order Search + * Search your orders using various search parameters + * @param orderSearchRequest (optional) + * @return ApiResponse<OrderSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public ApiResponse postV4OrdersearchWithHttpInfo(OrderSearchRequest orderSearchRequest) throws ApiException { + okhttp3.Call localVarCall = postV4OrdersearchValidateBeforeCall(orderSearchRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Order Search (asynchronously) + * Search your orders using various search parameters + * @param orderSearchRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call postV4OrdersearchAsync(OrderSearchRequest orderSearchRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postV4OrdersearchValidateBeforeCall(orderSearchRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/xiresellers/client/api/OrdersV5Api.java b/src/main/java/xiresellers/client/api/OrdersV5Api.java new file mode 100644 index 00000000..ae5e67f8 --- /dev/null +++ b/src/main/java/xiresellers/client/api/OrdersV5Api.java @@ -0,0 +1,737 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiCallback; +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.ApiResponse; +import xiresellers.client.Configuration; +import xiresellers.client.Pair; +import xiresellers.client.ProgressRequestBody; +import xiresellers.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import xiresellers.client.model.OrderCancelResponse; +import xiresellers.client.model.OrderCreateRequest; +import xiresellers.client.model.OrderCreateResponse; +import xiresellers.client.model.OrderDetailResponse; +import xiresellers.client.model.OrderSearchResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class OrdersV5Api { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public OrdersV5Api() { + this(Configuration.getDefaultApiClient()); + } + + public OrdersV5Api(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for deleteOrdersOrderNumber + * @param ordernumber Ingram Micro sales order number (required) + * @param customerNumber Your unique Ingram Micro customer number (required) + * @param isoCountryCode 2 chars ISO country code (required) + * @param entryDate Order entry date (yyyy-mm-dd) (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call deleteOrdersOrderNumberCall(String ordernumber, String customerNumber, String isoCountryCode, String entryDate, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/resellers/v5/Orders/{ordernumber}" + .replace("{" + "ordernumber" + "}", localVarApiClient.escapeString(ordernumber.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (customerNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("customerNumber", customerNumber)); + } + + if (isoCountryCode != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("isoCountryCode", isoCountryCode)); + } + + if (entryDate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("entryDate", entryDate)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteOrdersOrderNumberValidateBeforeCall(String ordernumber, String customerNumber, String isoCountryCode, String entryDate, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'ordernumber' is set + if (ordernumber == null) { + throw new ApiException("Missing the required parameter 'ordernumber' when calling deleteOrdersOrderNumber(Async)"); + } + + // verify the required parameter 'customerNumber' is set + if (customerNumber == null) { + throw new ApiException("Missing the required parameter 'customerNumber' when calling deleteOrdersOrderNumber(Async)"); + } + + // verify the required parameter 'isoCountryCode' is set + if (isoCountryCode == null) { + throw new ApiException("Missing the required parameter 'isoCountryCode' when calling deleteOrdersOrderNumber(Async)"); + } + + // verify the required parameter 'entryDate' is set + if (entryDate == null) { + throw new ApiException("Missing the required parameter 'entryDate' when calling deleteOrdersOrderNumber(Async)"); + } + + return deleteOrdersOrderNumberCall(ordernumber, customerNumber, isoCountryCode, entryDate, _callback); + + } + + /** + * Cancel an Existing Order + * This endpoint is a request to cancel a previously accepted order. Use your Ingram Micro sales order number to cancel an order. The <strong>orderNumber, isoCountryCode, customerNumber</strong> and <strong>entryDate</strong> parameters are required. This call must be submitted <strong>before</strong> the order is released to Ingram Micro’s warehouse. The order cannot be canceled once it is released to the warehouse. Direct ship orders cannot be canceled. Contact your Ingram Micro sales rep for assistance. + * @param ordernumber Ingram Micro sales order number (required) + * @param customerNumber Your unique Ingram Micro customer number (required) + * @param isoCountryCode 2 chars ISO country code (required) + * @param entryDate Order entry date (yyyy-mm-dd) (required) + * @return OrderCancelResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public OrderCancelResponse deleteOrdersOrderNumber(String ordernumber, String customerNumber, String isoCountryCode, String entryDate) throws ApiException { + ApiResponse localVarResp = deleteOrdersOrderNumberWithHttpInfo(ordernumber, customerNumber, isoCountryCode, entryDate); + return localVarResp.getData(); + } + + /** + * Cancel an Existing Order + * This endpoint is a request to cancel a previously accepted order. Use your Ingram Micro sales order number to cancel an order. The <strong>orderNumber, isoCountryCode, customerNumber</strong> and <strong>entryDate</strong> parameters are required. This call must be submitted <strong>before</strong> the order is released to Ingram Micro’s warehouse. The order cannot be canceled once it is released to the warehouse. Direct ship orders cannot be canceled. Contact your Ingram Micro sales rep for assistance. + * @param ordernumber Ingram Micro sales order number (required) + * @param customerNumber Your unique Ingram Micro customer number (required) + * @param isoCountryCode 2 chars ISO country code (required) + * @param entryDate Order entry date (yyyy-mm-dd) (required) + * @return ApiResponse<OrderCancelResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public ApiResponse deleteOrdersOrderNumberWithHttpInfo(String ordernumber, String customerNumber, String isoCountryCode, String entryDate) throws ApiException { + okhttp3.Call localVarCall = deleteOrdersOrderNumberValidateBeforeCall(ordernumber, customerNumber, isoCountryCode, entryDate, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Cancel an Existing Order (asynchronously) + * This endpoint is a request to cancel a previously accepted order. Use your Ingram Micro sales order number to cancel an order. The <strong>orderNumber, isoCountryCode, customerNumber</strong> and <strong>entryDate</strong> parameters are required. This call must be submitted <strong>before</strong> the order is released to Ingram Micro’s warehouse. The order cannot be canceled once it is released to the warehouse. Direct ship orders cannot be canceled. Contact your Ingram Micro sales rep for assistance. + * @param ordernumber Ingram Micro sales order number (required) + * @param customerNumber Your unique Ingram Micro customer number (required) + * @param isoCountryCode 2 chars ISO country code (required) + * @param entryDate Order entry date (yyyy-mm-dd) (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call deleteOrdersOrderNumberAsync(String ordernumber, String customerNumber, String isoCountryCode, String entryDate, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteOrdersOrderNumberValidateBeforeCall(ordernumber, customerNumber, isoCountryCode, entryDate, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getOrdersSearch + * @param customerNumber Your unique Ingram Micro customer number (required) + * @param isocountrycode 2 char iso country code (required) + * @param ordernumber Ingram sales order number (optional) + * @param customerordernumber Search using your PO/Order number (optional) + * @param orderstatus Ingram Micro order status (optional, default to any) + * @param startcreatetimestamp Search start date/time in UTC format (optional) + * @param endcreatetimestamp Search end date/time in UTC format (optional) + * @param pagesize Number of records required in the call (optional) + * @param pagenumber the page number reference (optional, default to 1) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call getOrdersSearchCall(String customerNumber, String isocountrycode, String ordernumber, String customerordernumber, String orderstatus, OffsetDateTime startcreatetimestamp, OffsetDateTime endcreatetimestamp, Integer pagesize, Integer pagenumber, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/resellers/v5/Orders/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (customerNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("customerNumber", customerNumber)); + } + + if (isocountrycode != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("isocountrycode", isocountrycode)); + } + + if (ordernumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("ordernumber", ordernumber)); + } + + if (customerordernumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("customerordernumber", customerordernumber)); + } + + if (orderstatus != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("orderstatus", orderstatus)); + } + + if (startcreatetimestamp != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("startcreatetimestamp", startcreatetimestamp)); + } + + if (endcreatetimestamp != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("endcreatetimestamp", endcreatetimestamp)); + } + + if (pagesize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pagesize", pagesize)); + } + + if (pagenumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pagenumber", pagenumber)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getOrdersSearchValidateBeforeCall(String customerNumber, String isocountrycode, String ordernumber, String customerordernumber, String orderstatus, OffsetDateTime startcreatetimestamp, OffsetDateTime endcreatetimestamp, Integer pagesize, Integer pagenumber, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'customerNumber' is set + if (customerNumber == null) { + throw new ApiException("Missing the required parameter 'customerNumber' when calling getOrdersSearch(Async)"); + } + + // verify the required parameter 'isocountrycode' is set + if (isocountrycode == null) { + throw new ApiException("Missing the required parameter 'isocountrycode' when calling getOrdersSearch(Async)"); + } + + return getOrdersSearchCall(customerNumber, isocountrycode, ordernumber, customerordernumber, orderstatus, startcreatetimestamp, endcreatetimestamp, pagesize, pagenumber, _callback); + + } + + /** + * Search your Orders + * Search your Ingram Micro orders. This endpoint searches by multiple order parameters and supports pagination of results. Search using one or more of the parameters below: <ul><li>ordernumber — Ingram Micro sales order number</li><li>customerordernumber — The PO or order number provided by you when creating an order</li><li>orderstatus — user order status codes for the search, default is set to \"any\"</li><li>startcreatetimestamp and endcreatetimestamp — Order create date range</li></ul> For pagination, please use these parameters: <ul><li>pagesize — default 25, max 100</li><li>pagenumber — default 1</li></ul> Order Status Values: <ul><li>P – PENDING</li><li>R – RELEASED</li><li>4 – SHIPPED</li><li>I – INVOICED</li><li>V – VOIDED</li></ul> The search endpoint also returns HATEOAS links for order details and invoice details, if applicable. + * @param customerNumber Your unique Ingram Micro customer number (required) + * @param isocountrycode 2 char iso country code (required) + * @param ordernumber Ingram sales order number (optional) + * @param customerordernumber Search using your PO/Order number (optional) + * @param orderstatus Ingram Micro order status (optional, default to any) + * @param startcreatetimestamp Search start date/time in UTC format (optional) + * @param endcreatetimestamp Search end date/time in UTC format (optional) + * @param pagesize Number of records required in the call (optional) + * @param pagenumber the page number reference (optional, default to 1) + * @return OrderSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public OrderSearchResponse getOrdersSearch(String customerNumber, String isocountrycode, String ordernumber, String customerordernumber, String orderstatus, OffsetDateTime startcreatetimestamp, OffsetDateTime endcreatetimestamp, Integer pagesize, Integer pagenumber) throws ApiException { + ApiResponse localVarResp = getOrdersSearchWithHttpInfo(customerNumber, isocountrycode, ordernumber, customerordernumber, orderstatus, startcreatetimestamp, endcreatetimestamp, pagesize, pagenumber); + return localVarResp.getData(); + } + + /** + * Search your Orders + * Search your Ingram Micro orders. This endpoint searches by multiple order parameters and supports pagination of results. Search using one or more of the parameters below: <ul><li>ordernumber — Ingram Micro sales order number</li><li>customerordernumber — The PO or order number provided by you when creating an order</li><li>orderstatus — user order status codes for the search, default is set to \"any\"</li><li>startcreatetimestamp and endcreatetimestamp — Order create date range</li></ul> For pagination, please use these parameters: <ul><li>pagesize — default 25, max 100</li><li>pagenumber — default 1</li></ul> Order Status Values: <ul><li>P – PENDING</li><li>R – RELEASED</li><li>4 – SHIPPED</li><li>I – INVOICED</li><li>V – VOIDED</li></ul> The search endpoint also returns HATEOAS links for order details and invoice details, if applicable. + * @param customerNumber Your unique Ingram Micro customer number (required) + * @param isocountrycode 2 char iso country code (required) + * @param ordernumber Ingram sales order number (optional) + * @param customerordernumber Search using your PO/Order number (optional) + * @param orderstatus Ingram Micro order status (optional, default to any) + * @param startcreatetimestamp Search start date/time in UTC format (optional) + * @param endcreatetimestamp Search end date/time in UTC format (optional) + * @param pagesize Number of records required in the call (optional) + * @param pagenumber the page number reference (optional, default to 1) + * @return ApiResponse<OrderSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public ApiResponse getOrdersSearchWithHttpInfo(String customerNumber, String isocountrycode, String ordernumber, String customerordernumber, String orderstatus, OffsetDateTime startcreatetimestamp, OffsetDateTime endcreatetimestamp, Integer pagesize, Integer pagenumber) throws ApiException { + okhttp3.Call localVarCall = getOrdersSearchValidateBeforeCall(customerNumber, isocountrycode, ordernumber, customerordernumber, orderstatus, startcreatetimestamp, endcreatetimestamp, pagesize, pagenumber, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Search your Orders (asynchronously) + * Search your Ingram Micro orders. This endpoint searches by multiple order parameters and supports pagination of results. Search using one or more of the parameters below: <ul><li>ordernumber — Ingram Micro sales order number</li><li>customerordernumber — The PO or order number provided by you when creating an order</li><li>orderstatus — user order status codes for the search, default is set to \"any\"</li><li>startcreatetimestamp and endcreatetimestamp — Order create date range</li></ul> For pagination, please use these parameters: <ul><li>pagesize — default 25, max 100</li><li>pagenumber — default 1</li></ul> Order Status Values: <ul><li>P – PENDING</li><li>R – RELEASED</li><li>4 – SHIPPED</li><li>I – INVOICED</li><li>V – VOIDED</li></ul> The search endpoint also returns HATEOAS links for order details and invoice details, if applicable. + * @param customerNumber Your unique Ingram Micro customer number (required) + * @param isocountrycode 2 char iso country code (required) + * @param ordernumber Ingram sales order number (optional) + * @param customerordernumber Search using your PO/Order number (optional) + * @param orderstatus Ingram Micro order status (optional, default to any) + * @param startcreatetimestamp Search start date/time in UTC format (optional) + * @param endcreatetimestamp Search end date/time in UTC format (optional) + * @param pagesize Number of records required in the call (optional) + * @param pagenumber the page number reference (optional, default to 1) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call getOrdersSearchAsync(String customerNumber, String isocountrycode, String ordernumber, String customerordernumber, String orderstatus, OffsetDateTime startcreatetimestamp, OffsetDateTime endcreatetimestamp, Integer pagesize, Integer pagenumber, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getOrdersSearchValidateBeforeCall(customerNumber, isocountrycode, ordernumber, customerordernumber, orderstatus, startcreatetimestamp, endcreatetimestamp, pagesize, pagenumber, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getV5OrdersDetails + * @param ordernumber Ingram Micro sales order number (required) + * @param customernumber Your unique Ingram Micro customer number (required) + * @param isocountrycode 2 chars ISO country code (required) + * @param customerordernumber Your PO/Order Number provide at the time of order creation (optional) + * @param startcreatetimestamp Filter start date - format YYYY-MM-DD (optional) + * @param endcreatetimestamp Filter end date - format YYYY-MM-DD (optional) + * @param simulate Order response for various order statuses. Not for use in production. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call getV5OrdersDetailsCall(String ordernumber, String customernumber, String isocountrycode, String customerordernumber, LocalDate startcreatetimestamp, String endcreatetimestamp, String simulate, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/resellers/v5/Orders/{ordernumber}" + .replace("{" + "ordernumber" + "}", localVarApiClient.escapeString(ordernumber.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (customernumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("customernumber", customernumber)); + } + + if (isocountrycode != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("isocountrycode", isocountrycode)); + } + + if (customerordernumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("customerordernumber", customerordernumber)); + } + + if (startcreatetimestamp != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("startcreatetimestamp", startcreatetimestamp)); + } + + if (endcreatetimestamp != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("endcreatetimestamp", endcreatetimestamp)); + } + + if (simulate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("simulate", simulate)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getV5OrdersDetailsValidateBeforeCall(String ordernumber, String customernumber, String isocountrycode, String customerordernumber, LocalDate startcreatetimestamp, String endcreatetimestamp, String simulate, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'ordernumber' is set + if (ordernumber == null) { + throw new ApiException("Missing the required parameter 'ordernumber' when calling getV5OrdersDetails(Async)"); + } + + // verify the required parameter 'customernumber' is set + if (customernumber == null) { + throw new ApiException("Missing the required parameter 'customernumber' when calling getV5OrdersDetails(Async)"); + } + + // verify the required parameter 'isocountrycode' is set + if (isocountrycode == null) { + throw new ApiException("Missing the required parameter 'isocountrycode' when calling getV5OrdersDetails(Async)"); + } + + return getV5OrdersDetailsCall(ordernumber, customernumber, isocountrycode, customerordernumber, startcreatetimestamp, endcreatetimestamp, simulate, _callback); + + } + + /** + * Get Order Details + * Use your Ingram Micro sales order number to search for existing orders or retrieve existing order details. <b>The sales order number, customer number and isoCountryCode are required parameters.</b> The sales order number is returned in the Order Create POST response. Ingram Micro recommends that you save this number for future uses. The IM sales order number can also be retrieved by searching for your existing order using the Order Search GET endpoint. You will need the customer PO number or order number that was provided at the time of order creation. In a case when the IM sales order number is repeated, you can refine the result by providing customer order number for additional filtering or using the date range to filter orders by creation date. Use the \"simulate\" query parameter to test the GET order response for various order statuses. This parameter is only available in the sandbox to help with development and testing of the GET order endpoint. + * @param ordernumber Ingram Micro sales order number (required) + * @param customernumber Your unique Ingram Micro customer number (required) + * @param isocountrycode 2 chars ISO country code (required) + * @param customerordernumber Your PO/Order Number provide at the time of order creation (optional) + * @param startcreatetimestamp Filter start date - format YYYY-MM-DD (optional) + * @param endcreatetimestamp Filter end date - format YYYY-MM-DD (optional) + * @param simulate Order response for various order statuses. Not for use in production. (optional) + * @return OrderDetailResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public OrderDetailResponse getV5OrdersDetails(String ordernumber, String customernumber, String isocountrycode, String customerordernumber, LocalDate startcreatetimestamp, String endcreatetimestamp, String simulate) throws ApiException { + ApiResponse localVarResp = getV5OrdersDetailsWithHttpInfo(ordernumber, customernumber, isocountrycode, customerordernumber, startcreatetimestamp, endcreatetimestamp, simulate); + return localVarResp.getData(); + } + + /** + * Get Order Details + * Use your Ingram Micro sales order number to search for existing orders or retrieve existing order details. <b>The sales order number, customer number and isoCountryCode are required parameters.</b> The sales order number is returned in the Order Create POST response. Ingram Micro recommends that you save this number for future uses. The IM sales order number can also be retrieved by searching for your existing order using the Order Search GET endpoint. You will need the customer PO number or order number that was provided at the time of order creation. In a case when the IM sales order number is repeated, you can refine the result by providing customer order number for additional filtering or using the date range to filter orders by creation date. Use the \"simulate\" query parameter to test the GET order response for various order statuses. This parameter is only available in the sandbox to help with development and testing of the GET order endpoint. + * @param ordernumber Ingram Micro sales order number (required) + * @param customernumber Your unique Ingram Micro customer number (required) + * @param isocountrycode 2 chars ISO country code (required) + * @param customerordernumber Your PO/Order Number provide at the time of order creation (optional) + * @param startcreatetimestamp Filter start date - format YYYY-MM-DD (optional) + * @param endcreatetimestamp Filter end date - format YYYY-MM-DD (optional) + * @param simulate Order response for various order statuses. Not for use in production. (optional) + * @return ApiResponse<OrderDetailResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public ApiResponse getV5OrdersDetailsWithHttpInfo(String ordernumber, String customernumber, String isocountrycode, String customerordernumber, LocalDate startcreatetimestamp, String endcreatetimestamp, String simulate) throws ApiException { + okhttp3.Call localVarCall = getV5OrdersDetailsValidateBeforeCall(ordernumber, customernumber, isocountrycode, customerordernumber, startcreatetimestamp, endcreatetimestamp, simulate, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Order Details (asynchronously) + * Use your Ingram Micro sales order number to search for existing orders or retrieve existing order details. <b>The sales order number, customer number and isoCountryCode are required parameters.</b> The sales order number is returned in the Order Create POST response. Ingram Micro recommends that you save this number for future uses. The IM sales order number can also be retrieved by searching for your existing order using the Order Search GET endpoint. You will need the customer PO number or order number that was provided at the time of order creation. In a case when the IM sales order number is repeated, you can refine the result by providing customer order number for additional filtering or using the date range to filter orders by creation date. Use the \"simulate\" query parameter to test the GET order response for various order statuses. This parameter is only available in the sandbox to help with development and testing of the GET order endpoint. + * @param ordernumber Ingram Micro sales order number (required) + * @param customernumber Your unique Ingram Micro customer number (required) + * @param isocountrycode 2 chars ISO country code (required) + * @param customerordernumber Your PO/Order Number provide at the time of order creation (optional) + * @param startcreatetimestamp Filter start date - format YYYY-MM-DD (optional) + * @param endcreatetimestamp Filter end date - format YYYY-MM-DD (optional) + * @param simulate Order response for various order statuses. Not for use in production. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call getV5OrdersDetailsAsync(String ordernumber, String customernumber, String isocountrycode, String customerordernumber, LocalDate startcreatetimestamp, String endcreatetimestamp, String simulate, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getV5OrdersDetailsValidateBeforeCall(ordernumber, customernumber, isocountrycode, customerordernumber, startcreatetimestamp, endcreatetimestamp, simulate, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postV5OrdersCreate + * @param orderCreateRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call postV5OrdersCreateCall(OrderCreateRequest orderCreateRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = orderCreateRequest; + + // create path and map variables + String localVarPath = "/resellers/v5/Orders"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postV5OrdersCreateValidateBeforeCall(OrderCreateRequest orderCreateRequest, final ApiCallback _callback) throws ApiException { + return postV5OrdersCreateCall(orderCreateRequest, _callback); + + } + + /** + * Create a New Order + * Instantly create and place orders. The POST API supports stocked SKUs as well as licensing and warranties SKUs. Every order to be created with this API must complete these validations to be placed and processed:<ul><li>SKU, shipping address, product authorization and stock allocations must clear validation.</li><li>Ingram Micro Sales validates pricing, stock or other processing parameters. Ingram Micro sales may place an order a hold if revision is necessary.</li><li>Credit validation confirms available credit prior to processing an order. If an order does not clear credit validation, the Ingram Micro sales rep or accounts receivable manager will contact you for next steps.</li><li>Warehouse validation selects the location closest to the destination zip code. If the stock is not available in any of the warehouses, Ingram Micro places a backorder in the warehouse closest to the destination zip code.</li></ul> Ingram Micro recommends that you provide the <strong>ingrampartnumber</strong> for each SKU contained in each order. When using <strong>vendorpartnumber</strong> to place an order, please use the product search endpoint to find the <strong>ingrampartnumber</strong> for a specific <strong>vendorpartnumber</strong>, and then supply the <strong>ingrampartnumber</strong> to place an order. <strong>NOTE:</strong> You must have net terms to use the <strong>Ingram Micro Order Create API</strong>. Ingram Micro offers trade credit when using our APIs, and repayment is based on net terms. For example, if your net terms agreement is net-30, you will have 30 days to make a full payment. Ingram Micro does not allow credit card transactions for API ordering. + * @param orderCreateRequest (optional) + * @return OrderCreateResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public OrderCreateResponse postV5OrdersCreate(OrderCreateRequest orderCreateRequest) throws ApiException { + ApiResponse localVarResp = postV5OrdersCreateWithHttpInfo(orderCreateRequest); + return localVarResp.getData(); + } + + /** + * Create a New Order + * Instantly create and place orders. The POST API supports stocked SKUs as well as licensing and warranties SKUs. Every order to be created with this API must complete these validations to be placed and processed:<ul><li>SKU, shipping address, product authorization and stock allocations must clear validation.</li><li>Ingram Micro Sales validates pricing, stock or other processing parameters. Ingram Micro sales may place an order a hold if revision is necessary.</li><li>Credit validation confirms available credit prior to processing an order. If an order does not clear credit validation, the Ingram Micro sales rep or accounts receivable manager will contact you for next steps.</li><li>Warehouse validation selects the location closest to the destination zip code. If the stock is not available in any of the warehouses, Ingram Micro places a backorder in the warehouse closest to the destination zip code.</li></ul> Ingram Micro recommends that you provide the <strong>ingrampartnumber</strong> for each SKU contained in each order. When using <strong>vendorpartnumber</strong> to place an order, please use the product search endpoint to find the <strong>ingrampartnumber</strong> for a specific <strong>vendorpartnumber</strong>, and then supply the <strong>ingrampartnumber</strong> to place an order. <strong>NOTE:</strong> You must have net terms to use the <strong>Ingram Micro Order Create API</strong>. Ingram Micro offers trade credit when using our APIs, and repayment is based on net terms. For example, if your net terms agreement is net-30, you will have 30 days to make a full payment. Ingram Micro does not allow credit card transactions for API ordering. + * @param orderCreateRequest (optional) + * @return ApiResponse<OrderCreateResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public ApiResponse postV5OrdersCreateWithHttpInfo(OrderCreateRequest orderCreateRequest) throws ApiException { + okhttp3.Call localVarCall = postV5OrdersCreateValidateBeforeCall(orderCreateRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create a New Order (asynchronously) + * Instantly create and place orders. The POST API supports stocked SKUs as well as licensing and warranties SKUs. Every order to be created with this API must complete these validations to be placed and processed:<ul><li>SKU, shipping address, product authorization and stock allocations must clear validation.</li><li>Ingram Micro Sales validates pricing, stock or other processing parameters. Ingram Micro sales may place an order a hold if revision is necessary.</li><li>Credit validation confirms available credit prior to processing an order. If an order does not clear credit validation, the Ingram Micro sales rep or accounts receivable manager will contact you for next steps.</li><li>Warehouse validation selects the location closest to the destination zip code. If the stock is not available in any of the warehouses, Ingram Micro places a backorder in the warehouse closest to the destination zip code.</li></ul> Ingram Micro recommends that you provide the <strong>ingrampartnumber</strong> for each SKU contained in each order. When using <strong>vendorpartnumber</strong> to place an order, please use the product search endpoint to find the <strong>ingrampartnumber</strong> for a specific <strong>vendorpartnumber</strong>, and then supply the <strong>ingrampartnumber</strong> to place an order. <strong>NOTE:</strong> You must have net terms to use the <strong>Ingram Micro Order Create API</strong>. Ingram Micro offers trade credit when using our APIs, and repayment is based on net terms. For example, if your net terms agreement is net-30, you will have 30 days to make a full payment. Ingram Micro does not allow credit card transactions for API ordering. + * @param orderCreateRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call postV5OrdersCreateAsync(OrderCreateRequest orderCreateRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postV5OrdersCreateValidateBeforeCall(orderCreateRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/xiresellers/client/api/OrdersV6Api.java b/src/main/java/xiresellers/client/api/OrdersV6Api.java new file mode 100644 index 00000000..ed0baaa8 --- /dev/null +++ b/src/main/java/xiresellers/client/api/OrdersV6Api.java @@ -0,0 +1,299 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiCallback; +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.ApiResponse; +import xiresellers.client.Configuration; +import xiresellers.client.Pair; +import xiresellers.client.ProgressRequestBody; +import xiresellers.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import xiresellers.client.model.ErrorResponse; +import java.time.LocalDate; +import xiresellers.client.model.OrderDetailResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class OrdersV6Api { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public OrdersV6Api() { + this(Configuration.getDefaultApiClient()); + } + + public OrdersV6Api(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getOrderdetailsV6 + * @param ordernumber The Ingram Micro sales order number. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany. (optional) + * @param ingramOrderDate The date and time in UTC format that the order was created. (optional) + * @param vendorNumber Vendor Number. (optional) + * @param simulateStatus Order response for various order statuses. Not for use in production. (optional) + * @param isIml True/False only for IML customers. (optional) + * @param regionCode Region code for sandbox testing - Not for use in production. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
    Status Code Description Response Headers
    200 OK * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    204 No Content -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call getOrderdetailsV6Call(String ordernumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, LocalDate ingramOrderDate, String vendorNumber, String simulateStatus, Boolean isIml, String regionCode, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/resellers/v6/orders/{ordernumber}" + .replace("{" + "ordernumber" + "}", localVarApiClient.escapeString(ordernumber.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (ingramOrderDate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("ingramOrderDate", ingramOrderDate)); + } + + if (vendorNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("vendorNumber", vendorNumber)); + } + + if (simulateStatus != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("simulateStatus", simulateStatus)); + } + + if (isIml != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("isIml", isIml)); + } + + if (regionCode != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("regionCode", regionCode)); + } + + if (imCustomerNumber != null) { + localVarHeaderParams.put("IM-CustomerNumber", localVarApiClient.parameterToString(imCustomerNumber)); + } + + if (imCountryCode != null) { + localVarHeaderParams.put("IM-CountryCode", localVarApiClient.parameterToString(imCountryCode)); + } + + if (imCorrelationID != null) { + localVarHeaderParams.put("IM-CorrelationID", localVarApiClient.parameterToString(imCorrelationID)); + } + + if (imSenderID != null) { + localVarHeaderParams.put("IM-SenderID", localVarApiClient.parameterToString(imSenderID)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getOrderdetailsV6ValidateBeforeCall(String ordernumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, LocalDate ingramOrderDate, String vendorNumber, String simulateStatus, Boolean isIml, String regionCode, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'ordernumber' is set + if (ordernumber == null) { + throw new ApiException("Missing the required parameter 'ordernumber' when calling getOrderdetailsV6(Async)"); + } + + // verify the required parameter 'imCustomerNumber' is set + if (imCustomerNumber == null) { + throw new ApiException("Missing the required parameter 'imCustomerNumber' when calling getOrderdetailsV6(Async)"); + } + + // verify the required parameter 'imCountryCode' is set + if (imCountryCode == null) { + throw new ApiException("Missing the required parameter 'imCountryCode' when calling getOrderdetailsV6(Async)"); + } + + // verify the required parameter 'imCorrelationID' is set + if (imCorrelationID == null) { + throw new ApiException("Missing the required parameter 'imCorrelationID' when calling getOrderdetailsV6(Async)"); + } + + return getOrderdetailsV6Call(ordernumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, ingramOrderDate, vendorNumber, simulateStatus, isIml, regionCode, _callback); + + } + + /** + * Get Order Details v6 + * Use your Ingram Micro sales order number to search for existing orders or retrieve existing order details. The sales order number, IM-CustomerNumber, IM-CountryCode, IM-SenderID and IM-CorrelationID are required parameters. In a case when the IM sales order number is repeated, you can refine the result by providing for additional filtering. Use the \"simulateStatus\" query parameter to test the GET order response for various order statuses. This parameter is only available in the sandbox to help with development and testing of the GET order endpoint. + * @param ordernumber The Ingram Micro sales order number. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany. (optional) + * @param ingramOrderDate The date and time in UTC format that the order was created. (optional) + * @param vendorNumber Vendor Number. (optional) + * @param simulateStatus Order response for various order statuses. Not for use in production. (optional) + * @param isIml True/False only for IML customers. (optional) + * @param regionCode Region code for sandbox testing - Not for use in production. (optional) + * @return OrderDetailResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
    Status Code Description Response Headers
    200 OK * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    204 No Content -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public OrderDetailResponse getOrderdetailsV6(String ordernumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, LocalDate ingramOrderDate, String vendorNumber, String simulateStatus, Boolean isIml, String regionCode) throws ApiException { + ApiResponse localVarResp = getOrderdetailsV6WithHttpInfo(ordernumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, ingramOrderDate, vendorNumber, simulateStatus, isIml, regionCode); + return localVarResp.getData(); + } + + /** + * Get Order Details v6 + * Use your Ingram Micro sales order number to search for existing orders or retrieve existing order details. The sales order number, IM-CustomerNumber, IM-CountryCode, IM-SenderID and IM-CorrelationID are required parameters. In a case when the IM sales order number is repeated, you can refine the result by providing for additional filtering. Use the \"simulateStatus\" query parameter to test the GET order response for various order statuses. This parameter is only available in the sandbox to help with development and testing of the GET order endpoint. + * @param ordernumber The Ingram Micro sales order number. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany. (optional) + * @param ingramOrderDate The date and time in UTC format that the order was created. (optional) + * @param vendorNumber Vendor Number. (optional) + * @param simulateStatus Order response for various order statuses. Not for use in production. (optional) + * @param isIml True/False only for IML customers. (optional) + * @param regionCode Region code for sandbox testing - Not for use in production. (optional) + * @return ApiResponse<OrderDetailResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
    Status Code Description Response Headers
    200 OK * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    204 No Content -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public ApiResponse getOrderdetailsV6WithHttpInfo(String ordernumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, LocalDate ingramOrderDate, String vendorNumber, String simulateStatus, Boolean isIml, String regionCode) throws ApiException { + okhttp3.Call localVarCall = getOrderdetailsV6ValidateBeforeCall(ordernumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, ingramOrderDate, vendorNumber, simulateStatus, isIml, regionCode, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Order Details v6 (asynchronously) + * Use your Ingram Micro sales order number to search for existing orders or retrieve existing order details. The sales order number, IM-CustomerNumber, IM-CountryCode, IM-SenderID and IM-CorrelationID are required parameters. In a case when the IM sales order number is repeated, you can refine the result by providing for additional filtering. Use the \"simulateStatus\" query parameter to test the GET order response for various order statuses. This parameter is only available in the sandbox to help with development and testing of the GET order endpoint. + * @param ordernumber The Ingram Micro sales order number. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany. (optional) + * @param ingramOrderDate The date and time in UTC format that the order was created. (optional) + * @param vendorNumber Vendor Number. (optional) + * @param simulateStatus Order response for various order statuses. Not for use in production. (optional) + * @param isIml True/False only for IML customers. (optional) + * @param regionCode Region code for sandbox testing - Not for use in production. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
    Status Code Description Response Headers
    200 OK * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    204 No Content -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call getOrderdetailsV6Async(String ordernumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, LocalDate ingramOrderDate, String vendorNumber, String simulateStatus, Boolean isIml, String regionCode, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getOrderdetailsV6ValidateBeforeCall(ordernumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, ingramOrderDate, vendorNumber, simulateStatus, isIml, regionCode, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/xiresellers/client/api/ProductCatalogApi.java b/src/main/java/xiresellers/client/api/ProductCatalogApi.java new file mode 100644 index 00000000..4ebf861f --- /dev/null +++ b/src/main/java/xiresellers/client/api/ProductCatalogApi.java @@ -0,0 +1,741 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiCallback; +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.ApiResponse; +import xiresellers.client.Configuration; +import xiresellers.client.Pair; +import xiresellers.client.ProgressRequestBody; +import xiresellers.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import xiresellers.client.model.ErrorResponse; +import xiresellers.client.model.PriceAndAvailabilityRequest; +import xiresellers.client.model.PriceAndAvailabilityResponseInner; +import xiresellers.client.model.ProductDetailResponse; +import xiresellers.client.model.ProductSearchResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ProductCatalogApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public ProductCatalogApi() { + this(Configuration.getDefaultApiClient()); + } + + public ProductCatalogApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getResellerV6Productdetail + * @param ingramPartNumber Ingram Micro unique part number for the product (required) + * @param imCustomerNumber Your unique Ingram Micro customer number (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems (required) + * @param imSenderID Sender Identification text (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
    Status Code Description Response Headers
    200 Success -
    400 Bad Request -
    404 No Content -
    500 Internal Server Error -
    + */ + public okhttp3.Call getResellerV6ProductdetailCall(String ingramPartNumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/resellers/v6/catalog/details/{ingramPartNumber}" + .replace("{" + "ingramPartNumber" + "}", localVarApiClient.escapeString(ingramPartNumber.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (imCustomerNumber != null) { + localVarHeaderParams.put("IM-CustomerNumber", localVarApiClient.parameterToString(imCustomerNumber)); + } + + if (imCountryCode != null) { + localVarHeaderParams.put("IM-CountryCode", localVarApiClient.parameterToString(imCountryCode)); + } + + if (imSenderID != null) { + localVarHeaderParams.put("IM-SenderID", localVarApiClient.parameterToString(imSenderID)); + } + + if (imCorrelationID != null) { + localVarHeaderParams.put("IM-CorrelationID", localVarApiClient.parameterToString(imCorrelationID)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getResellerV6ProductdetailValidateBeforeCall(String ingramPartNumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'ingramPartNumber' is set + if (ingramPartNumber == null) { + throw new ApiException("Missing the required parameter 'ingramPartNumber' when calling getResellerV6Productdetail(Async)"); + } + + // verify the required parameter 'imCustomerNumber' is set + if (imCustomerNumber == null) { + throw new ApiException("Missing the required parameter 'imCustomerNumber' when calling getResellerV6Productdetail(Async)"); + } + + // verify the required parameter 'imCountryCode' is set + if (imCountryCode == null) { + throw new ApiException("Missing the required parameter 'imCountryCode' when calling getResellerV6Productdetail(Async)"); + } + + // verify the required parameter 'imCorrelationID' is set + if (imCorrelationID == null) { + throw new ApiException("Missing the required parameter 'imCorrelationID' when calling getResellerV6Productdetail(Async)"); + } + + return getResellerV6ProductdetailCall(ingramPartNumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, _callback); + + } + + /** + * Product Details + * Search all the product-related details using a unique Ingram Part Number. Currently, this API is available in the USA, India, and Netherlands. + * @param ingramPartNumber Ingram Micro unique part number for the product (required) + * @param imCustomerNumber Your unique Ingram Micro customer number (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems (required) + * @param imSenderID Sender Identification text (optional) + * @return ProductDetailResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
    Status Code Description Response Headers
    200 Success -
    400 Bad Request -
    404 No Content -
    500 Internal Server Error -
    + */ + public ProductDetailResponse getResellerV6Productdetail(String ingramPartNumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID) throws ApiException { + ApiResponse localVarResp = getResellerV6ProductdetailWithHttpInfo(ingramPartNumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID); + return localVarResp.getData(); + } + + /** + * Product Details + * Search all the product-related details using a unique Ingram Part Number. Currently, this API is available in the USA, India, and Netherlands. + * @param ingramPartNumber Ingram Micro unique part number for the product (required) + * @param imCustomerNumber Your unique Ingram Micro customer number (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems (required) + * @param imSenderID Sender Identification text (optional) + * @return ApiResponse<ProductDetailResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
    Status Code Description Response Headers
    200 Success -
    400 Bad Request -
    404 No Content -
    500 Internal Server Error -
    + */ + public ApiResponse getResellerV6ProductdetailWithHttpInfo(String ingramPartNumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID) throws ApiException { + okhttp3.Call localVarCall = getResellerV6ProductdetailValidateBeforeCall(ingramPartNumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Product Details (asynchronously) + * Search all the product-related details using a unique Ingram Part Number. Currently, this API is available in the USA, India, and Netherlands. + * @param ingramPartNumber Ingram Micro unique part number for the product (required) + * @param imCustomerNumber Your unique Ingram Micro customer number (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems (required) + * @param imSenderID Sender Identification text (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
    Status Code Description Response Headers
    200 Success -
    400 Bad Request -
    404 No Content -
    500 Internal Server Error -
    + */ + public okhttp3.Call getResellerV6ProductdetailAsync(String ingramPartNumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getResellerV6ProductdetailValidateBeforeCall(ingramPartNumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getResellerV6Productsearch + * @param imCustomerNumber Your unique Ingram Micro customer number (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param pageNumber Current page number. Default is 1 (optional) + * @param pageSize Number of records required in the call - max records 100 per page (optional) + * @param imSenderID Sender Identification text (optional) + * @param type The SKU type of product. One of Physical, Digital, or Any. (optional) + * @param hasDiscounts Specifies if there are discounts available for the product. (optional) + * @param vendor The name of the vendor/manufacturer of the product. (optional) + * @param vendorPartNumber The vendors part number for the product. (optional) + * @param acceptLanguage Header to the API calls, the content will help us identify the response language. (optional, default to en) + * @param vendorNumber Vendor number of the product (optional) + * @param keyword Keyword search,can be ingram part number or vendor part number or product title or vendor nameKeyword search. Can be Ingram Micro part number, vender part number, product title, or vendor name. (optional) + * @param category The category of the product. Example: Displays. (optional) + * @param skipAuthorisation This parameter is True when you want Skip the authorization, so template will work like current B2b template. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
    Status Code Description Response Headers
    200 a ProductSearchv6ResponseElement to be returned * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Sender Identification text .
    400 Bad Request * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Sender Identification text .
    404 No Content -
    500 Internal Server Error * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Sender Identification text .
    + */ + public okhttp3.Call getResellerV6ProductsearchCall(String imCustomerNumber, String imCorrelationID, String imCountryCode, Integer pageNumber, Integer pageSize, String imSenderID, String type, String hasDiscounts, List vendor, List vendorPartNumber, String acceptLanguage, String vendorNumber, List keyword, String category, String skipAuthorisation, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/resellers/v6/catalog"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (pageNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageNumber", pageNumber)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + if (type != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type)); + } + + if (hasDiscounts != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("hasDiscounts", hasDiscounts)); + } + + if (vendor != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "vendor", vendor)); + } + + if (vendorPartNumber != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "vendorPartNumber", vendorPartNumber)); + } + + if (vendorNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("vendorNumber", vendorNumber)); + } + + if (keyword != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "keyword", keyword)); + } + + if (category != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("category", category)); + } + + if (skipAuthorisation != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("skipAuthorisation", skipAuthorisation)); + } + + if (imCustomerNumber != null) { + localVarHeaderParams.put("IM-CustomerNumber", localVarApiClient.parameterToString(imCustomerNumber)); + } + + if (imSenderID != null) { + localVarHeaderParams.put("IM-SenderID", localVarApiClient.parameterToString(imSenderID)); + } + + if (imCorrelationID != null) { + localVarHeaderParams.put("IM-CorrelationID", localVarApiClient.parameterToString(imCorrelationID)); + } + + if (imCountryCode != null) { + localVarHeaderParams.put("IM-CountryCode", localVarApiClient.parameterToString(imCountryCode)); + } + + if (acceptLanguage != null) { + localVarHeaderParams.put("Accept-Language", localVarApiClient.parameterToString(acceptLanguage)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getResellerV6ProductsearchValidateBeforeCall(String imCustomerNumber, String imCorrelationID, String imCountryCode, Integer pageNumber, Integer pageSize, String imSenderID, String type, String hasDiscounts, List vendor, List vendorPartNumber, String acceptLanguage, String vendorNumber, List keyword, String category, String skipAuthorisation, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'imCustomerNumber' is set + if (imCustomerNumber == null) { + throw new ApiException("Missing the required parameter 'imCustomerNumber' when calling getResellerV6Productsearch(Async)"); + } + + // verify the required parameter 'imCorrelationID' is set + if (imCorrelationID == null) { + throw new ApiException("Missing the required parameter 'imCorrelationID' when calling getResellerV6Productsearch(Async)"); + } + + // verify the required parameter 'imCountryCode' is set + if (imCountryCode == null) { + throw new ApiException("Missing the required parameter 'imCountryCode' when calling getResellerV6Productsearch(Async)"); + } + + return getResellerV6ProductsearchCall(imCustomerNumber, imCorrelationID, imCountryCode, pageNumber, pageSize, imSenderID, type, hasDiscounts, vendor, vendorPartNumber, acceptLanguage, vendorNumber, keyword, category, skipAuthorisation, _callback); + + } + + /** + * Search Products + * Search the Ingram Micro product catalog by providing any of the information in the keyword(Ingram part number / vendor part number/ product description / UPC + * @param imCustomerNumber Your unique Ingram Micro customer number (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param pageNumber Current page number. Default is 1 (optional) + * @param pageSize Number of records required in the call - max records 100 per page (optional) + * @param imSenderID Sender Identification text (optional) + * @param type The SKU type of product. One of Physical, Digital, or Any. (optional) + * @param hasDiscounts Specifies if there are discounts available for the product. (optional) + * @param vendor The name of the vendor/manufacturer of the product. (optional) + * @param vendorPartNumber The vendors part number for the product. (optional) + * @param acceptLanguage Header to the API calls, the content will help us identify the response language. (optional, default to en) + * @param vendorNumber Vendor number of the product (optional) + * @param keyword Keyword search,can be ingram part number or vendor part number or product title or vendor nameKeyword search. Can be Ingram Micro part number, vender part number, product title, or vendor name. (optional) + * @param category The category of the product. Example: Displays. (optional) + * @param skipAuthorisation This parameter is True when you want Skip the authorization, so template will work like current B2b template. (optional) + * @return ProductSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
    Status Code Description Response Headers
    200 a ProductSearchv6ResponseElement to be returned * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Sender Identification text .
    400 Bad Request * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Sender Identification text .
    404 No Content -
    500 Internal Server Error * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Sender Identification text .
    + */ + public ProductSearchResponse getResellerV6Productsearch(String imCustomerNumber, String imCorrelationID, String imCountryCode, Integer pageNumber, Integer pageSize, String imSenderID, String type, String hasDiscounts, List vendor, List vendorPartNumber, String acceptLanguage, String vendorNumber, List keyword, String category, String skipAuthorisation) throws ApiException { + ApiResponse localVarResp = getResellerV6ProductsearchWithHttpInfo(imCustomerNumber, imCorrelationID, imCountryCode, pageNumber, pageSize, imSenderID, type, hasDiscounts, vendor, vendorPartNumber, acceptLanguage, vendorNumber, keyword, category, skipAuthorisation); + return localVarResp.getData(); + } + + /** + * Search Products + * Search the Ingram Micro product catalog by providing any of the information in the keyword(Ingram part number / vendor part number/ product description / UPC + * @param imCustomerNumber Your unique Ingram Micro customer number (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param pageNumber Current page number. Default is 1 (optional) + * @param pageSize Number of records required in the call - max records 100 per page (optional) + * @param imSenderID Sender Identification text (optional) + * @param type The SKU type of product. One of Physical, Digital, or Any. (optional) + * @param hasDiscounts Specifies if there are discounts available for the product. (optional) + * @param vendor The name of the vendor/manufacturer of the product. (optional) + * @param vendorPartNumber The vendors part number for the product. (optional) + * @param acceptLanguage Header to the API calls, the content will help us identify the response language. (optional, default to en) + * @param vendorNumber Vendor number of the product (optional) + * @param keyword Keyword search,can be ingram part number or vendor part number or product title or vendor nameKeyword search. Can be Ingram Micro part number, vender part number, product title, or vendor name. (optional) + * @param category The category of the product. Example: Displays. (optional) + * @param skipAuthorisation This parameter is True when you want Skip the authorization, so template will work like current B2b template. (optional) + * @return ApiResponse<ProductSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
    Status Code Description Response Headers
    200 a ProductSearchv6ResponseElement to be returned * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Sender Identification text .
    400 Bad Request * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Sender Identification text .
    404 No Content -
    500 Internal Server Error * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Sender Identification text .
    + */ + public ApiResponse getResellerV6ProductsearchWithHttpInfo(String imCustomerNumber, String imCorrelationID, String imCountryCode, Integer pageNumber, Integer pageSize, String imSenderID, String type, String hasDiscounts, List vendor, List vendorPartNumber, String acceptLanguage, String vendorNumber, List keyword, String category, String skipAuthorisation) throws ApiException { + okhttp3.Call localVarCall = getResellerV6ProductsearchValidateBeforeCall(imCustomerNumber, imCorrelationID, imCountryCode, pageNumber, pageSize, imSenderID, type, hasDiscounts, vendor, vendorPartNumber, acceptLanguage, vendorNumber, keyword, category, skipAuthorisation, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Search Products (asynchronously) + * Search the Ingram Micro product catalog by providing any of the information in the keyword(Ingram part number / vendor part number/ product description / UPC + * @param imCustomerNumber Your unique Ingram Micro customer number (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param pageNumber Current page number. Default is 1 (optional) + * @param pageSize Number of records required in the call - max records 100 per page (optional) + * @param imSenderID Sender Identification text (optional) + * @param type The SKU type of product. One of Physical, Digital, or Any. (optional) + * @param hasDiscounts Specifies if there are discounts available for the product. (optional) + * @param vendor The name of the vendor/manufacturer of the product. (optional) + * @param vendorPartNumber The vendors part number for the product. (optional) + * @param acceptLanguage Header to the API calls, the content will help us identify the response language. (optional, default to en) + * @param vendorNumber Vendor number of the product (optional) + * @param keyword Keyword search,can be ingram part number or vendor part number or product title or vendor nameKeyword search. Can be Ingram Micro part number, vender part number, product title, or vendor name. (optional) + * @param category The category of the product. Example: Displays. (optional) + * @param skipAuthorisation This parameter is True when you want Skip the authorization, so template will work like current B2b template. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
    Status Code Description Response Headers
    200 a ProductSearchv6ResponseElement to be returned * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Sender Identification text .
    400 Bad Request * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Sender Identification text .
    404 No Content -
    500 Internal Server Error * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Sender Identification text .
    + */ + public okhttp3.Call getResellerV6ProductsearchAsync(String imCustomerNumber, String imCorrelationID, String imCountryCode, Integer pageNumber, Integer pageSize, String imSenderID, String type, String hasDiscounts, List vendor, List vendorPartNumber, String acceptLanguage, String vendorNumber, List keyword, String category, String skipAuthorisation, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getResellerV6ProductsearchValidateBeforeCall(imCustomerNumber, imCorrelationID, imCountryCode, pageNumber, pageSize, imSenderID, type, hasDiscounts, vendor, vendorPartNumber, acceptLanguage, vendorNumber, keyword, category, skipAuthorisation, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postPriceandavailability + * @param includeAvailability Pass boolean value as input, if true the response will contain warehouse availability details, if false the response will not hold warehouse availability details (required) + * @param includePricing Pass boolean value as input, if true the response will contain Pricing details of the Product, if false the response will not hold Pricing details. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param priceAndAvailabilityRequest (required) + * @param includeProductAttributes Pass boolean value as input, if true the response will contain detailed attributes related to the Product, if false or not sent the response will contain very few Product details. (optional) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
    Status Code Description Response Headers
    200 OK -
    207 Multi Status -
    400 Bad Request * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    401 Unauthorized -
    500 Internal Server Error -
    + */ + public okhttp3.Call postPriceandavailabilityCall(List includeAvailability, Boolean includePricing, String imCustomerNumber, String imCountryCode, String imCorrelationID, PriceAndAvailabilityRequest priceAndAvailabilityRequest, Boolean includeProductAttributes, String imSenderID, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = priceAndAvailabilityRequest; + + // create path and map variables + String localVarPath = "/resellers/v6/catalog/priceandavailability"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (includeAvailability != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "includeAvailability", includeAvailability)); + } + + if (includePricing != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("includePricing", includePricing)); + } + + if (includeProductAttributes != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("includeProductAttributes", includeProductAttributes)); + } + + if (imCustomerNumber != null) { + localVarHeaderParams.put("IM-CustomerNumber", localVarApiClient.parameterToString(imCustomerNumber)); + } + + if (imCountryCode != null) { + localVarHeaderParams.put("IM-CountryCode", localVarApiClient.parameterToString(imCountryCode)); + } + + if (imCorrelationID != null) { + localVarHeaderParams.put("IM-CorrelationID", localVarApiClient.parameterToString(imCorrelationID)); + } + + if (imSenderID != null) { + localVarHeaderParams.put("IM-SenderID", localVarApiClient.parameterToString(imSenderID)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postPriceandavailabilityValidateBeforeCall(List includeAvailability, Boolean includePricing, String imCustomerNumber, String imCountryCode, String imCorrelationID, PriceAndAvailabilityRequest priceAndAvailabilityRequest, Boolean includeProductAttributes, String imSenderID, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'includeAvailability' is set + if (includeAvailability == null) { + throw new ApiException("Missing the required parameter 'includeAvailability' when calling postPriceandavailability(Async)"); + } + + // verify the required parameter 'includePricing' is set + if (includePricing == null) { + throw new ApiException("Missing the required parameter 'includePricing' when calling postPriceandavailability(Async)"); + } + + // verify the required parameter 'imCustomerNumber' is set + if (imCustomerNumber == null) { + throw new ApiException("Missing the required parameter 'imCustomerNumber' when calling postPriceandavailability(Async)"); + } + + // verify the required parameter 'imCountryCode' is set + if (imCountryCode == null) { + throw new ApiException("Missing the required parameter 'imCountryCode' when calling postPriceandavailability(Async)"); + } + + // verify the required parameter 'imCorrelationID' is set + if (imCorrelationID == null) { + throw new ApiException("Missing the required parameter 'imCorrelationID' when calling postPriceandavailability(Async)"); + } + + // verify the required parameter 'priceAndAvailabilityRequest' is set + if (priceAndAvailabilityRequest == null) { + throw new ApiException("Missing the required parameter 'priceAndAvailabilityRequest' when calling postPriceandavailability(Async)"); + } + + return postPriceandavailabilityCall(includeAvailability, includePricing, imCustomerNumber, imCountryCode, imCorrelationID, priceAndAvailabilityRequest, includeProductAttributes, imSenderID, _callback); + + } + + /** + * Price and Availability + * The PriceAndAvailability API, will retrieve Pricing, Availability, discounts, Inventory Location, Reserve Inventory for the products upto 50 products. + * @param includeAvailability Pass boolean value as input, if true the response will contain warehouse availability details, if false the response will not hold warehouse availability details (required) + * @param includePricing Pass boolean value as input, if true the response will contain Pricing details of the Product, if false the response will not hold Pricing details. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param priceAndAvailabilityRequest (required) + * @param includeProductAttributes Pass boolean value as input, if true the response will contain detailed attributes related to the Product, if false or not sent the response will contain very few Product details. (optional) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @return List<PriceAndAvailabilityResponseInner> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
    Status Code Description Response Headers
    200 OK -
    207 Multi Status -
    400 Bad Request * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    401 Unauthorized -
    500 Internal Server Error -
    + */ + public List postPriceandavailability(List includeAvailability, Boolean includePricing, String imCustomerNumber, String imCountryCode, String imCorrelationID, PriceAndAvailabilityRequest priceAndAvailabilityRequest, Boolean includeProductAttributes, String imSenderID) throws ApiException { + ApiResponse> localVarResp = postPriceandavailabilityWithHttpInfo(includeAvailability, includePricing, imCustomerNumber, imCountryCode, imCorrelationID, priceAndAvailabilityRequest, includeProductAttributes, imSenderID); + return localVarResp.getData(); + } + + /** + * Price and Availability + * The PriceAndAvailability API, will retrieve Pricing, Availability, discounts, Inventory Location, Reserve Inventory for the products upto 50 products. + * @param includeAvailability Pass boolean value as input, if true the response will contain warehouse availability details, if false the response will not hold warehouse availability details (required) + * @param includePricing Pass boolean value as input, if true the response will contain Pricing details of the Product, if false the response will not hold Pricing details. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param priceAndAvailabilityRequest (required) + * @param includeProductAttributes Pass boolean value as input, if true the response will contain detailed attributes related to the Product, if false or not sent the response will contain very few Product details. (optional) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @return ApiResponse<List<PriceAndAvailabilityResponseInner>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
    Status Code Description Response Headers
    200 OK -
    207 Multi Status -
    400 Bad Request * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    401 Unauthorized -
    500 Internal Server Error -
    + */ + public ApiResponse> postPriceandavailabilityWithHttpInfo(List includeAvailability, Boolean includePricing, String imCustomerNumber, String imCountryCode, String imCorrelationID, PriceAndAvailabilityRequest priceAndAvailabilityRequest, Boolean includeProductAttributes, String imSenderID) throws ApiException { + okhttp3.Call localVarCall = postPriceandavailabilityValidateBeforeCall(includeAvailability, includePricing, imCustomerNumber, imCountryCode, imCorrelationID, priceAndAvailabilityRequest, includeProductAttributes, imSenderID, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Price and Availability (asynchronously) + * The PriceAndAvailability API, will retrieve Pricing, Availability, discounts, Inventory Location, Reserve Inventory for the products upto 50 products. + * @param includeAvailability Pass boolean value as input, if true the response will contain warehouse availability details, if false the response will not hold warehouse availability details (required) + * @param includePricing Pass boolean value as input, if true the response will contain Pricing details of the Product, if false the response will not hold Pricing details. (required) + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param priceAndAvailabilityRequest (required) + * @param includeProductAttributes Pass boolean value as input, if true the response will contain detailed attributes related to the Product, if false or not sent the response will contain very few Product details. (optional) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + +
    Status Code Description Response Headers
    200 OK -
    207 Multi Status -
    400 Bad Request * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    401 Unauthorized -
    500 Internal Server Error -
    + */ + public okhttp3.Call postPriceandavailabilityAsync(List includeAvailability, Boolean includePricing, String imCustomerNumber, String imCountryCode, String imCorrelationID, PriceAndAvailabilityRequest priceAndAvailabilityRequest, Boolean includeProductAttributes, String imSenderID, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = postPriceandavailabilityValidateBeforeCall(includeAvailability, includePricing, imCustomerNumber, imCountryCode, imCorrelationID, priceAndAvailabilityRequest, includeProductAttributes, imSenderID, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/xiresellers/client/api/ProductCatalogV4Api.java b/src/main/java/xiresellers/client/api/ProductCatalogV4Api.java new file mode 100644 index 00000000..88ce697e --- /dev/null +++ b/src/main/java/xiresellers/client/api/ProductCatalogV4Api.java @@ -0,0 +1,314 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiCallback; +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.ApiResponse; +import xiresellers.client.Configuration; +import xiresellers.client.Pair; +import xiresellers.client.ProgressRequestBody; +import xiresellers.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import xiresellers.client.model.MultiSKUPriceAndStockRequest; +import xiresellers.client.model.MultiSKUPriceAndStockResponse; +import xiresellers.client.model.ProductSearchRequest; +import xiresellers.client.model.ProductSearchResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ProductCatalogV4Api { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public ProductCatalogV4Api() { + this(Configuration.getDefaultApiClient()); + } + + public ProductCatalogV4Api(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for postV4Multiskupriceandstock + * @param multiSKUPriceAndStockRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Success -
    + */ + public okhttp3.Call postV4MultiskupriceandstockCall(MultiSKUPriceAndStockRequest multiSKUPriceAndStockRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = multiSKUPriceAndStockRequest; + + // create path and map variables + String localVarPath = "/products/v4/multiskupriceandstock"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postV4MultiskupriceandstockValidateBeforeCall(MultiSKUPriceAndStockRequest multiSKUPriceAndStockRequest, final ApiCallback _callback) throws ApiException { + return postV4MultiskupriceandstockCall(multiSKUPriceAndStockRequest, _callback); + + } + + /** + * Product availability for upto 50 SKUs + * Find price and availability of up to 50 SKUs in a single request. As you increase the number of items in the request response time will be extended. This transaction must not be used as a continuous cyclical call to populate availability and pricing for your full catalog. Customers that perform this activity will lose access to price and availability. Ingram can provide a Price catalog file and an Inventory file in flat file format, which can be obtained through FTP download. Please contact 1800-616-4665 or Electronic.Services@ingrammicro.com for more information on these files. + * @param multiSKUPriceAndStockRequest (optional) + * @return MultiSKUPriceAndStockResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Success -
    + */ + public MultiSKUPriceAndStockResponse postV4Multiskupriceandstock(MultiSKUPriceAndStockRequest multiSKUPriceAndStockRequest) throws ApiException { + ApiResponse localVarResp = postV4MultiskupriceandstockWithHttpInfo(multiSKUPriceAndStockRequest); + return localVarResp.getData(); + } + + /** + * Product availability for upto 50 SKUs + * Find price and availability of up to 50 SKUs in a single request. As you increase the number of items in the request response time will be extended. This transaction must not be used as a continuous cyclical call to populate availability and pricing for your full catalog. Customers that perform this activity will lose access to price and availability. Ingram can provide a Price catalog file and an Inventory file in flat file format, which can be obtained through FTP download. Please contact 1800-616-4665 or Electronic.Services@ingrammicro.com for more information on these files. + * @param multiSKUPriceAndStockRequest (optional) + * @return ApiResponse<MultiSKUPriceAndStockResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Success -
    + */ + public ApiResponse postV4MultiskupriceandstockWithHttpInfo(MultiSKUPriceAndStockRequest multiSKUPriceAndStockRequest) throws ApiException { + okhttp3.Call localVarCall = postV4MultiskupriceandstockValidateBeforeCall(multiSKUPriceAndStockRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Product availability for upto 50 SKUs (asynchronously) + * Find price and availability of up to 50 SKUs in a single request. As you increase the number of items in the request response time will be extended. This transaction must not be used as a continuous cyclical call to populate availability and pricing for your full catalog. Customers that perform this activity will lose access to price and availability. Ingram can provide a Price catalog file and an Inventory file in flat file format, which can be obtained through FTP download. Please contact 1800-616-4665 or Electronic.Services@ingrammicro.com for more information on these files. + * @param multiSKUPriceAndStockRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Success -
    + */ + public okhttp3.Call postV4MultiskupriceandstockAsync(MultiSKUPriceAndStockRequest multiSKUPriceAndStockRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postV4MultiskupriceandstockValidateBeforeCall(multiSKUPriceAndStockRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postV4Productsearch + * @param productSearchRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Success -
    + */ + public okhttp3.Call postV4ProductsearchCall(ProductSearchRequest productSearchRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = productSearchRequest; + + // create path and map variables + String localVarPath = "/products/v4/productsearch"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postV4ProductsearchValidateBeforeCall(ProductSearchRequest productSearchRequest, final ApiCallback _callback) throws ApiException { + return postV4ProductsearchCall(productSearchRequest, _callback); + + } + + /** + * Real-time Product Search + * A real time search that provides the Ingram Micro part number using the manufacturer part number. This API is helpful to eliminate any errors when a manufactuer has the same part number and Ingram Micro has had to create multiple sku numbers + * @param productSearchRequest (optional) + * @return ProductSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Success -
    + */ + public ProductSearchResponse postV4Productsearch(ProductSearchRequest productSearchRequest) throws ApiException { + ApiResponse localVarResp = postV4ProductsearchWithHttpInfo(productSearchRequest); + return localVarResp.getData(); + } + + /** + * Real-time Product Search + * A real time search that provides the Ingram Micro part number using the manufacturer part number. This API is helpful to eliminate any errors when a manufactuer has the same part number and Ingram Micro has had to create multiple sku numbers + * @param productSearchRequest (optional) + * @return ApiResponse<ProductSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Success -
    + */ + public ApiResponse postV4ProductsearchWithHttpInfo(ProductSearchRequest productSearchRequest) throws ApiException { + okhttp3.Call localVarCall = postV4ProductsearchValidateBeforeCall(productSearchRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Real-time Product Search (asynchronously) + * A real time search that provides the Ingram Micro part number using the manufacturer part number. This API is helpful to eliminate any errors when a manufactuer has the same part number and Ingram Micro has had to create multiple sku numbers + * @param productSearchRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Success -
    + */ + public okhttp3.Call postV4ProductsearchAsync(ProductSearchRequest productSearchRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postV4ProductsearchValidateBeforeCall(productSearchRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/xiresellers/client/api/ProductCatalogV5Api.java b/src/main/java/xiresellers/client/api/ProductCatalogV5Api.java new file mode 100644 index 00000000..bad159a1 --- /dev/null +++ b/src/main/java/xiresellers/client/api/ProductCatalogV5Api.java @@ -0,0 +1,347 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiCallback; +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.ApiResponse; +import xiresellers.client.Configuration; +import xiresellers.client.Pair; +import xiresellers.client.ProgressRequestBody; +import xiresellers.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import xiresellers.client.model.PriceAndAvailabilityRequest; +import xiresellers.client.model.PriceAndAvailabilityResponse; +import xiresellers.client.model.ProductSearchResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ProductCatalogV5Api { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public ProductCatalogV5Api() { + this(Configuration.getDefaultApiClient()); + } + + public ProductCatalogV5Api(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getV5CatalogProductsearch + * @param customerNumber Your unique Ingram Micro customer number (required) + * @param isoCountryCode 2 chars country code (required) + * @param partNumber Part Number can be ingram part number or vendor part number or customer part number or UPC (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call getV5CatalogProductsearchCall(String customerNumber, String isoCountryCode, String partNumber, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/resellers/v5/Catalog"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (customerNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("customerNumber", customerNumber)); + } + + if (isoCountryCode != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("isoCountryCode", isoCountryCode)); + } + + if (partNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("partNumber", partNumber)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getV5CatalogProductsearchValidateBeforeCall(String customerNumber, String isoCountryCode, String partNumber, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'customerNumber' is set + if (customerNumber == null) { + throw new ApiException("Missing the required parameter 'customerNumber' when calling getV5CatalogProductsearch(Async)"); + } + + // verify the required parameter 'isoCountryCode' is set + if (isoCountryCode == null) { + throw new ApiException("Missing the required parameter 'isoCountryCode' when calling getV5CatalogProductsearch(Async)"); + } + + // verify the required parameter 'partNumber' is set + if (partNumber == null) { + throw new ApiException("Missing the required parameter 'partNumber' when calling getV5CatalogProductsearch(Async)"); + } + + return getV5CatalogProductsearchCall(customerNumber, isoCountryCode, partNumber, _callback); + + } + + /** + * Search Product Catalog + * Search the Ingram Micro product catalog using customerNumber, isoCountryCode and partNumber.<ul><li>customerNumber and isoCountryCode fields are required.</li><li>The PartNumber field accepts the following:<ul><li>Ingram part number</li><li>Vendor part number</li><li>Customer part number</li><li>UPC (Universal Product Code)</li></ul></li></ul> + * @param customerNumber Your unique Ingram Micro customer number (required) + * @param isoCountryCode 2 chars country code (required) + * @param partNumber Part Number can be ingram part number or vendor part number or customer part number or UPC (required) + * @return ProductSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public ProductSearchResponse getV5CatalogProductsearch(String customerNumber, String isoCountryCode, String partNumber) throws ApiException { + ApiResponse localVarResp = getV5CatalogProductsearchWithHttpInfo(customerNumber, isoCountryCode, partNumber); + return localVarResp.getData(); + } + + /** + * Search Product Catalog + * Search the Ingram Micro product catalog using customerNumber, isoCountryCode and partNumber.<ul><li>customerNumber and isoCountryCode fields are required.</li><li>The PartNumber field accepts the following:<ul><li>Ingram part number</li><li>Vendor part number</li><li>Customer part number</li><li>UPC (Universal Product Code)</li></ul></li></ul> + * @param customerNumber Your unique Ingram Micro customer number (required) + * @param isoCountryCode 2 chars country code (required) + * @param partNumber Part Number can be ingram part number or vendor part number or customer part number or UPC (required) + * @return ApiResponse<ProductSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public ApiResponse getV5CatalogProductsearchWithHttpInfo(String customerNumber, String isoCountryCode, String partNumber) throws ApiException { + okhttp3.Call localVarCall = getV5CatalogProductsearchValidateBeforeCall(customerNumber, isoCountryCode, partNumber, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Search Product Catalog (asynchronously) + * Search the Ingram Micro product catalog using customerNumber, isoCountryCode and partNumber.<ul><li>customerNumber and isoCountryCode fields are required.</li><li>The PartNumber field accepts the following:<ul><li>Ingram part number</li><li>Vendor part number</li><li>Customer part number</li><li>UPC (Universal Product Code)</li></ul></li></ul> + * @param customerNumber Your unique Ingram Micro customer number (required) + * @param isoCountryCode 2 chars country code (required) + * @param partNumber Part Number can be ingram part number or vendor part number or customer part number or UPC (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call getV5CatalogProductsearchAsync(String customerNumber, String isoCountryCode, String partNumber, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getV5CatalogProductsearchValidateBeforeCall(customerNumber, isoCountryCode, partNumber, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for multiSKUPriceAndStock + * @param priceAndAvailabilityRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Success -
    + */ + public okhttp3.Call multiSKUPriceAndStockCall(PriceAndAvailabilityRequest priceAndAvailabilityRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = priceAndAvailabilityRequest; + + // create path and map variables + String localVarPath = "/resellers/v5/Catalog/priceandavailability"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call multiSKUPriceAndStockValidateBeforeCall(PriceAndAvailabilityRequest priceAndAvailabilityRequest, final ApiCallback _callback) throws ApiException { + return multiSKUPriceAndStockCall(priceAndAvailabilityRequest, _callback); + + } + + /** + * Find availability of upto 50 SKUs + * Search the product catalog for the price and availability for up to 50 SKUs at one time. This endpoint helps to confirm the details just prior to placing a real-time call.<ul><li>You may request visibility for reserve stock if you participate in reserved inventory, in addition to the stock that is open to all the partners. Please see the details in the endpoint model below.</li><li>Follow these guidelines when using this endpoint:<ul><li>This endpoint is not for refreshing the full catalog with availability and pricing information. Ingram Micro applies rate limits on this endpoint. Continuous cyclical calls will error out. Customers that perform this activity may lose access to the endpoint.</li><li>For the full catalog refresh, Ingram Micro can provide a Price and Inventory file in flat file format, made available through FTP download. Please contact your Ingram Micro sales rep for details.</li></ul></li></ul> + * @param priceAndAvailabilityRequest (optional) + * @return PriceAndAvailabilityResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Success -
    + */ + public PriceAndAvailabilityResponse multiSKUPriceAndStock(PriceAndAvailabilityRequest priceAndAvailabilityRequest) throws ApiException { + ApiResponse localVarResp = multiSKUPriceAndStockWithHttpInfo(priceAndAvailabilityRequest); + return localVarResp.getData(); + } + + /** + * Find availability of upto 50 SKUs + * Search the product catalog for the price and availability for up to 50 SKUs at one time. This endpoint helps to confirm the details just prior to placing a real-time call.<ul><li>You may request visibility for reserve stock if you participate in reserved inventory, in addition to the stock that is open to all the partners. Please see the details in the endpoint model below.</li><li>Follow these guidelines when using this endpoint:<ul><li>This endpoint is not for refreshing the full catalog with availability and pricing information. Ingram Micro applies rate limits on this endpoint. Continuous cyclical calls will error out. Customers that perform this activity may lose access to the endpoint.</li><li>For the full catalog refresh, Ingram Micro can provide a Price and Inventory file in flat file format, made available through FTP download. Please contact your Ingram Micro sales rep for details.</li></ul></li></ul> + * @param priceAndAvailabilityRequest (optional) + * @return ApiResponse<PriceAndAvailabilityResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Success -
    + */ + public ApiResponse multiSKUPriceAndStockWithHttpInfo(PriceAndAvailabilityRequest priceAndAvailabilityRequest) throws ApiException { + okhttp3.Call localVarCall = multiSKUPriceAndStockValidateBeforeCall(priceAndAvailabilityRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Find availability of upto 50 SKUs (asynchronously) + * Search the product catalog for the price and availability for up to 50 SKUs at one time. This endpoint helps to confirm the details just prior to placing a real-time call.<ul><li>You may request visibility for reserve stock if you participate in reserved inventory, in addition to the stock that is open to all the partners. Please see the details in the endpoint model below.</li><li>Follow these guidelines when using this endpoint:<ul><li>This endpoint is not for refreshing the full catalog with availability and pricing information. Ingram Micro applies rate limits on this endpoint. Continuous cyclical calls will error out. Customers that perform this activity may lose access to the endpoint.</li><li>For the full catalog refresh, Ingram Micro can provide a Price and Inventory file in flat file format, made available through FTP download. Please contact your Ingram Micro sales rep for details.</li></ul></li></ul> + * @param priceAndAvailabilityRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 Success -
    + */ + public okhttp3.Call multiSKUPriceAndStockAsync(PriceAndAvailabilityRequest priceAndAvailabilityRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = multiSKUPriceAndStockValidateBeforeCall(priceAndAvailabilityRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/xiresellers/client/api/QuoteToOrderApi.java b/src/main/java/xiresellers/client/api/QuoteToOrderApi.java new file mode 100644 index 00000000..f1314141 --- /dev/null +++ b/src/main/java/xiresellers/client/api/QuoteToOrderApi.java @@ -0,0 +1,256 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiCallback; +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.ApiResponse; +import xiresellers.client.Configuration; +import xiresellers.client.Pair; +import xiresellers.client.ProgressRequestBody; +import xiresellers.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import xiresellers.client.model.GetResellerV6ValidateQuote500Response; +import xiresellers.client.model.PostQuoteToOrderV6400Response; +import xiresellers.client.model.QuoteToOrderDetailsDTO; +import xiresellers.client.model.QuoteToOrderResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class QuoteToOrderApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public QuoteToOrderApi() { + this(Configuration.getDefaultApiClient()); + } + + public QuoteToOrderApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for postQuoteToOrderV6 + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param quoteToOrderDetailsDTO (required) + * @param imSenderID Unique value used to identify the sender of the transaction. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 Success -
    400 Bad Request -
    500 Server Error -
    + */ + public okhttp3.Call postQuoteToOrderV6Call(String imCustomerNumber, String imCountryCode, String imCorrelationID, QuoteToOrderDetailsDTO quoteToOrderDetailsDTO, String imSenderID, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = quoteToOrderDetailsDTO; + + // create path and map variables + String localVarPath = "/resellers/v6/q2o/orders"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (imCustomerNumber != null) { + localVarHeaderParams.put("IM-CustomerNumber", localVarApiClient.parameterToString(imCustomerNumber)); + } + + if (imCountryCode != null) { + localVarHeaderParams.put("IM-CountryCode", localVarApiClient.parameterToString(imCountryCode)); + } + + if (imSenderID != null) { + localVarHeaderParams.put("IM-SenderID", localVarApiClient.parameterToString(imSenderID)); + } + + if (imCorrelationID != null) { + localVarHeaderParams.put("IM-CorrelationID", localVarApiClient.parameterToString(imCorrelationID)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postQuoteToOrderV6ValidateBeforeCall(String imCustomerNumber, String imCountryCode, String imCorrelationID, QuoteToOrderDetailsDTO quoteToOrderDetailsDTO, String imSenderID, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'imCustomerNumber' is set + if (imCustomerNumber == null) { + throw new ApiException("Missing the required parameter 'imCustomerNumber' when calling postQuoteToOrderV6(Async)"); + } + + // verify the required parameter 'imCountryCode' is set + if (imCountryCode == null) { + throw new ApiException("Missing the required parameter 'imCountryCode' when calling postQuoteToOrderV6(Async)"); + } + + // verify the required parameter 'imCorrelationID' is set + if (imCorrelationID == null) { + throw new ApiException("Missing the required parameter 'imCorrelationID' when calling postQuoteToOrderV6(Async)"); + } + + // verify the required parameter 'quoteToOrderDetailsDTO' is set + if (quoteToOrderDetailsDTO == null) { + throw new ApiException("Missing the required parameter 'quoteToOrderDetailsDTO' when calling postQuoteToOrderV6(Async)"); + } + + return postQuoteToOrderV6Call(imCustomerNumber, imCountryCode, imCorrelationID, quoteToOrderDetailsDTO, imSenderID, _callback); + + } + + /** + * Quote To Order + * The “Quote to Order” (QTO) endpoint allows a customer to create an order using the existing quote which is in “Ready to Order” status. A customer can create an order using Configure to order (CTO) quote or a non-configure to order (Non-CTO) quote. Upon successful submission of the order create request, a confirmation message will be returned as an API response. <br > <br >Ingram Micro offers webhooks as a method to send notifications to Resellers once the order creation request is received. All the updates related to Order creation will be pushed as a notification to the customer via a pre-defined callback URL as an HTTP post. <br > <br > **Prerequisite:** Pre-defined callback URL <br > <br > Before creating an order using the quote, it’s recommended to validate the quote using the “Validate Quote” endpoint. Validate Quote endpoint will not only validate the quote but also outline all the mandatory fields required by the vendor at a header level and at the line level which a customer need to pass to the Quote To Order endpoint request. For a detailed understanding of the “Validate Quote” endpoint, review the “Validate Quote” endpoint documentation. <br ><br > **How it works:** <br ><br > - The customer validates the quote with a quote number from Validate Quote endpoint. <br > - The customer copies all the mandatory fields required by the vendor and adds them to the QTO request body. <br > - The customer provides all the values for Vendor mandatory fields along with other required information for QTO to create an order. <br > - After the order creation request receipt acknowledgment from the QTO endpoint, all further order creation updates will be provided via webhook push notification. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param quoteToOrderDetailsDTO (required) + * @param imSenderID Unique value used to identify the sender of the transaction. (optional) + * @return QuoteToOrderResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 Success -
    400 Bad Request -
    500 Server Error -
    + */ + public QuoteToOrderResponse postQuoteToOrderV6(String imCustomerNumber, String imCountryCode, String imCorrelationID, QuoteToOrderDetailsDTO quoteToOrderDetailsDTO, String imSenderID) throws ApiException { + ApiResponse localVarResp = postQuoteToOrderV6WithHttpInfo(imCustomerNumber, imCountryCode, imCorrelationID, quoteToOrderDetailsDTO, imSenderID); + return localVarResp.getData(); + } + + /** + * Quote To Order + * The “Quote to Order” (QTO) endpoint allows a customer to create an order using the existing quote which is in “Ready to Order” status. A customer can create an order using Configure to order (CTO) quote or a non-configure to order (Non-CTO) quote. Upon successful submission of the order create request, a confirmation message will be returned as an API response. <br > <br >Ingram Micro offers webhooks as a method to send notifications to Resellers once the order creation request is received. All the updates related to Order creation will be pushed as a notification to the customer via a pre-defined callback URL as an HTTP post. <br > <br > **Prerequisite:** Pre-defined callback URL <br > <br > Before creating an order using the quote, it’s recommended to validate the quote using the “Validate Quote” endpoint. Validate Quote endpoint will not only validate the quote but also outline all the mandatory fields required by the vendor at a header level and at the line level which a customer need to pass to the Quote To Order endpoint request. For a detailed understanding of the “Validate Quote” endpoint, review the “Validate Quote” endpoint documentation. <br ><br > **How it works:** <br ><br > - The customer validates the quote with a quote number from Validate Quote endpoint. <br > - The customer copies all the mandatory fields required by the vendor and adds them to the QTO request body. <br > - The customer provides all the values for Vendor mandatory fields along with other required information for QTO to create an order. <br > - After the order creation request receipt acknowledgment from the QTO endpoint, all further order creation updates will be provided via webhook push notification. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param quoteToOrderDetailsDTO (required) + * @param imSenderID Unique value used to identify the sender of the transaction. (optional) + * @return ApiResponse<QuoteToOrderResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 Success -
    400 Bad Request -
    500 Server Error -
    + */ + public ApiResponse postQuoteToOrderV6WithHttpInfo(String imCustomerNumber, String imCountryCode, String imCorrelationID, QuoteToOrderDetailsDTO quoteToOrderDetailsDTO, String imSenderID) throws ApiException { + okhttp3.Call localVarCall = postQuoteToOrderV6ValidateBeforeCall(imCustomerNumber, imCountryCode, imCorrelationID, quoteToOrderDetailsDTO, imSenderID, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Quote To Order (asynchronously) + * The “Quote to Order” (QTO) endpoint allows a customer to create an order using the existing quote which is in “Ready to Order” status. A customer can create an order using Configure to order (CTO) quote or a non-configure to order (Non-CTO) quote. Upon successful submission of the order create request, a confirmation message will be returned as an API response. <br > <br >Ingram Micro offers webhooks as a method to send notifications to Resellers once the order creation request is received. All the updates related to Order creation will be pushed as a notification to the customer via a pre-defined callback URL as an HTTP post. <br > <br > **Prerequisite:** Pre-defined callback URL <br > <br > Before creating an order using the quote, it’s recommended to validate the quote using the “Validate Quote” endpoint. Validate Quote endpoint will not only validate the quote but also outline all the mandatory fields required by the vendor at a header level and at the line level which a customer need to pass to the Quote To Order endpoint request. For a detailed understanding of the “Validate Quote” endpoint, review the “Validate Quote” endpoint documentation. <br ><br > **How it works:** <br ><br > - The customer validates the quote with a quote number from Validate Quote endpoint. <br > - The customer copies all the mandatory fields required by the vendor and adds them to the QTO request body. <br > - The customer provides all the values for Vendor mandatory fields along with other required information for QTO to create an order. <br > - After the order creation request receipt acknowledgment from the QTO endpoint, all further order creation updates will be provided via webhook push notification. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param quoteToOrderDetailsDTO (required) + * @param imSenderID Unique value used to identify the sender of the transaction. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 Success -
    400 Bad Request -
    500 Server Error -
    + */ + public okhttp3.Call postQuoteToOrderV6Async(String imCustomerNumber, String imCountryCode, String imCorrelationID, QuoteToOrderDetailsDTO quoteToOrderDetailsDTO, String imSenderID, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postQuoteToOrderV6ValidateBeforeCall(imCustomerNumber, imCountryCode, imCorrelationID, quoteToOrderDetailsDTO, imSenderID, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/xiresellers/client/api/QuotesApi.java b/src/main/java/xiresellers/client/api/QuotesApi.java new file mode 100644 index 00000000..7a9cfdaa --- /dev/null +++ b/src/main/java/xiresellers/client/api/QuotesApi.java @@ -0,0 +1,724 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiCallback; +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.ApiResponse; +import xiresellers.client.Configuration; +import xiresellers.client.Pair; +import xiresellers.client.ProgressRequestBody; +import xiresellers.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import xiresellers.client.model.ErrorResponse; +import xiresellers.client.model.GetResellerV6ValidateQuote400Response; +import xiresellers.client.model.GetResellerV6ValidateQuote500Response; +import xiresellers.client.model.QuoteDetailsResponse; +import xiresellers.client.model.QuoteSearchResponse; +import xiresellers.client.model.ValidateQuoteResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class QuotesApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public QuotesApi() { + this(Configuration.getDefaultApiClient()); + } + + public QuotesApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getQuotessearchV6 + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCustomerContact Logged in Users email address contact. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param ingramOrderDateBt Search with start and end date(only 2 entries allowed). (optional) + * @param quoteNumber Unique identifier generated by Ingram Micros CRM specific to each quote. When applying a filter to the quoteNumber and including a partial quote number in the filter, all quotes containing any information included in the filter can be retrieved as a subset of all available customer quotes. (optional) + * @param specialBidNumber Special Pricing Bid Number, also referred to as a Dart Number by some vendors, is a unique identifier associated with vendor specific products and discounts. (optional) + * @param endUserContact End User Name is the end customer name that is associated with a quote in Ingram Micros CRM. (optional) + * @param sortingOrder Sort applies to the selected column (sortingColumnName) and may be specified in Ascending (asc) or Descending (desc) order. The default sort is Descending (desc) - most recent first. (optional) + * @param sortBy Refers to the column selected to apply the sorting criteria. The default column is dateCreated and will sort by the most recently created quote first with the following in descending order. The default filter retrieves quotes created within the last 30 days. Filtering allows user to select a specific column to sort: quoteNumber, createdDate, lastModifiedDate and expiryDate. (optional) + * @param pageSize Number of records (quotes) to display per page in the quote list. The default is 25, but may be decreased using the filter . (optional) + * @param pageNumber Page index or page number for the list of quotes being returned. (optional, default to 1) + * @param vendorName The name of the vendor. (optional) + * @param quoteName The quote name was given by the customer while creating quote. (optional) + * @param status The status of the quote. (optional) + * @param quoteCreateDateBt Search with start and end date(only 2 entries allowed). (optional) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
    Status Code Description Response Headers
    200 OK * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    400 Bad Request * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    401 Unauthorized -
    404 Not Found * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    500 Internal Server Error * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    + */ + public okhttp3.Call getQuotessearchV6Call(String imCustomerNumber, String imCountryCode, String imCustomerContact, String imCorrelationID, List ingramOrderDateBt, String quoteNumber, String specialBidNumber, String endUserContact, String sortingOrder, String sortBy, Integer pageSize, Integer pageNumber, String vendorName, String quoteName, String status, String quoteCreateDateBt, String imSenderID, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/resellers/v6/quotes/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (ingramOrderDateBt != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "ingramOrderDate-bt", ingramOrderDateBt)); + } + + if (quoteNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("quoteNumber", quoteNumber)); + } + + if (specialBidNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("specialBidNumber", specialBidNumber)); + } + + if (endUserContact != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("endUserContact", endUserContact)); + } + + if (sortingOrder != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortingOrder", sortingOrder)); + } + + if (sortBy != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortBy", sortBy)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + if (pageNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageNumber", pageNumber)); + } + + if (vendorName != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("vendorName", vendorName)); + } + + if (quoteName != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("quoteName", quoteName)); + } + + if (status != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("status", status)); + } + + if (quoteCreateDateBt != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("quoteCreateDate-bt", quoteCreateDateBt)); + } + + if (imCustomerNumber != null) { + localVarHeaderParams.put("IM-CustomerNumber", localVarApiClient.parameterToString(imCustomerNumber)); + } + + if (imCountryCode != null) { + localVarHeaderParams.put("IM-CountryCode", localVarApiClient.parameterToString(imCountryCode)); + } + + if (imCustomerContact != null) { + localVarHeaderParams.put("IM-CustomerContact", localVarApiClient.parameterToString(imCustomerContact)); + } + + if (imCorrelationID != null) { + localVarHeaderParams.put("IM-CorrelationID", localVarApiClient.parameterToString(imCorrelationID)); + } + + if (imSenderID != null) { + localVarHeaderParams.put("IM-SenderID", localVarApiClient.parameterToString(imSenderID)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getQuotessearchV6ValidateBeforeCall(String imCustomerNumber, String imCountryCode, String imCustomerContact, String imCorrelationID, List ingramOrderDateBt, String quoteNumber, String specialBidNumber, String endUserContact, String sortingOrder, String sortBy, Integer pageSize, Integer pageNumber, String vendorName, String quoteName, String status, String quoteCreateDateBt, String imSenderID, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'imCustomerNumber' is set + if (imCustomerNumber == null) { + throw new ApiException("Missing the required parameter 'imCustomerNumber' when calling getQuotessearchV6(Async)"); + } + + // verify the required parameter 'imCountryCode' is set + if (imCountryCode == null) { + throw new ApiException("Missing the required parameter 'imCountryCode' when calling getQuotessearchV6(Async)"); + } + + // verify the required parameter 'imCustomerContact' is set + if (imCustomerContact == null) { + throw new ApiException("Missing the required parameter 'imCustomerContact' when calling getQuotessearchV6(Async)"); + } + + // verify the required parameter 'imCorrelationID' is set + if (imCorrelationID == null) { + throw new ApiException("Missing the required parameter 'imCorrelationID' when calling getQuotessearchV6(Async)"); + } + + return getQuotessearchV6Call(imCustomerNumber, imCountryCode, imCustomerContact, imCorrelationID, ingramOrderDateBt, quoteNumber, specialBidNumber, endUserContact, sortingOrder, sortBy, pageSize, pageNumber, vendorName, quoteName, status, quoteCreateDateBt, imSenderID, _callback); + + } + + /** + * Quote Search + * The Quote Search API, by default, will retrieve quotes modified or created within the last 30 days. Quotes older than 365 days are excluded by default. The date filters enable the retrieval of quotes older than 30 days and up to 365 days when using date range criteria. The Quote Search API enables the retrieval and filtering of relevant quote list key criteria data such as Quote Number, Special Bid Numbers, End User Name, Quote Status, and Date Ranges from Ingram Micros CRM system. Only Active quotes are avaiable through the API. Draft and Closed quotes are excluded and are not accessable through the Quote List Search API. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCustomerContact Logged in Users email address contact. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param ingramOrderDateBt Search with start and end date(only 2 entries allowed). (optional) + * @param quoteNumber Unique identifier generated by Ingram Micros CRM specific to each quote. When applying a filter to the quoteNumber and including a partial quote number in the filter, all quotes containing any information included in the filter can be retrieved as a subset of all available customer quotes. (optional) + * @param specialBidNumber Special Pricing Bid Number, also referred to as a Dart Number by some vendors, is a unique identifier associated with vendor specific products and discounts. (optional) + * @param endUserContact End User Name is the end customer name that is associated with a quote in Ingram Micros CRM. (optional) + * @param sortingOrder Sort applies to the selected column (sortingColumnName) and may be specified in Ascending (asc) or Descending (desc) order. The default sort is Descending (desc) - most recent first. (optional) + * @param sortBy Refers to the column selected to apply the sorting criteria. The default column is dateCreated and will sort by the most recently created quote first with the following in descending order. The default filter retrieves quotes created within the last 30 days. Filtering allows user to select a specific column to sort: quoteNumber, createdDate, lastModifiedDate and expiryDate. (optional) + * @param pageSize Number of records (quotes) to display per page in the quote list. The default is 25, but may be decreased using the filter . (optional) + * @param pageNumber Page index or page number for the list of quotes being returned. (optional, default to 1) + * @param vendorName The name of the vendor. (optional) + * @param quoteName The quote name was given by the customer while creating quote. (optional) + * @param status The status of the quote. (optional) + * @param quoteCreateDateBt Search with start and end date(only 2 entries allowed). (optional) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @return QuoteSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
    Status Code Description Response Headers
    200 OK * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    400 Bad Request * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    401 Unauthorized -
    404 Not Found * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    500 Internal Server Error * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    + */ + public QuoteSearchResponse getQuotessearchV6(String imCustomerNumber, String imCountryCode, String imCustomerContact, String imCorrelationID, List ingramOrderDateBt, String quoteNumber, String specialBidNumber, String endUserContact, String sortingOrder, String sortBy, Integer pageSize, Integer pageNumber, String vendorName, String quoteName, String status, String quoteCreateDateBt, String imSenderID) throws ApiException { + ApiResponse localVarResp = getQuotessearchV6WithHttpInfo(imCustomerNumber, imCountryCode, imCustomerContact, imCorrelationID, ingramOrderDateBt, quoteNumber, specialBidNumber, endUserContact, sortingOrder, sortBy, pageSize, pageNumber, vendorName, quoteName, status, quoteCreateDateBt, imSenderID); + return localVarResp.getData(); + } + + /** + * Quote Search + * The Quote Search API, by default, will retrieve quotes modified or created within the last 30 days. Quotes older than 365 days are excluded by default. The date filters enable the retrieval of quotes older than 30 days and up to 365 days when using date range criteria. The Quote Search API enables the retrieval and filtering of relevant quote list key criteria data such as Quote Number, Special Bid Numbers, End User Name, Quote Status, and Date Ranges from Ingram Micros CRM system. Only Active quotes are avaiable through the API. Draft and Closed quotes are excluded and are not accessable through the Quote List Search API. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCustomerContact Logged in Users email address contact. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param ingramOrderDateBt Search with start and end date(only 2 entries allowed). (optional) + * @param quoteNumber Unique identifier generated by Ingram Micros CRM specific to each quote. When applying a filter to the quoteNumber and including a partial quote number in the filter, all quotes containing any information included in the filter can be retrieved as a subset of all available customer quotes. (optional) + * @param specialBidNumber Special Pricing Bid Number, also referred to as a Dart Number by some vendors, is a unique identifier associated with vendor specific products and discounts. (optional) + * @param endUserContact End User Name is the end customer name that is associated with a quote in Ingram Micros CRM. (optional) + * @param sortingOrder Sort applies to the selected column (sortingColumnName) and may be specified in Ascending (asc) or Descending (desc) order. The default sort is Descending (desc) - most recent first. (optional) + * @param sortBy Refers to the column selected to apply the sorting criteria. The default column is dateCreated and will sort by the most recently created quote first with the following in descending order. The default filter retrieves quotes created within the last 30 days. Filtering allows user to select a specific column to sort: quoteNumber, createdDate, lastModifiedDate and expiryDate. (optional) + * @param pageSize Number of records (quotes) to display per page in the quote list. The default is 25, but may be decreased using the filter . (optional) + * @param pageNumber Page index or page number for the list of quotes being returned. (optional, default to 1) + * @param vendorName The name of the vendor. (optional) + * @param quoteName The quote name was given by the customer while creating quote. (optional) + * @param status The status of the quote. (optional) + * @param quoteCreateDateBt Search with start and end date(only 2 entries allowed). (optional) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @return ApiResponse<QuoteSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
    Status Code Description Response Headers
    200 OK * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    400 Bad Request * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    401 Unauthorized -
    404 Not Found * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    500 Internal Server Error * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    + */ + public ApiResponse getQuotessearchV6WithHttpInfo(String imCustomerNumber, String imCountryCode, String imCustomerContact, String imCorrelationID, List ingramOrderDateBt, String quoteNumber, String specialBidNumber, String endUserContact, String sortingOrder, String sortBy, Integer pageSize, Integer pageNumber, String vendorName, String quoteName, String status, String quoteCreateDateBt, String imSenderID) throws ApiException { + okhttp3.Call localVarCall = getQuotessearchV6ValidateBeforeCall(imCustomerNumber, imCountryCode, imCustomerContact, imCorrelationID, ingramOrderDateBt, quoteNumber, specialBidNumber, endUserContact, sortingOrder, sortBy, pageSize, pageNumber, vendorName, quoteName, status, quoteCreateDateBt, imSenderID, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Quote Search (asynchronously) + * The Quote Search API, by default, will retrieve quotes modified or created within the last 30 days. Quotes older than 365 days are excluded by default. The date filters enable the retrieval of quotes older than 30 days and up to 365 days when using date range criteria. The Quote Search API enables the retrieval and filtering of relevant quote list key criteria data such as Quote Number, Special Bid Numbers, End User Name, Quote Status, and Date Ranges from Ingram Micros CRM system. Only Active quotes are avaiable through the API. Draft and Closed quotes are excluded and are not accessable through the Quote List Search API. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCustomerContact Logged in Users email address contact. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param ingramOrderDateBt Search with start and end date(only 2 entries allowed). (optional) + * @param quoteNumber Unique identifier generated by Ingram Micros CRM specific to each quote. When applying a filter to the quoteNumber and including a partial quote number in the filter, all quotes containing any information included in the filter can be retrieved as a subset of all available customer quotes. (optional) + * @param specialBidNumber Special Pricing Bid Number, also referred to as a Dart Number by some vendors, is a unique identifier associated with vendor specific products and discounts. (optional) + * @param endUserContact End User Name is the end customer name that is associated with a quote in Ingram Micros CRM. (optional) + * @param sortingOrder Sort applies to the selected column (sortingColumnName) and may be specified in Ascending (asc) or Descending (desc) order. The default sort is Descending (desc) - most recent first. (optional) + * @param sortBy Refers to the column selected to apply the sorting criteria. The default column is dateCreated and will sort by the most recently created quote first with the following in descending order. The default filter retrieves quotes created within the last 30 days. Filtering allows user to select a specific column to sort: quoteNumber, createdDate, lastModifiedDate and expiryDate. (optional) + * @param pageSize Number of records (quotes) to display per page in the quote list. The default is 25, but may be decreased using the filter . (optional) + * @param pageNumber Page index or page number for the list of quotes being returned. (optional, default to 1) + * @param vendorName The name of the vendor. (optional) + * @param quoteName The quote name was given by the customer while creating quote. (optional) + * @param status The status of the quote. (optional) + * @param quoteCreateDateBt Search with start and end date(only 2 entries allowed). (optional) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + +
    Status Code Description Response Headers
    200 OK * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    400 Bad Request * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    401 Unauthorized -
    404 Not Found * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    500 Internal Server Error * IM-CorrelationID - Unique transaction number to identify each transaction across all the systems.
    * IM-SenderID - Unique value used to identify the sender of the transaction. Example: MyCompany
    + */ + public okhttp3.Call getQuotessearchV6Async(String imCustomerNumber, String imCountryCode, String imCustomerContact, String imCorrelationID, List ingramOrderDateBt, String quoteNumber, String specialBidNumber, String endUserContact, String sortingOrder, String sortBy, Integer pageSize, Integer pageNumber, String vendorName, String quoteName, String status, String quoteCreateDateBt, String imSenderID, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getQuotessearchV6ValidateBeforeCall(imCustomerNumber, imCountryCode, imCustomerContact, imCorrelationID, ingramOrderDateBt, quoteNumber, specialBidNumber, endUserContact, sortingOrder, sortBy, pageSize, pageNumber, vendorName, quoteName, status, quoteCreateDateBt, imSenderID, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getResellerV6ValidateQuote + * @param quoteNumber A unique identifier generated by Ingram Micro's CRM specific to each quote. (required) + * @param imCustomerNumber Your Ingram Micro unique customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param imSenderID Unique identifier used to identify the third party source accessing the services. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 Success -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call getResellerV6ValidateQuoteCall(String quoteNumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/resellers/v6/q2o/validatequote"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (quoteNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("quoteNumber", quoteNumber)); + } + + if (imCustomerNumber != null) { + localVarHeaderParams.put("IM-CustomerNumber", localVarApiClient.parameterToString(imCustomerNumber)); + } + + if (imCountryCode != null) { + localVarHeaderParams.put("IM-CountryCode", localVarApiClient.parameterToString(imCountryCode)); + } + + if (imSenderID != null) { + localVarHeaderParams.put("IM-SenderID", localVarApiClient.parameterToString(imSenderID)); + } + + if (imCorrelationID != null) { + localVarHeaderParams.put("IM-CorrelationID", localVarApiClient.parameterToString(imCorrelationID)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getResellerV6ValidateQuoteValidateBeforeCall(String quoteNumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'quoteNumber' is set + if (quoteNumber == null) { + throw new ApiException("Missing the required parameter 'quoteNumber' when calling getResellerV6ValidateQuote(Async)"); + } + + // verify the required parameter 'imCustomerNumber' is set + if (imCustomerNumber == null) { + throw new ApiException("Missing the required parameter 'imCustomerNumber' when calling getResellerV6ValidateQuote(Async)"); + } + + // verify the required parameter 'imCountryCode' is set + if (imCountryCode == null) { + throw new ApiException("Missing the required parameter 'imCountryCode' when calling getResellerV6ValidateQuote(Async)"); + } + + // verify the required parameter 'imCorrelationID' is set + if (imCorrelationID == null) { + throw new ApiException("Missing the required parameter 'imCorrelationID' when calling getResellerV6ValidateQuote(Async)"); + } + + return getResellerV6ValidateQuoteCall(quoteNumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, _callback); + + } + + /** + * Validate Quote + * The validate quote helps the customer validate the quote created in Ingram Micro's system. Apart from validating the quote, the endpoint also identifies all the mandatory fields that are required by the vendor at the header and line levels. + * @param quoteNumber A unique identifier generated by Ingram Micro's CRM specific to each quote. (required) + * @param imCustomerNumber Your Ingram Micro unique customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param imSenderID Unique identifier used to identify the third party source accessing the services. (optional) + * @return ValidateQuoteResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 Success -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public ValidateQuoteResponse getResellerV6ValidateQuote(String quoteNumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID) throws ApiException { + ApiResponse localVarResp = getResellerV6ValidateQuoteWithHttpInfo(quoteNumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID); + return localVarResp.getData(); + } + + /** + * Validate Quote + * The validate quote helps the customer validate the quote created in Ingram Micro's system. Apart from validating the quote, the endpoint also identifies all the mandatory fields that are required by the vendor at the header and line levels. + * @param quoteNumber A unique identifier generated by Ingram Micro's CRM specific to each quote. (required) + * @param imCustomerNumber Your Ingram Micro unique customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param imSenderID Unique identifier used to identify the third party source accessing the services. (optional) + * @return ApiResponse<ValidateQuoteResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 Success -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public ApiResponse getResellerV6ValidateQuoteWithHttpInfo(String quoteNumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID) throws ApiException { + okhttp3.Call localVarCall = getResellerV6ValidateQuoteValidateBeforeCall(quoteNumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Validate Quote (asynchronously) + * The validate quote helps the customer validate the quote created in Ingram Micro's system. Apart from validating the quote, the endpoint also identifies all the mandatory fields that are required by the vendor at the header and line levels. + * @param quoteNumber A unique identifier generated by Ingram Micro's CRM specific to each quote. (required) + * @param imCustomerNumber Your Ingram Micro unique customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param imSenderID Unique identifier used to identify the third party source accessing the services. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 Success -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call getResellerV6ValidateQuoteAsync(String quoteNumber, String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getResellerV6ValidateQuoteValidateBeforeCall(quoteNumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getResellersV6Quotes + * @param imCustomerNumber Your Ingram Micro unique customer number (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param quoteNumber Unique identifier generated by Ingram Micro's CRM specific to each quote. When applying a filter to the quoteNumber and including a partial quote number in the filter, all quotes containing any information included in the filter can be retrieved as a subset of all available customer quotes. (required) + * @param imSenderID Unique identifier used to identify the third party source accessing the services. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call getResellersV6QuotesCall(String imCustomerNumber, String imCountryCode, String imCorrelationID, String quoteNumber, String imSenderID, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/resellers/v6/quotes/{quoteNumber}" + .replace("{" + "quoteNumber" + "}", localVarApiClient.escapeString(quoteNumber.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (imCustomerNumber != null) { + localVarHeaderParams.put("IM-CustomerNumber", localVarApiClient.parameterToString(imCustomerNumber)); + } + + if (imCountryCode != null) { + localVarHeaderParams.put("IM-CountryCode", localVarApiClient.parameterToString(imCountryCode)); + } + + if (imSenderID != null) { + localVarHeaderParams.put("IM-SenderID", localVarApiClient.parameterToString(imSenderID)); + } + + if (imCorrelationID != null) { + localVarHeaderParams.put("IM-CorrelationID", localVarApiClient.parameterToString(imCorrelationID)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getResellersV6QuotesValidateBeforeCall(String imCustomerNumber, String imCountryCode, String imCorrelationID, String quoteNumber, String imSenderID, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'imCustomerNumber' is set + if (imCustomerNumber == null) { + throw new ApiException("Missing the required parameter 'imCustomerNumber' when calling getResellersV6Quotes(Async)"); + } + + // verify the required parameter 'imCountryCode' is set + if (imCountryCode == null) { + throw new ApiException("Missing the required parameter 'imCountryCode' when calling getResellersV6Quotes(Async)"); + } + + // verify the required parameter 'imCorrelationID' is set + if (imCorrelationID == null) { + throw new ApiException("Missing the required parameter 'imCorrelationID' when calling getResellersV6Quotes(Async)"); + } + + // verify the required parameter 'quoteNumber' is set + if (quoteNumber == null) { + throw new ApiException("Missing the required parameter 'quoteNumber' when calling getResellersV6Quotes(Async)"); + } + + return getResellersV6QuotesCall(imCustomerNumber, imCountryCode, imCorrelationID, quoteNumber, imSenderID, _callback); + + } + + /** + * Get Quote Details + * The quote details API provides all quote details associated with the quote number provided. The **“quoteNumber”**, **“isoCountryCode”** and **“customerNumber”** parameters are required. + * @param imCustomerNumber Your Ingram Micro unique customer number (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param quoteNumber Unique identifier generated by Ingram Micro's CRM specific to each quote. When applying a filter to the quoteNumber and including a partial quote number in the filter, all quotes containing any information included in the filter can be retrieved as a subset of all available customer quotes. (required) + * @param imSenderID Unique identifier used to identify the third party source accessing the services. (optional) + * @return QuoteDetailsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public QuoteDetailsResponse getResellersV6Quotes(String imCustomerNumber, String imCountryCode, String imCorrelationID, String quoteNumber, String imSenderID) throws ApiException { + ApiResponse localVarResp = getResellersV6QuotesWithHttpInfo(imCustomerNumber, imCountryCode, imCorrelationID, quoteNumber, imSenderID); + return localVarResp.getData(); + } + + /** + * Get Quote Details + * The quote details API provides all quote details associated with the quote number provided. The **“quoteNumber”**, **“isoCountryCode”** and **“customerNumber”** parameters are required. + * @param imCustomerNumber Your Ingram Micro unique customer number (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param quoteNumber Unique identifier generated by Ingram Micro's CRM specific to each quote. When applying a filter to the quoteNumber and including a partial quote number in the filter, all quotes containing any information included in the filter can be retrieved as a subset of all available customer quotes. (required) + * @param imSenderID Unique identifier used to identify the third party source accessing the services. (optional) + * @return ApiResponse<QuoteDetailsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public ApiResponse getResellersV6QuotesWithHttpInfo(String imCustomerNumber, String imCountryCode, String imCorrelationID, String quoteNumber, String imSenderID) throws ApiException { + okhttp3.Call localVarCall = getResellersV6QuotesValidateBeforeCall(imCustomerNumber, imCountryCode, imCorrelationID, quoteNumber, imSenderID, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Quote Details (asynchronously) + * The quote details API provides all quote details associated with the quote number provided. The **“quoteNumber”**, **“isoCountryCode”** and **“customerNumber”** parameters are required. + * @param imCustomerNumber Your Ingram Micro unique customer number (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction accross all the systems. (required) + * @param quoteNumber Unique identifier generated by Ingram Micro's CRM specific to each quote. When applying a filter to the quoteNumber and including a partial quote number in the filter, all quotes containing any information included in the filter can be retrieved as a subset of all available customer quotes. (required) + * @param imSenderID Unique identifier used to identify the third party source accessing the services. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call getResellersV6QuotesAsync(String imCustomerNumber, String imCountryCode, String imCorrelationID, String quoteNumber, String imSenderID, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getResellersV6QuotesValidateBeforeCall(imCustomerNumber, imCountryCode, imCorrelationID, quoteNumber, imSenderID, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/xiresellers/client/api/QuotesV4Api.java b/src/main/java/xiresellers/client/api/QuotesV4Api.java new file mode 100644 index 00000000..048290e7 --- /dev/null +++ b/src/main/java/xiresellers/client/api/QuotesV4Api.java @@ -0,0 +1,314 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiCallback; +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.ApiResponse; +import xiresellers.client.Configuration; +import xiresellers.client.Pair; +import xiresellers.client.ProgressRequestBody; +import xiresellers.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import xiresellers.client.model.QuoteDetailsRequest; +import xiresellers.client.model.QuoteDetailsResponse; +import xiresellers.client.model.QuoteListRequest; +import xiresellers.client.model.QuoteListResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class QuotesV4Api { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public QuotesV4Api() { + this(Configuration.getDefaultApiClient()); + } + + public QuotesV4Api(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for postV4Quotedetails + * @param quoteDetailsRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call postV4QuotedetailsCall(QuoteDetailsRequest quoteDetailsRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = quoteDetailsRequest; + + // create path and map variables + String localVarPath = "/quotes/v1/quotedetails"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postV4QuotedetailsValidateBeforeCall(QuoteDetailsRequest quoteDetailsRequest, final ApiCallback _callback) throws ApiException { + return postV4QuotedetailsCall(quoteDetailsRequest, _callback); + + } + + /** + * Get Quote Details + * A real-time request to delete a previously accepted order must be submitted before the order is released to Ingram Micro’s warehouse. After release the order is no longer eligible for deletion. Order delete transaction submitted after the order is released will be rejected and will not be applied. *Direct ship orders cannot be deleted. Contact your sales rep for assistance. + * @param quoteDetailsRequest (optional) + * @return QuoteDetailsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public QuoteDetailsResponse postV4Quotedetails(QuoteDetailsRequest quoteDetailsRequest) throws ApiException { + ApiResponse localVarResp = postV4QuotedetailsWithHttpInfo(quoteDetailsRequest); + return localVarResp.getData(); + } + + /** + * Get Quote Details + * A real-time request to delete a previously accepted order must be submitted before the order is released to Ingram Micro’s warehouse. After release the order is no longer eligible for deletion. Order delete transaction submitted after the order is released will be rejected and will not be applied. *Direct ship orders cannot be deleted. Contact your sales rep for assistance. + * @param quoteDetailsRequest (optional) + * @return ApiResponse<QuoteDetailsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public ApiResponse postV4QuotedetailsWithHttpInfo(QuoteDetailsRequest quoteDetailsRequest) throws ApiException { + okhttp3.Call localVarCall = postV4QuotedetailsValidateBeforeCall(quoteDetailsRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Quote Details (asynchronously) + * A real-time request to delete a previously accepted order must be submitted before the order is released to Ingram Micro’s warehouse. After release the order is no longer eligible for deletion. Order delete transaction submitted after the order is released will be rejected and will not be applied. *Direct ship orders cannot be deleted. Contact your sales rep for assistance. + * @param quoteDetailsRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call postV4QuotedetailsAsync(QuoteDetailsRequest quoteDetailsRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postV4QuotedetailsValidateBeforeCall(quoteDetailsRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postV4Quotesearch + * @param quoteListRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call postV4QuotesearchCall(QuoteListRequest quoteListRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = quoteListRequest; + + // create path and map variables + String localVarPath = "/quotes/v1/quotes"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postV4QuotesearchValidateBeforeCall(QuoteListRequest quoteListRequest, final ApiCallback _callback) throws ApiException { + return postV4QuotesearchCall(quoteListRequest, _callback); + + } + + /** + * Get Quote List + * A real-time request that allows the customer to query Ingram Micro for detailed information for a specific open or shipped order. Orders are searched using Ingram Micro Sales Order Number. + * @param quoteListRequest (optional) + * @return QuoteListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public QuoteListResponse postV4Quotesearch(QuoteListRequest quoteListRequest) throws ApiException { + ApiResponse localVarResp = postV4QuotesearchWithHttpInfo(quoteListRequest); + return localVarResp.getData(); + } + + /** + * Get Quote List + * A real-time request that allows the customer to query Ingram Micro for detailed information for a specific open or shipped order. Orders are searched using Ingram Micro Sales Order Number. + * @param quoteListRequest (optional) + * @return ApiResponse<QuoteListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public ApiResponse postV4QuotesearchWithHttpInfo(QuoteListRequest quoteListRequest) throws ApiException { + okhttp3.Call localVarCall = postV4QuotesearchValidateBeforeCall(quoteListRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Quote List (asynchronously) + * A real-time request that allows the customer to query Ingram Micro for detailed information for a specific open or shipped order. Orders are searched using Ingram Micro Sales Order Number. + * @param quoteListRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call postV4QuotesearchAsync(QuoteListRequest quoteListRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postV4QuotesearchValidateBeforeCall(quoteListRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/xiresellers/client/api/QuotesV5Api.java b/src/main/java/xiresellers/client/api/QuotesV5Api.java new file mode 100644 index 00000000..e5d643d9 --- /dev/null +++ b/src/main/java/xiresellers/client/api/QuotesV5Api.java @@ -0,0 +1,352 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiCallback; +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.ApiResponse; +import xiresellers.client.Configuration; +import xiresellers.client.Pair; +import xiresellers.client.ProgressRequestBody; +import xiresellers.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import xiresellers.client.model.QuoteDetails; +import xiresellers.client.model.QuoteListRequest; +import xiresellers.client.model.QuoteListResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class QuotesV5Api { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public QuotesV5Api() { + this(Configuration.getDefaultApiClient()); + } + + public QuotesV5Api(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getV5QuotesDetails + * @param quoteNumber Ingram Micro Quote Number (required) + * @param customerNumber Your Ingram Micro unique customer number (required) + * @param isoCountryCode (required) + * @param thirdPartySource Unique identifier used to identify the third party source accessing the services (optional, default to customer) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call getV5QuotesDetailsCall(String quoteNumber, String customerNumber, String isoCountryCode, String thirdPartySource, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/resellers/v5/quote/{quoteNumber}" + .replace("{" + "quoteNumber" + "}", localVarApiClient.escapeString(quoteNumber.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (customerNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("customerNumber", customerNumber)); + } + + if (isoCountryCode != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("isoCountryCode", isoCountryCode)); + } + + if (thirdPartySource != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("thirdPartySource", thirdPartySource)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getV5QuotesDetailsValidateBeforeCall(String quoteNumber, String customerNumber, String isoCountryCode, String thirdPartySource, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'quoteNumber' is set + if (quoteNumber == null) { + throw new ApiException("Missing the required parameter 'quoteNumber' when calling getV5QuotesDetails(Async)"); + } + + // verify the required parameter 'customerNumber' is set + if (customerNumber == null) { + throw new ApiException("Missing the required parameter 'customerNumber' when calling getV5QuotesDetails(Async)"); + } + + // verify the required parameter 'isoCountryCode' is set + if (isoCountryCode == null) { + throw new ApiException("Missing the required parameter 'isoCountryCode' when calling getV5QuotesDetails(Async)"); + } + + return getV5QuotesDetailsCall(quoteNumber, customerNumber, isoCountryCode, thirdPartySource, _callback); + + } + + /** + * Get Quote Details + * The quote details API provides all quote details associated with the quote number provided. The “<strong>quoteNumber</strong>”, “<strong>isoCountryCode</strong>” and “<strong>customerNumber</strong>” parameters are required. + * @param quoteNumber Ingram Micro Quote Number (required) + * @param customerNumber Your Ingram Micro unique customer number (required) + * @param isoCountryCode (required) + * @param thirdPartySource Unique identifier used to identify the third party source accessing the services (optional, default to customer) + * @return QuoteDetails + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public QuoteDetails getV5QuotesDetails(String quoteNumber, String customerNumber, String isoCountryCode, String thirdPartySource) throws ApiException { + ApiResponse localVarResp = getV5QuotesDetailsWithHttpInfo(quoteNumber, customerNumber, isoCountryCode, thirdPartySource); + return localVarResp.getData(); + } + + /** + * Get Quote Details + * The quote details API provides all quote details associated with the quote number provided. The “<strong>quoteNumber</strong>”, “<strong>isoCountryCode</strong>” and “<strong>customerNumber</strong>” parameters are required. + * @param quoteNumber Ingram Micro Quote Number (required) + * @param customerNumber Your Ingram Micro unique customer number (required) + * @param isoCountryCode (required) + * @param thirdPartySource Unique identifier used to identify the third party source accessing the services (optional, default to customer) + * @return ApiResponse<QuoteDetails> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public ApiResponse getV5QuotesDetailsWithHttpInfo(String quoteNumber, String customerNumber, String isoCountryCode, String thirdPartySource) throws ApiException { + okhttp3.Call localVarCall = getV5QuotesDetailsValidateBeforeCall(quoteNumber, customerNumber, isoCountryCode, thirdPartySource, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Quote Details (asynchronously) + * The quote details API provides all quote details associated with the quote number provided. The “<strong>quoteNumber</strong>”, “<strong>isoCountryCode</strong>” and “<strong>customerNumber</strong>” parameters are required. + * @param quoteNumber Ingram Micro Quote Number (required) + * @param customerNumber Your Ingram Micro unique customer number (required) + * @param isoCountryCode (required) + * @param thirdPartySource Unique identifier used to identify the third party source accessing the services (optional, default to customer) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call getV5QuotesDetailsAsync(String quoteNumber, String customerNumber, String isoCountryCode, String thirdPartySource, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getV5QuotesDetailsValidateBeforeCall(quoteNumber, customerNumber, isoCountryCode, thirdPartySource, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postV5QuotesSearch + * @param quoteListRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call postV5QuotesSearchCall(QuoteListRequest quoteListRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = quoteListRequest; + + // create path and map variables + String localVarPath = "/resellers/v5/quote/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postV5QuotesSearchValidateBeforeCall(QuoteListRequest quoteListRequest, final ApiCallback _callback) throws ApiException { + return postV5QuotesSearchCall(quoteListRequest, _callback); + + } + + /** + * Search Quotes + * This endpoint enables the retrieval and filtering of relevant quote list key criteria data, such as quote number, special bid numbers, end user name, status, and date ranges from the Ingram Micro system. By default, the Quotes endpoint retrieves quotes modified or created within the last 30 days. Observe these additional parameters:<ul><li>Only active quotes are available through this API.</li><li>Quotes older than 365 days are excluded by default.</li><li>You can use date range filters to retrieve quotes older than 30 days and up to 365 days.</li><li>Quotes that are in draft and closed states are excluded, and are not accessible through this API.</li></ul> + * @param quoteListRequest (optional) + * @return QuoteListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public QuoteListResponse postV5QuotesSearch(QuoteListRequest quoteListRequest) throws ApiException { + ApiResponse localVarResp = postV5QuotesSearchWithHttpInfo(quoteListRequest); + return localVarResp.getData(); + } + + /** + * Search Quotes + * This endpoint enables the retrieval and filtering of relevant quote list key criteria data, such as quote number, special bid numbers, end user name, status, and date ranges from the Ingram Micro system. By default, the Quotes endpoint retrieves quotes modified or created within the last 30 days. Observe these additional parameters:<ul><li>Only active quotes are available through this API.</li><li>Quotes older than 365 days are excluded by default.</li><li>You can use date range filters to retrieve quotes older than 30 days and up to 365 days.</li><li>Quotes that are in draft and closed states are excluded, and are not accessible through this API.</li></ul> + * @param quoteListRequest (optional) + * @return ApiResponse<QuoteListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public ApiResponse postV5QuotesSearchWithHttpInfo(QuoteListRequest quoteListRequest) throws ApiException { + okhttp3.Call localVarCall = postV5QuotesSearchValidateBeforeCall(quoteListRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Search Quotes (asynchronously) + * This endpoint enables the retrieval and filtering of relevant quote list key criteria data, such as quote number, special bid numbers, end user name, status, and date ranges from the Ingram Micro system. By default, the Quotes endpoint retrieves quotes modified or created within the last 30 days. Observe these additional parameters:<ul><li>Only active quotes are available through this API.</li><li>Quotes older than 365 days are excluded by default.</li><li>You can use date range filters to retrieve quotes older than 30 days and up to 365 days.</li><li>Quotes that are in draft and closed states are excluded, and are not accessible through this API.</li></ul> + * @param quoteListRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
    Status Code Description Response Headers
    200 OK -
    + */ + public okhttp3.Call postV5QuotesSearchAsync(QuoteListRequest quoteListRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postV5QuotesSearchValidateBeforeCall(quoteListRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/xiresellers/client/api/RenewalsApi.java b/src/main/java/xiresellers/client/api/RenewalsApi.java new file mode 100644 index 00000000..9ed96cd7 --- /dev/null +++ b/src/main/java/xiresellers/client/api/RenewalsApi.java @@ -0,0 +1,491 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiCallback; +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.ApiResponse; +import xiresellers.client.Configuration; +import xiresellers.client.Pair; +import xiresellers.client.ProgressRequestBody; +import xiresellers.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import xiresellers.client.model.GetResellerV6ValidateQuote500Response; +import xiresellers.client.model.PostRenewalssearch400Response; +import xiresellers.client.model.RenewalsDetailsResponse; +import xiresellers.client.model.RenewalsSearchRequest; +import xiresellers.client.model.RenewalsSearchResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class RenewalsApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public RenewalsApi() { + this(Configuration.getDefaultApiClient()); + } + + public RenewalsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getResellersV6Renewalsdetails + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param renewalId Unique Ingram renewal ID. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call getResellersV6RenewalsdetailsCall(String imCustomerNumber, String imCountryCode, String imCorrelationID, String renewalId, String imSenderID, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/resellers/v6/renewals/{renewalId}" + .replace("{" + "renewalId" + "}", localVarApiClient.escapeString(renewalId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (imCustomerNumber != null) { + localVarHeaderParams.put("IM-CustomerNumber", localVarApiClient.parameterToString(imCustomerNumber)); + } + + if (imCountryCode != null) { + localVarHeaderParams.put("IM-CountryCode", localVarApiClient.parameterToString(imCountryCode)); + } + + if (imCorrelationID != null) { + localVarHeaderParams.put("IM-CorrelationID", localVarApiClient.parameterToString(imCorrelationID)); + } + + if (imSenderID != null) { + localVarHeaderParams.put("IM-SenderID", localVarApiClient.parameterToString(imSenderID)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getResellersV6RenewalsdetailsValidateBeforeCall(String imCustomerNumber, String imCountryCode, String imCorrelationID, String renewalId, String imSenderID, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'imCustomerNumber' is set + if (imCustomerNumber == null) { + throw new ApiException("Missing the required parameter 'imCustomerNumber' when calling getResellersV6Renewalsdetails(Async)"); + } + + // verify the required parameter 'imCountryCode' is set + if (imCountryCode == null) { + throw new ApiException("Missing the required parameter 'imCountryCode' when calling getResellersV6Renewalsdetails(Async)"); + } + + // verify the required parameter 'imCorrelationID' is set + if (imCorrelationID == null) { + throw new ApiException("Missing the required parameter 'imCorrelationID' when calling getResellersV6Renewalsdetails(Async)"); + } + + // verify the required parameter 'renewalId' is set + if (renewalId == null) { + throw new ApiException("Missing the required parameter 'renewalId' when calling getResellersV6Renewalsdetails(Async)"); + } + + return getResellersV6RenewalsdetailsCall(imCustomerNumber, imCountryCode, imCorrelationID, renewalId, imSenderID, _callback); + + } + + /** + * Renewals Details + * The Renewal Details API endpoint will retrieve all the details related to the renewal. The customer is required to pass renewalId as a path parameter while sending a request. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param renewalId Unique Ingram renewal ID. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @return RenewalsDetailsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public RenewalsDetailsResponse getResellersV6Renewalsdetails(String imCustomerNumber, String imCountryCode, String imCorrelationID, String renewalId, String imSenderID) throws ApiException { + ApiResponse localVarResp = getResellersV6RenewalsdetailsWithHttpInfo(imCustomerNumber, imCountryCode, imCorrelationID, renewalId, imSenderID); + return localVarResp.getData(); + } + + /** + * Renewals Details + * The Renewal Details API endpoint will retrieve all the details related to the renewal. The customer is required to pass renewalId as a path parameter while sending a request. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param renewalId Unique Ingram renewal ID. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @return ApiResponse<RenewalsDetailsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public ApiResponse getResellersV6RenewalsdetailsWithHttpInfo(String imCustomerNumber, String imCountryCode, String imCorrelationID, String renewalId, String imSenderID) throws ApiException { + okhttp3.Call localVarCall = getResellersV6RenewalsdetailsValidateBeforeCall(imCustomerNumber, imCountryCode, imCorrelationID, renewalId, imSenderID, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Renewals Details (asynchronously) + * The Renewal Details API endpoint will retrieve all the details related to the renewal. The customer is required to pass renewalId as a path parameter while sending a request. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param renewalId Unique Ingram renewal ID. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call getResellersV6RenewalsdetailsAsync(String imCustomerNumber, String imCountryCode, String imCorrelationID, String renewalId, String imSenderID, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getResellersV6RenewalsdetailsValidateBeforeCall(imCustomerNumber, imCountryCode, imCorrelationID, renewalId, imSenderID, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postRenewalssearch + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param contentType The media type for JSON Request. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param customerOrderNumber The reseller's unique PO/Order number. (optional) + * @param ingramPurchaseOrderNumber Sales order number. (optional) + * @param serialNumber A serial number of the product. (optional) + * @param page Number of page. (optional) + * @param size The submitted pagesize, default is 25. (optional) + * @param sort Refers to the column selected to apply the sorting criteria. (optional) + * @param renewalsSearchRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Error: Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call postRenewalssearchCall(String imCustomerNumber, String imCountryCode, String imCorrelationID, String contentType, String imSenderID, String customerOrderNumber, String ingramPurchaseOrderNumber, String serialNumber, String page, String size, String sort, RenewalsSearchRequest renewalsSearchRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = renewalsSearchRequest; + + // create path and map variables + String localVarPath = "/resellers/v6/renewals/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (customerOrderNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("customerOrderNumber", customerOrderNumber)); + } + + if (ingramPurchaseOrderNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("ingramPurchaseOrderNumber", ingramPurchaseOrderNumber)); + } + + if (serialNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("serialNumber", serialNumber)); + } + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (size != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); + } + + if (sort != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); + } + + if (imCustomerNumber != null) { + localVarHeaderParams.put("IM-CustomerNumber", localVarApiClient.parameterToString(imCustomerNumber)); + } + + if (imCountryCode != null) { + localVarHeaderParams.put("IM-CountryCode", localVarApiClient.parameterToString(imCountryCode)); + } + + if (imCorrelationID != null) { + localVarHeaderParams.put("IM-CorrelationID", localVarApiClient.parameterToString(imCorrelationID)); + } + + if (imSenderID != null) { + localVarHeaderParams.put("IM-SenderID", localVarApiClient.parameterToString(imSenderID)); + } + + if (contentType != null) { + localVarHeaderParams.put("Content type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postRenewalssearchValidateBeforeCall(String imCustomerNumber, String imCountryCode, String imCorrelationID, String contentType, String imSenderID, String customerOrderNumber, String ingramPurchaseOrderNumber, String serialNumber, String page, String size, String sort, RenewalsSearchRequest renewalsSearchRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'imCustomerNumber' is set + if (imCustomerNumber == null) { + throw new ApiException("Missing the required parameter 'imCustomerNumber' when calling postRenewalssearch(Async)"); + } + + // verify the required parameter 'imCountryCode' is set + if (imCountryCode == null) { + throw new ApiException("Missing the required parameter 'imCountryCode' when calling postRenewalssearch(Async)"); + } + + // verify the required parameter 'imCorrelationID' is set + if (imCorrelationID == null) { + throw new ApiException("Missing the required parameter 'imCorrelationID' when calling postRenewalssearch(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling postRenewalssearch(Async)"); + } + + return postRenewalssearchCall(imCustomerNumber, imCountryCode, imCorrelationID, contentType, imSenderID, customerOrderNumber, ingramPurchaseOrderNumber, serialNumber, page, size, sort, renewalsSearchRequest, _callback); + + } + + /** + * Renewals Search + * The Renewal Search API, by default, will retrieve all the renewals that are associated with the customer’s account. The customer will be able to search for renewals via basic search or advanced search. Basic search is available thru the query string parameters, whereas the advanced search is available thru the request body schema. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param contentType The media type for JSON Request. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param customerOrderNumber The reseller's unique PO/Order number. (optional) + * @param ingramPurchaseOrderNumber Sales order number. (optional) + * @param serialNumber A serial number of the product. (optional) + * @param page Number of page. (optional) + * @param size The submitted pagesize, default is 25. (optional) + * @param sort Refers to the column selected to apply the sorting criteria. (optional) + * @param renewalsSearchRequest (optional) + * @return RenewalsSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Error: Bad Request -
    500 Internal Server Error -
    + */ + public RenewalsSearchResponse postRenewalssearch(String imCustomerNumber, String imCountryCode, String imCorrelationID, String contentType, String imSenderID, String customerOrderNumber, String ingramPurchaseOrderNumber, String serialNumber, String page, String size, String sort, RenewalsSearchRequest renewalsSearchRequest) throws ApiException { + ApiResponse localVarResp = postRenewalssearchWithHttpInfo(imCustomerNumber, imCountryCode, imCorrelationID, contentType, imSenderID, customerOrderNumber, ingramPurchaseOrderNumber, serialNumber, page, size, sort, renewalsSearchRequest); + return localVarResp.getData(); + } + + /** + * Renewals Search + * The Renewal Search API, by default, will retrieve all the renewals that are associated with the customer’s account. The customer will be able to search for renewals via basic search or advanced search. Basic search is available thru the query string parameters, whereas the advanced search is available thru the request body schema. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param contentType The media type for JSON Request. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param customerOrderNumber The reseller's unique PO/Order number. (optional) + * @param ingramPurchaseOrderNumber Sales order number. (optional) + * @param serialNumber A serial number of the product. (optional) + * @param page Number of page. (optional) + * @param size The submitted pagesize, default is 25. (optional) + * @param sort Refers to the column selected to apply the sorting criteria. (optional) + * @param renewalsSearchRequest (optional) + * @return ApiResponse<RenewalsSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Error: Bad Request -
    500 Internal Server Error -
    + */ + public ApiResponse postRenewalssearchWithHttpInfo(String imCustomerNumber, String imCountryCode, String imCorrelationID, String contentType, String imSenderID, String customerOrderNumber, String ingramPurchaseOrderNumber, String serialNumber, String page, String size, String sort, RenewalsSearchRequest renewalsSearchRequest) throws ApiException { + okhttp3.Call localVarCall = postRenewalssearchValidateBeforeCall(imCustomerNumber, imCountryCode, imCorrelationID, contentType, imSenderID, customerOrderNumber, ingramPurchaseOrderNumber, serialNumber, page, size, sort, renewalsSearchRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Renewals Search (asynchronously) + * The Renewal Search API, by default, will retrieve all the renewals that are associated with the customer’s account. The customer will be able to search for renewals via basic search or advanced search. Basic search is available thru the query string parameters, whereas the advanced search is available thru the request body schema. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param contentType The media type for JSON Request. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param customerOrderNumber The reseller's unique PO/Order number. (optional) + * @param ingramPurchaseOrderNumber Sales order number. (optional) + * @param serialNumber A serial number of the product. (optional) + * @param page Number of page. (optional) + * @param size The submitted pagesize, default is 25. (optional) + * @param sort Refers to the column selected to apply the sorting criteria. (optional) + * @param renewalsSearchRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Error: Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call postRenewalssearchAsync(String imCustomerNumber, String imCountryCode, String imCorrelationID, String contentType, String imSenderID, String customerOrderNumber, String ingramPurchaseOrderNumber, String serialNumber, String page, String size, String sort, RenewalsSearchRequest renewalsSearchRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postRenewalssearchValidateBeforeCall(imCustomerNumber, imCountryCode, imCorrelationID, contentType, imSenderID, customerOrderNumber, ingramPurchaseOrderNumber, serialNumber, page, size, sort, renewalsSearchRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/xiresellers/client/api/ReturnsApi.java b/src/main/java/xiresellers/client/api/ReturnsApi.java new file mode 100644 index 00000000..47965f64 --- /dev/null +++ b/src/main/java/xiresellers/client/api/ReturnsApi.java @@ -0,0 +1,719 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiCallback; +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.ApiResponse; +import xiresellers.client.Configuration; +import xiresellers.client.Pair; +import xiresellers.client.ProgressRequestBody; +import xiresellers.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import xiresellers.client.model.GetResellerV6ValidateQuote500Response; +import xiresellers.client.model.PostRenewalssearch400Response; +import xiresellers.client.model.ReturnsCreateRequest; +import xiresellers.client.model.ReturnsCreateResponse; +import xiresellers.client.model.ReturnsDetailsResponse; +import xiresellers.client.model.ReturnsSearchResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ReturnsApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public ReturnsApi() { + this(Configuration.getDefaultApiClient()); + } + + public ReturnsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getResellersV6Returnsdetails + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param caseRequestNumber A unique return request number. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call getResellersV6ReturnsdetailsCall(String imCustomerNumber, String imCountryCode, String imCorrelationID, String caseRequestNumber, String imSenderID, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/resellers/v6/returns/{caseRequestNumber}" + .replace("{" + "caseRequestNumber" + "}", localVarApiClient.escapeString(caseRequestNumber.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (imCustomerNumber != null) { + localVarHeaderParams.put("IM-CustomerNumber", localVarApiClient.parameterToString(imCustomerNumber)); + } + + if (imCountryCode != null) { + localVarHeaderParams.put("IM-CountryCode", localVarApiClient.parameterToString(imCountryCode)); + } + + if (imCorrelationID != null) { + localVarHeaderParams.put("IM-CorrelationID", localVarApiClient.parameterToString(imCorrelationID)); + } + + if (imSenderID != null) { + localVarHeaderParams.put("IM-SenderID", localVarApiClient.parameterToString(imSenderID)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getResellersV6ReturnsdetailsValidateBeforeCall(String imCustomerNumber, String imCountryCode, String imCorrelationID, String caseRequestNumber, String imSenderID, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'imCustomerNumber' is set + if (imCustomerNumber == null) { + throw new ApiException("Missing the required parameter 'imCustomerNumber' when calling getResellersV6Returnsdetails(Async)"); + } + + // verify the required parameter 'imCountryCode' is set + if (imCountryCode == null) { + throw new ApiException("Missing the required parameter 'imCountryCode' when calling getResellersV6Returnsdetails(Async)"); + } + + // verify the required parameter 'imCorrelationID' is set + if (imCorrelationID == null) { + throw new ApiException("Missing the required parameter 'imCorrelationID' when calling getResellersV6Returnsdetails(Async)"); + } + + // verify the required parameter 'caseRequestNumber' is set + if (caseRequestNumber == null) { + throw new ApiException("Missing the required parameter 'caseRequestNumber' when calling getResellersV6Returnsdetails(Async)"); + } + + return getResellersV6ReturnsdetailsCall(imCustomerNumber, imCountryCode, imCorrelationID, caseRequestNumber, imSenderID, _callback); + + } + + /** + * Returns Details + * The Returns Details API will retrieve all the details related to the specific caseRequestNumber. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param caseRequestNumber A unique return request number. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @return ReturnsDetailsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public ReturnsDetailsResponse getResellersV6Returnsdetails(String imCustomerNumber, String imCountryCode, String imCorrelationID, String caseRequestNumber, String imSenderID) throws ApiException { + ApiResponse localVarResp = getResellersV6ReturnsdetailsWithHttpInfo(imCustomerNumber, imCountryCode, imCorrelationID, caseRequestNumber, imSenderID); + return localVarResp.getData(); + } + + /** + * Returns Details + * The Returns Details API will retrieve all the details related to the specific caseRequestNumber. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param caseRequestNumber A unique return request number. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @return ApiResponse<ReturnsDetailsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public ApiResponse getResellersV6ReturnsdetailsWithHttpInfo(String imCustomerNumber, String imCountryCode, String imCorrelationID, String caseRequestNumber, String imSenderID) throws ApiException { + okhttp3.Call localVarCall = getResellersV6ReturnsdetailsValidateBeforeCall(imCustomerNumber, imCountryCode, imCorrelationID, caseRequestNumber, imSenderID, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Returns Details (asynchronously) + * The Returns Details API will retrieve all the details related to the specific caseRequestNumber. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param caseRequestNumber A unique return request number. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call getResellersV6ReturnsdetailsAsync(String imCustomerNumber, String imCountryCode, String imCorrelationID, String caseRequestNumber, String imSenderID, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getResellersV6ReturnsdetailsValidateBeforeCall(imCustomerNumber, imCountryCode, imCorrelationID, caseRequestNumber, imSenderID, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getResellersV6Returnssearch + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param caseRequestNumber A unique return request number. (optional) + * @param invoiceNumber The Invoice number for the order. (optional) + * @param returnClaimId A unique return claim Id. (optional) + * @param referenceNumber The reference number for the return. (optional) + * @param ingramPartNumber Unique IngramMicro part number. (optional) + * @param vendorPartNumber The vendor's part number. (optional) + * @param returnStatusIn Comma-separated values of pre-defined status. Open, Approved, Partially Approved, Denied, Voided. (optional) + * @param claimStatusIn Comma-separated values of pre-defined status. Open, Approved, Partially Approved, Denied, Voided. (optional) + * @param createdOnBt The date on which the return request was created. (optional) + * @param modifiedOnBt The date on which the return request was last updated. (optional) + * @param returnReasonIn Comma separated Pre-defined value. test, (EW) Express Warehousing, (AR) Account Receivables, (BB) Buy Back, (BE) Stock Balance Exception, (BO) Bill Only, (CE) Credit Dept Use - Credit Exception, (CF) Configuration Fee, (CS ) Customer Service Discretion, (CS1) Customer Service Discretion CS Error, (DE) Defective Exception, (DF) Defective Items, (DI) Direct Credit, (DM) Damaged from Carrier, (DN) Damaged Without Product, (DT) Direct/ Special Order, (DT1) Direct Ship billed, not shipped., (FO) Freight Out, (FX) No-Scan, (IN) Incomplete, (LS) Lost Shipment, (MN) Minimum Order Fee Credit, (OS) Over Shipment, (PR) Pricing Error, (RF) Refusal Credit, (RI) Re-Invoice, (RP) Return For Repair, (RT) Return Not Credited, (RTD) RCN, (SB) Stock Balance, (SD) Sales Discretion, (SH) Incorrect Shipping And Handling, (SS) Short Shipment, (SSK) Short Ship kit, (SW) Sales Writeoff, (TE) Opened Return, (TR) Training Refund, (TX) Tax Credit, (WS) Wrong Sales Sealed, (WW) Wrong Warehouse, (FS) Warehouse Failed Serial# Capture, Latin America Vebdor Credits, Select Source, ITAD - Trade-in Credit, Withholding Tax (optional) + * @param page Number of page. (optional) + * @param size The submitted pagesize, default is 25 (optional) + * @param sort Refers to the column selected to apply the sorting criteria. (optional) + * @param sortingColumnName The column name which will be sorted on. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call getResellersV6ReturnssearchCall(String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, String caseRequestNumber, String invoiceNumber, String returnClaimId, String referenceNumber, String ingramPartNumber, String vendorPartNumber, String returnStatusIn, String claimStatusIn, String createdOnBt, String modifiedOnBt, String returnReasonIn, String page, String size, String sort, String sortingColumnName, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/resellers/v6/returns/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (caseRequestNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("caseRequestNumber", caseRequestNumber)); + } + + if (invoiceNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("invoiceNumber", invoiceNumber)); + } + + if (returnClaimId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("returnClaimId", returnClaimId)); + } + + if (referenceNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("referenceNumber", referenceNumber)); + } + + if (ingramPartNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("ingramPartNumber", ingramPartNumber)); + } + + if (vendorPartNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("vendorPartNumber", vendorPartNumber)); + } + + if (returnStatusIn != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("returnStatus-in", returnStatusIn)); + } + + if (claimStatusIn != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("claimStatus-in", claimStatusIn)); + } + + if (createdOnBt != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("createdOn-bt", createdOnBt)); + } + + if (modifiedOnBt != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("modifiedOn-bt", modifiedOnBt)); + } + + if (returnReasonIn != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("returnReason-in", returnReasonIn)); + } + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (size != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); + } + + if (sort != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); + } + + if (sortingColumnName != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortingColumnName", sortingColumnName)); + } + + if (imCustomerNumber != null) { + localVarHeaderParams.put("IM-CustomerNumber", localVarApiClient.parameterToString(imCustomerNumber)); + } + + if (imCountryCode != null) { + localVarHeaderParams.put("IM-CountryCode", localVarApiClient.parameterToString(imCountryCode)); + } + + if (imCorrelationID != null) { + localVarHeaderParams.put("IM-CorrelationID", localVarApiClient.parameterToString(imCorrelationID)); + } + + if (imSenderID != null) { + localVarHeaderParams.put("IM-SenderID", localVarApiClient.parameterToString(imSenderID)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getResellersV6ReturnssearchValidateBeforeCall(String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, String caseRequestNumber, String invoiceNumber, String returnClaimId, String referenceNumber, String ingramPartNumber, String vendorPartNumber, String returnStatusIn, String claimStatusIn, String createdOnBt, String modifiedOnBt, String returnReasonIn, String page, String size, String sort, String sortingColumnName, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'imCustomerNumber' is set + if (imCustomerNumber == null) { + throw new ApiException("Missing the required parameter 'imCustomerNumber' when calling getResellersV6Returnssearch(Async)"); + } + + // verify the required parameter 'imCountryCode' is set + if (imCountryCode == null) { + throw new ApiException("Missing the required parameter 'imCountryCode' when calling getResellersV6Returnssearch(Async)"); + } + + // verify the required parameter 'imCorrelationID' is set + if (imCorrelationID == null) { + throw new ApiException("Missing the required parameter 'imCorrelationID' when calling getResellersV6Returnssearch(Async)"); + } + + return getResellersV6ReturnssearchCall(imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, caseRequestNumber, invoiceNumber, returnClaimId, referenceNumber, ingramPartNumber, vendorPartNumber, returnStatusIn, claimStatusIn, createdOnBt, modifiedOnBt, returnReasonIn, page, size, sort, sortingColumnName, _callback); + + } + + /** + * Returns Search + * The Returns Search API, by default, will retrieve all the returns that are associated with the customer’s account. The customer will be able to search returns using the query parameters. The Returns Search response will return the following information: returnClaimId, caseRequestNumber, createdOn, referenceNumber, and returnReason. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param caseRequestNumber A unique return request number. (optional) + * @param invoiceNumber The Invoice number for the order. (optional) + * @param returnClaimId A unique return claim Id. (optional) + * @param referenceNumber The reference number for the return. (optional) + * @param ingramPartNumber Unique IngramMicro part number. (optional) + * @param vendorPartNumber The vendor's part number. (optional) + * @param returnStatusIn Comma-separated values of pre-defined status. Open, Approved, Partially Approved, Denied, Voided. (optional) + * @param claimStatusIn Comma-separated values of pre-defined status. Open, Approved, Partially Approved, Denied, Voided. (optional) + * @param createdOnBt The date on which the return request was created. (optional) + * @param modifiedOnBt The date on which the return request was last updated. (optional) + * @param returnReasonIn Comma separated Pre-defined value. test, (EW) Express Warehousing, (AR) Account Receivables, (BB) Buy Back, (BE) Stock Balance Exception, (BO) Bill Only, (CE) Credit Dept Use - Credit Exception, (CF) Configuration Fee, (CS ) Customer Service Discretion, (CS1) Customer Service Discretion CS Error, (DE) Defective Exception, (DF) Defective Items, (DI) Direct Credit, (DM) Damaged from Carrier, (DN) Damaged Without Product, (DT) Direct/ Special Order, (DT1) Direct Ship billed, not shipped., (FO) Freight Out, (FX) No-Scan, (IN) Incomplete, (LS) Lost Shipment, (MN) Minimum Order Fee Credit, (OS) Over Shipment, (PR) Pricing Error, (RF) Refusal Credit, (RI) Re-Invoice, (RP) Return For Repair, (RT) Return Not Credited, (RTD) RCN, (SB) Stock Balance, (SD) Sales Discretion, (SH) Incorrect Shipping And Handling, (SS) Short Shipment, (SSK) Short Ship kit, (SW) Sales Writeoff, (TE) Opened Return, (TR) Training Refund, (TX) Tax Credit, (WS) Wrong Sales Sealed, (WW) Wrong Warehouse, (FS) Warehouse Failed Serial# Capture, Latin America Vebdor Credits, Select Source, ITAD - Trade-in Credit, Withholding Tax (optional) + * @param page Number of page. (optional) + * @param size The submitted pagesize, default is 25 (optional) + * @param sort Refers to the column selected to apply the sorting criteria. (optional) + * @param sortingColumnName The column name which will be sorted on. (optional) + * @return ReturnsSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public ReturnsSearchResponse getResellersV6Returnssearch(String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, String caseRequestNumber, String invoiceNumber, String returnClaimId, String referenceNumber, String ingramPartNumber, String vendorPartNumber, String returnStatusIn, String claimStatusIn, String createdOnBt, String modifiedOnBt, String returnReasonIn, String page, String size, String sort, String sortingColumnName) throws ApiException { + ApiResponse localVarResp = getResellersV6ReturnssearchWithHttpInfo(imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, caseRequestNumber, invoiceNumber, returnClaimId, referenceNumber, ingramPartNumber, vendorPartNumber, returnStatusIn, claimStatusIn, createdOnBt, modifiedOnBt, returnReasonIn, page, size, sort, sortingColumnName); + return localVarResp.getData(); + } + + /** + * Returns Search + * The Returns Search API, by default, will retrieve all the returns that are associated with the customer’s account. The customer will be able to search returns using the query parameters. The Returns Search response will return the following information: returnClaimId, caseRequestNumber, createdOn, referenceNumber, and returnReason. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param caseRequestNumber A unique return request number. (optional) + * @param invoiceNumber The Invoice number for the order. (optional) + * @param returnClaimId A unique return claim Id. (optional) + * @param referenceNumber The reference number for the return. (optional) + * @param ingramPartNumber Unique IngramMicro part number. (optional) + * @param vendorPartNumber The vendor's part number. (optional) + * @param returnStatusIn Comma-separated values of pre-defined status. Open, Approved, Partially Approved, Denied, Voided. (optional) + * @param claimStatusIn Comma-separated values of pre-defined status. Open, Approved, Partially Approved, Denied, Voided. (optional) + * @param createdOnBt The date on which the return request was created. (optional) + * @param modifiedOnBt The date on which the return request was last updated. (optional) + * @param returnReasonIn Comma separated Pre-defined value. test, (EW) Express Warehousing, (AR) Account Receivables, (BB) Buy Back, (BE) Stock Balance Exception, (BO) Bill Only, (CE) Credit Dept Use - Credit Exception, (CF) Configuration Fee, (CS ) Customer Service Discretion, (CS1) Customer Service Discretion CS Error, (DE) Defective Exception, (DF) Defective Items, (DI) Direct Credit, (DM) Damaged from Carrier, (DN) Damaged Without Product, (DT) Direct/ Special Order, (DT1) Direct Ship billed, not shipped., (FO) Freight Out, (FX) No-Scan, (IN) Incomplete, (LS) Lost Shipment, (MN) Minimum Order Fee Credit, (OS) Over Shipment, (PR) Pricing Error, (RF) Refusal Credit, (RI) Re-Invoice, (RP) Return For Repair, (RT) Return Not Credited, (RTD) RCN, (SB) Stock Balance, (SD) Sales Discretion, (SH) Incorrect Shipping And Handling, (SS) Short Shipment, (SSK) Short Ship kit, (SW) Sales Writeoff, (TE) Opened Return, (TR) Training Refund, (TX) Tax Credit, (WS) Wrong Sales Sealed, (WW) Wrong Warehouse, (FS) Warehouse Failed Serial# Capture, Latin America Vebdor Credits, Select Source, ITAD - Trade-in Credit, Withholding Tax (optional) + * @param page Number of page. (optional) + * @param size The submitted pagesize, default is 25 (optional) + * @param sort Refers to the column selected to apply the sorting criteria. (optional) + * @param sortingColumnName The column name which will be sorted on. (optional) + * @return ApiResponse<ReturnsSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public ApiResponse getResellersV6ReturnssearchWithHttpInfo(String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, String caseRequestNumber, String invoiceNumber, String returnClaimId, String referenceNumber, String ingramPartNumber, String vendorPartNumber, String returnStatusIn, String claimStatusIn, String createdOnBt, String modifiedOnBt, String returnReasonIn, String page, String size, String sort, String sortingColumnName) throws ApiException { + okhttp3.Call localVarCall = getResellersV6ReturnssearchValidateBeforeCall(imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, caseRequestNumber, invoiceNumber, returnClaimId, referenceNumber, ingramPartNumber, vendorPartNumber, returnStatusIn, claimStatusIn, createdOnBt, modifiedOnBt, returnReasonIn, page, size, sort, sortingColumnName, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Returns Search (asynchronously) + * The Returns Search API, by default, will retrieve all the returns that are associated with the customer’s account. The customer will be able to search returns using the query parameters. The Returns Search response will return the following information: returnClaimId, caseRequestNumber, createdOn, referenceNumber, and returnReason. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param caseRequestNumber A unique return request number. (optional) + * @param invoiceNumber The Invoice number for the order. (optional) + * @param returnClaimId A unique return claim Id. (optional) + * @param referenceNumber The reference number for the return. (optional) + * @param ingramPartNumber Unique IngramMicro part number. (optional) + * @param vendorPartNumber The vendor's part number. (optional) + * @param returnStatusIn Comma-separated values of pre-defined status. Open, Approved, Partially Approved, Denied, Voided. (optional) + * @param claimStatusIn Comma-separated values of pre-defined status. Open, Approved, Partially Approved, Denied, Voided. (optional) + * @param createdOnBt The date on which the return request was created. (optional) + * @param modifiedOnBt The date on which the return request was last updated. (optional) + * @param returnReasonIn Comma separated Pre-defined value. test, (EW) Express Warehousing, (AR) Account Receivables, (BB) Buy Back, (BE) Stock Balance Exception, (BO) Bill Only, (CE) Credit Dept Use - Credit Exception, (CF) Configuration Fee, (CS ) Customer Service Discretion, (CS1) Customer Service Discretion CS Error, (DE) Defective Exception, (DF) Defective Items, (DI) Direct Credit, (DM) Damaged from Carrier, (DN) Damaged Without Product, (DT) Direct/ Special Order, (DT1) Direct Ship billed, not shipped., (FO) Freight Out, (FX) No-Scan, (IN) Incomplete, (LS) Lost Shipment, (MN) Minimum Order Fee Credit, (OS) Over Shipment, (PR) Pricing Error, (RF) Refusal Credit, (RI) Re-Invoice, (RP) Return For Repair, (RT) Return Not Credited, (RTD) RCN, (SB) Stock Balance, (SD) Sales Discretion, (SH) Incorrect Shipping And Handling, (SS) Short Shipment, (SSK) Short Ship kit, (SW) Sales Writeoff, (TE) Opened Return, (TR) Training Refund, (TX) Tax Credit, (WS) Wrong Sales Sealed, (WW) Wrong Warehouse, (FS) Warehouse Failed Serial# Capture, Latin America Vebdor Credits, Select Source, ITAD - Trade-in Credit, Withholding Tax (optional) + * @param page Number of page. (optional) + * @param size The submitted pagesize, default is 25 (optional) + * @param sort Refers to the column selected to apply the sorting criteria. (optional) + * @param sortingColumnName The column name which will be sorted on. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call getResellersV6ReturnssearchAsync(String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, String caseRequestNumber, String invoiceNumber, String returnClaimId, String referenceNumber, String ingramPartNumber, String vendorPartNumber, String returnStatusIn, String claimStatusIn, String createdOnBt, String modifiedOnBt, String returnReasonIn, String page, String size, String sort, String sortingColumnName, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getResellersV6ReturnssearchValidateBeforeCall(imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, caseRequestNumber, invoiceNumber, returnClaimId, referenceNumber, ingramPartNumber, vendorPartNumber, returnStatusIn, claimStatusIn, createdOnBt, modifiedOnBt, returnReasonIn, page, size, sort, sortingColumnName, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postReturnscreate + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param returnsCreateRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Error: Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call postReturnscreateCall(String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, ReturnsCreateRequest returnsCreateRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = returnsCreateRequest; + + // create path and map variables + String localVarPath = "/resellers/v6/returns/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (imCustomerNumber != null) { + localVarHeaderParams.put("IM-CustomerNumber", localVarApiClient.parameterToString(imCustomerNumber)); + } + + if (imCountryCode != null) { + localVarHeaderParams.put("IM-CountryCode", localVarApiClient.parameterToString(imCountryCode)); + } + + if (imCorrelationID != null) { + localVarHeaderParams.put("IM-CorrelationID", localVarApiClient.parameterToString(imCorrelationID)); + } + + if (imSenderID != null) { + localVarHeaderParams.put("IM-SenderID", localVarApiClient.parameterToString(imSenderID)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postReturnscreateValidateBeforeCall(String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, ReturnsCreateRequest returnsCreateRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'imCustomerNumber' is set + if (imCustomerNumber == null) { + throw new ApiException("Missing the required parameter 'imCustomerNumber' when calling postReturnscreate(Async)"); + } + + // verify the required parameter 'imCountryCode' is set + if (imCountryCode == null) { + throw new ApiException("Missing the required parameter 'imCountryCode' when calling postReturnscreate(Async)"); + } + + // verify the required parameter 'imCorrelationID' is set + if (imCorrelationID == null) { + throw new ApiException("Missing the required parameter 'imCorrelationID' when calling postReturnscreate(Async)"); + } + + return postReturnscreateCall(imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, returnsCreateRequest, _callback); + + } + + /** + * Returns Create + * Return create endpoint will allow customers to create a return request. In order to create a request, the customer must provide either ingramPartNumber or vendorPartNumber along with other required fields listed below. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param returnsCreateRequest (optional) + * @return ReturnsCreateResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Error: Bad Request -
    500 Internal Server Error -
    + */ + public ReturnsCreateResponse postReturnscreate(String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, ReturnsCreateRequest returnsCreateRequest) throws ApiException { + ApiResponse localVarResp = postReturnscreateWithHttpInfo(imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, returnsCreateRequest); + return localVarResp.getData(); + } + + /** + * Returns Create + * Return create endpoint will allow customers to create a return request. In order to create a request, the customer must provide either ingramPartNumber or vendorPartNumber along with other required fields listed below. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param returnsCreateRequest (optional) + * @return ApiResponse<ReturnsCreateResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Error: Bad Request -
    500 Internal Server Error -
    + */ + public ApiResponse postReturnscreateWithHttpInfo(String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, ReturnsCreateRequest returnsCreateRequest) throws ApiException { + okhttp3.Call localVarCall = postReturnscreateValidateBeforeCall(imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, returnsCreateRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Returns Create (asynchronously) + * Return create endpoint will allow customers to create a return request. In order to create a request, the customer must provide either ingramPartNumber or vendorPartNumber along with other required fields listed below. + * @param imCustomerNumber Your unique Ingram Micro customer number. (required) + * @param imCountryCode Two-character ISO country code. (required) + * @param imCorrelationID Unique transaction number to identify each transaction across all the systems. (required) + * @param imSenderID Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + * @param returnsCreateRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
    Status Code Description Response Headers
    200 OK -
    400 Error: Bad Request -
    500 Internal Server Error -
    + */ + public okhttp3.Call postReturnscreateAsync(String imCustomerNumber, String imCountryCode, String imCorrelationID, String imSenderID, ReturnsCreateRequest returnsCreateRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postReturnscreateValidateBeforeCall(imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, returnsCreateRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/xiresellers/client/api/StockUpdateApi.java b/src/main/java/xiresellers/client/api/StockUpdateApi.java new file mode 100644 index 00000000..b7245648 --- /dev/null +++ b/src/main/java/xiresellers/client/api/StockUpdateApi.java @@ -0,0 +1,223 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiCallback; +import xiresellers.client.ApiClient; +import xiresellers.client.ApiException; +import xiresellers.client.ApiResponse; +import xiresellers.client.Configuration; +import xiresellers.client.Pair; +import xiresellers.client.ProgressRequestBody; +import xiresellers.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import xiresellers.client.model.AvailabilityAsyncNotificationRequest; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class StockUpdateApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public StockUpdateApi() { + this(Configuration.getDefaultApiClient()); + } + + public StockUpdateApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for resellersV1WebhooksAvailabilityupdatePost + * @param targeturl The webhook url where the request needs to sent. (required) + * @param xHubSignature Ingram Micro creates a signature token by use of a secret key + Event ID. The algorithm to generate the secret ley is given at link https://developer.ingrammicro.com/reseller/article/how-use-webhook-secret-key. Use the event Id in the below sample along with your secret key to generate the key. Alternatively, to send try this out, use a random text to see how it works. (required) + * @param availabilityAsyncNotificationRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
    Status Code Description Response Headers
    200 OK -
    500 Internal Server Error -
    + */ + public okhttp3.Call resellersV1WebhooksAvailabilityupdatePostCall(String targeturl, String xHubSignature, AvailabilityAsyncNotificationRequest availabilityAsyncNotificationRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = availabilityAsyncNotificationRequest; + + // create path and map variables + String localVarPath = "/resellers/v1/webhooks/availabilityupdate"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (targeturl != null) { + localVarHeaderParams.put("targeturl", localVarApiClient.parameterToString(targeturl)); + } + + if (xHubSignature != null) { + localVarHeaderParams.put("x-hub-signature", localVarApiClient.parameterToString(xHubSignature)); + } + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "application" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call resellersV1WebhooksAvailabilityupdatePostValidateBeforeCall(String targeturl, String xHubSignature, AvailabilityAsyncNotificationRequest availabilityAsyncNotificationRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'targeturl' is set + if (targeturl == null) { + throw new ApiException("Missing the required parameter 'targeturl' when calling resellersV1WebhooksAvailabilityupdatePost(Async)"); + } + + // verify the required parameter 'xHubSignature' is set + if (xHubSignature == null) { + throw new ApiException("Missing the required parameter 'xHubSignature' when calling resellersV1WebhooksAvailabilityupdatePost(Async)"); + } + + // verify the required parameter 'availabilityAsyncNotificationRequest' is set + if (availabilityAsyncNotificationRequest == null) { + throw new ApiException("Missing the required parameter 'availabilityAsyncNotificationRequest' when calling resellersV1WebhooksAvailabilityupdatePost(Async)"); + } + + return resellersV1WebhooksAvailabilityupdatePostCall(targeturl, xHubSignature, availabilityAsyncNotificationRequest, _callback); + + } + + /** + * Stock Update + * + * @param targeturl The webhook url where the request needs to sent. (required) + * @param xHubSignature Ingram Micro creates a signature token by use of a secret key + Event ID. The algorithm to generate the secret ley is given at link https://developer.ingrammicro.com/reseller/article/how-use-webhook-secret-key. Use the event Id in the below sample along with your secret key to generate the key. Alternatively, to send try this out, use a random text to see how it works. (required) + * @param availabilityAsyncNotificationRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
    Status Code Description Response Headers
    200 OK -
    500 Internal Server Error -
    + */ + public void resellersV1WebhooksAvailabilityupdatePost(String targeturl, String xHubSignature, AvailabilityAsyncNotificationRequest availabilityAsyncNotificationRequest) throws ApiException { + resellersV1WebhooksAvailabilityupdatePostWithHttpInfo(targeturl, xHubSignature, availabilityAsyncNotificationRequest); + } + + /** + * Stock Update + * + * @param targeturl The webhook url where the request needs to sent. (required) + * @param xHubSignature Ingram Micro creates a signature token by use of a secret key + Event ID. The algorithm to generate the secret ley is given at link https://developer.ingrammicro.com/reseller/article/how-use-webhook-secret-key. Use the event Id in the below sample along with your secret key to generate the key. Alternatively, to send try this out, use a random text to see how it works. (required) + * @param availabilityAsyncNotificationRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
    Status Code Description Response Headers
    200 OK -
    500 Internal Server Error -
    + */ + public ApiResponse resellersV1WebhooksAvailabilityupdatePostWithHttpInfo(String targeturl, String xHubSignature, AvailabilityAsyncNotificationRequest availabilityAsyncNotificationRequest) throws ApiException { + okhttp3.Call localVarCall = resellersV1WebhooksAvailabilityupdatePostValidateBeforeCall(targeturl, xHubSignature, availabilityAsyncNotificationRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Stock Update (asynchronously) + * + * @param targeturl The webhook url where the request needs to sent. (required) + * @param xHubSignature Ingram Micro creates a signature token by use of a secret key + Event ID. The algorithm to generate the secret ley is given at link https://developer.ingrammicro.com/reseller/article/how-use-webhook-secret-key. Use the event Id in the below sample along with your secret key to generate the key. Alternatively, to send try this out, use a random text to see how it works. (required) + * @param availabilityAsyncNotificationRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
    Status Code Description Response Headers
    200 OK -
    500 Internal Server Error -
    + */ + public okhttp3.Call resellersV1WebhooksAvailabilityupdatePostAsync(String targeturl, String xHubSignature, AvailabilityAsyncNotificationRequest availabilityAsyncNotificationRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = resellersV1WebhooksAvailabilityupdatePostValidateBeforeCall(targeturl, xHubSignature, availabilityAsyncNotificationRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/src/main/java/xiresellers/client/auth/ApiKeyAuth.java b/src/main/java/xiresellers/client/auth/ApiKeyAuth.java new file mode 100644 index 00000000..7a8cedd4 --- /dev/null +++ b/src/main/java/xiresellers/client/auth/ApiKeyAuth.java @@ -0,0 +1,80 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.auth; + +import xiresellers.client.ApiException; +import xiresellers.client.Pair; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ApiKeyAuth implements Authentication { + private final String location; + private final String paramName; + + private String apiKey; + private String apiKeyPrefix; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getApiKeyPrefix() { + return apiKeyPrefix; + } + + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if ("query".equals(location)) { + queryParams.add(new Pair(paramName, value)); + } else if ("header".equals(location)) { + headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); + } + } +} diff --git a/src/main/java/xiresellers/client/auth/Authentication.java b/src/main/java/xiresellers/client/auth/Authentication.java new file mode 100644 index 00000000..5489e18a --- /dev/null +++ b/src/main/java/xiresellers/client/auth/Authentication.java @@ -0,0 +1,36 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.auth; + +import xiresellers.client.Pair; +import xiresellers.client.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +public interface Authentication { + /** + * Apply authentication settings to header and query params. + * + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + * @param payload HTTP request body + * @param method HTTP method + * @param uri URI + * @throws ApiException if failed to update the parameters + */ + void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException; +} diff --git a/src/main/java/xiresellers/client/auth/HttpBasicAuth.java b/src/main/java/xiresellers/client/auth/HttpBasicAuth.java new file mode 100644 index 00000000..de780f65 --- /dev/null +++ b/src/main/java/xiresellers/client/auth/HttpBasicAuth.java @@ -0,0 +1,57 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.auth; + +import xiresellers.client.Pair; +import xiresellers.client.ApiException; + +import okhttp3.Credentials; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +import java.io.UnsupportedEncodingException; + +public class HttpBasicAuth implements Authentication { + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + if (username == null && password == null) { + return; + } + headerParams.put("Authorization", Credentials.basic( + username == null ? "" : username, + password == null ? "" : password)); + } +} diff --git a/src/main/java/xiresellers/client/auth/HttpBearerAuth.java b/src/main/java/xiresellers/client/auth/HttpBearerAuth.java new file mode 100644 index 00000000..cc24c25d --- /dev/null +++ b/src/main/java/xiresellers/client/auth/HttpBearerAuth.java @@ -0,0 +1,75 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.auth; + +import xiresellers.client.ApiException; +import xiresellers.client.Pair; + +import java.net.URI; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.function.Supplier; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class HttpBearerAuth implements Authentication { + private final String scheme; + private Supplier tokenSupplier; + + public HttpBearerAuth(String scheme) { + this.scheme = scheme; + } + + /** + * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @return The bearer token + */ + public String getBearerToken() { + return tokenSupplier.get(); + } + + /** + * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param bearerToken The bearer token to send in the Authorization header + */ + public void setBearerToken(String bearerToken) { + this.tokenSupplier = () -> bearerToken; + } + + /** + * Sets the supplier of tokens, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header + */ + public void setBearerToken(Supplier tokenSupplier) { + this.tokenSupplier = tokenSupplier; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null); + if (bearerToken == null) { + return; + } + + headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + } + + private static String upperCaseBearer(String scheme) { + return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + } +} diff --git a/src/main/java/xiresellers/client/auth/OAuth.java b/src/main/java/xiresellers/client/auth/OAuth.java new file mode 100644 index 00000000..8883acc4 --- /dev/null +++ b/src/main/java/xiresellers/client/auth/OAuth.java @@ -0,0 +1,42 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.auth; + +import xiresellers.client.Pair; +import xiresellers.client.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OAuth implements Authentication { + private String accessToken; + + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + if (accessToken != null) { + headerParams.put("Authorization", "Bearer " + accessToken); + } + } +} diff --git a/src/main/java/xiresellers/client/auth/OAuthFlow.java b/src/main/java/xiresellers/client/auth/OAuthFlow.java new file mode 100644 index 00000000..3e70181c --- /dev/null +++ b/src/main/java/xiresellers/client/auth/OAuthFlow.java @@ -0,0 +1,25 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.auth; + +/** + * OAuth flows that are supported by this client + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public enum OAuthFlow { + ACCESS_CODE, //called authorizationCode in OpenAPI 3.0 + IMPLICIT, + PASSWORD, + APPLICATION //called clientCredentials in OpenAPI 3.0 +} diff --git a/src/main/java/xiresellers/client/auth/OAuthOkHttpClient.java b/src/main/java/xiresellers/client/auth/OAuthOkHttpClient.java new file mode 100644 index 00000000..f5795c1f --- /dev/null +++ b/src/main/java/xiresellers/client/auth/OAuthOkHttpClient.java @@ -0,0 +1,69 @@ +package xiresellers.client.auth; + +import okhttp3.OkHttpClient; +import okhttp3.MediaType; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; + +import org.apache.oltu.oauth2.client.HttpClient; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest; +import org.apache.oltu.oauth2.client.response.OAuthClientResponse; +import org.apache.oltu.oauth2.client.response.OAuthClientResponseFactory; +import org.apache.oltu.oauth2.common.exception.OAuthProblemException; +import org.apache.oltu.oauth2.common.exception.OAuthSystemException; + +import java.io.IOException; +import java.util.Map; +import java.util.Map.Entry; + +public class OAuthOkHttpClient implements HttpClient { + private OkHttpClient client; + + public OAuthOkHttpClient() { + this.client = new OkHttpClient(); + } + + public OAuthOkHttpClient(OkHttpClient client) { + this.client = client; + } + + @Override + public T execute(OAuthClientRequest request, Map headers, + String requestMethod, Class responseClass) + throws OAuthSystemException, OAuthProblemException { + + MediaType mediaType = MediaType.parse("application/json"); + Request.Builder requestBuilder = new Request.Builder().url(request.getLocationUri()); + + if(headers != null) { + for (Entry entry : headers.entrySet()) { + if (entry.getKey().equalsIgnoreCase("Content-Type")) { + mediaType = MediaType.parse(entry.getValue()); + } else { + requestBuilder.addHeader(entry.getKey(), entry.getValue()); + } + } + } + + RequestBody body = request.getBody() != null ? RequestBody.create(request.getBody(), mediaType) : null; + requestBuilder.method(requestMethod, body); + + try { + Response response = client.newCall(requestBuilder.build()).execute(); + return OAuthClientResponseFactory.createCustomResponse( + response.body().string(), + response.body().contentType().toString(), + response.code(), + response.headers().toMultimap(), + responseClass); + } catch (IOException e) { + throw new OAuthSystemException(e); + } + } + + @Override + public void shutdown() { + // Nothing to do here + } +} diff --git a/src/main/java/xiresellers/client/auth/RetryingOAuth.java b/src/main/java/xiresellers/client/auth/RetryingOAuth.java new file mode 100644 index 00000000..f1b18ce4 --- /dev/null +++ b/src/main/java/xiresellers/client/auth/RetryingOAuth.java @@ -0,0 +1,210 @@ +package xiresellers.client.auth; + +import xiresellers.client.ApiException; +import xiresellers.client.Pair; + +import okhttp3.Interceptor; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +import org.apache.oltu.oauth2.client.OAuthClient; +import org.apache.oltu.oauth2.client.request.OAuthBearerClientRequest; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder; +import org.apache.oltu.oauth2.client.response.OAuthJSONAccessTokenResponse; +import org.apache.oltu.oauth2.common.exception.OAuthProblemException; +import org.apache.oltu.oauth2.common.exception.OAuthSystemException; +import org.apache.oltu.oauth2.common.message.types.GrantType; + +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.URI; +import java.util.Map; +import java.util.List; + +public class RetryingOAuth extends OAuth implements Interceptor { + private OAuthClient oAuthClient; + + private TokenRequestBuilder tokenRequestBuilder; + + /** + * @param client An OkHttp client + * @param tokenRequestBuilder A token request builder + */ + public RetryingOAuth(OkHttpClient client, TokenRequestBuilder tokenRequestBuilder) { + this.oAuthClient = new OAuthClient(new OAuthOkHttpClient(client)); + this.tokenRequestBuilder = tokenRequestBuilder; + } + + /** + * @param tokenRequestBuilder A token request builder + */ + public RetryingOAuth(TokenRequestBuilder tokenRequestBuilder) { + this(new OkHttpClient(), tokenRequestBuilder); + } + + /** + * @param tokenUrl The token URL to be used for this OAuth2 flow. + * Applicable to the following OAuth2 flows: "password", "clientCredentials" and "authorizationCode". + * The value must be an absolute URL. + * @param clientId The OAuth2 client ID for the "clientCredentials" flow. + * @param flow OAuth flow. + * @param clientSecret The OAuth2 client secret for the "clientCredentials" flow. + * @param parameters A map of string. + */ + public RetryingOAuth( + String tokenUrl, + String clientId, + OAuthFlow flow, + String clientSecret, + Map parameters + ) { + this(OAuthClientRequest.tokenLocation(tokenUrl) + .setClientId(clientId) + .setClientSecret(clientSecret)); + setFlow(flow); + if (parameters != null) { + for (Map.Entry entry : parameters.entrySet()) { + tokenRequestBuilder.setParameter(entry.getKey(), entry.getValue()); + } + } + } + + /** + * Set the OAuth flow + * + * @param flow The OAuth flow. + */ + public void setFlow(OAuthFlow flow) { + switch(flow) { + case ACCESS_CODE: + tokenRequestBuilder.setGrantType(GrantType.AUTHORIZATION_CODE); + break; + case IMPLICIT: + tokenRequestBuilder.setGrantType(GrantType.IMPLICIT); + break; + case PASSWORD: + tokenRequestBuilder.setGrantType(GrantType.PASSWORD); + break; + case APPLICATION: + tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS); + break; + default: + break; + } + } + + @Override + public Response intercept(Chain chain) throws IOException { + return retryingIntercept(chain, true); + } + + private Response retryingIntercept(Chain chain, boolean updateTokenAndRetryOnAuthorizationFailure) throws IOException { + Request request = chain.request(); + + // If the request already has an authorization (e.g. Basic auth), proceed with the request as is + if (request.header("Authorization") != null) { + return chain.proceed(request); + } + + // Get the token if it has not yet been acquired + if (getAccessToken() == null) { + updateAccessToken(null); + } + + OAuthClientRequest oAuthRequest; + if (getAccessToken() != null) { + // Build the request + Request.Builder requestBuilder = request.newBuilder(); + + String requestAccessToken = getAccessToken(); + try { + oAuthRequest = + new OAuthBearerClientRequest(request.url().toString()). + setAccessToken(requestAccessToken). + buildHeaderMessage(); + } catch (OAuthSystemException e) { + throw new IOException(e); + } + + Map headers = oAuthRequest.getHeaders(); + for (Map.Entry entry : headers.entrySet()) { + requestBuilder.addHeader(entry.getKey(), entry.getValue()); + } + requestBuilder.url(oAuthRequest.getLocationUri()); + + // Execute the request + Response response = chain.proceed(requestBuilder.build()); + + // 401/403 response codes most likely indicate an expired access token, unless it happens two times in a row + if ( + response != null && + ( response.code() == HttpURLConnection.HTTP_UNAUTHORIZED || + response.code() == HttpURLConnection.HTTP_FORBIDDEN ) && + updateTokenAndRetryOnAuthorizationFailure + ) { + try { + if (updateAccessToken(requestAccessToken)) { + response.body().close(); + return retryingIntercept(chain, false); + } + } catch (Exception e) { + response.body().close(); + throw e; + } + } + return response; + } + else { + return chain.proceed(chain.request()); + } + } + + /** + * Returns true if the access token has been updated + * + * @param requestAccessToken the request access token + * @return True if the update is successful + * @throws java.io.IOException If fail to update the access token + */ + public synchronized boolean updateAccessToken(String requestAccessToken) throws IOException { + if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) { + try { + OAuthJSONAccessTokenResponse accessTokenResponse = + oAuthClient.accessToken(tokenRequestBuilder.buildBodyMessage()); + if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) { + setAccessToken(accessTokenResponse.getAccessToken()); + } + } catch (OAuthSystemException | OAuthProblemException e) { + throw new IOException(e); + } + } + return getAccessToken() == null || !getAccessToken().equals(requestAccessToken); + } + + /** + * Gets the token request builder + * + * @return A token request builder + */ + public TokenRequestBuilder getTokenRequestBuilder() { + return tokenRequestBuilder; + } + + /** + * Sets the token request builder + * + * @param tokenRequestBuilder Token request builder + */ + public void setTokenRequestBuilder(TokenRequestBuilder tokenRequestBuilder) { + this.tokenRequestBuilder = tokenRequestBuilder; + } + + // Applying authorization to parameters is performed in the retryingIntercept method + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + // No implementation necessary + } +} diff --git a/src/main/java/xiresellers/client/model/AbstractOpenApiSchema.java b/src/main/java/xiresellers/client/model/AbstractOpenApiSchema.java new file mode 100644 index 00000000..2a80b8a1 --- /dev/null +++ b/src/main/java/xiresellers/client/model/AbstractOpenApiSchema.java @@ -0,0 +1,146 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import xiresellers.client.ApiException; +import java.util.Objects; +import java.lang.reflect.Type; +import java.util.Map; + +/** + * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public abstract class AbstractOpenApiSchema { + + // store the actual instance of the schema/object + private Object instance; + + // is nullable + private Boolean isNullable; + + // schema type (e.g. oneOf, anyOf) + private final String schemaType; + + public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { + this.schemaType = schemaType; + this.isNullable = isNullable; + } + + /** + * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object + * + * @return an instance of the actual schema/object + */ + public abstract Map> getSchemas(); + + /** + * Get the actual instance + * + * @return an instance of the actual schema/object + */ + //@JsonValue + public Object getActualInstance() {return instance;} + + /** + * Set the actual instance + * + * @param instance the actual instance of the schema/object + */ + public void setActualInstance(Object instance) {this.instance = instance;} + + /** + * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well + * + * @return an instance of the actual schema/object + */ + public Object getActualInstanceRecursively() { + return getActualInstanceRecursively(this); + } + + private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { + if (object.getActualInstance() == null) { + return null; + } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { + return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); + } else { + return object.getActualInstance(); + } + } + + /** + * Get the schema type (e.g. anyOf, oneOf) + * + * @return the schema type + */ + public String getSchemaType() { + return schemaType; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ").append(getClass()).append(" {\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); + sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; + return Objects.equals(this.instance, a.instance) && + Objects.equals(this.isNullable, a.isNullable) && + Objects.equals(this.schemaType, a.schemaType); + } + + @Override + public int hashCode() { + return Objects.hash(instance, isNullable, schemaType); + } + + /** + * Is nullable + * + * @return true if it's nullable + */ + public Boolean isNullable() { + if (Boolean.TRUE.equals(isNullable)) { + return Boolean.TRUE; + } else { + return Boolean.FALSE; + } + } + + + +} diff --git a/src/main/java/xiresellers/client/model/AddressType.java b/src/main/java/xiresellers/client/model/AddressType.java new file mode 100644 index 00000000..6cd84b7f --- /dev/null +++ b/src/main/java/xiresellers/client/model/AddressType.java @@ -0,0 +1,554 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Address type object + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class AddressType { + public static final String SERIALIZED_NAME_ATTENTION = "attention"; + @SerializedName(SERIALIZED_NAME_ATTENTION) + private String attention; + + public static final String SERIALIZED_NAME_NAME1 = "name1"; + @SerializedName(SERIALIZED_NAME_NAME1) + private String name1; + + public static final String SERIALIZED_NAME_NAME2 = "name2"; + @SerializedName(SERIALIZED_NAME_NAME2) + private String name2; + + public static final String SERIALIZED_NAME_ADDRESSLINE1 = "addressline1"; + @SerializedName(SERIALIZED_NAME_ADDRESSLINE1) + private String addressline1; + + public static final String SERIALIZED_NAME_ADDRESSLINE2 = "addressline2"; + @SerializedName(SERIALIZED_NAME_ADDRESSLINE2) + private String addressline2; + + public static final String SERIALIZED_NAME_ADDRESSLINE3 = "addressline3"; + @SerializedName(SERIALIZED_NAME_ADDRESSLINE3) + private String addressline3; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTALCODE = "postalcode"; + @SerializedName(SERIALIZED_NAME_POSTALCODE) + private String postalcode; + + public static final String SERIALIZED_NAME_COUNTRYCODE = "countrycode"; + @SerializedName(SERIALIZED_NAME_COUNTRYCODE) + private String countrycode; + + public static final String SERIALIZED_NAME_FAX = "fax"; + @SerializedName(SERIALIZED_NAME_FAX) + private String fax; + + public static final String SERIALIZED_NAME_PHONENUMBER = "phonenumber"; + @SerializedName(SERIALIZED_NAME_PHONENUMBER) + private String phonenumber; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public AddressType() { + } + + public AddressType attention(String attention) { + this.attention = attention; + return this; + } + + /** + * Get attention + * @return attention + **/ + @javax.annotation.Nullable + public String getAttention() { + return attention; + } + + public void setAttention(String attention) { + this.attention = attention; + } + + + public AddressType name1(String name1) { + this.name1 = name1; + return this; + } + + /** + * Get name1 + * @return name1 + **/ + @javax.annotation.Nullable + public String getName1() { + return name1; + } + + public void setName1(String name1) { + this.name1 = name1; + } + + + public AddressType name2(String name2) { + this.name2 = name2; + return this; + } + + /** + * Get name2 + * @return name2 + **/ + @javax.annotation.Nullable + public String getName2() { + return name2; + } + + public void setName2(String name2) { + this.name2 = name2; + } + + + public AddressType addressline1(String addressline1) { + this.addressline1 = addressline1; + return this; + } + + /** + * Get addressline1 + * @return addressline1 + **/ + @javax.annotation.Nullable + public String getAddressline1() { + return addressline1; + } + + public void setAddressline1(String addressline1) { + this.addressline1 = addressline1; + } + + + public AddressType addressline2(String addressline2) { + this.addressline2 = addressline2; + return this; + } + + /** + * Get addressline2 + * @return addressline2 + **/ + @javax.annotation.Nullable + public String getAddressline2() { + return addressline2; + } + + public void setAddressline2(String addressline2) { + this.addressline2 = addressline2; + } + + + public AddressType addressline3(String addressline3) { + this.addressline3 = addressline3; + return this; + } + + /** + * Get addressline3 + * @return addressline3 + **/ + @javax.annotation.Nullable + public String getAddressline3() { + return addressline3; + } + + public void setAddressline3(String addressline3) { + this.addressline3 = addressline3; + } + + + public AddressType city(String city) { + this.city = city; + return this; + } + + /** + * Get city + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public AddressType state(String state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public AddressType postalcode(String postalcode) { + this.postalcode = postalcode; + return this; + } + + /** + * Get postalcode + * @return postalcode + **/ + @javax.annotation.Nullable + public String getPostalcode() { + return postalcode; + } + + public void setPostalcode(String postalcode) { + this.postalcode = postalcode; + } + + + public AddressType countrycode(String countrycode) { + this.countrycode = countrycode; + return this; + } + + /** + * Get countrycode + * @return countrycode + **/ + @javax.annotation.Nullable + public String getCountrycode() { + return countrycode; + } + + public void setCountrycode(String countrycode) { + this.countrycode = countrycode; + } + + + public AddressType fax(String fax) { + this.fax = fax; + return this; + } + + /** + * Get fax + * @return fax + **/ + @javax.annotation.Nullable + public String getFax() { + return fax; + } + + public void setFax(String fax) { + this.fax = fax; + } + + + public AddressType phonenumber(String phonenumber) { + this.phonenumber = phonenumber; + return this; + } + + /** + * Get phonenumber + * @return phonenumber + **/ + @javax.annotation.Nullable + public String getPhonenumber() { + return phonenumber; + } + + public void setPhonenumber(String phonenumber) { + this.phonenumber = phonenumber; + } + + + public AddressType email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddressType addressType = (AddressType) o; + return Objects.equals(this.attention, addressType.attention) && + Objects.equals(this.name1, addressType.name1) && + Objects.equals(this.name2, addressType.name2) && + Objects.equals(this.addressline1, addressType.addressline1) && + Objects.equals(this.addressline2, addressType.addressline2) && + Objects.equals(this.addressline3, addressType.addressline3) && + Objects.equals(this.city, addressType.city) && + Objects.equals(this.state, addressType.state) && + Objects.equals(this.postalcode, addressType.postalcode) && + Objects.equals(this.countrycode, addressType.countrycode) && + Objects.equals(this.fax, addressType.fax) && + Objects.equals(this.phonenumber, addressType.phonenumber) && + Objects.equals(this.email, addressType.email); + } + + @Override + public int hashCode() { + return Objects.hash(attention, name1, name2, addressline1, addressline2, addressline3, city, state, postalcode, countrycode, fax, phonenumber, email); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddressType {\n"); + sb.append(" attention: ").append(toIndentedString(attention)).append("\n"); + sb.append(" name1: ").append(toIndentedString(name1)).append("\n"); + sb.append(" name2: ").append(toIndentedString(name2)).append("\n"); + sb.append(" addressline1: ").append(toIndentedString(addressline1)).append("\n"); + sb.append(" addressline2: ").append(toIndentedString(addressline2)).append("\n"); + sb.append(" addressline3: ").append(toIndentedString(addressline3)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalcode: ").append(toIndentedString(postalcode)).append("\n"); + sb.append(" countrycode: ").append(toIndentedString(countrycode)).append("\n"); + sb.append(" fax: ").append(toIndentedString(fax)).append("\n"); + sb.append(" phonenumber: ").append(toIndentedString(phonenumber)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attention"); + openapiFields.add("name1"); + openapiFields.add("name2"); + openapiFields.add("addressline1"); + openapiFields.add("addressline2"); + openapiFields.add("addressline3"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalcode"); + openapiFields.add("countrycode"); + openapiFields.add("fax"); + openapiFields.add("phonenumber"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AddressType + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AddressType.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AddressType is not found in the empty JSON string", AddressType.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AddressType.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AddressType` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("attention") != null && !jsonObj.get("attention").isJsonNull()) && !jsonObj.get("attention").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attention` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attention").toString())); + } + if ((jsonObj.get("name1") != null && !jsonObj.get("name1").isJsonNull()) && !jsonObj.get("name1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name1").toString())); + } + if ((jsonObj.get("name2") != null && !jsonObj.get("name2").isJsonNull()) && !jsonObj.get("name2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name2").toString())); + } + if ((jsonObj.get("addressline1") != null && !jsonObj.get("addressline1").isJsonNull()) && !jsonObj.get("addressline1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressline1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressline1").toString())); + } + if ((jsonObj.get("addressline2") != null && !jsonObj.get("addressline2").isJsonNull()) && !jsonObj.get("addressline2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressline2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressline2").toString())); + } + if ((jsonObj.get("addressline3") != null && !jsonObj.get("addressline3").isJsonNull()) && !jsonObj.get("addressline3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressline3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressline3").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalcode") != null && !jsonObj.get("postalcode").isJsonNull()) && !jsonObj.get("postalcode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalcode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalcode").toString())); + } + if ((jsonObj.get("countrycode") != null && !jsonObj.get("countrycode").isJsonNull()) && !jsonObj.get("countrycode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countrycode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countrycode").toString())); + } + if ((jsonObj.get("fax") != null && !jsonObj.get("fax").isJsonNull()) && !jsonObj.get("fax").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `fax` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fax").toString())); + } + if ((jsonObj.get("phonenumber") != null && !jsonObj.get("phonenumber").isJsonNull()) && !jsonObj.get("phonenumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phonenumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phonenumber").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AddressType.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AddressType' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AddressType.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AddressType value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AddressType read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AddressType given an JSON string + * + * @param jsonString JSON string + * @return An instance of AddressType + * @throws IOException if the JSON string is invalid with respect to AddressType + */ + public static AddressType fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AddressType.class); + } + + /** + * Convert an instance of AddressType to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/AvailabilityAsyncNotificationRequest.java b/src/main/java/xiresellers/client/model/AvailabilityAsyncNotificationRequest.java new file mode 100644 index 00000000..c9cd1579 --- /dev/null +++ b/src/main/java/xiresellers/client/model/AvailabilityAsyncNotificationRequest.java @@ -0,0 +1,344 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.AvailabilityAsyncNotificationRequestResourceInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * AvailabilityAsyncNotificationRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class AvailabilityAsyncNotificationRequest { + public static final String SERIALIZED_NAME_TOPIC = "topic"; + @SerializedName(SERIALIZED_NAME_TOPIC) + private String topic; + + public static final String SERIALIZED_NAME_EVENT = "event"; + @SerializedName(SERIALIZED_NAME_EVENT) + private String event; + + public static final String SERIALIZED_NAME_EVENT_TIME_STAMP = "eventTimeStamp"; + @SerializedName(SERIALIZED_NAME_EVENT_TIME_STAMP) + private String eventTimeStamp; + + public static final String SERIALIZED_NAME_EVENT_ID = "eventId"; + @SerializedName(SERIALIZED_NAME_EVENT_ID) + private String eventId; + + public static final String SERIALIZED_NAME_RESOURCE = "resource"; + @SerializedName(SERIALIZED_NAME_RESOURCE) + private List resource; + + public AvailabilityAsyncNotificationRequest() { + } + + public AvailabilityAsyncNotificationRequest topic(String topic) { + this.topic = topic; + return this; + } + + /** + * Field for identifying whether it is a reseller or vendor event. For eg, resellers/orders + * @return topic + **/ + @javax.annotation.Nullable + public String getTopic() { + return topic; + } + + public void setTopic(String topic) { + this.topic = topic; + } + + + public AvailabilityAsyncNotificationRequest event(String event) { + this.event = event; + return this; + } + + /** + * The event sent in the request. For eg, im::create. + * @return event + **/ + @javax.annotation.Nullable + public String getEvent() { + return event; + } + + public void setEvent(String event) { + this.event = event; + } + + + public AvailabilityAsyncNotificationRequest eventTimeStamp(String eventTimeStamp) { + this.eventTimeStamp = eventTimeStamp; + return this; + } + + /** + * The timestamp at which the event was sent. + * @return eventTimeStamp + **/ + @javax.annotation.Nullable + public String getEventTimeStamp() { + return eventTimeStamp; + } + + public void setEventTimeStamp(String eventTimeStamp) { + this.eventTimeStamp = eventTimeStamp; + } + + + public AvailabilityAsyncNotificationRequest eventId(String eventId) { + this.eventId = eventId; + return this; + } + + /** + * A unique id used as identifier for the sepcific event and used for generating the x-hub signature. + * @return eventId + **/ + @javax.annotation.Nullable + public String getEventId() { + return eventId; + } + + public void setEventId(String eventId) { + this.eventId = eventId; + } + + + public AvailabilityAsyncNotificationRequest resource(List resource) { + this.resource = resource; + return this; + } + + public AvailabilityAsyncNotificationRequest addResourceItem(AvailabilityAsyncNotificationRequestResourceInner resourceItem) { + if (this.resource == null) { + this.resource = new ArrayList<>(); + } + this.resource.add(resourceItem); + return this; + } + + /** + * Get resource + * @return resource + **/ + @javax.annotation.Nullable + public List getResource() { + return resource; + } + + public void setResource(List resource) { + this.resource = resource; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AvailabilityAsyncNotificationRequest availabilityAsyncNotificationRequest = (AvailabilityAsyncNotificationRequest) o; + return Objects.equals(this.topic, availabilityAsyncNotificationRequest.topic) && + Objects.equals(this.event, availabilityAsyncNotificationRequest.event) && + Objects.equals(this.eventTimeStamp, availabilityAsyncNotificationRequest.eventTimeStamp) && + Objects.equals(this.eventId, availabilityAsyncNotificationRequest.eventId) && + Objects.equals(this.resource, availabilityAsyncNotificationRequest.resource); + } + + @Override + public int hashCode() { + return Objects.hash(topic, event, eventTimeStamp, eventId, resource); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AvailabilityAsyncNotificationRequest {\n"); + sb.append(" topic: ").append(toIndentedString(topic)).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append(" eventTimeStamp: ").append(toIndentedString(eventTimeStamp)).append("\n"); + sb.append(" eventId: ").append(toIndentedString(eventId)).append("\n"); + sb.append(" resource: ").append(toIndentedString(resource)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("topic"); + openapiFields.add("event"); + openapiFields.add("eventTimeStamp"); + openapiFields.add("eventId"); + openapiFields.add("resource"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AvailabilityAsyncNotificationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AvailabilityAsyncNotificationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AvailabilityAsyncNotificationRequest is not found in the empty JSON string", AvailabilityAsyncNotificationRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AvailabilityAsyncNotificationRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AvailabilityAsyncNotificationRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("topic") != null && !jsonObj.get("topic").isJsonNull()) && !jsonObj.get("topic").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `topic` to be a primitive type in the JSON string but got `%s`", jsonObj.get("topic").toString())); + } + if ((jsonObj.get("event") != null && !jsonObj.get("event").isJsonNull()) && !jsonObj.get("event").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `event` to be a primitive type in the JSON string but got `%s`", jsonObj.get("event").toString())); + } + if ((jsonObj.get("eventTimeStamp") != null && !jsonObj.get("eventTimeStamp").isJsonNull()) && !jsonObj.get("eventTimeStamp").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `eventTimeStamp` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventTimeStamp").toString())); + } + if ((jsonObj.get("eventId") != null && !jsonObj.get("eventId").isJsonNull()) && !jsonObj.get("eventId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `eventId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventId").toString())); + } + if (jsonObj.get("resource") != null && !jsonObj.get("resource").isJsonNull()) { + JsonArray jsonArrayresource = jsonObj.getAsJsonArray("resource"); + if (jsonArrayresource != null) { + // ensure the json data is an array + if (!jsonObj.get("resource").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `resource` to be an array in the JSON string but got `%s`", jsonObj.get("resource").toString())); + } + + // validate the optional field `resource` (array) + for (int i = 0; i < jsonArrayresource.size(); i++) { + AvailabilityAsyncNotificationRequestResourceInner.validateJsonElement(jsonArrayresource.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AvailabilityAsyncNotificationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AvailabilityAsyncNotificationRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AvailabilityAsyncNotificationRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AvailabilityAsyncNotificationRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AvailabilityAsyncNotificationRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AvailabilityAsyncNotificationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AvailabilityAsyncNotificationRequest + * @throws IOException if the JSON string is invalid with respect to AvailabilityAsyncNotificationRequest + */ + public static AvailabilityAsyncNotificationRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AvailabilityAsyncNotificationRequest.class); + } + + /** + * Convert an instance of AvailabilityAsyncNotificationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/AvailabilityAsyncNotificationRequestResourceInner.java b/src/main/java/xiresellers/client/model/AvailabilityAsyncNotificationRequestResourceInner.java new file mode 100644 index 00000000..388571bb --- /dev/null +++ b/src/main/java/xiresellers/client/model/AvailabilityAsyncNotificationRequestResourceInner.java @@ -0,0 +1,460 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.AvailabilityAsyncNotificationRequestResourceInnerLinksInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * AvailabilityAsyncNotificationRequestResourceInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class AvailabilityAsyncNotificationRequestResourceInner { + public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; + @SerializedName(SERIALIZED_NAME_EVENT_TYPE) + private String eventType; + + public static final String SERIALIZED_NAME_INGRAM_PART_NUMBER = "ingramPartNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PART_NUMBER) + private String ingramPartNumber; + + public static final String SERIALIZED_NAME_VENDOR_PART_NUMBER = "vendorPartNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_PART_NUMBER) + private String vendorPartNumber; + + public static final String SERIALIZED_NAME_VENDOR_NAME = "vendorName"; + @SerializedName(SERIALIZED_NAME_VENDOR_NAME) + private String vendorName; + + public static final String SERIALIZED_NAME_UPC_CODE = "upcCode"; + @SerializedName(SERIALIZED_NAME_UPC_CODE) + private String upcCode; + + public static final String SERIALIZED_NAME_SKU_STATUS = "skuStatus"; + @SerializedName(SERIALIZED_NAME_SKU_STATUS) + private String skuStatus; + + public static final String SERIALIZED_NAME_BACK_ORDER_FLAG = "backOrderFlag"; + @SerializedName(SERIALIZED_NAME_BACK_ORDER_FLAG) + private String backOrderFlag; + + public static final String SERIALIZED_NAME_TOTAL_AVAILABILITY = "totalAvailability"; + @SerializedName(SERIALIZED_NAME_TOTAL_AVAILABILITY) + private String totalAvailability; + + public static final String SERIALIZED_NAME_LINKS = "links"; + @SerializedName(SERIALIZED_NAME_LINKS) + private List links; + + public AvailabilityAsyncNotificationRequestResourceInner() { + } + + public AvailabilityAsyncNotificationRequestResourceInner eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The event name sent in the event request. + * @return eventType + **/ + @javax.annotation.Nullable + public String getEventType() { + return eventType; + } + + public void setEventType(String eventType) { + this.eventType = eventType; + } + + + public AvailabilityAsyncNotificationRequestResourceInner ingramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + return this; + } + + /** + * The Unique IngramMicro part number for the product. + * @return ingramPartNumber + **/ + @javax.annotation.Nullable + public String getIngramPartNumber() { + return ingramPartNumber; + } + + public void setIngramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + } + + + public AvailabilityAsyncNotificationRequestResourceInner vendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + return this; + } + + /** + * The vendors part number for the product. + * @return vendorPartNumber + **/ + @javax.annotation.Nullable + public String getVendorPartNumber() { + return vendorPartNumber; + } + + public void setVendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + } + + + public AvailabilityAsyncNotificationRequestResourceInner vendorName(String vendorName) { + this.vendorName = vendorName; + return this; + } + + /** + * The name of the vendor/manufacturer of the product. + * @return vendorName + **/ + @javax.annotation.Nullable + public String getVendorName() { + return vendorName; + } + + public void setVendorName(String vendorName) { + this.vendorName = vendorName; + } + + + public AvailabilityAsyncNotificationRequestResourceInner upcCode(String upcCode) { + this.upcCode = upcCode; + return this; + } + + /** + * The UPC code for the product. Consists of 12 numeric digits that are uniquly assigned to each trade item. + * @return upcCode + **/ + @javax.annotation.Nullable + public String getUpcCode() { + return upcCode; + } + + public void setUpcCode(String upcCode) { + this.upcCode = upcCode; + } + + + public AvailabilityAsyncNotificationRequestResourceInner skuStatus(String skuStatus) { + this.skuStatus = skuStatus; + return this; + } + + /** + * Status returned saying whether sku is active. + * @return skuStatus + **/ + @javax.annotation.Nullable + public String getSkuStatus() { + return skuStatus; + } + + public void setSkuStatus(String skuStatus) { + this.skuStatus = skuStatus; + } + + + public AvailabilityAsyncNotificationRequestResourceInner backOrderFlag(String backOrderFlag) { + this.backOrderFlag = backOrderFlag; + return this; + } + + /** + * Backordered Flag. + * @return backOrderFlag + **/ + @javax.annotation.Nullable + public String getBackOrderFlag() { + return backOrderFlag; + } + + public void setBackOrderFlag(String backOrderFlag) { + this.backOrderFlag = backOrderFlag; + } + + + public AvailabilityAsyncNotificationRequestResourceInner totalAvailability(String totalAvailability) { + this.totalAvailability = totalAvailability; + return this; + } + + /** + * totalAvailability. + * @return totalAvailability + **/ + @javax.annotation.Nullable + public String getTotalAvailability() { + return totalAvailability; + } + + public void setTotalAvailability(String totalAvailability) { + this.totalAvailability = totalAvailability; + } + + + public AvailabilityAsyncNotificationRequestResourceInner links(List links) { + this.links = links; + return this; + } + + public AvailabilityAsyncNotificationRequestResourceInner addLinksItem(AvailabilityAsyncNotificationRequestResourceInnerLinksInner linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * Link to Order Details for the order(s). + * @return links + **/ + @javax.annotation.Nullable + public List getLinks() { + return links; + } + + public void setLinks(List links) { + this.links = links; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AvailabilityAsyncNotificationRequestResourceInner availabilityAsyncNotificationRequestResourceInner = (AvailabilityAsyncNotificationRequestResourceInner) o; + return Objects.equals(this.eventType, availabilityAsyncNotificationRequestResourceInner.eventType) && + Objects.equals(this.ingramPartNumber, availabilityAsyncNotificationRequestResourceInner.ingramPartNumber) && + Objects.equals(this.vendorPartNumber, availabilityAsyncNotificationRequestResourceInner.vendorPartNumber) && + Objects.equals(this.vendorName, availabilityAsyncNotificationRequestResourceInner.vendorName) && + Objects.equals(this.upcCode, availabilityAsyncNotificationRequestResourceInner.upcCode) && + Objects.equals(this.skuStatus, availabilityAsyncNotificationRequestResourceInner.skuStatus) && + Objects.equals(this.backOrderFlag, availabilityAsyncNotificationRequestResourceInner.backOrderFlag) && + Objects.equals(this.totalAvailability, availabilityAsyncNotificationRequestResourceInner.totalAvailability) && + Objects.equals(this.links, availabilityAsyncNotificationRequestResourceInner.links); + } + + @Override + public int hashCode() { + return Objects.hash(eventType, ingramPartNumber, vendorPartNumber, vendorName, upcCode, skuStatus, backOrderFlag, totalAvailability, links); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AvailabilityAsyncNotificationRequestResourceInner {\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" ingramPartNumber: ").append(toIndentedString(ingramPartNumber)).append("\n"); + sb.append(" vendorPartNumber: ").append(toIndentedString(vendorPartNumber)).append("\n"); + sb.append(" vendorName: ").append(toIndentedString(vendorName)).append("\n"); + sb.append(" upcCode: ").append(toIndentedString(upcCode)).append("\n"); + sb.append(" skuStatus: ").append(toIndentedString(skuStatus)).append("\n"); + sb.append(" backOrderFlag: ").append(toIndentedString(backOrderFlag)).append("\n"); + sb.append(" totalAvailability: ").append(toIndentedString(totalAvailability)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("eventType"); + openapiFields.add("ingramPartNumber"); + openapiFields.add("vendorPartNumber"); + openapiFields.add("vendorName"); + openapiFields.add("upcCode"); + openapiFields.add("skuStatus"); + openapiFields.add("backOrderFlag"); + openapiFields.add("totalAvailability"); + openapiFields.add("links"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AvailabilityAsyncNotificationRequestResourceInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AvailabilityAsyncNotificationRequestResourceInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AvailabilityAsyncNotificationRequestResourceInner is not found in the empty JSON string", AvailabilityAsyncNotificationRequestResourceInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AvailabilityAsyncNotificationRequestResourceInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AvailabilityAsyncNotificationRequestResourceInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + } + if ((jsonObj.get("ingramPartNumber") != null && !jsonObj.get("ingramPartNumber").isJsonNull()) && !jsonObj.get("ingramPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPartNumber").toString())); + } + if ((jsonObj.get("vendorPartNumber") != null && !jsonObj.get("vendorPartNumber").isJsonNull()) && !jsonObj.get("vendorPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorPartNumber").toString())); + } + if ((jsonObj.get("vendorName") != null && !jsonObj.get("vendorName").isJsonNull()) && !jsonObj.get("vendorName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorName").toString())); + } + if ((jsonObj.get("upcCode") != null && !jsonObj.get("upcCode").isJsonNull()) && !jsonObj.get("upcCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `upcCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("upcCode").toString())); + } + if ((jsonObj.get("skuStatus") != null && !jsonObj.get("skuStatus").isJsonNull()) && !jsonObj.get("skuStatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `skuStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("skuStatus").toString())); + } + if ((jsonObj.get("backOrderFlag") != null && !jsonObj.get("backOrderFlag").isJsonNull()) && !jsonObj.get("backOrderFlag").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `backOrderFlag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("backOrderFlag").toString())); + } + if ((jsonObj.get("totalAvailability") != null && !jsonObj.get("totalAvailability").isJsonNull()) && !jsonObj.get("totalAvailability").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `totalAvailability` to be a primitive type in the JSON string but got `%s`", jsonObj.get("totalAvailability").toString())); + } + if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull()) { + JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); + if (jsonArraylinks != null) { + // ensure the json data is an array + if (!jsonObj.get("links").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + } + + // validate the optional field `links` (array) + for (int i = 0; i < jsonArraylinks.size(); i++) { + AvailabilityAsyncNotificationRequestResourceInnerLinksInner.validateJsonElement(jsonArraylinks.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AvailabilityAsyncNotificationRequestResourceInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AvailabilityAsyncNotificationRequestResourceInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AvailabilityAsyncNotificationRequestResourceInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AvailabilityAsyncNotificationRequestResourceInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AvailabilityAsyncNotificationRequestResourceInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AvailabilityAsyncNotificationRequestResourceInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of AvailabilityAsyncNotificationRequestResourceInner + * @throws IOException if the JSON string is invalid with respect to AvailabilityAsyncNotificationRequestResourceInner + */ + public static AvailabilityAsyncNotificationRequestResourceInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AvailabilityAsyncNotificationRequestResourceInner.class); + } + + /** + * Convert an instance of AvailabilityAsyncNotificationRequestResourceInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/AvailabilityAsyncNotificationRequestResourceInnerLinksInner.java b/src/main/java/xiresellers/client/model/AvailabilityAsyncNotificationRequestResourceInnerLinksInner.java new file mode 100644 index 00000000..689abadd --- /dev/null +++ b/src/main/java/xiresellers/client/model/AvailabilityAsyncNotificationRequestResourceInnerLinksInner.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * AvailabilityAsyncNotificationRequestResourceInnerLinksInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class AvailabilityAsyncNotificationRequestResourceInnerLinksInner { + public static final String SERIALIZED_NAME_TOPIC = "topic"; + @SerializedName(SERIALIZED_NAME_TOPIC) + private String topic; + + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + private String href; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public AvailabilityAsyncNotificationRequestResourceInnerLinksInner() { + } + + public AvailabilityAsyncNotificationRequestResourceInnerLinksInner topic(String topic) { + this.topic = topic; + return this; + } + + /** + * Provides the details of the orders. + * @return topic + **/ + @javax.annotation.Nullable + public String getTopic() { + return topic; + } + + public void setTopic(String topic) { + this.topic = topic; + } + + + public AvailabilityAsyncNotificationRequestResourceInnerLinksInner href(String href) { + this.href = href; + return this; + } + + /** + * The URL endpoint for accessing the relevant data. + * @return href + **/ + @javax.annotation.Nullable + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + + public AvailabilityAsyncNotificationRequestResourceInnerLinksInner type(String type) { + this.type = type; + return this; + } + + /** + * The type of call that can be made to the href link (GET, POST, Etc.). + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AvailabilityAsyncNotificationRequestResourceInnerLinksInner availabilityAsyncNotificationRequestResourceInnerLinksInner = (AvailabilityAsyncNotificationRequestResourceInnerLinksInner) o; + return Objects.equals(this.topic, availabilityAsyncNotificationRequestResourceInnerLinksInner.topic) && + Objects.equals(this.href, availabilityAsyncNotificationRequestResourceInnerLinksInner.href) && + Objects.equals(this.type, availabilityAsyncNotificationRequestResourceInnerLinksInner.type); + } + + @Override + public int hashCode() { + return Objects.hash(topic, href, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AvailabilityAsyncNotificationRequestResourceInnerLinksInner {\n"); + sb.append(" topic: ").append(toIndentedString(topic)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("topic"); + openapiFields.add("href"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AvailabilityAsyncNotificationRequestResourceInnerLinksInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AvailabilityAsyncNotificationRequestResourceInnerLinksInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AvailabilityAsyncNotificationRequestResourceInnerLinksInner is not found in the empty JSON string", AvailabilityAsyncNotificationRequestResourceInnerLinksInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AvailabilityAsyncNotificationRequestResourceInnerLinksInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AvailabilityAsyncNotificationRequestResourceInnerLinksInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("topic") != null && !jsonObj.get("topic").isJsonNull()) && !jsonObj.get("topic").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `topic` to be a primitive type in the JSON string but got `%s`", jsonObj.get("topic").toString())); + } + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AvailabilityAsyncNotificationRequestResourceInnerLinksInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AvailabilityAsyncNotificationRequestResourceInnerLinksInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AvailabilityAsyncNotificationRequestResourceInnerLinksInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AvailabilityAsyncNotificationRequestResourceInnerLinksInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AvailabilityAsyncNotificationRequestResourceInnerLinksInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AvailabilityAsyncNotificationRequestResourceInnerLinksInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of AvailabilityAsyncNotificationRequestResourceInnerLinksInner + * @throws IOException if the JSON string is invalid with respect to AvailabilityAsyncNotificationRequestResourceInnerLinksInner + */ + public static AvailabilityAsyncNotificationRequestResourceInnerLinksInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AvailabilityAsyncNotificationRequestResourceInnerLinksInner.class); + } + + /** + * Convert an instance of AvailabilityAsyncNotificationRequestResourceInnerLinksInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/DealsDetailsResponse.java b/src/main/java/xiresellers/client/model/DealsDetailsResponse.java new file mode 100644 index 00000000..015386ba --- /dev/null +++ b/src/main/java/xiresellers/client/model/DealsDetailsResponse.java @@ -0,0 +1,528 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.DealsDetailsResponseProductsInner; +import xiresellers.client.model.RenewalsDetailsResponseEndUserInfoInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * DealsDetailsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class DealsDetailsResponse { + public static final String SERIALIZED_NAME_DEAL_ID = "dealId"; + @SerializedName(SERIALIZED_NAME_DEAL_ID) + private String dealId; + + public static final String SERIALIZED_NAME_VERSION = "version"; + @SerializedName(SERIALIZED_NAME_VERSION) + private String version; + + public static final String SERIALIZED_NAME_END_USER = "endUser"; + @SerializedName(SERIALIZED_NAME_END_USER) + private String endUser; + + public static final String SERIALIZED_NAME_EXTENDED_MSRP = "extendedMsrp"; + @SerializedName(SERIALIZED_NAME_EXTENDED_MSRP) + private BigDecimal extendedMsrp; + + public static final String SERIALIZED_NAME_VENDOR = "vendor"; + @SerializedName(SERIALIZED_NAME_VENDOR) + private String vendor; + + public static final String SERIALIZED_NAME_DEAL_RECEIVED_ON = "dealReceivedOn"; + @SerializedName(SERIALIZED_NAME_DEAL_RECEIVED_ON) + private LocalDate dealReceivedOn; + + public static final String SERIALIZED_NAME_DEAL_EXPIRY_DATE = "dealExpiryDate"; + @SerializedName(SERIALIZED_NAME_DEAL_EXPIRY_DATE) + private LocalDate dealExpiryDate; + + public static final String SERIALIZED_NAME_PRICE_PROTECTION_END_DATE = "priceProtectionEndDate"; + @SerializedName(SERIALIZED_NAME_PRICE_PROTECTION_END_DATE) + private LocalDate priceProtectionEndDate; + + public static final String SERIALIZED_NAME_CURRENCY_CODE = "currencyCode"; + @SerializedName(SERIALIZED_NAME_CURRENCY_CODE) + private String currencyCode; + + public static final String SERIALIZED_NAME_END_USER_INFO = "endUserInfo"; + @SerializedName(SERIALIZED_NAME_END_USER_INFO) + private List endUserInfo; + + public static final String SERIALIZED_NAME_PRODUCTS = "products"; + @SerializedName(SERIALIZED_NAME_PRODUCTS) + private List products; + + public DealsDetailsResponse() { + } + + public DealsDetailsResponse dealId(String dealId) { + this.dealId = dealId; + return this; + } + + /** + * Deal/Special bid number. + * @return dealId + **/ + @javax.annotation.Nullable + public String getDealId() { + return dealId; + } + + public void setDealId(String dealId) { + this.dealId = dealId; + } + + + public DealsDetailsResponse version(String version) { + this.version = version; + return this; + } + + /** + * Most recent version number of the deal. + * @return version + **/ + @javax.annotation.Nullable + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + + public DealsDetailsResponse endUser(String endUser) { + this.endUser = endUser; + return this; + } + + /** + * The end user/customer's name. + * @return endUser + **/ + @javax.annotation.Nullable + public String getEndUser() { + return endUser; + } + + public void setEndUser(String endUser) { + this.endUser = endUser; + } + + + public DealsDetailsResponse extendedMsrp(BigDecimal extendedMsrp) { + this.extendedMsrp = extendedMsrp; + return this; + } + + /** + * Extended MSRP - Manufacturer Suggested Retail Price X Quantity. + * @return extendedMsrp + **/ + @javax.annotation.Nullable + public BigDecimal getExtendedMsrp() { + return extendedMsrp; + } + + public void setExtendedMsrp(BigDecimal extendedMsrp) { + this.extendedMsrp = extendedMsrp; + } + + + public DealsDetailsResponse vendor(String vendor) { + this.vendor = vendor; + return this; + } + + /** + * The vendor's name. + * @return vendor + **/ + @javax.annotation.Nullable + public String getVendor() { + return vendor; + } + + public void setVendor(String vendor) { + this.vendor = vendor; + } + + + public DealsDetailsResponse dealReceivedOn(LocalDate dealReceivedOn) { + this.dealReceivedOn = dealReceivedOn; + return this; + } + + /** + * The date on which the deal starts. + * @return dealReceivedOn + **/ + @javax.annotation.Nullable + public LocalDate getDealReceivedOn() { + return dealReceivedOn; + } + + public void setDealReceivedOn(LocalDate dealReceivedOn) { + this.dealReceivedOn = dealReceivedOn; + } + + + public DealsDetailsResponse dealExpiryDate(LocalDate dealExpiryDate) { + this.dealExpiryDate = dealExpiryDate; + return this; + } + + /** + * Expiration date of the deal/Special bid. + * @return dealExpiryDate + **/ + @javax.annotation.Nullable + public LocalDate getDealExpiryDate() { + return dealExpiryDate; + } + + public void setDealExpiryDate(LocalDate dealExpiryDate) { + this.dealExpiryDate = dealExpiryDate; + } + + + public DealsDetailsResponse priceProtectionEndDate(LocalDate priceProtectionEndDate) { + this.priceProtectionEndDate = priceProtectionEndDate; + return this; + } + + /** + * The date on which the price protection will end. + * @return priceProtectionEndDate + **/ + @javax.annotation.Nullable + public LocalDate getPriceProtectionEndDate() { + return priceProtectionEndDate; + } + + public void setPriceProtectionEndDate(LocalDate priceProtectionEndDate) { + this.priceProtectionEndDate = priceProtectionEndDate; + } + + + public DealsDetailsResponse currencyCode(String currencyCode) { + this.currencyCode = currencyCode; + return this; + } + + /** + * Country specific currency code. + * @return currencyCode + **/ + @javax.annotation.Nullable + public String getCurrencyCode() { + return currencyCode; + } + + public void setCurrencyCode(String currencyCode) { + this.currencyCode = currencyCode; + } + + + public DealsDetailsResponse endUserInfo(List endUserInfo) { + this.endUserInfo = endUserInfo; + return this; + } + + public DealsDetailsResponse addEndUserInfoItem(RenewalsDetailsResponseEndUserInfoInner endUserInfoItem) { + if (this.endUserInfo == null) { + this.endUserInfo = new ArrayList<>(); + } + this.endUserInfo.add(endUserInfoItem); + return this; + } + + /** + * Get endUserInfo + * @return endUserInfo + **/ + @javax.annotation.Nullable + public List getEndUserInfo() { + return endUserInfo; + } + + public void setEndUserInfo(List endUserInfo) { + this.endUserInfo = endUserInfo; + } + + + public DealsDetailsResponse products(List products) { + this.products = products; + return this; + } + + public DealsDetailsResponse addProductsItem(DealsDetailsResponseProductsInner productsItem) { + if (this.products == null) { + this.products = new ArrayList<>(); + } + this.products.add(productsItem); + return this; + } + + /** + * Get products + * @return products + **/ + @javax.annotation.Nullable + public List getProducts() { + return products; + } + + public void setProducts(List products) { + this.products = products; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DealsDetailsResponse dealsDetailsResponse = (DealsDetailsResponse) o; + return Objects.equals(this.dealId, dealsDetailsResponse.dealId) && + Objects.equals(this.version, dealsDetailsResponse.version) && + Objects.equals(this.endUser, dealsDetailsResponse.endUser) && + Objects.equals(this.extendedMsrp, dealsDetailsResponse.extendedMsrp) && + Objects.equals(this.vendor, dealsDetailsResponse.vendor) && + Objects.equals(this.dealReceivedOn, dealsDetailsResponse.dealReceivedOn) && + Objects.equals(this.dealExpiryDate, dealsDetailsResponse.dealExpiryDate) && + Objects.equals(this.priceProtectionEndDate, dealsDetailsResponse.priceProtectionEndDate) && + Objects.equals(this.currencyCode, dealsDetailsResponse.currencyCode) && + Objects.equals(this.endUserInfo, dealsDetailsResponse.endUserInfo) && + Objects.equals(this.products, dealsDetailsResponse.products); + } + + @Override + public int hashCode() { + return Objects.hash(dealId, version, endUser, extendedMsrp, vendor, dealReceivedOn, dealExpiryDate, priceProtectionEndDate, currencyCode, endUserInfo, products); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DealsDetailsResponse {\n"); + sb.append(" dealId: ").append(toIndentedString(dealId)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" endUser: ").append(toIndentedString(endUser)).append("\n"); + sb.append(" extendedMsrp: ").append(toIndentedString(extendedMsrp)).append("\n"); + sb.append(" vendor: ").append(toIndentedString(vendor)).append("\n"); + sb.append(" dealReceivedOn: ").append(toIndentedString(dealReceivedOn)).append("\n"); + sb.append(" dealExpiryDate: ").append(toIndentedString(dealExpiryDate)).append("\n"); + sb.append(" priceProtectionEndDate: ").append(toIndentedString(priceProtectionEndDate)).append("\n"); + sb.append(" currencyCode: ").append(toIndentedString(currencyCode)).append("\n"); + sb.append(" endUserInfo: ").append(toIndentedString(endUserInfo)).append("\n"); + sb.append(" products: ").append(toIndentedString(products)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("dealId"); + openapiFields.add("version"); + openapiFields.add("endUser"); + openapiFields.add("extendedMsrp"); + openapiFields.add("vendor"); + openapiFields.add("dealReceivedOn"); + openapiFields.add("dealExpiryDate"); + openapiFields.add("priceProtectionEndDate"); + openapiFields.add("currencyCode"); + openapiFields.add("endUserInfo"); + openapiFields.add("products"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DealsDetailsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DealsDetailsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DealsDetailsResponse is not found in the empty JSON string", DealsDetailsResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DealsDetailsResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DealsDetailsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("dealId") != null && !jsonObj.get("dealId").isJsonNull()) && !jsonObj.get("dealId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `dealId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dealId").toString())); + } + if ((jsonObj.get("version") != null && !jsonObj.get("version").isJsonNull()) && !jsonObj.get("version").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("version").toString())); + } + if ((jsonObj.get("endUser") != null && !jsonObj.get("endUser").isJsonNull()) && !jsonObj.get("endUser").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endUser` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endUser").toString())); + } + if ((jsonObj.get("vendor") != null && !jsonObj.get("vendor").isJsonNull()) && !jsonObj.get("vendor").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendor").toString())); + } + if ((jsonObj.get("currencyCode") != null && !jsonObj.get("currencyCode").isJsonNull()) && !jsonObj.get("currencyCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `currencyCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currencyCode").toString())); + } + if (jsonObj.get("endUserInfo") != null && !jsonObj.get("endUserInfo").isJsonNull()) { + JsonArray jsonArrayendUserInfo = jsonObj.getAsJsonArray("endUserInfo"); + if (jsonArrayendUserInfo != null) { + // ensure the json data is an array + if (!jsonObj.get("endUserInfo").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `endUserInfo` to be an array in the JSON string but got `%s`", jsonObj.get("endUserInfo").toString())); + } + + // validate the optional field `endUserInfo` (array) + for (int i = 0; i < jsonArrayendUserInfo.size(); i++) { + RenewalsDetailsResponseEndUserInfoInner.validateJsonElement(jsonArrayendUserInfo.get(i)); + }; + } + } + if (jsonObj.get("products") != null && !jsonObj.get("products").isJsonNull()) { + JsonArray jsonArrayproducts = jsonObj.getAsJsonArray("products"); + if (jsonArrayproducts != null) { + // ensure the json data is an array + if (!jsonObj.get("products").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `products` to be an array in the JSON string but got `%s`", jsonObj.get("products").toString())); + } + + // validate the optional field `products` (array) + for (int i = 0; i < jsonArrayproducts.size(); i++) { + DealsDetailsResponseProductsInner.validateJsonElement(jsonArrayproducts.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DealsDetailsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DealsDetailsResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DealsDetailsResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DealsDetailsResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DealsDetailsResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of DealsDetailsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of DealsDetailsResponse + * @throws IOException if the JSON string is invalid with respect to DealsDetailsResponse + */ + public static DealsDetailsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DealsDetailsResponse.class); + } + + /** + * Convert an instance of DealsDetailsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/DealsDetailsResponseProductsInner.java b/src/main/java/xiresellers/client/model/DealsDetailsResponseProductsInner.java new file mode 100644 index 00000000..fbfbce9a --- /dev/null +++ b/src/main/java/xiresellers/client/model/DealsDetailsResponseProductsInner.java @@ -0,0 +1,561 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * DealsDetailsResponseProductsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class DealsDetailsResponseProductsInner { + public static final String SERIALIZED_NAME_INGRAM_PART_NUMBER = "ingramPartNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PART_NUMBER) + private String ingramPartNumber; + + public static final String SERIALIZED_NAME_VENDOR_PART_NUMBER = "vendorPartNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_PART_NUMBER) + private String vendorPartNumber; + + public static final String SERIALIZED_NAME_UPC = "upc"; + @SerializedName(SERIALIZED_NAME_UPC) + private String upc; + + public static final String SERIALIZED_NAME_PRODUCT_DESCRIPTION = "productDescription"; + @SerializedName(SERIALIZED_NAME_PRODUCT_DESCRIPTION) + private String productDescription; + + public static final String SERIALIZED_NAME_MSRP = "msrp"; + @SerializedName(SERIALIZED_NAME_MSRP) + private BigDecimal msrp; + + public static final String SERIALIZED_NAME_EXTENDED_M_S_R_P = "extendedMSRP"; + @SerializedName(SERIALIZED_NAME_EXTENDED_M_S_R_P) + private BigDecimal extendedMSRP; + + public static final String SERIALIZED_NAME_STANDARD_PRICE = "standardPrice"; + @SerializedName(SERIALIZED_NAME_STANDARD_PRICE) + private BigDecimal standardPrice; + + public static final String SERIALIZED_NAME_APPROVED_QUANTITY = "approvedQuantity"; + @SerializedName(SERIALIZED_NAME_APPROVED_QUANTITY) + private Integer approvedQuantity; + + public static final String SERIALIZED_NAME_REMAINING_QUANTITY = "remainingQuantity"; + @SerializedName(SERIALIZED_NAME_REMAINING_QUANTITY) + private Integer remainingQuantity; + + public static final String SERIALIZED_NAME_COMMENTS = "comments"; + @SerializedName(SERIALIZED_NAME_COMMENTS) + private String comments; + + public static final String SERIALIZED_NAME_SPECIAL_CONDITIONS = "specialConditions"; + @SerializedName(SERIALIZED_NAME_SPECIAL_CONDITIONS) + private String specialConditions; + + public static final String SERIALIZED_NAME_START_DATE = "startDate"; + @SerializedName(SERIALIZED_NAME_START_DATE) + private LocalDate startDate; + + public static final String SERIALIZED_NAME_EXPIRATION_DATE = "expirationDate"; + @SerializedName(SERIALIZED_NAME_EXPIRATION_DATE) + private LocalDate expirationDate; + + public static final String SERIALIZED_NAME_DAYS_REMAINING = "daysRemaining"; + @SerializedName(SERIALIZED_NAME_DAYS_REMAINING) + private Integer daysRemaining; + + public DealsDetailsResponseProductsInner() { + } + + public DealsDetailsResponseProductsInner ingramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + return this; + } + + /** + * Unique Ingram part number. + * @return ingramPartNumber + **/ + @javax.annotation.Nullable + public String getIngramPartNumber() { + return ingramPartNumber; + } + + public void setIngramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + } + + + public DealsDetailsResponseProductsInner vendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + return this; + } + + /** + * Vendor Part number for the product. + * @return vendorPartNumber + **/ + @javax.annotation.Nullable + public String getVendorPartNumber() { + return vendorPartNumber; + } + + public void setVendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + } + + + public DealsDetailsResponseProductsInner upc(String upc) { + this.upc = upc; + return this; + } + + /** + * The UPC code for the product. Consists of 12 numeric digits that are uniquely assigned to each trade item. + * @return upc + **/ + @javax.annotation.Nullable + public String getUpc() { + return upc; + } + + public void setUpc(String upc) { + this.upc = upc; + } + + + public DealsDetailsResponseProductsInner productDescription(String productDescription) { + this.productDescription = productDescription; + return this; + } + + /** + * Description of the product. + * @return productDescription + **/ + @javax.annotation.Nullable + public String getProductDescription() { + return productDescription; + } + + public void setProductDescription(String productDescription) { + this.productDescription = productDescription; + } + + + public DealsDetailsResponseProductsInner msrp(BigDecimal msrp) { + this.msrp = msrp; + return this; + } + + /** + * Manufacturer Suggested Retail Price. + * @return msrp + **/ + @javax.annotation.Nullable + public BigDecimal getMsrp() { + return msrp; + } + + public void setMsrp(BigDecimal msrp) { + this.msrp = msrp; + } + + + public DealsDetailsResponseProductsInner extendedMSRP(BigDecimal extendedMSRP) { + this.extendedMSRP = extendedMSRP; + return this; + } + + /** + * Extended MSRP - Manufacturer Suggested Retail Price X Quantity. + * @return extendedMSRP + **/ + @javax.annotation.Nullable + public BigDecimal getExtendedMSRP() { + return extendedMSRP; + } + + public void setExtendedMSRP(BigDecimal extendedMSRP) { + this.extendedMSRP = extendedMSRP; + } + + + public DealsDetailsResponseProductsInner standardPrice(BigDecimal standardPrice) { + this.standardPrice = standardPrice; + return this; + } + + /** + * Standard price of the line item. + * @return standardPrice + **/ + @javax.annotation.Nullable + public BigDecimal getStandardPrice() { + return standardPrice; + } + + public void setStandardPrice(BigDecimal standardPrice) { + this.standardPrice = standardPrice; + } + + + public DealsDetailsResponseProductsInner approvedQuantity(Integer approvedQuantity) { + this.approvedQuantity = approvedQuantity; + return this; + } + + /** + * Total quantity approved for the deal. + * @return approvedQuantity + **/ + @javax.annotation.Nullable + public Integer getApprovedQuantity() { + return approvedQuantity; + } + + public void setApprovedQuantity(Integer approvedQuantity) { + this.approvedQuantity = approvedQuantity; + } + + + public DealsDetailsResponseProductsInner remainingQuantity(Integer remainingQuantity) { + this.remainingQuantity = remainingQuantity; + return this; + } + + /** + * The quantity remaining as part of the deal for the customer to order. + * @return remainingQuantity + **/ + @javax.annotation.Nullable + public Integer getRemainingQuantity() { + return remainingQuantity; + } + + public void setRemainingQuantity(Integer remainingQuantity) { + this.remainingQuantity = remainingQuantity; + } + + + public DealsDetailsResponseProductsInner comments(String comments) { + this.comments = comments; + return this; + } + + /** + * Comments of the deal. + * @return comments + **/ + @javax.annotation.Nullable + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + + public DealsDetailsResponseProductsInner specialConditions(String specialConditions) { + this.specialConditions = specialConditions; + return this; + } + + /** + * Special conditions of the deal. + * @return specialConditions + **/ + @javax.annotation.Nullable + public String getSpecialConditions() { + return specialConditions; + } + + public void setSpecialConditions(String specialConditions) { + this.specialConditions = specialConditions; + } + + + public DealsDetailsResponseProductsInner startDate(LocalDate startDate) { + this.startDate = startDate; + return this; + } + + /** + * Start Date. + * @return startDate + **/ + @javax.annotation.Nullable + public LocalDate getStartDate() { + return startDate; + } + + public void setStartDate(LocalDate startDate) { + this.startDate = startDate; + } + + + public DealsDetailsResponseProductsInner expirationDate(LocalDate expirationDate) { + this.expirationDate = expirationDate; + return this; + } + + /** + * Expiration date. + * @return expirationDate + **/ + @javax.annotation.Nullable + public LocalDate getExpirationDate() { + return expirationDate; + } + + public void setExpirationDate(LocalDate expirationDate) { + this.expirationDate = expirationDate; + } + + + public DealsDetailsResponseProductsInner daysRemaining(Integer daysRemaining) { + this.daysRemaining = daysRemaining; + return this; + } + + /** + * Number of days remaining before the deal expires. + * @return daysRemaining + **/ + @javax.annotation.Nullable + public Integer getDaysRemaining() { + return daysRemaining; + } + + public void setDaysRemaining(Integer daysRemaining) { + this.daysRemaining = daysRemaining; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DealsDetailsResponseProductsInner dealsDetailsResponseProductsInner = (DealsDetailsResponseProductsInner) o; + return Objects.equals(this.ingramPartNumber, dealsDetailsResponseProductsInner.ingramPartNumber) && + Objects.equals(this.vendorPartNumber, dealsDetailsResponseProductsInner.vendorPartNumber) && + Objects.equals(this.upc, dealsDetailsResponseProductsInner.upc) && + Objects.equals(this.productDescription, dealsDetailsResponseProductsInner.productDescription) && + Objects.equals(this.msrp, dealsDetailsResponseProductsInner.msrp) && + Objects.equals(this.extendedMSRP, dealsDetailsResponseProductsInner.extendedMSRP) && + Objects.equals(this.standardPrice, dealsDetailsResponseProductsInner.standardPrice) && + Objects.equals(this.approvedQuantity, dealsDetailsResponseProductsInner.approvedQuantity) && + Objects.equals(this.remainingQuantity, dealsDetailsResponseProductsInner.remainingQuantity) && + Objects.equals(this.comments, dealsDetailsResponseProductsInner.comments) && + Objects.equals(this.specialConditions, dealsDetailsResponseProductsInner.specialConditions) && + Objects.equals(this.startDate, dealsDetailsResponseProductsInner.startDate) && + Objects.equals(this.expirationDate, dealsDetailsResponseProductsInner.expirationDate) && + Objects.equals(this.daysRemaining, dealsDetailsResponseProductsInner.daysRemaining); + } + + @Override + public int hashCode() { + return Objects.hash(ingramPartNumber, vendorPartNumber, upc, productDescription, msrp, extendedMSRP, standardPrice, approvedQuantity, remainingQuantity, comments, specialConditions, startDate, expirationDate, daysRemaining); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DealsDetailsResponseProductsInner {\n"); + sb.append(" ingramPartNumber: ").append(toIndentedString(ingramPartNumber)).append("\n"); + sb.append(" vendorPartNumber: ").append(toIndentedString(vendorPartNumber)).append("\n"); + sb.append(" upc: ").append(toIndentedString(upc)).append("\n"); + sb.append(" productDescription: ").append(toIndentedString(productDescription)).append("\n"); + sb.append(" msrp: ").append(toIndentedString(msrp)).append("\n"); + sb.append(" extendedMSRP: ").append(toIndentedString(extendedMSRP)).append("\n"); + sb.append(" standardPrice: ").append(toIndentedString(standardPrice)).append("\n"); + sb.append(" approvedQuantity: ").append(toIndentedString(approvedQuantity)).append("\n"); + sb.append(" remainingQuantity: ").append(toIndentedString(remainingQuantity)).append("\n"); + sb.append(" comments: ").append(toIndentedString(comments)).append("\n"); + sb.append(" specialConditions: ").append(toIndentedString(specialConditions)).append("\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); + sb.append(" daysRemaining: ").append(toIndentedString(daysRemaining)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("ingramPartNumber"); + openapiFields.add("vendorPartNumber"); + openapiFields.add("upc"); + openapiFields.add("productDescription"); + openapiFields.add("msrp"); + openapiFields.add("extendedMSRP"); + openapiFields.add("standardPrice"); + openapiFields.add("approvedQuantity"); + openapiFields.add("remainingQuantity"); + openapiFields.add("comments"); + openapiFields.add("specialConditions"); + openapiFields.add("startDate"); + openapiFields.add("expirationDate"); + openapiFields.add("daysRemaining"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DealsDetailsResponseProductsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DealsDetailsResponseProductsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DealsDetailsResponseProductsInner is not found in the empty JSON string", DealsDetailsResponseProductsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DealsDetailsResponseProductsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DealsDetailsResponseProductsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("ingramPartNumber") != null && !jsonObj.get("ingramPartNumber").isJsonNull()) && !jsonObj.get("ingramPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPartNumber").toString())); + } + if ((jsonObj.get("vendorPartNumber") != null && !jsonObj.get("vendorPartNumber").isJsonNull()) && !jsonObj.get("vendorPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorPartNumber").toString())); + } + if ((jsonObj.get("upc") != null && !jsonObj.get("upc").isJsonNull()) && !jsonObj.get("upc").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `upc` to be a primitive type in the JSON string but got `%s`", jsonObj.get("upc").toString())); + } + if ((jsonObj.get("productDescription") != null && !jsonObj.get("productDescription").isJsonNull()) && !jsonObj.get("productDescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `productDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productDescription").toString())); + } + if ((jsonObj.get("comments") != null && !jsonObj.get("comments").isJsonNull()) && !jsonObj.get("comments").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `comments` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comments").toString())); + } + if ((jsonObj.get("specialConditions") != null && !jsonObj.get("specialConditions").isJsonNull()) && !jsonObj.get("specialConditions").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `specialConditions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("specialConditions").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DealsDetailsResponseProductsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DealsDetailsResponseProductsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DealsDetailsResponseProductsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DealsDetailsResponseProductsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DealsDetailsResponseProductsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of DealsDetailsResponseProductsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of DealsDetailsResponseProductsInner + * @throws IOException if the JSON string is invalid with respect to DealsDetailsResponseProductsInner + */ + public static DealsDetailsResponseProductsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DealsDetailsResponseProductsInner.class); + } + + /** + * Convert an instance of DealsDetailsResponseProductsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/DealsSearchResponse.java b/src/main/java/xiresellers/client/model/DealsSearchResponse.java new file mode 100644 index 00000000..9a874009 --- /dev/null +++ b/src/main/java/xiresellers/client/model/DealsSearchResponse.java @@ -0,0 +1,364 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.DealsSearchResponseDealsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * DealsSearchResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class DealsSearchResponse { + public static final String SERIALIZED_NAME_RECORDS_FOUND = "recordsFound"; + @SerializedName(SERIALIZED_NAME_RECORDS_FOUND) + private Integer recordsFound; + + public static final String SERIALIZED_NAME_PAGE_SIZE = "pageSize"; + @SerializedName(SERIALIZED_NAME_PAGE_SIZE) + private Integer pageSize; + + public static final String SERIALIZED_NAME_PAGE_NUMBER = "pageNumber"; + @SerializedName(SERIALIZED_NAME_PAGE_NUMBER) + private Integer pageNumber; + + public static final String SERIALIZED_NAME_DEALS = "deals"; + @SerializedName(SERIALIZED_NAME_DEALS) + private List deals; + + public static final String SERIALIZED_NAME_NEXT_PAGE = "nextPage"; + @SerializedName(SERIALIZED_NAME_NEXT_PAGE) + private String nextPage; + + public static final String SERIALIZED_NAME_PREVIOUS_PAGE = "previousPage"; + @SerializedName(SERIALIZED_NAME_PREVIOUS_PAGE) + private String previousPage; + + public DealsSearchResponse() { + } + + public DealsSearchResponse recordsFound(Integer recordsFound) { + this.recordsFound = recordsFound; + return this; + } + + /** + * Number of records found. + * @return recordsFound + **/ + @javax.annotation.Nullable + public Integer getRecordsFound() { + return recordsFound; + } + + public void setRecordsFound(Integer recordsFound) { + this.recordsFound = recordsFound; + } + + + public DealsSearchResponse pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Number of records in a page. + * @return pageSize + **/ + @javax.annotation.Nullable + public Integer getPageSize() { + return pageSize; + } + + public void setPageSize(Integer pageSize) { + this.pageSize = pageSize; + } + + + public DealsSearchResponse pageNumber(Integer pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Number of page. + * @return pageNumber + **/ + @javax.annotation.Nullable + public Integer getPageNumber() { + return pageNumber; + } + + public void setPageNumber(Integer pageNumber) { + this.pageNumber = pageNumber; + } + + + public DealsSearchResponse deals(List deals) { + this.deals = deals; + return this; + } + + public DealsSearchResponse addDealsItem(DealsSearchResponseDealsInner dealsItem) { + if (this.deals == null) { + this.deals = new ArrayList<>(); + } + this.deals.add(dealsItem); + return this; + } + + /** + * Get deals + * @return deals + **/ + @javax.annotation.Nullable + public List getDeals() { + return deals; + } + + public void setDeals(List deals) { + this.deals = deals; + } + + + public DealsSearchResponse nextPage(String nextPage) { + this.nextPage = nextPage; + return this; + } + + /** + * URL for the next page. + * @return nextPage + **/ + @javax.annotation.Nullable + public String getNextPage() { + return nextPage; + } + + public void setNextPage(String nextPage) { + this.nextPage = nextPage; + } + + + public DealsSearchResponse previousPage(String previousPage) { + this.previousPage = previousPage; + return this; + } + + /** + * URL for the previous page. + * @return previousPage + **/ + @javax.annotation.Nullable + public String getPreviousPage() { + return previousPage; + } + + public void setPreviousPage(String previousPage) { + this.previousPage = previousPage; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DealsSearchResponse dealsSearchResponse = (DealsSearchResponse) o; + return Objects.equals(this.recordsFound, dealsSearchResponse.recordsFound) && + Objects.equals(this.pageSize, dealsSearchResponse.pageSize) && + Objects.equals(this.pageNumber, dealsSearchResponse.pageNumber) && + Objects.equals(this.deals, dealsSearchResponse.deals) && + Objects.equals(this.nextPage, dealsSearchResponse.nextPage) && + Objects.equals(this.previousPage, dealsSearchResponse.previousPage); + } + + @Override + public int hashCode() { + return Objects.hash(recordsFound, pageSize, pageNumber, deals, nextPage, previousPage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DealsSearchResponse {\n"); + sb.append(" recordsFound: ").append(toIndentedString(recordsFound)).append("\n"); + sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); + sb.append(" pageNumber: ").append(toIndentedString(pageNumber)).append("\n"); + sb.append(" deals: ").append(toIndentedString(deals)).append("\n"); + sb.append(" nextPage: ").append(toIndentedString(nextPage)).append("\n"); + sb.append(" previousPage: ").append(toIndentedString(previousPage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("recordsFound"); + openapiFields.add("pageSize"); + openapiFields.add("pageNumber"); + openapiFields.add("deals"); + openapiFields.add("nextPage"); + openapiFields.add("previousPage"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DealsSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DealsSearchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DealsSearchResponse is not found in the empty JSON string", DealsSearchResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DealsSearchResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DealsSearchResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("deals") != null && !jsonObj.get("deals").isJsonNull()) { + JsonArray jsonArraydeals = jsonObj.getAsJsonArray("deals"); + if (jsonArraydeals != null) { + // ensure the json data is an array + if (!jsonObj.get("deals").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `deals` to be an array in the JSON string but got `%s`", jsonObj.get("deals").toString())); + } + + // validate the optional field `deals` (array) + for (int i = 0; i < jsonArraydeals.size(); i++) { + DealsSearchResponseDealsInner.validateJsonElement(jsonArraydeals.get(i)); + }; + } + } + if ((jsonObj.get("nextPage") != null && !jsonObj.get("nextPage").isJsonNull()) && !jsonObj.get("nextPage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nextPage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextPage").toString())); + } + if ((jsonObj.get("previousPage") != null && !jsonObj.get("previousPage").isJsonNull()) && !jsonObj.get("previousPage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `previousPage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("previousPage").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DealsSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DealsSearchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DealsSearchResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DealsSearchResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DealsSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of DealsSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of DealsSearchResponse + * @throws IOException if the JSON string is invalid with respect to DealsSearchResponse + */ + public static DealsSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DealsSearchResponse.class); + } + + /** + * Convert an instance of DealsSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/DealsSearchResponseDealsInner.java b/src/main/java/xiresellers/client/model/DealsSearchResponseDealsInner.java new file mode 100644 index 00000000..1f439c4c --- /dev/null +++ b/src/main/java/xiresellers/client/model/DealsSearchResponseDealsInner.java @@ -0,0 +1,371 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.RenewalsSearchResponseRenewalsInnerLinksInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * DealsSearchResponseDealsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class DealsSearchResponseDealsInner { + public static final String SERIALIZED_NAME_DEAL_ID = "dealId"; + @SerializedName(SERIALIZED_NAME_DEAL_ID) + private String dealId; + + public static final String SERIALIZED_NAME_VERSION = "version"; + @SerializedName(SERIALIZED_NAME_VERSION) + private String version; + + public static final String SERIALIZED_NAME_END_USER = "endUser"; + @SerializedName(SERIALIZED_NAME_END_USER) + private String endUser; + + public static final String SERIALIZED_NAME_VENDOR = "vendor"; + @SerializedName(SERIALIZED_NAME_VENDOR) + private String vendor; + + public static final String SERIALIZED_NAME_DEAL_EXPIRY_DATE = "dealExpiryDate"; + @SerializedName(SERIALIZED_NAME_DEAL_EXPIRY_DATE) + private LocalDate dealExpiryDate; + + public static final String SERIALIZED_NAME_LINKS = "links"; + @SerializedName(SERIALIZED_NAME_LINKS) + private List links; + + public DealsSearchResponseDealsInner() { + } + + public DealsSearchResponseDealsInner dealId(String dealId) { + this.dealId = dealId; + return this; + } + + /** + * Deal/Special bid number. + * @return dealId + **/ + @javax.annotation.Nullable + public String getDealId() { + return dealId; + } + + public void setDealId(String dealId) { + this.dealId = dealId; + } + + + public DealsSearchResponseDealsInner version(String version) { + this.version = version; + return this; + } + + /** + * Most recent version number of the deal. + * @return version + **/ + @javax.annotation.Nullable + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + + public DealsSearchResponseDealsInner endUser(String endUser) { + this.endUser = endUser; + return this; + } + + /** + * The end user/customer's name. + * @return endUser + **/ + @javax.annotation.Nullable + public String getEndUser() { + return endUser; + } + + public void setEndUser(String endUser) { + this.endUser = endUser; + } + + + public DealsSearchResponseDealsInner vendor(String vendor) { + this.vendor = vendor; + return this; + } + + /** + * The vendor's name. + * @return vendor + **/ + @javax.annotation.Nullable + public String getVendor() { + return vendor; + } + + public void setVendor(String vendor) { + this.vendor = vendor; + } + + + public DealsSearchResponseDealsInner dealExpiryDate(LocalDate dealExpiryDate) { + this.dealExpiryDate = dealExpiryDate; + return this; + } + + /** + * Expiration date of the deal/Special bid. + * @return dealExpiryDate + **/ + @javax.annotation.Nullable + public LocalDate getDealExpiryDate() { + return dealExpiryDate; + } + + public void setDealExpiryDate(LocalDate dealExpiryDate) { + this.dealExpiryDate = dealExpiryDate; + } + + + public DealsSearchResponseDealsInner links(List links) { + this.links = links; + return this; + } + + public DealsSearchResponseDealsInner addLinksItem(RenewalsSearchResponseRenewalsInnerLinksInner linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * Get links + * @return links + **/ + @javax.annotation.Nullable + public List getLinks() { + return links; + } + + public void setLinks(List links) { + this.links = links; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DealsSearchResponseDealsInner dealsSearchResponseDealsInner = (DealsSearchResponseDealsInner) o; + return Objects.equals(this.dealId, dealsSearchResponseDealsInner.dealId) && + Objects.equals(this.version, dealsSearchResponseDealsInner.version) && + Objects.equals(this.endUser, dealsSearchResponseDealsInner.endUser) && + Objects.equals(this.vendor, dealsSearchResponseDealsInner.vendor) && + Objects.equals(this.dealExpiryDate, dealsSearchResponseDealsInner.dealExpiryDate) && + Objects.equals(this.links, dealsSearchResponseDealsInner.links); + } + + @Override + public int hashCode() { + return Objects.hash(dealId, version, endUser, vendor, dealExpiryDate, links); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DealsSearchResponseDealsInner {\n"); + sb.append(" dealId: ").append(toIndentedString(dealId)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" endUser: ").append(toIndentedString(endUser)).append("\n"); + sb.append(" vendor: ").append(toIndentedString(vendor)).append("\n"); + sb.append(" dealExpiryDate: ").append(toIndentedString(dealExpiryDate)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("dealId"); + openapiFields.add("version"); + openapiFields.add("endUser"); + openapiFields.add("vendor"); + openapiFields.add("dealExpiryDate"); + openapiFields.add("links"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DealsSearchResponseDealsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DealsSearchResponseDealsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DealsSearchResponseDealsInner is not found in the empty JSON string", DealsSearchResponseDealsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DealsSearchResponseDealsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DealsSearchResponseDealsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("dealId") != null && !jsonObj.get("dealId").isJsonNull()) && !jsonObj.get("dealId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `dealId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dealId").toString())); + } + if ((jsonObj.get("version") != null && !jsonObj.get("version").isJsonNull()) && !jsonObj.get("version").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("version").toString())); + } + if ((jsonObj.get("endUser") != null && !jsonObj.get("endUser").isJsonNull()) && !jsonObj.get("endUser").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endUser` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endUser").toString())); + } + if ((jsonObj.get("vendor") != null && !jsonObj.get("vendor").isJsonNull()) && !jsonObj.get("vendor").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendor").toString())); + } + if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull()) { + JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); + if (jsonArraylinks != null) { + // ensure the json data is an array + if (!jsonObj.get("links").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + } + + // validate the optional field `links` (array) + for (int i = 0; i < jsonArraylinks.size(); i++) { + RenewalsSearchResponseRenewalsInnerLinksInner.validateJsonElement(jsonArraylinks.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DealsSearchResponseDealsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DealsSearchResponseDealsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DealsSearchResponseDealsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DealsSearchResponseDealsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DealsSearchResponseDealsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of DealsSearchResponseDealsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of DealsSearchResponseDealsInner + * @throws IOException if the JSON string is invalid with respect to DealsSearchResponseDealsInner + */ + public static DealsSearchResponseDealsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DealsSearchResponseDealsInner.class); + } + + /** + * Convert an instance of DealsSearchResponseDealsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/Error.java b/src/main/java/xiresellers/client/model/Error.java new file mode 100644 index 00000000..370b4ff4 --- /dev/null +++ b/src/main/java/xiresellers/client/model/Error.java @@ -0,0 +1,327 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import xiresellers.client.model.Fields; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Error + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class Error { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public static final String SERIALIZED_NAME_FIELDS = "fields"; + @SerializedName(SERIALIZED_NAME_FIELDS) + private List fields; + + public Error() { + } + + public Error id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public Error type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + + public Error message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + **/ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + public Error fields(List fields) { + this.fields = fields; + return this; + } + + public Error addFieldsItem(Fields fieldsItem) { + if (this.fields == null) { + this.fields = new ArrayList<>(); + } + this.fields.add(fieldsItem); + return this; + } + + /** + * Get fields + * @return fields + **/ + @javax.annotation.Nullable + public List getFields() { + return fields; + } + + public void setFields(List fields) { + this.fields = fields; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Error error = (Error) o; + return Objects.equals(this.id, error.id) && + Objects.equals(this.type, error.type) && + Objects.equals(this.message, error.message) && + Objects.equals(this.fields, error.fields); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, message, fields); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Error {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" fields: ").append(toIndentedString(fields)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("type"); + openapiFields.add("message"); + openapiFields.add("fields"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Error + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Error.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Error is not found in the empty JSON string", Error.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Error.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Error` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + if (jsonObj.get("fields") != null && !jsonObj.get("fields").isJsonNull()) { + JsonArray jsonArrayfields = jsonObj.getAsJsonArray("fields"); + if (jsonArrayfields != null) { + // ensure the json data is an array + if (!jsonObj.get("fields").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `fields` to be an array in the JSON string but got `%s`", jsonObj.get("fields").toString())); + } + + // validate the optional field `fields` (array) + for (int i = 0; i < jsonArrayfields.size(); i++) { + Fields.validateJsonElement(jsonArrayfields.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Error.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Error' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Error.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Error value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Error read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Error given an JSON string + * + * @param jsonString JSON string + * @return An instance of Error + * @throws IOException if the JSON string is invalid with respect to Error + */ + public static Error fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Error.class); + } + + /** + * Convert an instance of Error to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ErrorResponse.java b/src/main/java/xiresellers/client/model/ErrorResponse.java new file mode 100644 index 00000000..6893368a --- /dev/null +++ b/src/main/java/xiresellers/client/model/ErrorResponse.java @@ -0,0 +1,228 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ErrorResponseErrorsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ErrorResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ErrorResponse { + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors; + + public ErrorResponse() { + } + + public ErrorResponse errors(List errors) { + this.errors = errors; + return this; + } + + public ErrorResponse addErrorsItem(ErrorResponseErrorsInner errorsItem) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors.add(errorsItem); + return this; + } + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + public List getErrors() { + return errors; + } + + public void setErrors(List errors) { + this.errors = errors; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ErrorResponse errorResponse = (ErrorResponse) o; + return Objects.equals(this.errors, errorResponse.errors); + } + + @Override + public int hashCode() { + return Objects.hash(errors); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ErrorResponse {\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ErrorResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ErrorResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ErrorResponse is not found in the empty JSON string", ErrorResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ErrorResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ErrorResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + ErrorResponseErrorsInner.validateJsonElement(jsonArrayerrors.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ErrorResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ErrorResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ErrorResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ErrorResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ErrorResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ErrorResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ErrorResponse + * @throws IOException if the JSON string is invalid with respect to ErrorResponse + */ + public static ErrorResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ErrorResponse.class); + } + + /** + * Convert an instance of ErrorResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ErrorResponseDTO.java b/src/main/java/xiresellers/client/model/ErrorResponseDTO.java new file mode 100644 index 00000000..7dda6be7 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ErrorResponseDTO.java @@ -0,0 +1,240 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import xiresellers.client.model.Error; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ErrorResponseDTO + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ErrorResponseDTO { + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors; + + public ErrorResponseDTO() { + } + + public ErrorResponseDTO errors(List errors) { + this.errors = errors; + return this; + } + + public ErrorResponseDTO addErrorsItem(Error errorsItem) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors.add(errorsItem); + return this; + } + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + public List getErrors() { + return errors; + } + + public void setErrors(List errors) { + this.errors = errors; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ErrorResponseDTO errorResponseDTO = (ErrorResponseDTO) o; + return Objects.equals(this.errors, errorResponseDTO.errors); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(errors); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ErrorResponseDTO {\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ErrorResponseDTO + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ErrorResponseDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ErrorResponseDTO is not found in the empty JSON string", ErrorResponseDTO.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ErrorResponseDTO.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ErrorResponseDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + Error.validateJsonElement(jsonArrayerrors.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ErrorResponseDTO.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ErrorResponseDTO' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ErrorResponseDTO.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ErrorResponseDTO value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ErrorResponseDTO read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ErrorResponseDTO given an JSON string + * + * @param jsonString JSON string + * @return An instance of ErrorResponseDTO + * @throws IOException if the JSON string is invalid with respect to ErrorResponseDTO + */ + public static ErrorResponseDTO fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ErrorResponseDTO.class); + } + + /** + * Convert an instance of ErrorResponseDTO to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ErrorResponseErrorsInner.java b/src/main/java/xiresellers/client/model/ErrorResponseErrorsInner.java new file mode 100644 index 00000000..b9c9b902 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ErrorResponseErrorsInner.java @@ -0,0 +1,315 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ErrorResponseErrorsInnerFieldsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ErrorResponseErrorsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ErrorResponseErrorsInner { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public static final String SERIALIZED_NAME_FIELDS = "fields"; + @SerializedName(SERIALIZED_NAME_FIELDS) + private List fields; + + public ErrorResponseErrorsInner() { + } + + public ErrorResponseErrorsInner id(String id) { + this.id = id; + return this; + } + + /** + * Unique Id to identify error. + * @return id + **/ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public ErrorResponseErrorsInner type(String type) { + this.type = type; + return this; + } + + /** + * Describes the type of the error. + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + + public ErrorResponseErrorsInner message(String message) { + this.message = message; + return this; + } + + /** + * Describes the error message. + * @return message + **/ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + public ErrorResponseErrorsInner fields(List fields) { + this.fields = fields; + return this; + } + + public ErrorResponseErrorsInner addFieldsItem(ErrorResponseErrorsInnerFieldsInner fieldsItem) { + if (this.fields == null) { + this.fields = new ArrayList<>(); + } + this.fields.add(fieldsItem); + return this; + } + + /** + * Get fields + * @return fields + **/ + @javax.annotation.Nullable + public List getFields() { + return fields; + } + + public void setFields(List fields) { + this.fields = fields; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ErrorResponseErrorsInner errorResponseErrorsInner = (ErrorResponseErrorsInner) o; + return Objects.equals(this.id, errorResponseErrorsInner.id) && + Objects.equals(this.type, errorResponseErrorsInner.type) && + Objects.equals(this.message, errorResponseErrorsInner.message) && + Objects.equals(this.fields, errorResponseErrorsInner.fields); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, message, fields); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ErrorResponseErrorsInner {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" fields: ").append(toIndentedString(fields)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("type"); + openapiFields.add("message"); + openapiFields.add("fields"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ErrorResponseErrorsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ErrorResponseErrorsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ErrorResponseErrorsInner is not found in the empty JSON string", ErrorResponseErrorsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ErrorResponseErrorsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ErrorResponseErrorsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + if (jsonObj.get("fields") != null && !jsonObj.get("fields").isJsonNull()) { + JsonArray jsonArrayfields = jsonObj.getAsJsonArray("fields"); + if (jsonArrayfields != null) { + // ensure the json data is an array + if (!jsonObj.get("fields").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `fields` to be an array in the JSON string but got `%s`", jsonObj.get("fields").toString())); + } + + // validate the optional field `fields` (array) + for (int i = 0; i < jsonArrayfields.size(); i++) { + ErrorResponseErrorsInnerFieldsInner.validateJsonElement(jsonArrayfields.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ErrorResponseErrorsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ErrorResponseErrorsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ErrorResponseErrorsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ErrorResponseErrorsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ErrorResponseErrorsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ErrorResponseErrorsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ErrorResponseErrorsInner + * @throws IOException if the JSON string is invalid with respect to ErrorResponseErrorsInner + */ + public static ErrorResponseErrorsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ErrorResponseErrorsInner.class); + } + + /** + * Convert an instance of ErrorResponseErrorsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ErrorResponseErrorsInnerFieldsInner.java b/src/main/java/xiresellers/client/model/ErrorResponseErrorsInnerFieldsInner.java new file mode 100644 index 00000000..f6ca79fb --- /dev/null +++ b/src/main/java/xiresellers/client/model/ErrorResponseErrorsInnerFieldsInner.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ErrorResponseErrorsInnerFieldsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ErrorResponseErrorsInnerFieldsInner { + public static final String SERIALIZED_NAME_FIELD = "field"; + @SerializedName(SERIALIZED_NAME_FIELD) + private String field; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private String value; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public ErrorResponseErrorsInnerFieldsInner() { + } + + public ErrorResponseErrorsInnerFieldsInner field(String field) { + this.field = field; + return this; + } + + /** + * Contains the name of the field. + * @return field + **/ + @javax.annotation.Nullable + public String getField() { + return field; + } + + public void setField(String field) { + this.field = field; + } + + + public ErrorResponseErrorsInnerFieldsInner value(String value) { + this.value = value; + return this; + } + + /** + * Value sent in the input for the specific field. + * @return value + **/ + @javax.annotation.Nullable + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + + public ErrorResponseErrorsInnerFieldsInner message(String message) { + this.message = message; + return this; + } + + /** + * Gives the description of the field message. + * @return message + **/ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ErrorResponseErrorsInnerFieldsInner errorResponseErrorsInnerFieldsInner = (ErrorResponseErrorsInnerFieldsInner) o; + return Objects.equals(this.field, errorResponseErrorsInnerFieldsInner.field) && + Objects.equals(this.value, errorResponseErrorsInnerFieldsInner.value) && + Objects.equals(this.message, errorResponseErrorsInnerFieldsInner.message); + } + + @Override + public int hashCode() { + return Objects.hash(field, value, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ErrorResponseErrorsInnerFieldsInner {\n"); + sb.append(" field: ").append(toIndentedString(field)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("field"); + openapiFields.add("value"); + openapiFields.add("message"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ErrorResponseErrorsInnerFieldsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ErrorResponseErrorsInnerFieldsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ErrorResponseErrorsInnerFieldsInner is not found in the empty JSON string", ErrorResponseErrorsInnerFieldsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ErrorResponseErrorsInnerFieldsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ErrorResponseErrorsInnerFieldsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("field") != null && !jsonObj.get("field").isJsonNull()) && !jsonObj.get("field").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `field` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field").toString())); + } + if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ErrorResponseErrorsInnerFieldsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ErrorResponseErrorsInnerFieldsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ErrorResponseErrorsInnerFieldsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ErrorResponseErrorsInnerFieldsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ErrorResponseErrorsInnerFieldsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ErrorResponseErrorsInnerFieldsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ErrorResponseErrorsInnerFieldsInner + * @throws IOException if the JSON string is invalid with respect to ErrorResponseErrorsInnerFieldsInner + */ + public static ErrorResponseErrorsInnerFieldsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ErrorResponseErrorsInnerFieldsInner.class); + } + + /** + * Convert an instance of ErrorResponseErrorsInnerFieldsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/Fields.java b/src/main/java/xiresellers/client/model/Fields.java new file mode 100644 index 00000000..74a99426 --- /dev/null +++ b/src/main/java/xiresellers/client/model/Fields.java @@ -0,0 +1,276 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Fields + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class Fields { + public static final String SERIALIZED_NAME_FIELD = "field"; + @SerializedName(SERIALIZED_NAME_FIELD) + private String field; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private String value; + + public Fields() { + } + + public Fields field(String field) { + this.field = field; + return this; + } + + /** + * Get field + * @return field + **/ + @javax.annotation.Nullable + public String getField() { + return field; + } + + public void setField(String field) { + this.field = field; + } + + + public Fields message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + **/ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + public Fields value(String value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + **/ + @javax.annotation.Nullable + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Fields fields = (Fields) o; + return Objects.equals(this.field, fields.field) && + Objects.equals(this.message, fields.message) && + Objects.equals(this.value, fields.value); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(field, message, value); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Fields {\n"); + sb.append(" field: ").append(toIndentedString(field)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("field"); + openapiFields.add("message"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Fields + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Fields.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Fields is not found in the empty JSON string", Fields.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Fields.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Fields` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("field") != null && !jsonObj.get("field").isJsonNull()) && !jsonObj.get("field").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `field` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field").toString())); + } + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Fields.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Fields' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Fields.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Fields value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Fields read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Fields given an JSON string + * + * @param jsonString JSON string + * @return An instance of Fields + * @throws IOException if the JSON string is invalid with respect to Fields + */ + public static Fields fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Fields.class); + } + + /** + * Convert an instance of Fields to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/FreightRequest.java b/src/main/java/xiresellers/client/model/FreightRequest.java new file mode 100644 index 00000000..7b755705 --- /dev/null +++ b/src/main/java/xiresellers/client/model/FreightRequest.java @@ -0,0 +1,335 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.FreightRequestLinesInner; +import xiresellers.client.model.FreightRequestShipToAddressInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * FreightRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class FreightRequest { + public static final String SERIALIZED_NAME_BILL_TO_ADDRESS_ID = "billToAddressId"; + @SerializedName(SERIALIZED_NAME_BILL_TO_ADDRESS_ID) + private String billToAddressId; + + public static final String SERIALIZED_NAME_SHIP_TO_ADDRESS_ID = "shipToAddressId"; + @SerializedName(SERIALIZED_NAME_SHIP_TO_ADDRESS_ID) + private String shipToAddressId; + + public static final String SERIALIZED_NAME_SHIP_TO_ADDRESS = "shipToAddress"; + @SerializedName(SERIALIZED_NAME_SHIP_TO_ADDRESS) + private List shipToAddress; + + public static final String SERIALIZED_NAME_LINES = "lines"; + @SerializedName(SERIALIZED_NAME_LINES) + private List lines; + + public FreightRequest() { + } + + public FreightRequest billToAddressId(String billToAddressId) { + this.billToAddressId = billToAddressId; + return this; + } + + /** + * Suffix used to identify billing address. Created during onboarding. Resellers are provided with one or more address IDs depending on how many bill to addresses they need for various flooring companies they are using for credit. + * @return billToAddressId + **/ + @javax.annotation.Nullable + public String getBillToAddressId() { + return billToAddressId; + } + + public void setBillToAddressId(String billToAddressId) { + this.billToAddressId = billToAddressId; + } + + + public FreightRequest shipToAddressId(String shipToAddressId) { + this.shipToAddressId = shipToAddressId; + return this; + } + + /** + * The ID references the reseller's address in Ingram Micro's system for shipping. Provided to resellers during the onboarding process. + * @return shipToAddressId + **/ + @javax.annotation.Nullable + public String getShipToAddressId() { + return shipToAddressId; + } + + public void setShipToAddressId(String shipToAddressId) { + this.shipToAddressId = shipToAddressId; + } + + + public FreightRequest shipToAddress(List shipToAddress) { + this.shipToAddress = shipToAddress; + return this; + } + + public FreightRequest addShipToAddressItem(FreightRequestShipToAddressInner shipToAddressItem) { + if (this.shipToAddress == null) { + this.shipToAddress = new ArrayList<>(); + } + this.shipToAddress.add(shipToAddressItem); + return this; + } + + /** + * The shipping information. + * @return shipToAddress + **/ + @javax.annotation.Nullable + public List getShipToAddress() { + return shipToAddress; + } + + public void setShipToAddress(List shipToAddress) { + this.shipToAddress = shipToAddress; + } + + + public FreightRequest lines(List lines) { + this.lines = lines; + return this; + } + + public FreightRequest addLinesItem(FreightRequestLinesInner linesItem) { + if (this.lines == null) { + this.lines = new ArrayList<>(); + } + this.lines.add(linesItem); + return this; + } + + /** + * Get lines + * @return lines + **/ + @javax.annotation.Nullable + public List getLines() { + return lines; + } + + public void setLines(List lines) { + this.lines = lines; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FreightRequest freightRequest = (FreightRequest) o; + return Objects.equals(this.billToAddressId, freightRequest.billToAddressId) && + Objects.equals(this.shipToAddressId, freightRequest.shipToAddressId) && + Objects.equals(this.shipToAddress, freightRequest.shipToAddress) && + Objects.equals(this.lines, freightRequest.lines); + } + + @Override + public int hashCode() { + return Objects.hash(billToAddressId, shipToAddressId, shipToAddress, lines); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FreightRequest {\n"); + sb.append(" billToAddressId: ").append(toIndentedString(billToAddressId)).append("\n"); + sb.append(" shipToAddressId: ").append(toIndentedString(shipToAddressId)).append("\n"); + sb.append(" shipToAddress: ").append(toIndentedString(shipToAddress)).append("\n"); + sb.append(" lines: ").append(toIndentedString(lines)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("billToAddressId"); + openapiFields.add("shipToAddressId"); + openapiFields.add("shipToAddress"); + openapiFields.add("lines"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FreightRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FreightRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FreightRequest is not found in the empty JSON string", FreightRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FreightRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FreightRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("billToAddressId") != null && !jsonObj.get("billToAddressId").isJsonNull()) && !jsonObj.get("billToAddressId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `billToAddressId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("billToAddressId").toString())); + } + if ((jsonObj.get("shipToAddressId") != null && !jsonObj.get("shipToAddressId").isJsonNull()) && !jsonObj.get("shipToAddressId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shipToAddressId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shipToAddressId").toString())); + } + if (jsonObj.get("shipToAddress") != null && !jsonObj.get("shipToAddress").isJsonNull()) { + JsonArray jsonArrayshipToAddress = jsonObj.getAsJsonArray("shipToAddress"); + if (jsonArrayshipToAddress != null) { + // ensure the json data is an array + if (!jsonObj.get("shipToAddress").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `shipToAddress` to be an array in the JSON string but got `%s`", jsonObj.get("shipToAddress").toString())); + } + + // validate the optional field `shipToAddress` (array) + for (int i = 0; i < jsonArrayshipToAddress.size(); i++) { + FreightRequestShipToAddressInner.validateJsonElement(jsonArrayshipToAddress.get(i)); + }; + } + } + if (jsonObj.get("lines") != null && !jsonObj.get("lines").isJsonNull()) { + JsonArray jsonArraylines = jsonObj.getAsJsonArray("lines"); + if (jsonArraylines != null) { + // ensure the json data is an array + if (!jsonObj.get("lines").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `lines` to be an array in the JSON string but got `%s`", jsonObj.get("lines").toString())); + } + + // validate the optional field `lines` (array) + for (int i = 0; i < jsonArraylines.size(); i++) { + FreightRequestLinesInner.validateJsonElement(jsonArraylines.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FreightRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FreightRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FreightRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FreightRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FreightRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of FreightRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FreightRequest + * @throws IOException if the JSON string is invalid with respect to FreightRequest + */ + public static FreightRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FreightRequest.class); + } + + /** + * Convert an instance of FreightRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/FreightRequestLinesInner.java b/src/main/java/xiresellers/client/model/FreightRequestLinesInner.java new file mode 100644 index 00000000..a3cf7773 --- /dev/null +++ b/src/main/java/xiresellers/client/model/FreightRequestLinesInner.java @@ -0,0 +1,322 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * FreightRequestLinesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class FreightRequestLinesInner { + public static final String SERIALIZED_NAME_CUSTOMER_LINE_NUMBER = "customerLineNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_LINE_NUMBER) + private String customerLineNumber; + + public static final String SERIALIZED_NAME_INGRAM_PART_NUMBER = "ingramPartNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PART_NUMBER) + private String ingramPartNumber; + + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + @SerializedName(SERIALIZED_NAME_QUANTITY) + private String quantity; + + public static final String SERIALIZED_NAME_WAREHOUSE_ID = "warehouseId"; + @SerializedName(SERIALIZED_NAME_WAREHOUSE_ID) + private String warehouseId; + + public static final String SERIALIZED_NAME_CARRIER_CODE = "carrierCode"; + @SerializedName(SERIALIZED_NAME_CARRIER_CODE) + private String carrierCode; + + public FreightRequestLinesInner() { + } + + public FreightRequestLinesInner customerLineNumber(String customerLineNumber) { + this.customerLineNumber = customerLineNumber; + return this; + } + + /** + * The ID references the reseller's address in Ingram Micro's system for shipping. Provided to resellers during the onboarding process. + * @return customerLineNumber + **/ + @javax.annotation.Nullable + public String getCustomerLineNumber() { + return customerLineNumber; + } + + public void setCustomerLineNumber(String customerLineNumber) { + this.customerLineNumber = customerLineNumber; + } + + + public FreightRequestLinesInner ingramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + return this; + } + + /** + * The unique IngramMicro part number. + * @return ingramPartNumber + **/ + @javax.annotation.Nullable + public String getIngramPartNumber() { + return ingramPartNumber; + } + + public void setIngramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + } + + + public FreightRequestLinesInner quantity(String quantity) { + this.quantity = quantity; + return this; + } + + /** + * The requested quantity of the line item. + * @return quantity + **/ + @javax.annotation.Nullable + public String getQuantity() { + return quantity; + } + + public void setQuantity(String quantity) { + this.quantity = quantity; + } + + + public FreightRequestLinesInner warehouseId(String warehouseId) { + this.warehouseId = warehouseId; + return this; + } + + /** + * The ID of the warehouse the line item will ship from. + * @return warehouseId + **/ + @javax.annotation.Nullable + public String getWarehouseId() { + return warehouseId; + } + + public void setWarehouseId(String warehouseId) { + this.warehouseId = warehouseId; + } + + + public FreightRequestLinesInner carrierCode(String carrierCode) { + this.carrierCode = carrierCode; + return this; + } + + /** + * The code for the shipping carrier for the line item. + * @return carrierCode + **/ + @javax.annotation.Nullable + public String getCarrierCode() { + return carrierCode; + } + + public void setCarrierCode(String carrierCode) { + this.carrierCode = carrierCode; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FreightRequestLinesInner freightRequestLinesInner = (FreightRequestLinesInner) o; + return Objects.equals(this.customerLineNumber, freightRequestLinesInner.customerLineNumber) && + Objects.equals(this.ingramPartNumber, freightRequestLinesInner.ingramPartNumber) && + Objects.equals(this.quantity, freightRequestLinesInner.quantity) && + Objects.equals(this.warehouseId, freightRequestLinesInner.warehouseId) && + Objects.equals(this.carrierCode, freightRequestLinesInner.carrierCode); + } + + @Override + public int hashCode() { + return Objects.hash(customerLineNumber, ingramPartNumber, quantity, warehouseId, carrierCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FreightRequestLinesInner {\n"); + sb.append(" customerLineNumber: ").append(toIndentedString(customerLineNumber)).append("\n"); + sb.append(" ingramPartNumber: ").append(toIndentedString(ingramPartNumber)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" warehouseId: ").append(toIndentedString(warehouseId)).append("\n"); + sb.append(" carrierCode: ").append(toIndentedString(carrierCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("customerLineNumber"); + openapiFields.add("ingramPartNumber"); + openapiFields.add("quantity"); + openapiFields.add("warehouseId"); + openapiFields.add("carrierCode"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FreightRequestLinesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FreightRequestLinesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FreightRequestLinesInner is not found in the empty JSON string", FreightRequestLinesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FreightRequestLinesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FreightRequestLinesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("customerLineNumber") != null && !jsonObj.get("customerLineNumber").isJsonNull()) && !jsonObj.get("customerLineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerLineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerLineNumber").toString())); + } + if ((jsonObj.get("ingramPartNumber") != null && !jsonObj.get("ingramPartNumber").isJsonNull()) && !jsonObj.get("ingramPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPartNumber").toString())); + } + if ((jsonObj.get("quantity") != null && !jsonObj.get("quantity").isJsonNull()) && !jsonObj.get("quantity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quantity").toString())); + } + if ((jsonObj.get("warehouseId") != null && !jsonObj.get("warehouseId").isJsonNull()) && !jsonObj.get("warehouseId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `warehouseId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("warehouseId").toString())); + } + if ((jsonObj.get("carrierCode") != null && !jsonObj.get("carrierCode").isJsonNull()) && !jsonObj.get("carrierCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `carrierCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierCode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FreightRequestLinesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FreightRequestLinesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FreightRequestLinesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FreightRequestLinesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FreightRequestLinesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of FreightRequestLinesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of FreightRequestLinesInner + * @throws IOException if the JSON string is invalid with respect to FreightRequestLinesInner + */ + public static FreightRequestLinesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FreightRequestLinesInner.class); + } + + /** + * Convert an instance of FreightRequestLinesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/FreightRequestShipToAddressInner.java b/src/main/java/xiresellers/client/model/FreightRequestShipToAddressInner.java new file mode 100644 index 00000000..8e6046c8 --- /dev/null +++ b/src/main/java/xiresellers/client/model/FreightRequestShipToAddressInner.java @@ -0,0 +1,409 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * FreightRequestShipToAddressInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class FreightRequestShipToAddressInner { + public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; + @SerializedName(SERIALIZED_NAME_COMPANY_NAME) + private String companyName; + + public static final String SERIALIZED_NAME_ADDRESS_LINE1 = "addressLine1"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE1) + private String addressLine1; + + public static final String SERIALIZED_NAME_ADDRESS_LINE2 = "addressLine2"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE2) + private String addressLine2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE3 = "addressLine3"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE3) + private String addressLine3; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; + @SerializedName(SERIALIZED_NAME_POSTAL_CODE) + private String postalCode; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public FreightRequestShipToAddressInner() { + } + + public FreightRequestShipToAddressInner companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * The name of the company the order will be shipped to. + * @return companyName + **/ + @javax.annotation.Nullable + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public FreightRequestShipToAddressInner addressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + return this; + } + + /** + * Line 1 of the address the order will be shipped to. + * @return addressLine1 + **/ + @javax.annotation.Nullable + public String getAddressLine1() { + return addressLine1; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + + public FreightRequestShipToAddressInner addressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + return this; + } + + /** + * Line 2 of the address the order will be shipped to. + * @return addressLine2 + **/ + @javax.annotation.Nullable + public String getAddressLine2() { + return addressLine2; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + + public FreightRequestShipToAddressInner addressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + return this; + } + + /** + * Line 3 of the address the order will be shipped to. + * @return addressLine3 + **/ + @javax.annotation.Nullable + public String getAddressLine3() { + return addressLine3; + } + + public void setAddressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + } + + + public FreightRequestShipToAddressInner city(String city) { + this.city = city; + return this; + } + + /** + * The city the order will be shipped to. + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public FreightRequestShipToAddressInner state(String state) { + this.state = state; + return this; + } + + /** + * The state the order will be shipped to. + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public FreightRequestShipToAddressInner postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * The zip or postal code the order will be shipped to. + * @return postalCode + **/ + @javax.annotation.Nullable + public String getPostalCode() { + return postalCode; + } + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public FreightRequestShipToAddressInner countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * The two-character ISO country code the order will be shipped to. + * @return countryCode + **/ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FreightRequestShipToAddressInner freightRequestShipToAddressInner = (FreightRequestShipToAddressInner) o; + return Objects.equals(this.companyName, freightRequestShipToAddressInner.companyName) && + Objects.equals(this.addressLine1, freightRequestShipToAddressInner.addressLine1) && + Objects.equals(this.addressLine2, freightRequestShipToAddressInner.addressLine2) && + Objects.equals(this.addressLine3, freightRequestShipToAddressInner.addressLine3) && + Objects.equals(this.city, freightRequestShipToAddressInner.city) && + Objects.equals(this.state, freightRequestShipToAddressInner.state) && + Objects.equals(this.postalCode, freightRequestShipToAddressInner.postalCode) && + Objects.equals(this.countryCode, freightRequestShipToAddressInner.countryCode); + } + + @Override + public int hashCode() { + return Objects.hash(companyName, addressLine1, addressLine2, addressLine3, city, state, postalCode, countryCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FreightRequestShipToAddressInner {\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); + sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); + sb.append(" addressLine3: ").append(toIndentedString(addressLine3)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("companyName"); + openapiFields.add("addressLine1"); + openapiFields.add("addressLine2"); + openapiFields.add("addressLine3"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalCode"); + openapiFields.add("countryCode"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FreightRequestShipToAddressInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FreightRequestShipToAddressInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FreightRequestShipToAddressInner is not found in the empty JSON string", FreightRequestShipToAddressInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FreightRequestShipToAddressInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FreightRequestShipToAddressInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("companyName") != null && !jsonObj.get("companyName").isJsonNull()) && !jsonObj.get("companyName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); + } + if ((jsonObj.get("addressLine1") != null && !jsonObj.get("addressLine1").isJsonNull()) && !jsonObj.get("addressLine1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine1").toString())); + } + if ((jsonObj.get("addressLine2") != null && !jsonObj.get("addressLine2").isJsonNull()) && !jsonObj.get("addressLine2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine2").toString())); + } + if ((jsonObj.get("addressLine3") != null && !jsonObj.get("addressLine3").isJsonNull()) && !jsonObj.get("addressLine3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine3").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FreightRequestShipToAddressInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FreightRequestShipToAddressInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FreightRequestShipToAddressInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FreightRequestShipToAddressInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FreightRequestShipToAddressInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of FreightRequestShipToAddressInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of FreightRequestShipToAddressInner + * @throws IOException if the JSON string is invalid with respect to FreightRequestShipToAddressInner + */ + public static FreightRequestShipToAddressInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FreightRequestShipToAddressInner.class); + } + + /** + * Convert an instance of FreightRequestShipToAddressInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/FreightResponse.java b/src/main/java/xiresellers/client/model/FreightResponse.java new file mode 100644 index 00000000..70ba1f18 --- /dev/null +++ b/src/main/java/xiresellers/client/model/FreightResponse.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.FreightResponseFreightEstimateResponse; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * FreightResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class FreightResponse { + public static final String SERIALIZED_NAME_FREIGHT_ESTIMATE_RESPONSE = "freightEstimateResponse"; + @SerializedName(SERIALIZED_NAME_FREIGHT_ESTIMATE_RESPONSE) + private FreightResponseFreightEstimateResponse freightEstimateResponse; + + public FreightResponse() { + } + + public FreightResponse freightEstimateResponse(FreightResponseFreightEstimateResponse freightEstimateResponse) { + this.freightEstimateResponse = freightEstimateResponse; + return this; + } + + /** + * Get freightEstimateResponse + * @return freightEstimateResponse + **/ + @javax.annotation.Nullable + public FreightResponseFreightEstimateResponse getFreightEstimateResponse() { + return freightEstimateResponse; + } + + public void setFreightEstimateResponse(FreightResponseFreightEstimateResponse freightEstimateResponse) { + this.freightEstimateResponse = freightEstimateResponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FreightResponse freightResponse = (FreightResponse) o; + return Objects.equals(this.freightEstimateResponse, freightResponse.freightEstimateResponse); + } + + @Override + public int hashCode() { + return Objects.hash(freightEstimateResponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FreightResponse {\n"); + sb.append(" freightEstimateResponse: ").append(toIndentedString(freightEstimateResponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("freightEstimateResponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FreightResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FreightResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FreightResponse is not found in the empty JSON string", FreightResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FreightResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FreightResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `freightEstimateResponse` + if (jsonObj.get("freightEstimateResponse") != null && !jsonObj.get("freightEstimateResponse").isJsonNull()) { + FreightResponseFreightEstimateResponse.validateJsonElement(jsonObj.get("freightEstimateResponse")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FreightResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FreightResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FreightResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FreightResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FreightResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of FreightResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of FreightResponse + * @throws IOException if the JSON string is invalid with respect to FreightResponse + */ + public static FreightResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FreightResponse.class); + } + + /** + * Convert an instance of FreightResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/FreightResponseFreightEstimateResponse.java b/src/main/java/xiresellers/client/model/FreightResponseFreightEstimateResponse.java new file mode 100644 index 00000000..56c0b94d --- /dev/null +++ b/src/main/java/xiresellers/client/model/FreightResponseFreightEstimateResponse.java @@ -0,0 +1,437 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.FreightResponseFreightEstimateResponseDistributionInner; +import xiresellers.client.model.FreightResponseFreightEstimateResponseLinesInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * FreightResponseFreightEstimateResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class FreightResponseFreightEstimateResponse { + public static final String SERIALIZED_NAME_CURRENCY_CODE = "currencyCode"; + @SerializedName(SERIALIZED_NAME_CURRENCY_CODE) + private String currencyCode; + + public static final String SERIALIZED_NAME_TOTAL_FREIGHT_AMOUNT = "totalFreightAmount"; + @SerializedName(SERIALIZED_NAME_TOTAL_FREIGHT_AMOUNT) + private BigDecimal totalFreightAmount; + + public static final String SERIALIZED_NAME_TOTAL_TAX_AMOUNT = "totalTaxAmount"; + @SerializedName(SERIALIZED_NAME_TOTAL_TAX_AMOUNT) + private BigDecimal totalTaxAmount; + + public static final String SERIALIZED_NAME_TOTAL_FEES = "totalFees"; + @SerializedName(SERIALIZED_NAME_TOTAL_FEES) + private BigDecimal totalFees; + + public static final String SERIALIZED_NAME_TOTAL_NET_AMOUNT = "totalNetAmount"; + @SerializedName(SERIALIZED_NAME_TOTAL_NET_AMOUNT) + private BigDecimal totalNetAmount; + + public static final String SERIALIZED_NAME_GROSS_AMOUNT = "grossAmount"; + @SerializedName(SERIALIZED_NAME_GROSS_AMOUNT) + private BigDecimal grossAmount; + + public static final String SERIALIZED_NAME_DISTRIBUTION = "distribution"; + @SerializedName(SERIALIZED_NAME_DISTRIBUTION) + private List distribution; + + public static final String SERIALIZED_NAME_LINES = "lines"; + @SerializedName(SERIALIZED_NAME_LINES) + private List lines; + + public FreightResponseFreightEstimateResponse() { + } + + public FreightResponseFreightEstimateResponse currencyCode(String currencyCode) { + this.currencyCode = currencyCode; + return this; + } + + /** + * The country-specific three-character ISO 4217 currency code used for the order. + * @return currencyCode + **/ + @javax.annotation.Nullable + public String getCurrencyCode() { + return currencyCode; + } + + public void setCurrencyCode(String currencyCode) { + this.currencyCode = currencyCode; + } + + + public FreightResponseFreightEstimateResponse totalFreightAmount(BigDecimal totalFreightAmount) { + this.totalFreightAmount = totalFreightAmount; + return this; + } + + /** + * Total freight amount. + * @return totalFreightAmount + **/ + @javax.annotation.Nullable + public BigDecimal getTotalFreightAmount() { + return totalFreightAmount; + } + + public void setTotalFreightAmount(BigDecimal totalFreightAmount) { + this.totalFreightAmount = totalFreightAmount; + } + + + public FreightResponseFreightEstimateResponse totalTaxAmount(BigDecimal totalTaxAmount) { + this.totalTaxAmount = totalTaxAmount; + return this; + } + + /** + * Total tax amount. + * @return totalTaxAmount + **/ + @javax.annotation.Nullable + public BigDecimal getTotalTaxAmount() { + return totalTaxAmount; + } + + public void setTotalTaxAmount(BigDecimal totalTaxAmount) { + this.totalTaxAmount = totalTaxAmount; + } + + + public FreightResponseFreightEstimateResponse totalFees(BigDecimal totalFees) { + this.totalFees = totalFees; + return this; + } + + /** + * Total fees. + * @return totalFees + **/ + @javax.annotation.Nullable + public BigDecimal getTotalFees() { + return totalFees; + } + + public void setTotalFees(BigDecimal totalFees) { + this.totalFees = totalFees; + } + + + public FreightResponseFreightEstimateResponse totalNetAmount(BigDecimal totalNetAmount) { + this.totalNetAmount = totalNetAmount; + return this; + } + + /** + * Total net amount. + * @return totalNetAmount + **/ + @javax.annotation.Nullable + public BigDecimal getTotalNetAmount() { + return totalNetAmount; + } + + public void setTotalNetAmount(BigDecimal totalNetAmount) { + this.totalNetAmount = totalNetAmount; + } + + + public FreightResponseFreightEstimateResponse grossAmount(BigDecimal grossAmount) { + this.grossAmount = grossAmount; + return this; + } + + /** + * Gross amount. + * @return grossAmount + **/ + @javax.annotation.Nullable + public BigDecimal getGrossAmount() { + return grossAmount; + } + + public void setGrossAmount(BigDecimal grossAmount) { + this.grossAmount = grossAmount; + } + + + public FreightResponseFreightEstimateResponse distribution(List distribution) { + this.distribution = distribution; + return this; + } + + public FreightResponseFreightEstimateResponse addDistributionItem(FreightResponseFreightEstimateResponseDistributionInner distributionItem) { + if (this.distribution == null) { + this.distribution = new ArrayList<>(); + } + this.distribution.add(distributionItem); + return this; + } + + /** + * Get distribution + * @return distribution + **/ + @javax.annotation.Nullable + public List getDistribution() { + return distribution; + } + + public void setDistribution(List distribution) { + this.distribution = distribution; + } + + + public FreightResponseFreightEstimateResponse lines(List lines) { + this.lines = lines; + return this; + } + + public FreightResponseFreightEstimateResponse addLinesItem(FreightResponseFreightEstimateResponseLinesInner linesItem) { + if (this.lines == null) { + this.lines = new ArrayList<>(); + } + this.lines.add(linesItem); + return this; + } + + /** + * Get lines + * @return lines + **/ + @javax.annotation.Nullable + public List getLines() { + return lines; + } + + public void setLines(List lines) { + this.lines = lines; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FreightResponseFreightEstimateResponse freightResponseFreightEstimateResponse = (FreightResponseFreightEstimateResponse) o; + return Objects.equals(this.currencyCode, freightResponseFreightEstimateResponse.currencyCode) && + Objects.equals(this.totalFreightAmount, freightResponseFreightEstimateResponse.totalFreightAmount) && + Objects.equals(this.totalTaxAmount, freightResponseFreightEstimateResponse.totalTaxAmount) && + Objects.equals(this.totalFees, freightResponseFreightEstimateResponse.totalFees) && + Objects.equals(this.totalNetAmount, freightResponseFreightEstimateResponse.totalNetAmount) && + Objects.equals(this.grossAmount, freightResponseFreightEstimateResponse.grossAmount) && + Objects.equals(this.distribution, freightResponseFreightEstimateResponse.distribution) && + Objects.equals(this.lines, freightResponseFreightEstimateResponse.lines); + } + + @Override + public int hashCode() { + return Objects.hash(currencyCode, totalFreightAmount, totalTaxAmount, totalFees, totalNetAmount, grossAmount, distribution, lines); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FreightResponseFreightEstimateResponse {\n"); + sb.append(" currencyCode: ").append(toIndentedString(currencyCode)).append("\n"); + sb.append(" totalFreightAmount: ").append(toIndentedString(totalFreightAmount)).append("\n"); + sb.append(" totalTaxAmount: ").append(toIndentedString(totalTaxAmount)).append("\n"); + sb.append(" totalFees: ").append(toIndentedString(totalFees)).append("\n"); + sb.append(" totalNetAmount: ").append(toIndentedString(totalNetAmount)).append("\n"); + sb.append(" grossAmount: ").append(toIndentedString(grossAmount)).append("\n"); + sb.append(" distribution: ").append(toIndentedString(distribution)).append("\n"); + sb.append(" lines: ").append(toIndentedString(lines)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("currencyCode"); + openapiFields.add("totalFreightAmount"); + openapiFields.add("totalTaxAmount"); + openapiFields.add("totalFees"); + openapiFields.add("totalNetAmount"); + openapiFields.add("grossAmount"); + openapiFields.add("distribution"); + openapiFields.add("lines"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FreightResponseFreightEstimateResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FreightResponseFreightEstimateResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FreightResponseFreightEstimateResponse is not found in the empty JSON string", FreightResponseFreightEstimateResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FreightResponseFreightEstimateResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FreightResponseFreightEstimateResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("currencyCode") != null && !jsonObj.get("currencyCode").isJsonNull()) && !jsonObj.get("currencyCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `currencyCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currencyCode").toString())); + } + if (jsonObj.get("distribution") != null && !jsonObj.get("distribution").isJsonNull()) { + JsonArray jsonArraydistribution = jsonObj.getAsJsonArray("distribution"); + if (jsonArraydistribution != null) { + // ensure the json data is an array + if (!jsonObj.get("distribution").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `distribution` to be an array in the JSON string but got `%s`", jsonObj.get("distribution").toString())); + } + + // validate the optional field `distribution` (array) + for (int i = 0; i < jsonArraydistribution.size(); i++) { + FreightResponseFreightEstimateResponseDistributionInner.validateJsonElement(jsonArraydistribution.get(i)); + }; + } + } + if (jsonObj.get("lines") != null && !jsonObj.get("lines").isJsonNull()) { + JsonArray jsonArraylines = jsonObj.getAsJsonArray("lines"); + if (jsonArraylines != null) { + // ensure the json data is an array + if (!jsonObj.get("lines").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `lines` to be an array in the JSON string but got `%s`", jsonObj.get("lines").toString())); + } + + // validate the optional field `lines` (array) + for (int i = 0; i < jsonArraylines.size(); i++) { + FreightResponseFreightEstimateResponseLinesInner.validateJsonElement(jsonArraylines.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FreightResponseFreightEstimateResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FreightResponseFreightEstimateResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FreightResponseFreightEstimateResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FreightResponseFreightEstimateResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FreightResponseFreightEstimateResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of FreightResponseFreightEstimateResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of FreightResponseFreightEstimateResponse + * @throws IOException if the JSON string is invalid with respect to FreightResponseFreightEstimateResponse + */ + public static FreightResponseFreightEstimateResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FreightResponseFreightEstimateResponse.class); + } + + /** + * Convert an instance of FreightResponseFreightEstimateResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/FreightResponseFreightEstimateResponseDistributionInner.java b/src/main/java/xiresellers/client/model/FreightResponseFreightEstimateResponseDistributionInner.java new file mode 100644 index 00000000..86c7af96 --- /dev/null +++ b/src/main/java/xiresellers/client/model/FreightResponseFreightEstimateResponseDistributionInner.java @@ -0,0 +1,394 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * FreightResponseFreightEstimateResponseDistributionInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class FreightResponseFreightEstimateResponseDistributionInner { + public static final String SERIALIZED_NAME_SHIP_FROM_BRANCH_NUMBER = "shipFromBranchNumber"; + @SerializedName(SERIALIZED_NAME_SHIP_FROM_BRANCH_NUMBER) + private String shipFromBranchNumber; + + public static final String SERIALIZED_NAME_CARRIER_CODE = "carrierCode"; + @SerializedName(SERIALIZED_NAME_CARRIER_CODE) + private String carrierCode; + + public static final String SERIALIZED_NAME_SHIP_VIA = "shipVia"; + @SerializedName(SERIALIZED_NAME_SHIP_VIA) + private String shipVia; + + public static final String SERIALIZED_NAME_FREIGHT_RATE = "freightRate"; + @SerializedName(SERIALIZED_NAME_FREIGHT_RATE) + private BigDecimal freightRate; + + public static final String SERIALIZED_NAME_TOTAL_WEIGHT = "totalWeight"; + @SerializedName(SERIALIZED_NAME_TOTAL_WEIGHT) + private BigDecimal totalWeight; + + public static final String SERIALIZED_NAME_TRANSIT_DAYS = "transitDays"; + @SerializedName(SERIALIZED_NAME_TRANSIT_DAYS) + private Integer transitDays; + + public static final String SERIALIZED_NAME_CARRIER_LIST = "carrierList"; + @SerializedName(SERIALIZED_NAME_CARRIER_LIST) + private List carrierList; + + public FreightResponseFreightEstimateResponseDistributionInner() { + } + + public FreightResponseFreightEstimateResponseDistributionInner shipFromBranchNumber(String shipFromBranchNumber) { + this.shipFromBranchNumber = shipFromBranchNumber; + return this; + } + + /** + * The ID of the warehouse the line item will ship from. + * @return shipFromBranchNumber + **/ + @javax.annotation.Nullable + public String getShipFromBranchNumber() { + return shipFromBranchNumber; + } + + public void setShipFromBranchNumber(String shipFromBranchNumber) { + this.shipFromBranchNumber = shipFromBranchNumber; + } + + + public FreightResponseFreightEstimateResponseDistributionInner carrierCode(String carrierCode) { + this.carrierCode = carrierCode; + return this; + } + + /** + * The code for the shipping carrier for the line item. + * @return carrierCode + **/ + @javax.annotation.Nullable + public String getCarrierCode() { + return carrierCode; + } + + public void setCarrierCode(String carrierCode) { + this.carrierCode = carrierCode; + } + + + public FreightResponseFreightEstimateResponseDistributionInner shipVia(String shipVia) { + this.shipVia = shipVia; + return this; + } + + /** + * The name of the shipping carrier. + * @return shipVia + **/ + @javax.annotation.Nullable + public String getShipVia() { + return shipVia; + } + + public void setShipVia(String shipVia) { + this.shipVia = shipVia; + } + + + public FreightResponseFreightEstimateResponseDistributionInner freightRate(BigDecimal freightRate) { + this.freightRate = freightRate; + return this; + } + + /** + * Estimated freight charge. + * @return freightRate + **/ + @javax.annotation.Nullable + public BigDecimal getFreightRate() { + return freightRate; + } + + public void setFreightRate(BigDecimal freightRate) { + this.freightRate = freightRate; + } + + + public FreightResponseFreightEstimateResponseDistributionInner totalWeight(BigDecimal totalWeight) { + this.totalWeight = totalWeight; + return this; + } + + /** + * Total weight. + * @return totalWeight + **/ + @javax.annotation.Nullable + public BigDecimal getTotalWeight() { + return totalWeight; + } + + public void setTotalWeight(BigDecimal totalWeight) { + this.totalWeight = totalWeight; + } + + + public FreightResponseFreightEstimateResponseDistributionInner transitDays(Integer transitDays) { + this.transitDays = transitDays; + return this; + } + + /** + * Number of transit days. + * @return transitDays + **/ + @javax.annotation.Nullable + public Integer getTransitDays() { + return transitDays; + } + + public void setTransitDays(Integer transitDays) { + this.transitDays = transitDays; + } + + + public FreightResponseFreightEstimateResponseDistributionInner carrierList(List carrierList) { + this.carrierList = carrierList; + return this; + } + + public FreightResponseFreightEstimateResponseDistributionInner addCarrierListItem(FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner carrierListItem) { + if (this.carrierList == null) { + this.carrierList = new ArrayList<>(); + } + this.carrierList.add(carrierListItem); + return this; + } + + /** + * Get carrierList + * @return carrierList + **/ + @javax.annotation.Nullable + public List getCarrierList() { + return carrierList; + } + + public void setCarrierList(List carrierList) { + this.carrierList = carrierList; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FreightResponseFreightEstimateResponseDistributionInner freightResponseFreightEstimateResponseDistributionInner = (FreightResponseFreightEstimateResponseDistributionInner) o; + return Objects.equals(this.shipFromBranchNumber, freightResponseFreightEstimateResponseDistributionInner.shipFromBranchNumber) && + Objects.equals(this.carrierCode, freightResponseFreightEstimateResponseDistributionInner.carrierCode) && + Objects.equals(this.shipVia, freightResponseFreightEstimateResponseDistributionInner.shipVia) && + Objects.equals(this.freightRate, freightResponseFreightEstimateResponseDistributionInner.freightRate) && + Objects.equals(this.totalWeight, freightResponseFreightEstimateResponseDistributionInner.totalWeight) && + Objects.equals(this.transitDays, freightResponseFreightEstimateResponseDistributionInner.transitDays) && + Objects.equals(this.carrierList, freightResponseFreightEstimateResponseDistributionInner.carrierList); + } + + @Override + public int hashCode() { + return Objects.hash(shipFromBranchNumber, carrierCode, shipVia, freightRate, totalWeight, transitDays, carrierList); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FreightResponseFreightEstimateResponseDistributionInner {\n"); + sb.append(" shipFromBranchNumber: ").append(toIndentedString(shipFromBranchNumber)).append("\n"); + sb.append(" carrierCode: ").append(toIndentedString(carrierCode)).append("\n"); + sb.append(" shipVia: ").append(toIndentedString(shipVia)).append("\n"); + sb.append(" freightRate: ").append(toIndentedString(freightRate)).append("\n"); + sb.append(" totalWeight: ").append(toIndentedString(totalWeight)).append("\n"); + sb.append(" transitDays: ").append(toIndentedString(transitDays)).append("\n"); + sb.append(" carrierList: ").append(toIndentedString(carrierList)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("shipFromBranchNumber"); + openapiFields.add("carrierCode"); + openapiFields.add("shipVia"); + openapiFields.add("freightRate"); + openapiFields.add("totalWeight"); + openapiFields.add("transitDays"); + openapiFields.add("carrierList"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FreightResponseFreightEstimateResponseDistributionInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FreightResponseFreightEstimateResponseDistributionInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FreightResponseFreightEstimateResponseDistributionInner is not found in the empty JSON string", FreightResponseFreightEstimateResponseDistributionInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FreightResponseFreightEstimateResponseDistributionInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FreightResponseFreightEstimateResponseDistributionInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("shipFromBranchNumber") != null && !jsonObj.get("shipFromBranchNumber").isJsonNull()) && !jsonObj.get("shipFromBranchNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shipFromBranchNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shipFromBranchNumber").toString())); + } + if ((jsonObj.get("carrierCode") != null && !jsonObj.get("carrierCode").isJsonNull()) && !jsonObj.get("carrierCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `carrierCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierCode").toString())); + } + if ((jsonObj.get("shipVia") != null && !jsonObj.get("shipVia").isJsonNull()) && !jsonObj.get("shipVia").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shipVia` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shipVia").toString())); + } + if (jsonObj.get("carrierList") != null && !jsonObj.get("carrierList").isJsonNull()) { + JsonArray jsonArraycarrierList = jsonObj.getAsJsonArray("carrierList"); + if (jsonArraycarrierList != null) { + // ensure the json data is an array + if (!jsonObj.get("carrierList").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `carrierList` to be an array in the JSON string but got `%s`", jsonObj.get("carrierList").toString())); + } + + // validate the optional field `carrierList` (array) + for (int i = 0; i < jsonArraycarrierList.size(); i++) { + FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner.validateJsonElement(jsonArraycarrierList.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FreightResponseFreightEstimateResponseDistributionInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FreightResponseFreightEstimateResponseDistributionInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FreightResponseFreightEstimateResponseDistributionInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FreightResponseFreightEstimateResponseDistributionInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FreightResponseFreightEstimateResponseDistributionInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of FreightResponseFreightEstimateResponseDistributionInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of FreightResponseFreightEstimateResponseDistributionInner + * @throws IOException if the JSON string is invalid with respect to FreightResponseFreightEstimateResponseDistributionInner + */ + public static FreightResponseFreightEstimateResponseDistributionInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FreightResponseFreightEstimateResponseDistributionInner.class); + } + + /** + * Convert an instance of FreightResponseFreightEstimateResponseDistributionInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner.java b/src/main/java/xiresellers/client/model/FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner.java new file mode 100644 index 00000000..1bdc532d --- /dev/null +++ b/src/main/java/xiresellers/client/model/FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner.java @@ -0,0 +1,317 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner { + public static final String SERIALIZED_NAME_CARRIER_CODE = "carrierCode"; + @SerializedName(SERIALIZED_NAME_CARRIER_CODE) + private String carrierCode; + + public static final String SERIALIZED_NAME_SHIP_VIA = "shipVia"; + @SerializedName(SERIALIZED_NAME_SHIP_VIA) + private String shipVia; + + public static final String SERIALIZED_NAME_CARRIER_MODE = "carrierMode"; + @SerializedName(SERIALIZED_NAME_CARRIER_MODE) + private String carrierMode; + + public static final String SERIALIZED_NAME_ESTIMATED_FREIGHT_CHARGE = "estimatedFreightCharge"; + @SerializedName(SERIALIZED_NAME_ESTIMATED_FREIGHT_CHARGE) + private BigDecimal estimatedFreightCharge; + + public static final String SERIALIZED_NAME_DAYS_IN_TRANSIT = "daysInTransit"; + @SerializedName(SERIALIZED_NAME_DAYS_IN_TRANSIT) + private Integer daysInTransit; + + public FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner() { + } + + public FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner carrierCode(String carrierCode) { + this.carrierCode = carrierCode; + return this; + } + + /** + * The code for the shipping carrier for the line item. + * @return carrierCode + **/ + @javax.annotation.Nullable + public String getCarrierCode() { + return carrierCode; + } + + public void setCarrierCode(String carrierCode) { + this.carrierCode = carrierCode; + } + + + public FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner shipVia(String shipVia) { + this.shipVia = shipVia; + return this; + } + + /** + * The name of the shipping carrier. + * @return shipVia + **/ + @javax.annotation.Nullable + public String getShipVia() { + return shipVia; + } + + public void setShipVia(String shipVia) { + this.shipVia = shipVia; + } + + + public FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner carrierMode(String carrierMode) { + this.carrierMode = carrierMode; + return this; + } + + /** + * Mode of the carrier. + * @return carrierMode + **/ + @javax.annotation.Nullable + public String getCarrierMode() { + return carrierMode; + } + + public void setCarrierMode(String carrierMode) { + this.carrierMode = carrierMode; + } + + + public FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner estimatedFreightCharge(BigDecimal estimatedFreightCharge) { + this.estimatedFreightCharge = estimatedFreightCharge; + return this; + } + + /** + * Estimated freight charge. + * @return estimatedFreightCharge + **/ + @javax.annotation.Nullable + public BigDecimal getEstimatedFreightCharge() { + return estimatedFreightCharge; + } + + public void setEstimatedFreightCharge(BigDecimal estimatedFreightCharge) { + this.estimatedFreightCharge = estimatedFreightCharge; + } + + + public FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner daysInTransit(Integer daysInTransit) { + this.daysInTransit = daysInTransit; + return this; + } + + /** + * Number of transit days. + * @return daysInTransit + **/ + @javax.annotation.Nullable + public Integer getDaysInTransit() { + return daysInTransit; + } + + public void setDaysInTransit(Integer daysInTransit) { + this.daysInTransit = daysInTransit; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner freightResponseFreightEstimateResponseDistributionInnerCarrierListInner = (FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner) o; + return Objects.equals(this.carrierCode, freightResponseFreightEstimateResponseDistributionInnerCarrierListInner.carrierCode) && + Objects.equals(this.shipVia, freightResponseFreightEstimateResponseDistributionInnerCarrierListInner.shipVia) && + Objects.equals(this.carrierMode, freightResponseFreightEstimateResponseDistributionInnerCarrierListInner.carrierMode) && + Objects.equals(this.estimatedFreightCharge, freightResponseFreightEstimateResponseDistributionInnerCarrierListInner.estimatedFreightCharge) && + Objects.equals(this.daysInTransit, freightResponseFreightEstimateResponseDistributionInnerCarrierListInner.daysInTransit); + } + + @Override + public int hashCode() { + return Objects.hash(carrierCode, shipVia, carrierMode, estimatedFreightCharge, daysInTransit); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner {\n"); + sb.append(" carrierCode: ").append(toIndentedString(carrierCode)).append("\n"); + sb.append(" shipVia: ").append(toIndentedString(shipVia)).append("\n"); + sb.append(" carrierMode: ").append(toIndentedString(carrierMode)).append("\n"); + sb.append(" estimatedFreightCharge: ").append(toIndentedString(estimatedFreightCharge)).append("\n"); + sb.append(" daysInTransit: ").append(toIndentedString(daysInTransit)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("carrierCode"); + openapiFields.add("shipVia"); + openapiFields.add("carrierMode"); + openapiFields.add("estimatedFreightCharge"); + openapiFields.add("daysInTransit"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner is not found in the empty JSON string", FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("carrierCode") != null && !jsonObj.get("carrierCode").isJsonNull()) && !jsonObj.get("carrierCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `carrierCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierCode").toString())); + } + if ((jsonObj.get("shipVia") != null && !jsonObj.get("shipVia").isJsonNull()) && !jsonObj.get("shipVia").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shipVia` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shipVia").toString())); + } + if ((jsonObj.get("carrierMode") != null && !jsonObj.get("carrierMode").isJsonNull()) && !jsonObj.get("carrierMode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `carrierMode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierMode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner + * @throws IOException if the JSON string is invalid with respect to FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner + */ + public static FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner.class); + } + + /** + * Convert an instance of FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/FreightResponseFreightEstimateResponseLinesInner.java b/src/main/java/xiresellers/client/model/FreightResponseFreightEstimateResponseLinesInner.java new file mode 100644 index 00000000..82022282 --- /dev/null +++ b/src/main/java/xiresellers/client/model/FreightResponseFreightEstimateResponseLinesInner.java @@ -0,0 +1,343 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * FreightResponseFreightEstimateResponseLinesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class FreightResponseFreightEstimateResponseLinesInner { + public static final String SERIALIZED_NAME_INGRAM_PART_NUMBER = "ingramPartNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PART_NUMBER) + private String ingramPartNumber; + + public static final String SERIALIZED_NAME_VENDOR_PART_NUMBER = "vendorPartNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_PART_NUMBER) + private String vendorPartNumber; + + public static final String SERIALIZED_NAME_WAREHOUSE_ID = "warehouseId"; + @SerializedName(SERIALIZED_NAME_WAREHOUSE_ID) + private String warehouseId; + + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + @SerializedName(SERIALIZED_NAME_QUANTITY) + private Integer quantity; + + public static final String SERIALIZED_NAME_UNIT_PRICE = "unitPrice"; + @SerializedName(SERIALIZED_NAME_UNIT_PRICE) + private BigDecimal unitPrice; + + public static final String SERIALIZED_NAME_NET_AMOUNT = "netAmount"; + @SerializedName(SERIALIZED_NAME_NET_AMOUNT) + private BigDecimal netAmount; + + public FreightResponseFreightEstimateResponseLinesInner() { + } + + public FreightResponseFreightEstimateResponseLinesInner ingramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + return this; + } + + /** + * The unique IngramMicro part number. + * @return ingramPartNumber + **/ + @javax.annotation.Nullable + public String getIngramPartNumber() { + return ingramPartNumber; + } + + public void setIngramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + } + + + public FreightResponseFreightEstimateResponseLinesInner vendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + return this; + } + + /** + * The vendor part number for the line item. + * @return vendorPartNumber + **/ + @javax.annotation.Nullable + public String getVendorPartNumber() { + return vendorPartNumber; + } + + public void setVendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + } + + + public FreightResponseFreightEstimateResponseLinesInner warehouseId(String warehouseId) { + this.warehouseId = warehouseId; + return this; + } + + /** + * The ID of the warehouse the line item will ship from. + * @return warehouseId + **/ + @javax.annotation.Nullable + public String getWarehouseId() { + return warehouseId; + } + + public void setWarehouseId(String warehouseId) { + this.warehouseId = warehouseId; + } + + + public FreightResponseFreightEstimateResponseLinesInner quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * The requested quantity of the line item. + * @return quantity + **/ + @javax.annotation.Nullable + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + + public FreightResponseFreightEstimateResponseLinesInner unitPrice(BigDecimal unitPrice) { + this.unitPrice = unitPrice; + return this; + } + + /** + * The unit price for the line item. + * @return unitPrice + **/ + @javax.annotation.Nullable + public BigDecimal getUnitPrice() { + return unitPrice; + } + + public void setUnitPrice(BigDecimal unitPrice) { + this.unitPrice = unitPrice; + } + + + public FreightResponseFreightEstimateResponseLinesInner netAmount(BigDecimal netAmount) { + this.netAmount = netAmount; + return this; + } + + /** + * The net amount (unit price X quantity) for the line item. + * @return netAmount + **/ + @javax.annotation.Nullable + public BigDecimal getNetAmount() { + return netAmount; + } + + public void setNetAmount(BigDecimal netAmount) { + this.netAmount = netAmount; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FreightResponseFreightEstimateResponseLinesInner freightResponseFreightEstimateResponseLinesInner = (FreightResponseFreightEstimateResponseLinesInner) o; + return Objects.equals(this.ingramPartNumber, freightResponseFreightEstimateResponseLinesInner.ingramPartNumber) && + Objects.equals(this.vendorPartNumber, freightResponseFreightEstimateResponseLinesInner.vendorPartNumber) && + Objects.equals(this.warehouseId, freightResponseFreightEstimateResponseLinesInner.warehouseId) && + Objects.equals(this.quantity, freightResponseFreightEstimateResponseLinesInner.quantity) && + Objects.equals(this.unitPrice, freightResponseFreightEstimateResponseLinesInner.unitPrice) && + Objects.equals(this.netAmount, freightResponseFreightEstimateResponseLinesInner.netAmount); + } + + @Override + public int hashCode() { + return Objects.hash(ingramPartNumber, vendorPartNumber, warehouseId, quantity, unitPrice, netAmount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FreightResponseFreightEstimateResponseLinesInner {\n"); + sb.append(" ingramPartNumber: ").append(toIndentedString(ingramPartNumber)).append("\n"); + sb.append(" vendorPartNumber: ").append(toIndentedString(vendorPartNumber)).append("\n"); + sb.append(" warehouseId: ").append(toIndentedString(warehouseId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" unitPrice: ").append(toIndentedString(unitPrice)).append("\n"); + sb.append(" netAmount: ").append(toIndentedString(netAmount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("ingramPartNumber"); + openapiFields.add("vendorPartNumber"); + openapiFields.add("warehouseId"); + openapiFields.add("quantity"); + openapiFields.add("unitPrice"); + openapiFields.add("netAmount"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FreightResponseFreightEstimateResponseLinesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FreightResponseFreightEstimateResponseLinesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FreightResponseFreightEstimateResponseLinesInner is not found in the empty JSON string", FreightResponseFreightEstimateResponseLinesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FreightResponseFreightEstimateResponseLinesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FreightResponseFreightEstimateResponseLinesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("ingramPartNumber") != null && !jsonObj.get("ingramPartNumber").isJsonNull()) && !jsonObj.get("ingramPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPartNumber").toString())); + } + if ((jsonObj.get("vendorPartNumber") != null && !jsonObj.get("vendorPartNumber").isJsonNull()) && !jsonObj.get("vendorPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorPartNumber").toString())); + } + if ((jsonObj.get("warehouseId") != null && !jsonObj.get("warehouseId").isJsonNull()) && !jsonObj.get("warehouseId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `warehouseId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("warehouseId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FreightResponseFreightEstimateResponseLinesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FreightResponseFreightEstimateResponseLinesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FreightResponseFreightEstimateResponseLinesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FreightResponseFreightEstimateResponseLinesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FreightResponseFreightEstimateResponseLinesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of FreightResponseFreightEstimateResponseLinesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of FreightResponseFreightEstimateResponseLinesInner + * @throws IOException if the JSON string is invalid with respect to FreightResponseFreightEstimateResponseLinesInner + */ + public static FreightResponseFreightEstimateResponseLinesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FreightResponseFreightEstimateResponseLinesInner.class); + } + + /** + * Convert an instance of FreightResponseFreightEstimateResponseLinesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/GetResellerV6ValidateQuote400Response.java b/src/main/java/xiresellers/client/model/GetResellerV6ValidateQuote400Response.java new file mode 100644 index 00000000..085ebf46 --- /dev/null +++ b/src/main/java/xiresellers/client/model/GetResellerV6ValidateQuote400Response.java @@ -0,0 +1,315 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.GetResellerV6ValidateQuote400ResponseFieldsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * GetResellerV6ValidateQuote400Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class GetResellerV6ValidateQuote400Response { + public static final String SERIALIZED_NAME_TRACEID = "traceid"; + @SerializedName(SERIALIZED_NAME_TRACEID) + private String traceid; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public static final String SERIALIZED_NAME_FIELDS = "fields"; + @SerializedName(SERIALIZED_NAME_FIELDS) + private List fields; + + public GetResellerV6ValidateQuote400Response() { + } + + public GetResellerV6ValidateQuote400Response traceid(String traceid) { + this.traceid = traceid; + return this; + } + + /** + * Unique Id to identify error. + * @return traceid + **/ + @javax.annotation.Nullable + public String getTraceid() { + return traceid; + } + + public void setTraceid(String traceid) { + this.traceid = traceid; + } + + + public GetResellerV6ValidateQuote400Response type(String type) { + this.type = type; + return this; + } + + /** + * Describes the type of the error. + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + + public GetResellerV6ValidateQuote400Response message(String message) { + this.message = message; + return this; + } + + /** + * A detailed error message. + * @return message + **/ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + public GetResellerV6ValidateQuote400Response fields(List fields) { + this.fields = fields; + return this; + } + + public GetResellerV6ValidateQuote400Response addFieldsItem(GetResellerV6ValidateQuote400ResponseFieldsInner fieldsItem) { + if (this.fields == null) { + this.fields = new ArrayList<>(); + } + this.fields.add(fieldsItem); + return this; + } + + /** + * Get fields + * @return fields + **/ + @javax.annotation.Nullable + public List getFields() { + return fields; + } + + public void setFields(List fields) { + this.fields = fields; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetResellerV6ValidateQuote400Response getResellerV6ValidateQuote400Response = (GetResellerV6ValidateQuote400Response) o; + return Objects.equals(this.traceid, getResellerV6ValidateQuote400Response.traceid) && + Objects.equals(this.type, getResellerV6ValidateQuote400Response.type) && + Objects.equals(this.message, getResellerV6ValidateQuote400Response.message) && + Objects.equals(this.fields, getResellerV6ValidateQuote400Response.fields); + } + + @Override + public int hashCode() { + return Objects.hash(traceid, type, message, fields); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetResellerV6ValidateQuote400Response {\n"); + sb.append(" traceid: ").append(toIndentedString(traceid)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" fields: ").append(toIndentedString(fields)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("traceid"); + openapiFields.add("type"); + openapiFields.add("message"); + openapiFields.add("fields"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetResellerV6ValidateQuote400Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetResellerV6ValidateQuote400Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetResellerV6ValidateQuote400Response is not found in the empty JSON string", GetResellerV6ValidateQuote400Response.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GetResellerV6ValidateQuote400Response.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetResellerV6ValidateQuote400Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("traceid") != null && !jsonObj.get("traceid").isJsonNull()) && !jsonObj.get("traceid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `traceid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("traceid").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + if (jsonObj.get("fields") != null && !jsonObj.get("fields").isJsonNull()) { + JsonArray jsonArrayfields = jsonObj.getAsJsonArray("fields"); + if (jsonArrayfields != null) { + // ensure the json data is an array + if (!jsonObj.get("fields").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `fields` to be an array in the JSON string but got `%s`", jsonObj.get("fields").toString())); + } + + // validate the optional field `fields` (array) + for (int i = 0; i < jsonArrayfields.size(); i++) { + GetResellerV6ValidateQuote400ResponseFieldsInner.validateJsonElement(jsonArrayfields.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetResellerV6ValidateQuote400Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetResellerV6ValidateQuote400Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetResellerV6ValidateQuote400Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetResellerV6ValidateQuote400Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetResellerV6ValidateQuote400Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetResellerV6ValidateQuote400Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetResellerV6ValidateQuote400Response + * @throws IOException if the JSON string is invalid with respect to GetResellerV6ValidateQuote400Response + */ + public static GetResellerV6ValidateQuote400Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetResellerV6ValidateQuote400Response.class); + } + + /** + * Convert an instance of GetResellerV6ValidateQuote400Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/GetResellerV6ValidateQuote400ResponseFieldsInner.java b/src/main/java/xiresellers/client/model/GetResellerV6ValidateQuote400ResponseFieldsInner.java new file mode 100644 index 00000000..a62ef4fa --- /dev/null +++ b/src/main/java/xiresellers/client/model/GetResellerV6ValidateQuote400ResponseFieldsInner.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * GetResellerV6ValidateQuote400ResponseFieldsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class GetResellerV6ValidateQuote400ResponseFieldsInner { + public static final String SERIALIZED_NAME_FIELD = "field"; + @SerializedName(SERIALIZED_NAME_FIELD) + private String field; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private String value; + + public GetResellerV6ValidateQuote400ResponseFieldsInner() { + } + + public GetResellerV6ValidateQuote400ResponseFieldsInner field(String field) { + this.field = field; + return this; + } + + /** + * Contains the name of the field. + * @return field + **/ + @javax.annotation.Nullable + public String getField() { + return field; + } + + public void setField(String field) { + this.field = field; + } + + + public GetResellerV6ValidateQuote400ResponseFieldsInner message(String message) { + this.message = message; + return this; + } + + /** + * Gives the description of the field message. + * @return message + **/ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + public GetResellerV6ValidateQuote400ResponseFieldsInner value(String value) { + this.value = value; + return this; + } + + /** + * Value sent in the input for the specific field. + * @return value + **/ + @javax.annotation.Nullable + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetResellerV6ValidateQuote400ResponseFieldsInner getResellerV6ValidateQuote400ResponseFieldsInner = (GetResellerV6ValidateQuote400ResponseFieldsInner) o; + return Objects.equals(this.field, getResellerV6ValidateQuote400ResponseFieldsInner.field) && + Objects.equals(this.message, getResellerV6ValidateQuote400ResponseFieldsInner.message) && + Objects.equals(this.value, getResellerV6ValidateQuote400ResponseFieldsInner.value); + } + + @Override + public int hashCode() { + return Objects.hash(field, message, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetResellerV6ValidateQuote400ResponseFieldsInner {\n"); + sb.append(" field: ").append(toIndentedString(field)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("field"); + openapiFields.add("message"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetResellerV6ValidateQuote400ResponseFieldsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetResellerV6ValidateQuote400ResponseFieldsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetResellerV6ValidateQuote400ResponseFieldsInner is not found in the empty JSON string", GetResellerV6ValidateQuote400ResponseFieldsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GetResellerV6ValidateQuote400ResponseFieldsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetResellerV6ValidateQuote400ResponseFieldsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("field") != null && !jsonObj.get("field").isJsonNull()) && !jsonObj.get("field").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `field` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field").toString())); + } + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetResellerV6ValidateQuote400ResponseFieldsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetResellerV6ValidateQuote400ResponseFieldsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetResellerV6ValidateQuote400ResponseFieldsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetResellerV6ValidateQuote400ResponseFieldsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetResellerV6ValidateQuote400ResponseFieldsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetResellerV6ValidateQuote400ResponseFieldsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetResellerV6ValidateQuote400ResponseFieldsInner + * @throws IOException if the JSON string is invalid with respect to GetResellerV6ValidateQuote400ResponseFieldsInner + */ + public static GetResellerV6ValidateQuote400ResponseFieldsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetResellerV6ValidateQuote400ResponseFieldsInner.class); + } + + /** + * Convert an instance of GetResellerV6ValidateQuote400ResponseFieldsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/GetResellerV6ValidateQuote500Response.java b/src/main/java/xiresellers/client/model/GetResellerV6ValidateQuote500Response.java new file mode 100644 index 00000000..9883d3ec --- /dev/null +++ b/src/main/java/xiresellers/client/model/GetResellerV6ValidateQuote500Response.java @@ -0,0 +1,304 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * GetResellerV6ValidateQuote500Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class GetResellerV6ValidateQuote500Response { + public static final String SERIALIZED_NAME_TRACEID = "traceid"; + @SerializedName(SERIALIZED_NAME_TRACEID) + private String traceid; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public static final String SERIALIZED_NAME_FIELDS = "fields"; + @SerializedName(SERIALIZED_NAME_FIELDS) + private List fields; + + public GetResellerV6ValidateQuote500Response() { + } + + public GetResellerV6ValidateQuote500Response traceid(String traceid) { + this.traceid = traceid; + return this; + } + + /** + * Unique Id to identify error. + * @return traceid + **/ + @javax.annotation.Nullable + public String getTraceid() { + return traceid; + } + + public void setTraceid(String traceid) { + this.traceid = traceid; + } + + + public GetResellerV6ValidateQuote500Response type(String type) { + this.type = type; + return this; + } + + /** + * Describes the type of the error. + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + + public GetResellerV6ValidateQuote500Response message(String message) { + this.message = message; + return this; + } + + /** + * Describes the error message. + * @return message + **/ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + public GetResellerV6ValidateQuote500Response fields(List fields) { + this.fields = fields; + return this; + } + + public GetResellerV6ValidateQuote500Response addFieldsItem(Object fieldsItem) { + if (this.fields == null) { + this.fields = new ArrayList<>(); + } + this.fields.add(fieldsItem); + return this; + } + + /** + * Get fields + * @return fields + **/ + @javax.annotation.Nullable + public List getFields() { + return fields; + } + + public void setFields(List fields) { + this.fields = fields; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetResellerV6ValidateQuote500Response getResellerV6ValidateQuote500Response = (GetResellerV6ValidateQuote500Response) o; + return Objects.equals(this.traceid, getResellerV6ValidateQuote500Response.traceid) && + Objects.equals(this.type, getResellerV6ValidateQuote500Response.type) && + Objects.equals(this.message, getResellerV6ValidateQuote500Response.message) && + Objects.equals(this.fields, getResellerV6ValidateQuote500Response.fields); + } + + @Override + public int hashCode() { + return Objects.hash(traceid, type, message, fields); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetResellerV6ValidateQuote500Response {\n"); + sb.append(" traceid: ").append(toIndentedString(traceid)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" fields: ").append(toIndentedString(fields)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("traceid"); + openapiFields.add("type"); + openapiFields.add("message"); + openapiFields.add("fields"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetResellerV6ValidateQuote500Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetResellerV6ValidateQuote500Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetResellerV6ValidateQuote500Response is not found in the empty JSON string", GetResellerV6ValidateQuote500Response.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GetResellerV6ValidateQuote500Response.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetResellerV6ValidateQuote500Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("traceid") != null && !jsonObj.get("traceid").isJsonNull()) && !jsonObj.get("traceid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `traceid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("traceid").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("fields") != null && !jsonObj.get("fields").isJsonNull() && !jsonObj.get("fields").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `fields` to be an array in the JSON string but got `%s`", jsonObj.get("fields").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetResellerV6ValidateQuote500Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetResellerV6ValidateQuote500Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetResellerV6ValidateQuote500Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetResellerV6ValidateQuote500Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetResellerV6ValidateQuote500Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetResellerV6ValidateQuote500Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetResellerV6ValidateQuote500Response + * @throws IOException if the JSON string is invalid with respect to GetResellerV6ValidateQuote500Response + */ + public static GetResellerV6ValidateQuote500Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetResellerV6ValidateQuote500Response.class); + } + + /** + * Convert an instance of GetResellerV6ValidateQuote500Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/InvoiceDetailRequest.java b/src/main/java/xiresellers/client/model/InvoiceDetailRequest.java new file mode 100644 index 00000000..afa7a4f4 --- /dev/null +++ b/src/main/java/xiresellers/client/model/InvoiceDetailRequest.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.InvoiceDetailRequestServicerequest; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * InvoiceDetailRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class InvoiceDetailRequest { + public static final String SERIALIZED_NAME_SERVICEREQUEST = "servicerequest"; + @SerializedName(SERIALIZED_NAME_SERVICEREQUEST) + private InvoiceDetailRequestServicerequest servicerequest; + + public InvoiceDetailRequest() { + } + + public InvoiceDetailRequest servicerequest(InvoiceDetailRequestServicerequest servicerequest) { + this.servicerequest = servicerequest; + return this; + } + + /** + * Get servicerequest + * @return servicerequest + **/ + @javax.annotation.Nullable + public InvoiceDetailRequestServicerequest getServicerequest() { + return servicerequest; + } + + public void setServicerequest(InvoiceDetailRequestServicerequest servicerequest) { + this.servicerequest = servicerequest; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvoiceDetailRequest invoiceDetailRequest = (InvoiceDetailRequest) o; + return Objects.equals(this.servicerequest, invoiceDetailRequest.servicerequest); + } + + @Override + public int hashCode() { + return Objects.hash(servicerequest); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvoiceDetailRequest {\n"); + sb.append(" servicerequest: ").append(toIndentedString(servicerequest)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("servicerequest"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvoiceDetailRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvoiceDetailRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceDetailRequest is not found in the empty JSON string", InvoiceDetailRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvoiceDetailRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvoiceDetailRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `servicerequest` + if (jsonObj.get("servicerequest") != null && !jsonObj.get("servicerequest").isJsonNull()) { + InvoiceDetailRequestServicerequest.validateJsonElement(jsonObj.get("servicerequest")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvoiceDetailRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvoiceDetailRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvoiceDetailRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvoiceDetailRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InvoiceDetailRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvoiceDetailRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvoiceDetailRequest + * @throws IOException if the JSON string is invalid with respect to InvoiceDetailRequest + */ + public static InvoiceDetailRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvoiceDetailRequest.class); + } + + /** + * Convert an instance of InvoiceDetailRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/InvoiceDetailRequestServicerequest.java b/src/main/java/xiresellers/client/model/InvoiceDetailRequestServicerequest.java new file mode 100644 index 00000000..7e118277 --- /dev/null +++ b/src/main/java/xiresellers/client/model/InvoiceDetailRequestServicerequest.java @@ -0,0 +1,239 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.InvoiceDetailRequestServicerequestInvoicedetailrequest; +import xiresellers.client.model.InvoiceDetailRequestServicerequestRequestpreamble; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * InvoiceDetailRequestServicerequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class InvoiceDetailRequestServicerequest { + public static final String SERIALIZED_NAME_REQUESTPREAMBLE = "requestpreamble"; + @SerializedName(SERIALIZED_NAME_REQUESTPREAMBLE) + private InvoiceDetailRequestServicerequestRequestpreamble requestpreamble; + + public static final String SERIALIZED_NAME_INVOICEDETAILREQUEST = "invoicedetailrequest"; + @SerializedName(SERIALIZED_NAME_INVOICEDETAILREQUEST) + private InvoiceDetailRequestServicerequestInvoicedetailrequest invoicedetailrequest; + + public InvoiceDetailRequestServicerequest() { + } + + public InvoiceDetailRequestServicerequest requestpreamble(InvoiceDetailRequestServicerequestRequestpreamble requestpreamble) { + this.requestpreamble = requestpreamble; + return this; + } + + /** + * Get requestpreamble + * @return requestpreamble + **/ + @javax.annotation.Nullable + public InvoiceDetailRequestServicerequestRequestpreamble getRequestpreamble() { + return requestpreamble; + } + + public void setRequestpreamble(InvoiceDetailRequestServicerequestRequestpreamble requestpreamble) { + this.requestpreamble = requestpreamble; + } + + + public InvoiceDetailRequestServicerequest invoicedetailrequest(InvoiceDetailRequestServicerequestInvoicedetailrequest invoicedetailrequest) { + this.invoicedetailrequest = invoicedetailrequest; + return this; + } + + /** + * Get invoicedetailrequest + * @return invoicedetailrequest + **/ + @javax.annotation.Nullable + public InvoiceDetailRequestServicerequestInvoicedetailrequest getInvoicedetailrequest() { + return invoicedetailrequest; + } + + public void setInvoicedetailrequest(InvoiceDetailRequestServicerequestInvoicedetailrequest invoicedetailrequest) { + this.invoicedetailrequest = invoicedetailrequest; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvoiceDetailRequestServicerequest invoiceDetailRequestServicerequest = (InvoiceDetailRequestServicerequest) o; + return Objects.equals(this.requestpreamble, invoiceDetailRequestServicerequest.requestpreamble) && + Objects.equals(this.invoicedetailrequest, invoiceDetailRequestServicerequest.invoicedetailrequest); + } + + @Override + public int hashCode() { + return Objects.hash(requestpreamble, invoicedetailrequest); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvoiceDetailRequestServicerequest {\n"); + sb.append(" requestpreamble: ").append(toIndentedString(requestpreamble)).append("\n"); + sb.append(" invoicedetailrequest: ").append(toIndentedString(invoicedetailrequest)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("requestpreamble"); + openapiFields.add("invoicedetailrequest"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvoiceDetailRequestServicerequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvoiceDetailRequestServicerequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceDetailRequestServicerequest is not found in the empty JSON string", InvoiceDetailRequestServicerequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvoiceDetailRequestServicerequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvoiceDetailRequestServicerequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `requestpreamble` + if (jsonObj.get("requestpreamble") != null && !jsonObj.get("requestpreamble").isJsonNull()) { + InvoiceDetailRequestServicerequestRequestpreamble.validateJsonElement(jsonObj.get("requestpreamble")); + } + // validate the optional field `invoicedetailrequest` + if (jsonObj.get("invoicedetailrequest") != null && !jsonObj.get("invoicedetailrequest").isJsonNull()) { + InvoiceDetailRequestServicerequestInvoicedetailrequest.validateJsonElement(jsonObj.get("invoicedetailrequest")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvoiceDetailRequestServicerequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvoiceDetailRequestServicerequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvoiceDetailRequestServicerequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvoiceDetailRequestServicerequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InvoiceDetailRequestServicerequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvoiceDetailRequestServicerequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvoiceDetailRequestServicerequest + * @throws IOException if the JSON string is invalid with respect to InvoiceDetailRequestServicerequest + */ + public static InvoiceDetailRequestServicerequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvoiceDetailRequestServicerequest.class); + } + + /** + * Convert an instance of InvoiceDetailRequestServicerequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/InvoiceDetailRequestServicerequestInvoicedetailrequest.java b/src/main/java/xiresellers/client/model/InvoiceDetailRequestServicerequestInvoicedetailrequest.java new file mode 100644 index 00000000..17c1efaf --- /dev/null +++ b/src/main/java/xiresellers/client/model/InvoiceDetailRequestServicerequestInvoicedetailrequest.java @@ -0,0 +1,214 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * InvoiceDetailRequestServicerequestInvoicedetailrequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class InvoiceDetailRequestServicerequestInvoicedetailrequest { + public static final String SERIALIZED_NAME_INVOICENUMBER = "invoicenumber"; + @SerializedName(SERIALIZED_NAME_INVOICENUMBER) + private String invoicenumber; + + public InvoiceDetailRequestServicerequestInvoicedetailrequest() { + } + + public InvoiceDetailRequestServicerequestInvoicedetailrequest invoicenumber(String invoicenumber) { + this.invoicenumber = invoicenumber; + return this; + } + + /** + * Get invoicenumber + * @return invoicenumber + **/ + @javax.annotation.Nonnull + public String getInvoicenumber() { + return invoicenumber; + } + + public void setInvoicenumber(String invoicenumber) { + this.invoicenumber = invoicenumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvoiceDetailRequestServicerequestInvoicedetailrequest invoiceDetailRequestServicerequestInvoicedetailrequest = (InvoiceDetailRequestServicerequestInvoicedetailrequest) o; + return Objects.equals(this.invoicenumber, invoiceDetailRequestServicerequestInvoicedetailrequest.invoicenumber); + } + + @Override + public int hashCode() { + return Objects.hash(invoicenumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvoiceDetailRequestServicerequestInvoicedetailrequest {\n"); + sb.append(" invoicenumber: ").append(toIndentedString(invoicenumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("invoicenumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("invoicenumber"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvoiceDetailRequestServicerequestInvoicedetailrequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvoiceDetailRequestServicerequestInvoicedetailrequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceDetailRequestServicerequestInvoicedetailrequest is not found in the empty JSON string", InvoiceDetailRequestServicerequestInvoicedetailrequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvoiceDetailRequestServicerequestInvoicedetailrequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvoiceDetailRequestServicerequestInvoicedetailrequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : InvoiceDetailRequestServicerequestInvoicedetailrequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("invoicenumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `invoicenumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoicenumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvoiceDetailRequestServicerequestInvoicedetailrequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvoiceDetailRequestServicerequestInvoicedetailrequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvoiceDetailRequestServicerequestInvoicedetailrequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvoiceDetailRequestServicerequestInvoicedetailrequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InvoiceDetailRequestServicerequestInvoicedetailrequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvoiceDetailRequestServicerequestInvoicedetailrequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvoiceDetailRequestServicerequestInvoicedetailrequest + * @throws IOException if the JSON string is invalid with respect to InvoiceDetailRequestServicerequestInvoicedetailrequest + */ + public static InvoiceDetailRequestServicerequestInvoicedetailrequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvoiceDetailRequestServicerequestInvoicedetailrequest.class); + } + + /** + * Convert an instance of InvoiceDetailRequestServicerequestInvoicedetailrequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/InvoiceDetailRequestServicerequestRequestpreamble.java b/src/main/java/xiresellers/client/model/InvoiceDetailRequestServicerequestRequestpreamble.java new file mode 100644 index 00000000..eeba65d5 --- /dev/null +++ b/src/main/java/xiresellers/client/model/InvoiceDetailRequestServicerequestRequestpreamble.java @@ -0,0 +1,244 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * InvoiceDetailRequestServicerequestRequestpreamble + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class InvoiceDetailRequestServicerequestRequestpreamble { + public static final String SERIALIZED_NAME_ISOCOUNTRYCODE = "isocountrycode"; + @SerializedName(SERIALIZED_NAME_ISOCOUNTRYCODE) + private String isocountrycode; + + public static final String SERIALIZED_NAME_CUSTOMERNUMBER = "customernumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMERNUMBER) + private String customernumber; + + public InvoiceDetailRequestServicerequestRequestpreamble() { + } + + public InvoiceDetailRequestServicerequestRequestpreamble isocountrycode(String isocountrycode) { + this.isocountrycode = isocountrycode; + return this; + } + + /** + * Get isocountrycode + * @return isocountrycode + **/ + @javax.annotation.Nonnull + public String getIsocountrycode() { + return isocountrycode; + } + + public void setIsocountrycode(String isocountrycode) { + this.isocountrycode = isocountrycode; + } + + + public InvoiceDetailRequestServicerequestRequestpreamble customernumber(String customernumber) { + this.customernumber = customernumber; + return this; + } + + /** + * Get customernumber + * @return customernumber + **/ + @javax.annotation.Nonnull + public String getCustomernumber() { + return customernumber; + } + + public void setCustomernumber(String customernumber) { + this.customernumber = customernumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvoiceDetailRequestServicerequestRequestpreamble invoiceDetailRequestServicerequestRequestpreamble = (InvoiceDetailRequestServicerequestRequestpreamble) o; + return Objects.equals(this.isocountrycode, invoiceDetailRequestServicerequestRequestpreamble.isocountrycode) && + Objects.equals(this.customernumber, invoiceDetailRequestServicerequestRequestpreamble.customernumber); + } + + @Override + public int hashCode() { + return Objects.hash(isocountrycode, customernumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvoiceDetailRequestServicerequestRequestpreamble {\n"); + sb.append(" isocountrycode: ").append(toIndentedString(isocountrycode)).append("\n"); + sb.append(" customernumber: ").append(toIndentedString(customernumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("isocountrycode"); + openapiFields.add("customernumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("isocountrycode"); + openapiRequiredFields.add("customernumber"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvoiceDetailRequestServicerequestRequestpreamble + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvoiceDetailRequestServicerequestRequestpreamble.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceDetailRequestServicerequestRequestpreamble is not found in the empty JSON string", InvoiceDetailRequestServicerequestRequestpreamble.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvoiceDetailRequestServicerequestRequestpreamble.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvoiceDetailRequestServicerequestRequestpreamble` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : InvoiceDetailRequestServicerequestRequestpreamble.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("isocountrycode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `isocountrycode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isocountrycode").toString())); + } + if (!jsonObj.get("customernumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customernumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customernumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvoiceDetailRequestServicerequestRequestpreamble.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvoiceDetailRequestServicerequestRequestpreamble' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvoiceDetailRequestServicerequestRequestpreamble.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvoiceDetailRequestServicerequestRequestpreamble value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InvoiceDetailRequestServicerequestRequestpreamble read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvoiceDetailRequestServicerequestRequestpreamble given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvoiceDetailRequestServicerequestRequestpreamble + * @throws IOException if the JSON string is invalid with respect to InvoiceDetailRequestServicerequestRequestpreamble + */ + public static InvoiceDetailRequestServicerequestRequestpreamble fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvoiceDetailRequestServicerequestRequestpreamble.class); + } + + /** + * Convert an instance of InvoiceDetailRequestServicerequestRequestpreamble to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/InvoiceDetailResponse.java b/src/main/java/xiresellers/client/model/InvoiceDetailResponse.java new file mode 100644 index 00000000..d797c3fd --- /dev/null +++ b/src/main/java/xiresellers/client/model/InvoiceDetailResponse.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.InvoiceDetailResponseServiceresponse; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * InvoiceDetailResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class InvoiceDetailResponse { + public static final String SERIALIZED_NAME_SERVICERESPONSE = "serviceresponse"; + @SerializedName(SERIALIZED_NAME_SERVICERESPONSE) + private InvoiceDetailResponseServiceresponse serviceresponse; + + public InvoiceDetailResponse() { + } + + public InvoiceDetailResponse serviceresponse(InvoiceDetailResponseServiceresponse serviceresponse) { + this.serviceresponse = serviceresponse; + return this; + } + + /** + * Get serviceresponse + * @return serviceresponse + **/ + @javax.annotation.Nullable + public InvoiceDetailResponseServiceresponse getServiceresponse() { + return serviceresponse; + } + + public void setServiceresponse(InvoiceDetailResponseServiceresponse serviceresponse) { + this.serviceresponse = serviceresponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvoiceDetailResponse invoiceDetailResponse = (InvoiceDetailResponse) o; + return Objects.equals(this.serviceresponse, invoiceDetailResponse.serviceresponse); + } + + @Override + public int hashCode() { + return Objects.hash(serviceresponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvoiceDetailResponse {\n"); + sb.append(" serviceresponse: ").append(toIndentedString(serviceresponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("serviceresponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvoiceDetailResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvoiceDetailResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceDetailResponse is not found in the empty JSON string", InvoiceDetailResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvoiceDetailResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvoiceDetailResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `serviceresponse` + if (jsonObj.get("serviceresponse") != null && !jsonObj.get("serviceresponse").isJsonNull()) { + InvoiceDetailResponseServiceresponse.validateJsonElement(jsonObj.get("serviceresponse")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvoiceDetailResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvoiceDetailResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvoiceDetailResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvoiceDetailResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InvoiceDetailResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvoiceDetailResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvoiceDetailResponse + * @throws IOException if the JSON string is invalid with respect to InvoiceDetailResponse + */ + public static InvoiceDetailResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvoiceDetailResponse.class); + } + + /** + * Convert an instance of InvoiceDetailResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/InvoiceDetailResponseServiceresponse.java b/src/main/java/xiresellers/client/model/InvoiceDetailResponseServiceresponse.java new file mode 100644 index 00000000..92a03d94 --- /dev/null +++ b/src/main/java/xiresellers/client/model/InvoiceDetailResponseServiceresponse.java @@ -0,0 +1,239 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.InvoiceDetailResponseServiceresponseInvoicedetailresponse; +import xiresellers.client.model.InvoiceDetailResponseServiceresponseResponsepreamble; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * InvoiceDetailResponseServiceresponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class InvoiceDetailResponseServiceresponse { + public static final String SERIALIZED_NAME_RESPONSEPREAMBLE = "responsepreamble"; + @SerializedName(SERIALIZED_NAME_RESPONSEPREAMBLE) + private InvoiceDetailResponseServiceresponseResponsepreamble responsepreamble; + + public static final String SERIALIZED_NAME_INVOICEDETAILRESPONSE = "invoicedetailresponse"; + @SerializedName(SERIALIZED_NAME_INVOICEDETAILRESPONSE) + private InvoiceDetailResponseServiceresponseInvoicedetailresponse invoicedetailresponse; + + public InvoiceDetailResponseServiceresponse() { + } + + public InvoiceDetailResponseServiceresponse responsepreamble(InvoiceDetailResponseServiceresponseResponsepreamble responsepreamble) { + this.responsepreamble = responsepreamble; + return this; + } + + /** + * Get responsepreamble + * @return responsepreamble + **/ + @javax.annotation.Nullable + public InvoiceDetailResponseServiceresponseResponsepreamble getResponsepreamble() { + return responsepreamble; + } + + public void setResponsepreamble(InvoiceDetailResponseServiceresponseResponsepreamble responsepreamble) { + this.responsepreamble = responsepreamble; + } + + + public InvoiceDetailResponseServiceresponse invoicedetailresponse(InvoiceDetailResponseServiceresponseInvoicedetailresponse invoicedetailresponse) { + this.invoicedetailresponse = invoicedetailresponse; + return this; + } + + /** + * Get invoicedetailresponse + * @return invoicedetailresponse + **/ + @javax.annotation.Nullable + public InvoiceDetailResponseServiceresponseInvoicedetailresponse getInvoicedetailresponse() { + return invoicedetailresponse; + } + + public void setInvoicedetailresponse(InvoiceDetailResponseServiceresponseInvoicedetailresponse invoicedetailresponse) { + this.invoicedetailresponse = invoicedetailresponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvoiceDetailResponseServiceresponse invoiceDetailResponseServiceresponse = (InvoiceDetailResponseServiceresponse) o; + return Objects.equals(this.responsepreamble, invoiceDetailResponseServiceresponse.responsepreamble) && + Objects.equals(this.invoicedetailresponse, invoiceDetailResponseServiceresponse.invoicedetailresponse); + } + + @Override + public int hashCode() { + return Objects.hash(responsepreamble, invoicedetailresponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvoiceDetailResponseServiceresponse {\n"); + sb.append(" responsepreamble: ").append(toIndentedString(responsepreamble)).append("\n"); + sb.append(" invoicedetailresponse: ").append(toIndentedString(invoicedetailresponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("responsepreamble"); + openapiFields.add("invoicedetailresponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvoiceDetailResponseServiceresponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvoiceDetailResponseServiceresponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceDetailResponseServiceresponse is not found in the empty JSON string", InvoiceDetailResponseServiceresponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvoiceDetailResponseServiceresponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvoiceDetailResponseServiceresponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `responsepreamble` + if (jsonObj.get("responsepreamble") != null && !jsonObj.get("responsepreamble").isJsonNull()) { + InvoiceDetailResponseServiceresponseResponsepreamble.validateJsonElement(jsonObj.get("responsepreamble")); + } + // validate the optional field `invoicedetailresponse` + if (jsonObj.get("invoicedetailresponse") != null && !jsonObj.get("invoicedetailresponse").isJsonNull()) { + InvoiceDetailResponseServiceresponseInvoicedetailresponse.validateJsonElement(jsonObj.get("invoicedetailresponse")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvoiceDetailResponseServiceresponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvoiceDetailResponseServiceresponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvoiceDetailResponseServiceresponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvoiceDetailResponseServiceresponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InvoiceDetailResponseServiceresponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvoiceDetailResponseServiceresponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvoiceDetailResponseServiceresponse + * @throws IOException if the JSON string is invalid with respect to InvoiceDetailResponseServiceresponse + */ + public static InvoiceDetailResponseServiceresponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvoiceDetailResponseServiceresponse.class); + } + + /** + * Convert an instance of InvoiceDetailResponseServiceresponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseInvoicedetailresponse.java b/src/main/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseInvoicedetailresponse.java new file mode 100644 index 00000000..2f0fec15 --- /dev/null +++ b/src/main/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseInvoicedetailresponse.java @@ -0,0 +1,766 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * InvoiceDetailResponseServiceresponseInvoicedetailresponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class InvoiceDetailResponseServiceresponseInvoicedetailresponse { + public static final String SERIALIZED_NAME_CUSTOMERNUMBER = "customernumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMERNUMBER) + private String customernumber; + + public static final String SERIALIZED_NAME_INVOICENUMBER = "invoicenumber"; + @SerializedName(SERIALIZED_NAME_INVOICENUMBER) + private String invoicenumber; + + public static final String SERIALIZED_NAME_INVOICEDATE = "invoicedate"; + @SerializedName(SERIALIZED_NAME_INVOICEDATE) + private LocalDate invoicedate; + + public static final String SERIALIZED_NAME_INVOICETYPE = "invoicetype"; + @SerializedName(SERIALIZED_NAME_INVOICETYPE) + private String invoicetype; + + public static final String SERIALIZED_NAME_CUSTOMERORDERNUMBER = "customerordernumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMERORDERNUMBER) + private String customerordernumber; + + public static final String SERIALIZED_NAME_CUSTOMERFREIGHTAMOUNT = "customerfreightamount"; + @SerializedName(SERIALIZED_NAME_CUSTOMERFREIGHTAMOUNT) + private Double customerfreightamount; + + public static final String SERIALIZED_NAME_CUSTOMERFOREIGNFRIGHTAMT = "customerforeignfrightamt"; + @SerializedName(SERIALIZED_NAME_CUSTOMERFOREIGNFRIGHTAMT) + private Float customerforeignfrightamt; + + public static final String SERIALIZED_NAME_TOTALTAXAMOUNT = "totaltaxamount"; + @SerializedName(SERIALIZED_NAME_TOTALTAXAMOUNT) + private Double totaltaxamount; + + public static final String SERIALIZED_NAME_TOTALAMOUNT = "totalamount"; + @SerializedName(SERIALIZED_NAME_TOTALAMOUNT) + private Double totalamount; + + public static final String SERIALIZED_NAME_SHIPTOSUFFIX = "shiptosuffix"; + @SerializedName(SERIALIZED_NAME_SHIPTOSUFFIX) + private String shiptosuffix; + + public static final String SERIALIZED_NAME_BILLTOSUFFIX = "billtosuffix"; + @SerializedName(SERIALIZED_NAME_BILLTOSUFFIX) + private String billtosuffix; + + public static final String SERIALIZED_NAME_FREIGHTAMOUNT = "freightamount"; + @SerializedName(SERIALIZED_NAME_FREIGHTAMOUNT) + private Double freightamount; + + public static final String SERIALIZED_NAME_PAYMENTTERMS = "paymentterms"; + @SerializedName(SERIALIZED_NAME_PAYMENTTERMS) + private String paymentterms; + + public static final String SERIALIZED_NAME_ORDERDATE = "orderdate"; + @SerializedName(SERIALIZED_NAME_ORDERDATE) + private String orderdate; + + public static final String SERIALIZED_NAME_CARRIER = "carrier"; + @SerializedName(SERIALIZED_NAME_CARRIER) + private String carrier; + + public static final String SERIALIZED_NAME_CARRIERDESCRIPTION = "carrierdescription"; + @SerializedName(SERIALIZED_NAME_CARRIERDESCRIPTION) + private String carrierdescription; + + public static final String SERIALIZED_NAME_DISCOUNTAMOUNT = "discountamount"; + @SerializedName(SERIALIZED_NAME_DISCOUNTAMOUNT) + private Double discountamount; + + public static final String SERIALIZED_NAME_TAXTYPE = "taxtype"; + @SerializedName(SERIALIZED_NAME_TAXTYPE) + private String taxtype; + + public static final String SERIALIZED_NAME_ENDUSERPONUMBER = "enduserponumber"; + @SerializedName(SERIALIZED_NAME_ENDUSERPONUMBER) + private String enduserponumber; + + public static final String SERIALIZED_NAME_FREIGHTFORWARDERCODE = "freightforwardercode"; + @SerializedName(SERIALIZED_NAME_FREIGHTFORWARDERCODE) + private String freightforwardercode; + + public static final String SERIALIZED_NAME_CREDITMEMOREASONCODE = "creditmemoreasoncode"; + @SerializedName(SERIALIZED_NAME_CREDITMEMOREASONCODE) + private String creditmemoreasoncode; + + public InvoiceDetailResponseServiceresponseInvoicedetailresponse() { + } + + public InvoiceDetailResponseServiceresponseInvoicedetailresponse customernumber(String customernumber) { + this.customernumber = customernumber; + return this; + } + + /** + * Get customernumber + * @return customernumber + **/ + @javax.annotation.Nullable + public String getCustomernumber() { + return customernumber; + } + + public void setCustomernumber(String customernumber) { + this.customernumber = customernumber; + } + + + public InvoiceDetailResponseServiceresponseInvoicedetailresponse invoicenumber(String invoicenumber) { + this.invoicenumber = invoicenumber; + return this; + } + + /** + * Get invoicenumber + * @return invoicenumber + **/ + @javax.annotation.Nullable + public String getInvoicenumber() { + return invoicenumber; + } + + public void setInvoicenumber(String invoicenumber) { + this.invoicenumber = invoicenumber; + } + + + public InvoiceDetailResponseServiceresponseInvoicedetailresponse invoicedate(LocalDate invoicedate) { + this.invoicedate = invoicedate; + return this; + } + + /** + * Get invoicedate + * @return invoicedate + **/ + @javax.annotation.Nullable + public LocalDate getInvoicedate() { + return invoicedate; + } + + public void setInvoicedate(LocalDate invoicedate) { + this.invoicedate = invoicedate; + } + + + public InvoiceDetailResponseServiceresponseInvoicedetailresponse invoicetype(String invoicetype) { + this.invoicetype = invoicetype; + return this; + } + + /** + * Get invoicetype + * @return invoicetype + **/ + @javax.annotation.Nullable + public String getInvoicetype() { + return invoicetype; + } + + public void setInvoicetype(String invoicetype) { + this.invoicetype = invoicetype; + } + + + public InvoiceDetailResponseServiceresponseInvoicedetailresponse customerordernumber(String customerordernumber) { + this.customerordernumber = customerordernumber; + return this; + } + + /** + * Get customerordernumber + * @return customerordernumber + **/ + @javax.annotation.Nullable + public String getCustomerordernumber() { + return customerordernumber; + } + + public void setCustomerordernumber(String customerordernumber) { + this.customerordernumber = customerordernumber; + } + + + public InvoiceDetailResponseServiceresponseInvoicedetailresponse customerfreightamount(Double customerfreightamount) { + this.customerfreightamount = customerfreightamount; + return this; + } + + /** + * Get customerfreightamount + * @return customerfreightamount + **/ + @javax.annotation.Nullable + public Double getCustomerfreightamount() { + return customerfreightamount; + } + + public void setCustomerfreightamount(Double customerfreightamount) { + this.customerfreightamount = customerfreightamount; + } + + + public InvoiceDetailResponseServiceresponseInvoicedetailresponse customerforeignfrightamt(Float customerforeignfrightamt) { + this.customerforeignfrightamt = customerforeignfrightamt; + return this; + } + + /** + * Get customerforeignfrightamt + * @return customerforeignfrightamt + **/ + @javax.annotation.Nullable + public Float getCustomerforeignfrightamt() { + return customerforeignfrightamt; + } + + public void setCustomerforeignfrightamt(Float customerforeignfrightamt) { + this.customerforeignfrightamt = customerforeignfrightamt; + } + + + public InvoiceDetailResponseServiceresponseInvoicedetailresponse totaltaxamount(Double totaltaxamount) { + this.totaltaxamount = totaltaxamount; + return this; + } + + /** + * Get totaltaxamount + * @return totaltaxamount + **/ + @javax.annotation.Nullable + public Double getTotaltaxamount() { + return totaltaxamount; + } + + public void setTotaltaxamount(Double totaltaxamount) { + this.totaltaxamount = totaltaxamount; + } + + + public InvoiceDetailResponseServiceresponseInvoicedetailresponse totalamount(Double totalamount) { + this.totalamount = totalamount; + return this; + } + + /** + * Get totalamount + * @return totalamount + **/ + @javax.annotation.Nullable + public Double getTotalamount() { + return totalamount; + } + + public void setTotalamount(Double totalamount) { + this.totalamount = totalamount; + } + + + public InvoiceDetailResponseServiceresponseInvoicedetailresponse shiptosuffix(String shiptosuffix) { + this.shiptosuffix = shiptosuffix; + return this; + } + + /** + * Get shiptosuffix + * @return shiptosuffix + **/ + @javax.annotation.Nullable + public String getShiptosuffix() { + return shiptosuffix; + } + + public void setShiptosuffix(String shiptosuffix) { + this.shiptosuffix = shiptosuffix; + } + + + public InvoiceDetailResponseServiceresponseInvoicedetailresponse billtosuffix(String billtosuffix) { + this.billtosuffix = billtosuffix; + return this; + } + + /** + * Get billtosuffix + * @return billtosuffix + **/ + @javax.annotation.Nullable + public String getBilltosuffix() { + return billtosuffix; + } + + public void setBilltosuffix(String billtosuffix) { + this.billtosuffix = billtosuffix; + } + + + public InvoiceDetailResponseServiceresponseInvoicedetailresponse freightamount(Double freightamount) { + this.freightamount = freightamount; + return this; + } + + /** + * Get freightamount + * @return freightamount + **/ + @javax.annotation.Nullable + public Double getFreightamount() { + return freightamount; + } + + public void setFreightamount(Double freightamount) { + this.freightamount = freightamount; + } + + + public InvoiceDetailResponseServiceresponseInvoicedetailresponse paymentterms(String paymentterms) { + this.paymentterms = paymentterms; + return this; + } + + /** + * Get paymentterms + * @return paymentterms + **/ + @javax.annotation.Nullable + public String getPaymentterms() { + return paymentterms; + } + + public void setPaymentterms(String paymentterms) { + this.paymentterms = paymentterms; + } + + + public InvoiceDetailResponseServiceresponseInvoicedetailresponse orderdate(String orderdate) { + this.orderdate = orderdate; + return this; + } + + /** + * Get orderdate + * @return orderdate + **/ + @javax.annotation.Nullable + public String getOrderdate() { + return orderdate; + } + + public void setOrderdate(String orderdate) { + this.orderdate = orderdate; + } + + + public InvoiceDetailResponseServiceresponseInvoicedetailresponse carrier(String carrier) { + this.carrier = carrier; + return this; + } + + /** + * Get carrier + * @return carrier + **/ + @javax.annotation.Nullable + public String getCarrier() { + return carrier; + } + + public void setCarrier(String carrier) { + this.carrier = carrier; + } + + + public InvoiceDetailResponseServiceresponseInvoicedetailresponse carrierdescription(String carrierdescription) { + this.carrierdescription = carrierdescription; + return this; + } + + /** + * Get carrierdescription + * @return carrierdescription + **/ + @javax.annotation.Nullable + public String getCarrierdescription() { + return carrierdescription; + } + + public void setCarrierdescription(String carrierdescription) { + this.carrierdescription = carrierdescription; + } + + + public InvoiceDetailResponseServiceresponseInvoicedetailresponse discountamount(Double discountamount) { + this.discountamount = discountamount; + return this; + } + + /** + * Get discountamount + * @return discountamount + **/ + @javax.annotation.Nullable + public Double getDiscountamount() { + return discountamount; + } + + public void setDiscountamount(Double discountamount) { + this.discountamount = discountamount; + } + + + public InvoiceDetailResponseServiceresponseInvoicedetailresponse taxtype(String taxtype) { + this.taxtype = taxtype; + return this; + } + + /** + * Get taxtype + * @return taxtype + **/ + @javax.annotation.Nullable + public String getTaxtype() { + return taxtype; + } + + public void setTaxtype(String taxtype) { + this.taxtype = taxtype; + } + + + public InvoiceDetailResponseServiceresponseInvoicedetailresponse enduserponumber(String enduserponumber) { + this.enduserponumber = enduserponumber; + return this; + } + + /** + * Get enduserponumber + * @return enduserponumber + **/ + @javax.annotation.Nullable + public String getEnduserponumber() { + return enduserponumber; + } + + public void setEnduserponumber(String enduserponumber) { + this.enduserponumber = enduserponumber; + } + + + public InvoiceDetailResponseServiceresponseInvoicedetailresponse freightforwardercode(String freightforwardercode) { + this.freightforwardercode = freightforwardercode; + return this; + } + + /** + * Get freightforwardercode + * @return freightforwardercode + **/ + @javax.annotation.Nullable + public String getFreightforwardercode() { + return freightforwardercode; + } + + public void setFreightforwardercode(String freightforwardercode) { + this.freightforwardercode = freightforwardercode; + } + + + public InvoiceDetailResponseServiceresponseInvoicedetailresponse creditmemoreasoncode(String creditmemoreasoncode) { + this.creditmemoreasoncode = creditmemoreasoncode; + return this; + } + + /** + * Get creditmemoreasoncode + * @return creditmemoreasoncode + **/ + @javax.annotation.Nullable + public String getCreditmemoreasoncode() { + return creditmemoreasoncode; + } + + public void setCreditmemoreasoncode(String creditmemoreasoncode) { + this.creditmemoreasoncode = creditmemoreasoncode; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvoiceDetailResponseServiceresponseInvoicedetailresponse invoiceDetailResponseServiceresponseInvoicedetailresponse = (InvoiceDetailResponseServiceresponseInvoicedetailresponse) o; + return Objects.equals(this.customernumber, invoiceDetailResponseServiceresponseInvoicedetailresponse.customernumber) && + Objects.equals(this.invoicenumber, invoiceDetailResponseServiceresponseInvoicedetailresponse.invoicenumber) && + Objects.equals(this.invoicedate, invoiceDetailResponseServiceresponseInvoicedetailresponse.invoicedate) && + Objects.equals(this.invoicetype, invoiceDetailResponseServiceresponseInvoicedetailresponse.invoicetype) && + Objects.equals(this.customerordernumber, invoiceDetailResponseServiceresponseInvoicedetailresponse.customerordernumber) && + Objects.equals(this.customerfreightamount, invoiceDetailResponseServiceresponseInvoicedetailresponse.customerfreightamount) && + Objects.equals(this.customerforeignfrightamt, invoiceDetailResponseServiceresponseInvoicedetailresponse.customerforeignfrightamt) && + Objects.equals(this.totaltaxamount, invoiceDetailResponseServiceresponseInvoicedetailresponse.totaltaxamount) && + Objects.equals(this.totalamount, invoiceDetailResponseServiceresponseInvoicedetailresponse.totalamount) && + Objects.equals(this.shiptosuffix, invoiceDetailResponseServiceresponseInvoicedetailresponse.shiptosuffix) && + Objects.equals(this.billtosuffix, invoiceDetailResponseServiceresponseInvoicedetailresponse.billtosuffix) && + Objects.equals(this.freightamount, invoiceDetailResponseServiceresponseInvoicedetailresponse.freightamount) && + Objects.equals(this.paymentterms, invoiceDetailResponseServiceresponseInvoicedetailresponse.paymentterms) && + Objects.equals(this.orderdate, invoiceDetailResponseServiceresponseInvoicedetailresponse.orderdate) && + Objects.equals(this.carrier, invoiceDetailResponseServiceresponseInvoicedetailresponse.carrier) && + Objects.equals(this.carrierdescription, invoiceDetailResponseServiceresponseInvoicedetailresponse.carrierdescription) && + Objects.equals(this.discountamount, invoiceDetailResponseServiceresponseInvoicedetailresponse.discountamount) && + Objects.equals(this.taxtype, invoiceDetailResponseServiceresponseInvoicedetailresponse.taxtype) && + Objects.equals(this.enduserponumber, invoiceDetailResponseServiceresponseInvoicedetailresponse.enduserponumber) && + Objects.equals(this.freightforwardercode, invoiceDetailResponseServiceresponseInvoicedetailresponse.freightforwardercode) && + Objects.equals(this.creditmemoreasoncode, invoiceDetailResponseServiceresponseInvoicedetailresponse.creditmemoreasoncode); + } + + @Override + public int hashCode() { + return Objects.hash(customernumber, invoicenumber, invoicedate, invoicetype, customerordernumber, customerfreightamount, customerforeignfrightamt, totaltaxamount, totalamount, shiptosuffix, billtosuffix, freightamount, paymentterms, orderdate, carrier, carrierdescription, discountamount, taxtype, enduserponumber, freightforwardercode, creditmemoreasoncode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvoiceDetailResponseServiceresponseInvoicedetailresponse {\n"); + sb.append(" customernumber: ").append(toIndentedString(customernumber)).append("\n"); + sb.append(" invoicenumber: ").append(toIndentedString(invoicenumber)).append("\n"); + sb.append(" invoicedate: ").append(toIndentedString(invoicedate)).append("\n"); + sb.append(" invoicetype: ").append(toIndentedString(invoicetype)).append("\n"); + sb.append(" customerordernumber: ").append(toIndentedString(customerordernumber)).append("\n"); + sb.append(" customerfreightamount: ").append(toIndentedString(customerfreightamount)).append("\n"); + sb.append(" customerforeignfrightamt: ").append(toIndentedString(customerforeignfrightamt)).append("\n"); + sb.append(" totaltaxamount: ").append(toIndentedString(totaltaxamount)).append("\n"); + sb.append(" totalamount: ").append(toIndentedString(totalamount)).append("\n"); + sb.append(" shiptosuffix: ").append(toIndentedString(shiptosuffix)).append("\n"); + sb.append(" billtosuffix: ").append(toIndentedString(billtosuffix)).append("\n"); + sb.append(" freightamount: ").append(toIndentedString(freightamount)).append("\n"); + sb.append(" paymentterms: ").append(toIndentedString(paymentterms)).append("\n"); + sb.append(" orderdate: ").append(toIndentedString(orderdate)).append("\n"); + sb.append(" carrier: ").append(toIndentedString(carrier)).append("\n"); + sb.append(" carrierdescription: ").append(toIndentedString(carrierdescription)).append("\n"); + sb.append(" discountamount: ").append(toIndentedString(discountamount)).append("\n"); + sb.append(" taxtype: ").append(toIndentedString(taxtype)).append("\n"); + sb.append(" enduserponumber: ").append(toIndentedString(enduserponumber)).append("\n"); + sb.append(" freightforwardercode: ").append(toIndentedString(freightforwardercode)).append("\n"); + sb.append(" creditmemoreasoncode: ").append(toIndentedString(creditmemoreasoncode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("customernumber"); + openapiFields.add("invoicenumber"); + openapiFields.add("invoicedate"); + openapiFields.add("invoicetype"); + openapiFields.add("customerordernumber"); + openapiFields.add("customerfreightamount"); + openapiFields.add("customerforeignfrightamt"); + openapiFields.add("totaltaxamount"); + openapiFields.add("totalamount"); + openapiFields.add("shiptosuffix"); + openapiFields.add("billtosuffix"); + openapiFields.add("freightamount"); + openapiFields.add("paymentterms"); + openapiFields.add("orderdate"); + openapiFields.add("carrier"); + openapiFields.add("carrierdescription"); + openapiFields.add("discountamount"); + openapiFields.add("taxtype"); + openapiFields.add("enduserponumber"); + openapiFields.add("freightforwardercode"); + openapiFields.add("creditmemoreasoncode"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvoiceDetailResponseServiceresponseInvoicedetailresponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvoiceDetailResponseServiceresponseInvoicedetailresponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceDetailResponseServiceresponseInvoicedetailresponse is not found in the empty JSON string", InvoiceDetailResponseServiceresponseInvoicedetailresponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvoiceDetailResponseServiceresponseInvoicedetailresponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvoiceDetailResponseServiceresponseInvoicedetailresponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("customernumber") != null && !jsonObj.get("customernumber").isJsonNull()) && !jsonObj.get("customernumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customernumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customernumber").toString())); + } + if ((jsonObj.get("invoicenumber") != null && !jsonObj.get("invoicenumber").isJsonNull()) && !jsonObj.get("invoicenumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `invoicenumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoicenumber").toString())); + } + if ((jsonObj.get("invoicetype") != null && !jsonObj.get("invoicetype").isJsonNull()) && !jsonObj.get("invoicetype").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `invoicetype` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoicetype").toString())); + } + if ((jsonObj.get("customerordernumber") != null && !jsonObj.get("customerordernumber").isJsonNull()) && !jsonObj.get("customerordernumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerordernumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerordernumber").toString())); + } + if ((jsonObj.get("shiptosuffix") != null && !jsonObj.get("shiptosuffix").isJsonNull()) && !jsonObj.get("shiptosuffix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shiptosuffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shiptosuffix").toString())); + } + if ((jsonObj.get("billtosuffix") != null && !jsonObj.get("billtosuffix").isJsonNull()) && !jsonObj.get("billtosuffix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `billtosuffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("billtosuffix").toString())); + } + if ((jsonObj.get("paymentterms") != null && !jsonObj.get("paymentterms").isJsonNull()) && !jsonObj.get("paymentterms").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `paymentterms` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentterms").toString())); + } + if ((jsonObj.get("orderdate") != null && !jsonObj.get("orderdate").isJsonNull()) && !jsonObj.get("orderdate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `orderdate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orderdate").toString())); + } + if ((jsonObj.get("carrier") != null && !jsonObj.get("carrier").isJsonNull()) && !jsonObj.get("carrier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `carrier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrier").toString())); + } + if ((jsonObj.get("carrierdescription") != null && !jsonObj.get("carrierdescription").isJsonNull()) && !jsonObj.get("carrierdescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `carrierdescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierdescription").toString())); + } + if ((jsonObj.get("taxtype") != null && !jsonObj.get("taxtype").isJsonNull()) && !jsonObj.get("taxtype").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `taxtype` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxtype").toString())); + } + if ((jsonObj.get("enduserponumber") != null && !jsonObj.get("enduserponumber").isJsonNull()) && !jsonObj.get("enduserponumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `enduserponumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("enduserponumber").toString())); + } + if ((jsonObj.get("freightforwardercode") != null && !jsonObj.get("freightforwardercode").isJsonNull()) && !jsonObj.get("freightforwardercode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `freightforwardercode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("freightforwardercode").toString())); + } + if ((jsonObj.get("creditmemoreasoncode") != null && !jsonObj.get("creditmemoreasoncode").isJsonNull()) && !jsonObj.get("creditmemoreasoncode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `creditmemoreasoncode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creditmemoreasoncode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvoiceDetailResponseServiceresponseInvoicedetailresponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvoiceDetailResponseServiceresponseInvoicedetailresponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvoiceDetailResponseServiceresponseInvoicedetailresponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvoiceDetailResponseServiceresponseInvoicedetailresponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InvoiceDetailResponseServiceresponseInvoicedetailresponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvoiceDetailResponseServiceresponseInvoicedetailresponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvoiceDetailResponseServiceresponseInvoicedetailresponse + * @throws IOException if the JSON string is invalid with respect to InvoiceDetailResponseServiceresponseInvoicedetailresponse + */ + public static InvoiceDetailResponseServiceresponseInvoicedetailresponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvoiceDetailResponseServiceresponseInvoicedetailresponse.class); + } + + /** + * Convert an instance of InvoiceDetailResponseServiceresponseInvoicedetailresponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner.java b/src/main/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner.java new file mode 100644 index 00000000..94944325 --- /dev/null +++ b/src/main/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner { + public static final String SERIALIZED_NAME_ATTRIBUTENAME = "attributename"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTENAME) + private String attributename; + + public static final String SERIALIZED_NAME_ATTRIBUTEVALUE = "attributevalue"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTEVALUE) + private String attributevalue; + + public InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner() { + } + + public InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner attributename(String attributename) { + this.attributename = attributename; + return this; + } + + /** + * Get attributename + * @return attributename + **/ + @javax.annotation.Nullable + public String getAttributename() { + return attributename; + } + + public void setAttributename(String attributename) { + this.attributename = attributename; + } + + + public InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner attributevalue(String attributevalue) { + this.attributevalue = attributevalue; + return this; + } + + /** + * Get attributevalue + * @return attributevalue + **/ + @javax.annotation.Nullable + public String getAttributevalue() { + return attributevalue; + } + + public void setAttributevalue(String attributevalue) { + this.attributevalue = attributevalue; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner invoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner = (InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner) o; + return Objects.equals(this.attributename, invoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner.attributename) && + Objects.equals(this.attributevalue, invoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner.attributevalue); + } + + @Override + public int hashCode() { + return Objects.hash(attributename, attributevalue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner {\n"); + sb.append(" attributename: ").append(toIndentedString(attributename)).append("\n"); + sb.append(" attributevalue: ").append(toIndentedString(attributevalue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributename"); + openapiFields.add("attributevalue"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner is not found in the empty JSON string", InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("attributename") != null && !jsonObj.get("attributename").isJsonNull()) && !jsonObj.get("attributename").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributename` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributename").toString())); + } + if ((jsonObj.get("attributevalue") != null && !jsonObj.get("attributevalue").isJsonNull()) && !jsonObj.get("attributevalue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributevalue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributevalue").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner + * @throws IOException if the JSON string is invalid with respect to InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner + */ + public static InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner.class); + } + + /** + * Convert an instance of InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner.java b/src/main/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner.java new file mode 100644 index 00000000..9e3a9fd0 --- /dev/null +++ b/src/main/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner { + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private String code; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_CHARGEAMOUNT = "chargeamount"; + @SerializedName(SERIALIZED_NAME_CHARGEAMOUNT) + private String chargeamount; + + public InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner() { + } + + public InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner code(String code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + **/ + @javax.annotation.Nullable + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + + public InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + + public InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner chargeamount(String chargeamount) { + this.chargeamount = chargeamount; + return this; + } + + /** + * Get chargeamount + * @return chargeamount + **/ + @javax.annotation.Nullable + public String getChargeamount() { + return chargeamount; + } + + public void setChargeamount(String chargeamount) { + this.chargeamount = chargeamount; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner invoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner = (InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner) o; + return Objects.equals(this.code, invoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner.code) && + Objects.equals(this.description, invoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner.description) && + Objects.equals(this.chargeamount, invoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner.chargeamount); + } + + @Override + public int hashCode() { + return Objects.hash(code, description, chargeamount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" chargeamount: ").append(toIndentedString(chargeamount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("code"); + openapiFields.add("description"); + openapiFields.add("chargeamount"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner is not found in the empty JSON string", InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("chargeamount") != null && !jsonObj.get("chargeamount").isJsonNull()) && !jsonObj.get("chargeamount").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `chargeamount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chargeamount").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner + * @throws IOException if the JSON string is invalid with respect to InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner + */ + public static InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner.class); + } + + /** + * Convert an instance of InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseResponsepreamble.java b/src/main/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseResponsepreamble.java new file mode 100644 index 00000000..59181838 --- /dev/null +++ b/src/main/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseResponsepreamble.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * InvoiceDetailResponseServiceresponseResponsepreamble + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class InvoiceDetailResponseServiceresponseResponsepreamble { + public static final String SERIALIZED_NAME_RESPONSESTATUS = "responsestatus"; + @SerializedName(SERIALIZED_NAME_RESPONSESTATUS) + private String responsestatus; + + public static final String SERIALIZED_NAME_STATUSCODE = "statuscode"; + @SerializedName(SERIALIZED_NAME_STATUSCODE) + private String statuscode; + + public static final String SERIALIZED_NAME_RESPONSEMESSAGE = "responsemessage"; + @SerializedName(SERIALIZED_NAME_RESPONSEMESSAGE) + private String responsemessage; + + public InvoiceDetailResponseServiceresponseResponsepreamble() { + } + + public InvoiceDetailResponseServiceresponseResponsepreamble responsestatus(String responsestatus) { + this.responsestatus = responsestatus; + return this; + } + + /** + * Get responsestatus + * @return responsestatus + **/ + @javax.annotation.Nullable + public String getResponsestatus() { + return responsestatus; + } + + public void setResponsestatus(String responsestatus) { + this.responsestatus = responsestatus; + } + + + public InvoiceDetailResponseServiceresponseResponsepreamble statuscode(String statuscode) { + this.statuscode = statuscode; + return this; + } + + /** + * Get statuscode + * @return statuscode + **/ + @javax.annotation.Nullable + public String getStatuscode() { + return statuscode; + } + + public void setStatuscode(String statuscode) { + this.statuscode = statuscode; + } + + + public InvoiceDetailResponseServiceresponseResponsepreamble responsemessage(String responsemessage) { + this.responsemessage = responsemessage; + return this; + } + + /** + * Get responsemessage + * @return responsemessage + **/ + @javax.annotation.Nullable + public String getResponsemessage() { + return responsemessage; + } + + public void setResponsemessage(String responsemessage) { + this.responsemessage = responsemessage; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvoiceDetailResponseServiceresponseResponsepreamble invoiceDetailResponseServiceresponseResponsepreamble = (InvoiceDetailResponseServiceresponseResponsepreamble) o; + return Objects.equals(this.responsestatus, invoiceDetailResponseServiceresponseResponsepreamble.responsestatus) && + Objects.equals(this.statuscode, invoiceDetailResponseServiceresponseResponsepreamble.statuscode) && + Objects.equals(this.responsemessage, invoiceDetailResponseServiceresponseResponsepreamble.responsemessage); + } + + @Override + public int hashCode() { + return Objects.hash(responsestatus, statuscode, responsemessage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvoiceDetailResponseServiceresponseResponsepreamble {\n"); + sb.append(" responsestatus: ").append(toIndentedString(responsestatus)).append("\n"); + sb.append(" statuscode: ").append(toIndentedString(statuscode)).append("\n"); + sb.append(" responsemessage: ").append(toIndentedString(responsemessage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("responsestatus"); + openapiFields.add("statuscode"); + openapiFields.add("responsemessage"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvoiceDetailResponseServiceresponseResponsepreamble + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvoiceDetailResponseServiceresponseResponsepreamble.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceDetailResponseServiceresponseResponsepreamble is not found in the empty JSON string", InvoiceDetailResponseServiceresponseResponsepreamble.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvoiceDetailResponseServiceresponseResponsepreamble.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvoiceDetailResponseServiceresponseResponsepreamble` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("responsestatus") != null && !jsonObj.get("responsestatus").isJsonNull()) && !jsonObj.get("responsestatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `responsestatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("responsestatus").toString())); + } + if ((jsonObj.get("statuscode") != null && !jsonObj.get("statuscode").isJsonNull()) && !jsonObj.get("statuscode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `statuscode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("statuscode").toString())); + } + if ((jsonObj.get("responsemessage") != null && !jsonObj.get("responsemessage").isJsonNull()) && !jsonObj.get("responsemessage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `responsemessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("responsemessage").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvoiceDetailResponseServiceresponseResponsepreamble.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvoiceDetailResponseServiceresponseResponsepreamble' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvoiceDetailResponseServiceresponseResponsepreamble.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvoiceDetailResponseServiceresponseResponsepreamble value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InvoiceDetailResponseServiceresponseResponsepreamble read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvoiceDetailResponseServiceresponseResponsepreamble given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvoiceDetailResponseServiceresponseResponsepreamble + * @throws IOException if the JSON string is invalid with respect to InvoiceDetailResponseServiceresponseResponsepreamble + */ + public static InvoiceDetailResponseServiceresponseResponsepreamble fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvoiceDetailResponseServiceresponseResponsepreamble.class); + } + + /** + * Convert an instance of InvoiceDetailResponseServiceresponseResponsepreamble to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/InvoiceDetails.java b/src/main/java/xiresellers/client/model/InvoiceDetails.java new file mode 100644 index 00000000..edb4eed7 --- /dev/null +++ b/src/main/java/xiresellers/client/model/InvoiceDetails.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.InvoiceDetailResponseServiceresponse; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * InvoiceDetails + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class InvoiceDetails { + public static final String SERIALIZED_NAME_SERVICERESPONSE = "serviceresponse"; + @SerializedName(SERIALIZED_NAME_SERVICERESPONSE) + private InvoiceDetailResponseServiceresponse serviceresponse; + + public InvoiceDetails() { + } + + public InvoiceDetails serviceresponse(InvoiceDetailResponseServiceresponse serviceresponse) { + this.serviceresponse = serviceresponse; + return this; + } + + /** + * Get serviceresponse + * @return serviceresponse + **/ + @javax.annotation.Nullable + public InvoiceDetailResponseServiceresponse getServiceresponse() { + return serviceresponse; + } + + public void setServiceresponse(InvoiceDetailResponseServiceresponse serviceresponse) { + this.serviceresponse = serviceresponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvoiceDetails invoiceDetails = (InvoiceDetails) o; + return Objects.equals(this.serviceresponse, invoiceDetails.serviceresponse); + } + + @Override + public int hashCode() { + return Objects.hash(serviceresponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvoiceDetails {\n"); + sb.append(" serviceresponse: ").append(toIndentedString(serviceresponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("serviceresponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvoiceDetails + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvoiceDetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceDetails is not found in the empty JSON string", InvoiceDetails.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvoiceDetails.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvoiceDetails` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `serviceresponse` + if (jsonObj.get("serviceresponse") != null && !jsonObj.get("serviceresponse").isJsonNull()) { + InvoiceDetailResponseServiceresponse.validateJsonElement(jsonObj.get("serviceresponse")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvoiceDetails.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvoiceDetails' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvoiceDetails.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvoiceDetails value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InvoiceDetails read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvoiceDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvoiceDetails + * @throws IOException if the JSON string is invalid with respect to InvoiceDetails + */ + public static InvoiceDetails fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvoiceDetails.class); + } + + /** + * Convert an instance of InvoiceDetails to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/InvoiceDetailsv61Response.java b/src/main/java/xiresellers/client/model/InvoiceDetailsv61Response.java new file mode 100644 index 00000000..c4d409d0 --- /dev/null +++ b/src/main/java/xiresellers/client/model/InvoiceDetailsv61Response.java @@ -0,0 +1,755 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.InvoiceDetailsv61ResponseBillToInfo; +import xiresellers.client.model.InvoiceDetailsv61ResponseFxRateInfo; +import xiresellers.client.model.InvoiceDetailsv61ResponseLinesInner; +import xiresellers.client.model.InvoiceDetailsv61ResponsePaymentTermsInfo; +import xiresellers.client.model.InvoiceDetailsv61ResponseShipToInfo; +import xiresellers.client.model.InvoiceDetailsv61ResponseSummary; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * InvoiceDetailsv61Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class InvoiceDetailsv61Response { + public static final String SERIALIZED_NAME_INVOICE_NUMBER = "invoiceNumber"; + @SerializedName(SERIALIZED_NAME_INVOICE_NUMBER) + private String invoiceNumber; + + public static final String SERIALIZED_NAME_INVOICE_STATUS = "invoiceStatus"; + @SerializedName(SERIALIZED_NAME_INVOICE_STATUS) + private String invoiceStatus; + + public static final String SERIALIZED_NAME_INVOICE_DATE = "invoiceDate"; + @SerializedName(SERIALIZED_NAME_INVOICE_DATE) + private LocalDate invoiceDate; + + public static final String SERIALIZED_NAME_CUSTOMER_ORDER_NUMBER = "customerOrderNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_ORDER_NUMBER) + private String customerOrderNumber; + + public static final String SERIALIZED_NAME_END_CUSTOMER_ORDER_NUMBER = "endCustomerOrderNumber"; + @SerializedName(SERIALIZED_NAME_END_CUSTOMER_ORDER_NUMBER) + private String endCustomerOrderNumber; + + public static final String SERIALIZED_NAME_ORDER_DATE = "OrderDate"; + @SerializedName(SERIALIZED_NAME_ORDER_DATE) + private LocalDate orderDate; + + public static final String SERIALIZED_NAME_BILL_TO_I_D = "billToID"; + @SerializedName(SERIALIZED_NAME_BILL_TO_I_D) + private String billToID; + + public static final String SERIALIZED_NAME_INVOICE_TYPE = "invoiceType"; + @SerializedName(SERIALIZED_NAME_INVOICE_TYPE) + private String invoiceType; + + public static final String SERIALIZED_NAME_INVOICE_DUE_DATE = "invoiceDueDate"; + @SerializedName(SERIALIZED_NAME_INVOICE_DUE_DATE) + private String invoiceDueDate; + + public static final String SERIALIZED_NAME_CUSTOMER_COUNTRY_CODE = "customerCountryCode"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_COUNTRY_CODE) + private String customerCountryCode; + + public static final String SERIALIZED_NAME_CUSTOMER_NUMBER = "customerNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_NUMBER) + private String customerNumber; + + public static final String SERIALIZED_NAME_INGRAM_ORDER_NUMBER = "ingramOrderNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_ORDER_NUMBER) + private String ingramOrderNumber; + + public static final String SERIALIZED_NAME_NOTES = "notes"; + @SerializedName(SERIALIZED_NAME_NOTES) + private String notes; + + public static final String SERIALIZED_NAME_PAYMENT_TERMS_INFO = "paymentTermsInfo"; + @SerializedName(SERIALIZED_NAME_PAYMENT_TERMS_INFO) + private InvoiceDetailsv61ResponsePaymentTermsInfo paymentTermsInfo; + + public static final String SERIALIZED_NAME_BILL_TO_INFO = "billToInfo"; + @SerializedName(SERIALIZED_NAME_BILL_TO_INFO) + private InvoiceDetailsv61ResponseBillToInfo billToInfo; + + public static final String SERIALIZED_NAME_SHIP_TO_INFO = "shipToInfo"; + @SerializedName(SERIALIZED_NAME_SHIP_TO_INFO) + private InvoiceDetailsv61ResponseShipToInfo shipToInfo; + + public static final String SERIALIZED_NAME_LINES = "lines"; + @SerializedName(SERIALIZED_NAME_LINES) + private List lines; + + public static final String SERIALIZED_NAME_FX_RATE_INFO = "fxRateInfo"; + @SerializedName(SERIALIZED_NAME_FX_RATE_INFO) + private InvoiceDetailsv61ResponseFxRateInfo fxRateInfo; + + public static final String SERIALIZED_NAME_SUMMARY = "summary"; + @SerializedName(SERIALIZED_NAME_SUMMARY) + private InvoiceDetailsv61ResponseSummary summary; + + public InvoiceDetailsv61Response() { + } + + public InvoiceDetailsv61Response invoiceNumber(String invoiceNumber) { + this.invoiceNumber = invoiceNumber; + return this; + } + + /** + * The Invoice number for the order. + * @return invoiceNumber + **/ + @javax.annotation.Nullable + public String getInvoiceNumber() { + return invoiceNumber; + } + + public void setInvoiceNumber(String invoiceNumber) { + this.invoiceNumber = invoiceNumber; + } + + + public InvoiceDetailsv61Response invoiceStatus(String invoiceStatus) { + this.invoiceStatus = invoiceStatus; + return this; + } + + /** + * Status of the invoice. + * @return invoiceStatus + **/ + @javax.annotation.Nullable + public String getInvoiceStatus() { + return invoiceStatus; + } + + public void setInvoiceStatus(String invoiceStatus) { + this.invoiceStatus = invoiceStatus; + } + + + public InvoiceDetailsv61Response invoiceDate(LocalDate invoiceDate) { + this.invoiceDate = invoiceDate; + return this; + } + + /** + * Date of an Invoice. + * @return invoiceDate + **/ + @javax.annotation.Nullable + public LocalDate getInvoiceDate() { + return invoiceDate; + } + + public void setInvoiceDate(LocalDate invoiceDate) { + this.invoiceDate = invoiceDate; + } + + + public InvoiceDetailsv61Response customerOrderNumber(String customerOrderNumber) { + this.customerOrderNumber = customerOrderNumber; + return this; + } + + /** + * The reseller's order number for reference in their system. + * @return customerOrderNumber + **/ + @javax.annotation.Nullable + public String getCustomerOrderNumber() { + return customerOrderNumber; + } + + public void setCustomerOrderNumber(String customerOrderNumber) { + this.customerOrderNumber = customerOrderNumber; + } + + + public InvoiceDetailsv61Response endCustomerOrderNumber(String endCustomerOrderNumber) { + this.endCustomerOrderNumber = endCustomerOrderNumber; + return this; + } + + /** + * The end customer's order number for reference in their system. + * @return endCustomerOrderNumber + **/ + @javax.annotation.Nullable + public String getEndCustomerOrderNumber() { + return endCustomerOrderNumber; + } + + public void setEndCustomerOrderNumber(String endCustomerOrderNumber) { + this.endCustomerOrderNumber = endCustomerOrderNumber; + } + + + public InvoiceDetailsv61Response orderDate(LocalDate orderDate) { + this.orderDate = orderDate; + return this; + } + + /** + * The date and time in UTC format that the order was created. + * @return orderDate + **/ + @javax.annotation.Nullable + public LocalDate getOrderDate() { + return orderDate; + } + + public void setOrderDate(LocalDate orderDate) { + this.orderDate = orderDate; + } + + + public InvoiceDetailsv61Response billToID(String billToID) { + this.billToID = billToID; + return this; + } + + /** + * Bill to party + * @return billToID + **/ + @javax.annotation.Nullable + public String getBillToID() { + return billToID; + } + + public void setBillToID(String billToID) { + this.billToID = billToID; + } + + + public InvoiceDetailsv61Response invoiceType(String invoiceType) { + this.invoiceType = invoiceType; + return this; + } + + /** + * Type of the Invoice + * @return invoiceType + **/ + @javax.annotation.Nullable + public String getInvoiceType() { + return invoiceType; + } + + public void setInvoiceType(String invoiceType) { + this.invoiceType = invoiceType; + } + + + public InvoiceDetailsv61Response invoiceDueDate(String invoiceDueDate) { + this.invoiceDueDate = invoiceDueDate; + return this; + } + + /** + * Date when the invoice is due. + * @return invoiceDueDate + **/ + @javax.annotation.Nullable + public String getInvoiceDueDate() { + return invoiceDueDate; + } + + public void setInvoiceDueDate(String invoiceDueDate) { + this.invoiceDueDate = invoiceDueDate; + } + + + public InvoiceDetailsv61Response customerCountryCode(String customerCountryCode) { + this.customerCountryCode = customerCountryCode; + return this; + } + + /** + * Customer country code. + * @return customerCountryCode + **/ + @javax.annotation.Nullable + public String getCustomerCountryCode() { + return customerCountryCode; + } + + public void setCustomerCountryCode(String customerCountryCode) { + this.customerCountryCode = customerCountryCode; + } + + + public InvoiceDetailsv61Response customerNumber(String customerNumber) { + this.customerNumber = customerNumber; + return this; + } + + /** + * Unique customer number in Ingram's system. + * @return customerNumber + **/ + @javax.annotation.Nullable + public String getCustomerNumber() { + return customerNumber; + } + + public void setCustomerNumber(String customerNumber) { + this.customerNumber = customerNumber; + } + + + public InvoiceDetailsv61Response ingramOrderNumber(String ingramOrderNumber) { + this.ingramOrderNumber = ingramOrderNumber; + return this; + } + + /** + * The IngramMicro sales order number. + * @return ingramOrderNumber + **/ + @javax.annotation.Nullable + public String getIngramOrderNumber() { + return ingramOrderNumber; + } + + public void setIngramOrderNumber(String ingramOrderNumber) { + this.ingramOrderNumber = ingramOrderNumber; + } + + + public InvoiceDetailsv61Response notes(String notes) { + this.notes = notes; + return this; + } + + /** + * Notes for the invoice. + * @return notes + **/ + @javax.annotation.Nullable + public String getNotes() { + return notes; + } + + public void setNotes(String notes) { + this.notes = notes; + } + + + public InvoiceDetailsv61Response paymentTermsInfo(InvoiceDetailsv61ResponsePaymentTermsInfo paymentTermsInfo) { + this.paymentTermsInfo = paymentTermsInfo; + return this; + } + + /** + * Get paymentTermsInfo + * @return paymentTermsInfo + **/ + @javax.annotation.Nullable + public InvoiceDetailsv61ResponsePaymentTermsInfo getPaymentTermsInfo() { + return paymentTermsInfo; + } + + public void setPaymentTermsInfo(InvoiceDetailsv61ResponsePaymentTermsInfo paymentTermsInfo) { + this.paymentTermsInfo = paymentTermsInfo; + } + + + public InvoiceDetailsv61Response billToInfo(InvoiceDetailsv61ResponseBillToInfo billToInfo) { + this.billToInfo = billToInfo; + return this; + } + + /** + * Get billToInfo + * @return billToInfo + **/ + @javax.annotation.Nullable + public InvoiceDetailsv61ResponseBillToInfo getBillToInfo() { + return billToInfo; + } + + public void setBillToInfo(InvoiceDetailsv61ResponseBillToInfo billToInfo) { + this.billToInfo = billToInfo; + } + + + public InvoiceDetailsv61Response shipToInfo(InvoiceDetailsv61ResponseShipToInfo shipToInfo) { + this.shipToInfo = shipToInfo; + return this; + } + + /** + * Get shipToInfo + * @return shipToInfo + **/ + @javax.annotation.Nullable + public InvoiceDetailsv61ResponseShipToInfo getShipToInfo() { + return shipToInfo; + } + + public void setShipToInfo(InvoiceDetailsv61ResponseShipToInfo shipToInfo) { + this.shipToInfo = shipToInfo; + } + + + public InvoiceDetailsv61Response lines(List lines) { + this.lines = lines; + return this; + } + + public InvoiceDetailsv61Response addLinesItem(InvoiceDetailsv61ResponseLinesInner linesItem) { + if (this.lines == null) { + this.lines = new ArrayList<>(); + } + this.lines.add(linesItem); + return this; + } + + /** + * Get lines + * @return lines + **/ + @javax.annotation.Nullable + public List getLines() { + return lines; + } + + public void setLines(List lines) { + this.lines = lines; + } + + + public InvoiceDetailsv61Response fxRateInfo(InvoiceDetailsv61ResponseFxRateInfo fxRateInfo) { + this.fxRateInfo = fxRateInfo; + return this; + } + + /** + * Get fxRateInfo + * @return fxRateInfo + **/ + @javax.annotation.Nullable + public InvoiceDetailsv61ResponseFxRateInfo getFxRateInfo() { + return fxRateInfo; + } + + public void setFxRateInfo(InvoiceDetailsv61ResponseFxRateInfo fxRateInfo) { + this.fxRateInfo = fxRateInfo; + } + + + public InvoiceDetailsv61Response summary(InvoiceDetailsv61ResponseSummary summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @javax.annotation.Nullable + public InvoiceDetailsv61ResponseSummary getSummary() { + return summary; + } + + public void setSummary(InvoiceDetailsv61ResponseSummary summary) { + this.summary = summary; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvoiceDetailsv61Response invoiceDetailsv61Response = (InvoiceDetailsv61Response) o; + return Objects.equals(this.invoiceNumber, invoiceDetailsv61Response.invoiceNumber) && + Objects.equals(this.invoiceStatus, invoiceDetailsv61Response.invoiceStatus) && + Objects.equals(this.invoiceDate, invoiceDetailsv61Response.invoiceDate) && + Objects.equals(this.customerOrderNumber, invoiceDetailsv61Response.customerOrderNumber) && + Objects.equals(this.endCustomerOrderNumber, invoiceDetailsv61Response.endCustomerOrderNumber) && + Objects.equals(this.orderDate, invoiceDetailsv61Response.orderDate) && + Objects.equals(this.billToID, invoiceDetailsv61Response.billToID) && + Objects.equals(this.invoiceType, invoiceDetailsv61Response.invoiceType) && + Objects.equals(this.invoiceDueDate, invoiceDetailsv61Response.invoiceDueDate) && + Objects.equals(this.customerCountryCode, invoiceDetailsv61Response.customerCountryCode) && + Objects.equals(this.customerNumber, invoiceDetailsv61Response.customerNumber) && + Objects.equals(this.ingramOrderNumber, invoiceDetailsv61Response.ingramOrderNumber) && + Objects.equals(this.notes, invoiceDetailsv61Response.notes) && + Objects.equals(this.paymentTermsInfo, invoiceDetailsv61Response.paymentTermsInfo) && + Objects.equals(this.billToInfo, invoiceDetailsv61Response.billToInfo) && + Objects.equals(this.shipToInfo, invoiceDetailsv61Response.shipToInfo) && + Objects.equals(this.lines, invoiceDetailsv61Response.lines) && + Objects.equals(this.fxRateInfo, invoiceDetailsv61Response.fxRateInfo) && + Objects.equals(this.summary, invoiceDetailsv61Response.summary); + } + + @Override + public int hashCode() { + return Objects.hash(invoiceNumber, invoiceStatus, invoiceDate, customerOrderNumber, endCustomerOrderNumber, orderDate, billToID, invoiceType, invoiceDueDate, customerCountryCode, customerNumber, ingramOrderNumber, notes, paymentTermsInfo, billToInfo, shipToInfo, lines, fxRateInfo, summary); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvoiceDetailsv61Response {\n"); + sb.append(" invoiceNumber: ").append(toIndentedString(invoiceNumber)).append("\n"); + sb.append(" invoiceStatus: ").append(toIndentedString(invoiceStatus)).append("\n"); + sb.append(" invoiceDate: ").append(toIndentedString(invoiceDate)).append("\n"); + sb.append(" customerOrderNumber: ").append(toIndentedString(customerOrderNumber)).append("\n"); + sb.append(" endCustomerOrderNumber: ").append(toIndentedString(endCustomerOrderNumber)).append("\n"); + sb.append(" orderDate: ").append(toIndentedString(orderDate)).append("\n"); + sb.append(" billToID: ").append(toIndentedString(billToID)).append("\n"); + sb.append(" invoiceType: ").append(toIndentedString(invoiceType)).append("\n"); + sb.append(" invoiceDueDate: ").append(toIndentedString(invoiceDueDate)).append("\n"); + sb.append(" customerCountryCode: ").append(toIndentedString(customerCountryCode)).append("\n"); + sb.append(" customerNumber: ").append(toIndentedString(customerNumber)).append("\n"); + sb.append(" ingramOrderNumber: ").append(toIndentedString(ingramOrderNumber)).append("\n"); + sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); + sb.append(" paymentTermsInfo: ").append(toIndentedString(paymentTermsInfo)).append("\n"); + sb.append(" billToInfo: ").append(toIndentedString(billToInfo)).append("\n"); + sb.append(" shipToInfo: ").append(toIndentedString(shipToInfo)).append("\n"); + sb.append(" lines: ").append(toIndentedString(lines)).append("\n"); + sb.append(" fxRateInfo: ").append(toIndentedString(fxRateInfo)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("invoiceNumber"); + openapiFields.add("invoiceStatus"); + openapiFields.add("invoiceDate"); + openapiFields.add("customerOrderNumber"); + openapiFields.add("endCustomerOrderNumber"); + openapiFields.add("OrderDate"); + openapiFields.add("billToID"); + openapiFields.add("invoiceType"); + openapiFields.add("invoiceDueDate"); + openapiFields.add("customerCountryCode"); + openapiFields.add("customerNumber"); + openapiFields.add("ingramOrderNumber"); + openapiFields.add("notes"); + openapiFields.add("paymentTermsInfo"); + openapiFields.add("billToInfo"); + openapiFields.add("shipToInfo"); + openapiFields.add("lines"); + openapiFields.add("fxRateInfo"); + openapiFields.add("summary"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvoiceDetailsv61Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvoiceDetailsv61Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceDetailsv61Response is not found in the empty JSON string", InvoiceDetailsv61Response.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvoiceDetailsv61Response.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvoiceDetailsv61Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("invoiceNumber") != null && !jsonObj.get("invoiceNumber").isJsonNull()) && !jsonObj.get("invoiceNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `invoiceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoiceNumber").toString())); + } + if ((jsonObj.get("invoiceStatus") != null && !jsonObj.get("invoiceStatus").isJsonNull()) && !jsonObj.get("invoiceStatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `invoiceStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoiceStatus").toString())); + } + if ((jsonObj.get("customerOrderNumber") != null && !jsonObj.get("customerOrderNumber").isJsonNull()) && !jsonObj.get("customerOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerOrderNumber").toString())); + } + if ((jsonObj.get("endCustomerOrderNumber") != null && !jsonObj.get("endCustomerOrderNumber").isJsonNull()) && !jsonObj.get("endCustomerOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endCustomerOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endCustomerOrderNumber").toString())); + } + if ((jsonObj.get("billToID") != null && !jsonObj.get("billToID").isJsonNull()) && !jsonObj.get("billToID").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `billToID` to be a primitive type in the JSON string but got `%s`", jsonObj.get("billToID").toString())); + } + if ((jsonObj.get("invoiceType") != null && !jsonObj.get("invoiceType").isJsonNull()) && !jsonObj.get("invoiceType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `invoiceType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoiceType").toString())); + } + if ((jsonObj.get("invoiceDueDate") != null && !jsonObj.get("invoiceDueDate").isJsonNull()) && !jsonObj.get("invoiceDueDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `invoiceDueDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoiceDueDate").toString())); + } + if ((jsonObj.get("customerCountryCode") != null && !jsonObj.get("customerCountryCode").isJsonNull()) && !jsonObj.get("customerCountryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerCountryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerCountryCode").toString())); + } + if ((jsonObj.get("customerNumber") != null && !jsonObj.get("customerNumber").isJsonNull()) && !jsonObj.get("customerNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerNumber").toString())); + } + if ((jsonObj.get("ingramOrderNumber") != null && !jsonObj.get("ingramOrderNumber").isJsonNull()) && !jsonObj.get("ingramOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramOrderNumber").toString())); + } + if ((jsonObj.get("notes") != null && !jsonObj.get("notes").isJsonNull()) && !jsonObj.get("notes").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `notes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("notes").toString())); + } + // validate the optional field `paymentTermsInfo` + if (jsonObj.get("paymentTermsInfo") != null && !jsonObj.get("paymentTermsInfo").isJsonNull()) { + InvoiceDetailsv61ResponsePaymentTermsInfo.validateJsonElement(jsonObj.get("paymentTermsInfo")); + } + // validate the optional field `billToInfo` + if (jsonObj.get("billToInfo") != null && !jsonObj.get("billToInfo").isJsonNull()) { + InvoiceDetailsv61ResponseBillToInfo.validateJsonElement(jsonObj.get("billToInfo")); + } + // validate the optional field `shipToInfo` + if (jsonObj.get("shipToInfo") != null && !jsonObj.get("shipToInfo").isJsonNull()) { + InvoiceDetailsv61ResponseShipToInfo.validateJsonElement(jsonObj.get("shipToInfo")); + } + if (jsonObj.get("lines") != null && !jsonObj.get("lines").isJsonNull()) { + JsonArray jsonArraylines = jsonObj.getAsJsonArray("lines"); + if (jsonArraylines != null) { + // ensure the json data is an array + if (!jsonObj.get("lines").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `lines` to be an array in the JSON string but got `%s`", jsonObj.get("lines").toString())); + } + + // validate the optional field `lines` (array) + for (int i = 0; i < jsonArraylines.size(); i++) { + InvoiceDetailsv61ResponseLinesInner.validateJsonElement(jsonArraylines.get(i)); + }; + } + } + // validate the optional field `fxRateInfo` + if (jsonObj.get("fxRateInfo") != null && !jsonObj.get("fxRateInfo").isJsonNull()) { + InvoiceDetailsv61ResponseFxRateInfo.validateJsonElement(jsonObj.get("fxRateInfo")); + } + // validate the optional field `summary` + if (jsonObj.get("summary") != null && !jsonObj.get("summary").isJsonNull()) { + InvoiceDetailsv61ResponseSummary.validateJsonElement(jsonObj.get("summary")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvoiceDetailsv61Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvoiceDetailsv61Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvoiceDetailsv61Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvoiceDetailsv61Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InvoiceDetailsv61Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvoiceDetailsv61Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvoiceDetailsv61Response + * @throws IOException if the JSON string is invalid with respect to InvoiceDetailsv61Response + */ + public static InvoiceDetailsv61Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvoiceDetailsv61Response.class); + } + + /** + * Convert an instance of InvoiceDetailsv61Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseBillToInfo.java b/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseBillToInfo.java new file mode 100644 index 00000000..cba3a00d --- /dev/null +++ b/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseBillToInfo.java @@ -0,0 +1,496 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * InvoiceDetailsv61ResponseBillToInfo + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class InvoiceDetailsv61ResponseBillToInfo { + public static final String SERIALIZED_NAME_CONTACT = "contact"; + @SerializedName(SERIALIZED_NAME_CONTACT) + private String contact; + + public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; + @SerializedName(SERIALIZED_NAME_COMPANY_NAME) + private String companyName; + + public static final String SERIALIZED_NAME_ADDRESS_LINE1 = "addressLine1"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE1) + private String addressLine1; + + public static final String SERIALIZED_NAME_ADDRESS_LINE2 = "addressLine2"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE2) + private String addressLine2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE3 = "addressLine3"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE3) + private String addressLine3; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; + @SerializedName(SERIALIZED_NAME_POSTAL_CODE) + private String postalCode; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) + private String phoneNumber; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public InvoiceDetailsv61ResponseBillToInfo() { + } + + public InvoiceDetailsv61ResponseBillToInfo contact(String contact) { + this.contact = contact; + return this; + } + + /** + * Bill to Name. + * @return contact + **/ + @javax.annotation.Nullable + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + + public InvoiceDetailsv61ResponseBillToInfo companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * Bill to company. + * @return companyName + **/ + @javax.annotation.Nullable + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public InvoiceDetailsv61ResponseBillToInfo addressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + return this; + } + + /** + * Bill to Address Line1. + * @return addressLine1 + **/ + @javax.annotation.Nullable + public String getAddressLine1() { + return addressLine1; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + + public InvoiceDetailsv61ResponseBillToInfo addressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + return this; + } + + /** + * Bill to Address Line2. + * @return addressLine2 + **/ + @javax.annotation.Nullable + public String getAddressLine2() { + return addressLine2; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + + public InvoiceDetailsv61ResponseBillToInfo addressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + return this; + } + + /** + * Bill to Address Line3. + * @return addressLine3 + **/ + @javax.annotation.Nullable + public String getAddressLine3() { + return addressLine3; + } + + public void setAddressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + } + + + public InvoiceDetailsv61ResponseBillToInfo city(String city) { + this.city = city; + return this; + } + + /** + * Bill to City. + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public InvoiceDetailsv61ResponseBillToInfo state(String state) { + this.state = state; + return this; + } + + /** + * Bill to State code + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public InvoiceDetailsv61ResponseBillToInfo postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * Bill to Postalcode code. + * @return postalCode + **/ + @javax.annotation.Nullable + public String getPostalCode() { + return postalCode; + } + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public InvoiceDetailsv61ResponseBillToInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Bill to Country code. + * @return countryCode + **/ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public InvoiceDetailsv61ResponseBillToInfo phoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * Phone number of the bill to company. + * @return phoneNumber + **/ + @javax.annotation.Nullable + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public InvoiceDetailsv61ResponseBillToInfo email(String email) { + this.email = email; + return this; + } + + /** + * Email address of the bill to company. + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvoiceDetailsv61ResponseBillToInfo invoiceDetailsv61ResponseBillToInfo = (InvoiceDetailsv61ResponseBillToInfo) o; + return Objects.equals(this.contact, invoiceDetailsv61ResponseBillToInfo.contact) && + Objects.equals(this.companyName, invoiceDetailsv61ResponseBillToInfo.companyName) && + Objects.equals(this.addressLine1, invoiceDetailsv61ResponseBillToInfo.addressLine1) && + Objects.equals(this.addressLine2, invoiceDetailsv61ResponseBillToInfo.addressLine2) && + Objects.equals(this.addressLine3, invoiceDetailsv61ResponseBillToInfo.addressLine3) && + Objects.equals(this.city, invoiceDetailsv61ResponseBillToInfo.city) && + Objects.equals(this.state, invoiceDetailsv61ResponseBillToInfo.state) && + Objects.equals(this.postalCode, invoiceDetailsv61ResponseBillToInfo.postalCode) && + Objects.equals(this.countryCode, invoiceDetailsv61ResponseBillToInfo.countryCode) && + Objects.equals(this.phoneNumber, invoiceDetailsv61ResponseBillToInfo.phoneNumber) && + Objects.equals(this.email, invoiceDetailsv61ResponseBillToInfo.email); + } + + @Override + public int hashCode() { + return Objects.hash(contact, companyName, addressLine1, addressLine2, addressLine3, city, state, postalCode, countryCode, phoneNumber, email); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvoiceDetailsv61ResponseBillToInfo {\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); + sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); + sb.append(" addressLine3: ").append(toIndentedString(addressLine3)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("contact"); + openapiFields.add("companyName"); + openapiFields.add("addressLine1"); + openapiFields.add("addressLine2"); + openapiFields.add("addressLine3"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalCode"); + openapiFields.add("countryCode"); + openapiFields.add("phoneNumber"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvoiceDetailsv61ResponseBillToInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvoiceDetailsv61ResponseBillToInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceDetailsv61ResponseBillToInfo is not found in the empty JSON string", InvoiceDetailsv61ResponseBillToInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvoiceDetailsv61ResponseBillToInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvoiceDetailsv61ResponseBillToInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("contact") != null && !jsonObj.get("contact").isJsonNull()) && !jsonObj.get("contact").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contact` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact").toString())); + } + if ((jsonObj.get("companyName") != null && !jsonObj.get("companyName").isJsonNull()) && !jsonObj.get("companyName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); + } + if ((jsonObj.get("addressLine1") != null && !jsonObj.get("addressLine1").isJsonNull()) && !jsonObj.get("addressLine1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine1").toString())); + } + if ((jsonObj.get("addressLine2") != null && !jsonObj.get("addressLine2").isJsonNull()) && !jsonObj.get("addressLine2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine2").toString())); + } + if ((jsonObj.get("addressLine3") != null && !jsonObj.get("addressLine3").isJsonNull()) && !jsonObj.get("addressLine3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine3").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvoiceDetailsv61ResponseBillToInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvoiceDetailsv61ResponseBillToInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvoiceDetailsv61ResponseBillToInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvoiceDetailsv61ResponseBillToInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InvoiceDetailsv61ResponseBillToInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvoiceDetailsv61ResponseBillToInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvoiceDetailsv61ResponseBillToInfo + * @throws IOException if the JSON string is invalid with respect to InvoiceDetailsv61ResponseBillToInfo + */ + public static InvoiceDetailsv61ResponseBillToInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvoiceDetailsv61ResponseBillToInfo.class); + } + + /** + * Convert an instance of InvoiceDetailsv61ResponseBillToInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseFxRateInfo.java b/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseFxRateInfo.java new file mode 100644 index 00000000..6a860f3c --- /dev/null +++ b/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseFxRateInfo.java @@ -0,0 +1,290 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * InvoiceDetailsv61ResponseFxRateInfo + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class InvoiceDetailsv61ResponseFxRateInfo { + public static final String SERIALIZED_NAME_CURRENCY_CODE = "currencyCode"; + @SerializedName(SERIALIZED_NAME_CURRENCY_CODE) + private String currencyCode; + + public static final String SERIALIZED_NAME_COMPANY_CURRENCY = "companyCurrency"; + @SerializedName(SERIALIZED_NAME_COMPANY_CURRENCY) + private String companyCurrency; + + public static final String SERIALIZED_NAME_INVOICE_CURRENCY = "invoiceCurrency"; + @SerializedName(SERIALIZED_NAME_INVOICE_CURRENCY) + private String invoiceCurrency; + + public static final String SERIALIZED_NAME_CURRENCY_FX_RATE = "currencyFxRate"; + @SerializedName(SERIALIZED_NAME_CURRENCY_FX_RATE) + private Double currencyFxRate; + + public InvoiceDetailsv61ResponseFxRateInfo() { + } + + public InvoiceDetailsv61ResponseFxRateInfo currencyCode(String currencyCode) { + this.currencyCode = currencyCode; + return this; + } + + /** + * Currency code. + * @return currencyCode + **/ + @javax.annotation.Nullable + public String getCurrencyCode() { + return currencyCode; + } + + public void setCurrencyCode(String currencyCode) { + this.currencyCode = currencyCode; + } + + + public InvoiceDetailsv61ResponseFxRateInfo companyCurrency(String companyCurrency) { + this.companyCurrency = companyCurrency; + return this; + } + + /** + * Company currency code. + * @return companyCurrency + **/ + @javax.annotation.Nullable + public String getCompanyCurrency() { + return companyCurrency; + } + + public void setCompanyCurrency(String companyCurrency) { + this.companyCurrency = companyCurrency; + } + + + public InvoiceDetailsv61ResponseFxRateInfo invoiceCurrency(String invoiceCurrency) { + this.invoiceCurrency = invoiceCurrency; + return this; + } + + /** + * Invoice currency. + * @return invoiceCurrency + **/ + @javax.annotation.Nullable + public String getInvoiceCurrency() { + return invoiceCurrency; + } + + public void setInvoiceCurrency(String invoiceCurrency) { + this.invoiceCurrency = invoiceCurrency; + } + + + public InvoiceDetailsv61ResponseFxRateInfo currencyFxRate(Double currencyFxRate) { + this.currencyFxRate = currencyFxRate; + return this; + } + + /** + * Currency FX rate. + * @return currencyFxRate + **/ + @javax.annotation.Nullable + public Double getCurrencyFxRate() { + return currencyFxRate; + } + + public void setCurrencyFxRate(Double currencyFxRate) { + this.currencyFxRate = currencyFxRate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvoiceDetailsv61ResponseFxRateInfo invoiceDetailsv61ResponseFxRateInfo = (InvoiceDetailsv61ResponseFxRateInfo) o; + return Objects.equals(this.currencyCode, invoiceDetailsv61ResponseFxRateInfo.currencyCode) && + Objects.equals(this.companyCurrency, invoiceDetailsv61ResponseFxRateInfo.companyCurrency) && + Objects.equals(this.invoiceCurrency, invoiceDetailsv61ResponseFxRateInfo.invoiceCurrency) && + Objects.equals(this.currencyFxRate, invoiceDetailsv61ResponseFxRateInfo.currencyFxRate); + } + + @Override + public int hashCode() { + return Objects.hash(currencyCode, companyCurrency, invoiceCurrency, currencyFxRate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvoiceDetailsv61ResponseFxRateInfo {\n"); + sb.append(" currencyCode: ").append(toIndentedString(currencyCode)).append("\n"); + sb.append(" companyCurrency: ").append(toIndentedString(companyCurrency)).append("\n"); + sb.append(" invoiceCurrency: ").append(toIndentedString(invoiceCurrency)).append("\n"); + sb.append(" currencyFxRate: ").append(toIndentedString(currencyFxRate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("currencyCode"); + openapiFields.add("companyCurrency"); + openapiFields.add("invoiceCurrency"); + openapiFields.add("currencyFxRate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvoiceDetailsv61ResponseFxRateInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvoiceDetailsv61ResponseFxRateInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceDetailsv61ResponseFxRateInfo is not found in the empty JSON string", InvoiceDetailsv61ResponseFxRateInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvoiceDetailsv61ResponseFxRateInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvoiceDetailsv61ResponseFxRateInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("currencyCode") != null && !jsonObj.get("currencyCode").isJsonNull()) && !jsonObj.get("currencyCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `currencyCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currencyCode").toString())); + } + if ((jsonObj.get("companyCurrency") != null && !jsonObj.get("companyCurrency").isJsonNull()) && !jsonObj.get("companyCurrency").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyCurrency` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyCurrency").toString())); + } + if ((jsonObj.get("invoiceCurrency") != null && !jsonObj.get("invoiceCurrency").isJsonNull()) && !jsonObj.get("invoiceCurrency").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `invoiceCurrency` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoiceCurrency").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvoiceDetailsv61ResponseFxRateInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvoiceDetailsv61ResponseFxRateInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvoiceDetailsv61ResponseFxRateInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvoiceDetailsv61ResponseFxRateInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InvoiceDetailsv61ResponseFxRateInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvoiceDetailsv61ResponseFxRateInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvoiceDetailsv61ResponseFxRateInfo + * @throws IOException if the JSON string is invalid with respect to InvoiceDetailsv61ResponseFxRateInfo + */ + public static InvoiceDetailsv61ResponseFxRateInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvoiceDetailsv61ResponseFxRateInfo.class); + } + + /** + * Convert an instance of InvoiceDetailsv61ResponseFxRateInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseLinesInner.java b/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseLinesInner.java new file mode 100644 index 00000000..09024e48 --- /dev/null +++ b/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseLinesInner.java @@ -0,0 +1,738 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import xiresellers.client.model.InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * InvoiceDetailsv61ResponseLinesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class InvoiceDetailsv61ResponseLinesInner { + public static final String SERIALIZED_NAME_INGRAM_LINE_NUMBER = "ingramLineNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_LINE_NUMBER) + private String ingramLineNumber; + + public static final String SERIALIZED_NAME_CUSTOMER_LINE_NUMBER = "customerLineNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_LINE_NUMBER) + private String customerLineNumber = "0"; + + public static final String SERIALIZED_NAME_INGRAM_PART_NUMBER = "ingramPartNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PART_NUMBER) + private String ingramPartNumber; + + public static final String SERIALIZED_NAME_VENDOR_PART_NUMBER = "vendorPartNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_PART_NUMBER) + private String vendorPartNumber; + + public static final String SERIALIZED_NAME_CUSTOMER_PART_NUMBER = "customerPartNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_PART_NUMBER) + private String customerPartNumber; + + public static final String SERIALIZED_NAME_VENDOR_NAME = "vendorName"; + @SerializedName(SERIALIZED_NAME_VENDOR_NAME) + private String vendorName; + + public static final String SERIALIZED_NAME_PRODUCT_DESCRIPTION = "productDescription"; + @SerializedName(SERIALIZED_NAME_PRODUCT_DESCRIPTION) + private String productDescription; + + public static final String SERIALIZED_NAME_UNIT_WEIGHT = "unitWeight"; + @SerializedName(SERIALIZED_NAME_UNIT_WEIGHT) + private String unitWeight; + + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + @SerializedName(SERIALIZED_NAME_QUANTITY) + private Integer quantity; + + public static final String SERIALIZED_NAME_UNIT_PRICE = "unitPrice"; + @SerializedName(SERIALIZED_NAME_UNIT_PRICE) + private Double unitPrice; + + public static final String SERIALIZED_NAME_UNIT_OF_MEASURE = "unitOfMeasure"; + @SerializedName(SERIALIZED_NAME_UNIT_OF_MEASURE) + private String unitOfMeasure; + + public static final String SERIALIZED_NAME_CURRENCY_CODE = "currencyCode"; + @SerializedName(SERIALIZED_NAME_CURRENCY_CODE) + private String currencyCode; + + public static final String SERIALIZED_NAME_EXTENDED_PRICE = "extendedPrice"; + @SerializedName(SERIALIZED_NAME_EXTENDED_PRICE) + private Double extendedPrice; + + public static final String SERIALIZED_NAME_TAX_PERCENTAGE = "taxPercentage"; + @SerializedName(SERIALIZED_NAME_TAX_PERCENTAGE) + private Double taxPercentage; + + public static final String SERIALIZED_NAME_TAX_RATE = "taxRate"; + @SerializedName(SERIALIZED_NAME_TAX_RATE) + private Double taxRate; + + public static final String SERIALIZED_NAME_TAX_AMOUNT = "taxAmount"; + @SerializedName(SERIALIZED_NAME_TAX_AMOUNT) + private Double taxAmount; + + public static final String SERIALIZED_NAME_SERIAL_NUMBERS = "serialNumbers"; + @SerializedName(SERIALIZED_NAME_SERIAL_NUMBERS) + private List serialNumbers; + + public static final String SERIALIZED_NAME_QUANTITY_ORDERED = "quantityOrdered"; + @SerializedName(SERIALIZED_NAME_QUANTITY_ORDERED) + private Integer quantityOrdered; + + public static final String SERIALIZED_NAME_QUANTITY_SHIPPED = "quantityShipped"; + @SerializedName(SERIALIZED_NAME_QUANTITY_SHIPPED) + private Integer quantityShipped; + + public InvoiceDetailsv61ResponseLinesInner() { + } + + public InvoiceDetailsv61ResponseLinesInner ingramLineNumber(String ingramLineNumber) { + this.ingramLineNumber = ingramLineNumber; + return this; + } + + /** + * Unique line number from Ingram. + * @return ingramLineNumber + **/ + @javax.annotation.Nullable + public String getIngramLineNumber() { + return ingramLineNumber; + } + + public void setIngramLineNumber(String ingramLineNumber) { + this.ingramLineNumber = ingramLineNumber; + } + + + public InvoiceDetailsv61ResponseLinesInner customerLineNumber(String customerLineNumber) { + this.customerLineNumber = customerLineNumber; + return this; + } + + /** + * Line number passes by customer while creating an order. + * @return customerLineNumber + **/ + @javax.annotation.Nullable + public String getCustomerLineNumber() { + return customerLineNumber; + } + + public void setCustomerLineNumber(String customerLineNumber) { + this.customerLineNumber = customerLineNumber; + } + + + public InvoiceDetailsv61ResponseLinesInner ingramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + return this; + } + + /** + * Ingram Micro SKU (stock keeping unit). An identification, usually alphanumeric, of a particular product that allows it to be tracked for inventory purposes. + * @return ingramPartNumber + **/ + @javax.annotation.Nullable + public String getIngramPartNumber() { + return ingramPartNumber; + } + + public void setIngramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + } + + + public InvoiceDetailsv61ResponseLinesInner vendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + return this; + } + + /** + * Vendor Part Number. + * @return vendorPartNumber + **/ + @javax.annotation.Nullable + public String getVendorPartNumber() { + return vendorPartNumber; + } + + public void setVendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + } + + + public InvoiceDetailsv61ResponseLinesInner customerPartNumber(String customerPartNumber) { + this.customerPartNumber = customerPartNumber; + return this; + } + + /** + * Part number from customer's system. + * @return customerPartNumber + **/ + @javax.annotation.Nullable + public String getCustomerPartNumber() { + return customerPartNumber; + } + + public void setCustomerPartNumber(String customerPartNumber) { + this.customerPartNumber = customerPartNumber; + } + + + public InvoiceDetailsv61ResponseLinesInner vendorName(String vendorName) { + this.vendorName = vendorName; + return this; + } + + /** + * Name of the vendor. + * @return vendorName + **/ + @javax.annotation.Nullable + public String getVendorName() { + return vendorName; + } + + public void setVendorName(String vendorName) { + this.vendorName = vendorName; + } + + + public InvoiceDetailsv61ResponseLinesInner productDescription(String productDescription) { + this.productDescription = productDescription; + return this; + } + + /** + * Description of the product. + * @return productDescription + **/ + @javax.annotation.Nullable + public String getProductDescription() { + return productDescription; + } + + public void setProductDescription(String productDescription) { + this.productDescription = productDescription; + } + + + public InvoiceDetailsv61ResponseLinesInner unitWeight(String unitWeight) { + this.unitWeight = unitWeight; + return this; + } + + /** + * Weight of the product. + * @return unitWeight + **/ + @javax.annotation.Nullable + public String getUnitWeight() { + return unitWeight; + } + + public void setUnitWeight(String unitWeight) { + this.unitWeight = unitWeight; + } + + + public InvoiceDetailsv61ResponseLinesInner quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Quantity of the product. + * @return quantity + **/ + @javax.annotation.Nullable + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + + public InvoiceDetailsv61ResponseLinesInner unitPrice(Double unitPrice) { + this.unitPrice = unitPrice; + return this; + } + + /** + * Unit price of the product. + * @return unitPrice + **/ + @javax.annotation.Nullable + public Double getUnitPrice() { + return unitPrice; + } + + public void setUnitPrice(Double unitPrice) { + this.unitPrice = unitPrice; + } + + + public InvoiceDetailsv61ResponseLinesInner unitOfMeasure(String unitOfMeasure) { + this.unitOfMeasure = unitOfMeasure; + return this; + } + + /** + * Unit of measure of the product. + * @return unitOfMeasure + **/ + @javax.annotation.Nullable + public String getUnitOfMeasure() { + return unitOfMeasure; + } + + public void setUnitOfMeasure(String unitOfMeasure) { + this.unitOfMeasure = unitOfMeasure; + } + + + public InvoiceDetailsv61ResponseLinesInner currencyCode(String currencyCode) { + this.currencyCode = currencyCode; + return this; + } + + /** + * Currency code. + * @return currencyCode + **/ + @javax.annotation.Nullable + public String getCurrencyCode() { + return currencyCode; + } + + public void setCurrencyCode(String currencyCode) { + this.currencyCode = currencyCode; + } + + + public InvoiceDetailsv61ResponseLinesInner extendedPrice(Double extendedPrice) { + this.extendedPrice = extendedPrice; + return this; + } + + /** + * Extended price of the product. + * @return extendedPrice + **/ + @javax.annotation.Nullable + public Double getExtendedPrice() { + return extendedPrice; + } + + public void setExtendedPrice(Double extendedPrice) { + this.extendedPrice = extendedPrice; + } + + + public InvoiceDetailsv61ResponseLinesInner taxPercentage(Double taxPercentage) { + this.taxPercentage = taxPercentage; + return this; + } + + /** + * Tax percentage + * @return taxPercentage + **/ + @javax.annotation.Nullable + public Double getTaxPercentage() { + return taxPercentage; + } + + public void setTaxPercentage(Double taxPercentage) { + this.taxPercentage = taxPercentage; + } + + + public InvoiceDetailsv61ResponseLinesInner taxRate(Double taxRate) { + this.taxRate = taxRate; + return this; + } + + /** + * Tax rate + * @return taxRate + **/ + @javax.annotation.Nullable + public Double getTaxRate() { + return taxRate; + } + + public void setTaxRate(Double taxRate) { + this.taxRate = taxRate; + } + + + public InvoiceDetailsv61ResponseLinesInner taxAmount(Double taxAmount) { + this.taxAmount = taxAmount; + return this; + } + + /** + * Line level tax amount. + * @return taxAmount + **/ + @javax.annotation.Nullable + public Double getTaxAmount() { + return taxAmount; + } + + public void setTaxAmount(Double taxAmount) { + this.taxAmount = taxAmount; + } + + + public InvoiceDetailsv61ResponseLinesInner serialNumbers(List serialNumbers) { + this.serialNumbers = serialNumbers; + return this; + } + + public InvoiceDetailsv61ResponseLinesInner addSerialNumbersItem(InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner serialNumbersItem) { + if (this.serialNumbers == null) { + this.serialNumbers = new ArrayList<>(); + } + this.serialNumbers.add(serialNumbersItem); + return this; + } + + /** + * Get serialNumbers + * @return serialNumbers + **/ + @javax.annotation.Nullable + public List getSerialNumbers() { + return serialNumbers; + } + + public void setSerialNumbers(List serialNumbers) { + this.serialNumbers = serialNumbers; + } + + + public InvoiceDetailsv61ResponseLinesInner quantityOrdered(Integer quantityOrdered) { + this.quantityOrdered = quantityOrdered; + return this; + } + + /** + * Quantity ordered by the customer. + * @return quantityOrdered + **/ + @javax.annotation.Nullable + public Integer getQuantityOrdered() { + return quantityOrdered; + } + + public void setQuantityOrdered(Integer quantityOrdered) { + this.quantityOrdered = quantityOrdered; + } + + + public InvoiceDetailsv61ResponseLinesInner quantityShipped(Integer quantityShipped) { + this.quantityShipped = quantityShipped; + return this; + } + + /** + * Quantity shipped to the customer. + * @return quantityShipped + **/ + @javax.annotation.Nullable + public Integer getQuantityShipped() { + return quantityShipped; + } + + public void setQuantityShipped(Integer quantityShipped) { + this.quantityShipped = quantityShipped; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvoiceDetailsv61ResponseLinesInner invoiceDetailsv61ResponseLinesInner = (InvoiceDetailsv61ResponseLinesInner) o; + return Objects.equals(this.ingramLineNumber, invoiceDetailsv61ResponseLinesInner.ingramLineNumber) && + Objects.equals(this.customerLineNumber, invoiceDetailsv61ResponseLinesInner.customerLineNumber) && + Objects.equals(this.ingramPartNumber, invoiceDetailsv61ResponseLinesInner.ingramPartNumber) && + Objects.equals(this.vendorPartNumber, invoiceDetailsv61ResponseLinesInner.vendorPartNumber) && + Objects.equals(this.customerPartNumber, invoiceDetailsv61ResponseLinesInner.customerPartNumber) && + Objects.equals(this.vendorName, invoiceDetailsv61ResponseLinesInner.vendorName) && + Objects.equals(this.productDescription, invoiceDetailsv61ResponseLinesInner.productDescription) && + Objects.equals(this.unitWeight, invoiceDetailsv61ResponseLinesInner.unitWeight) && + Objects.equals(this.quantity, invoiceDetailsv61ResponseLinesInner.quantity) && + Objects.equals(this.unitPrice, invoiceDetailsv61ResponseLinesInner.unitPrice) && + Objects.equals(this.unitOfMeasure, invoiceDetailsv61ResponseLinesInner.unitOfMeasure) && + Objects.equals(this.currencyCode, invoiceDetailsv61ResponseLinesInner.currencyCode) && + Objects.equals(this.extendedPrice, invoiceDetailsv61ResponseLinesInner.extendedPrice) && + Objects.equals(this.taxPercentage, invoiceDetailsv61ResponseLinesInner.taxPercentage) && + Objects.equals(this.taxRate, invoiceDetailsv61ResponseLinesInner.taxRate) && + Objects.equals(this.taxAmount, invoiceDetailsv61ResponseLinesInner.taxAmount) && + Objects.equals(this.serialNumbers, invoiceDetailsv61ResponseLinesInner.serialNumbers) && + Objects.equals(this.quantityOrdered, invoiceDetailsv61ResponseLinesInner.quantityOrdered) && + Objects.equals(this.quantityShipped, invoiceDetailsv61ResponseLinesInner.quantityShipped); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(ingramLineNumber, customerLineNumber, ingramPartNumber, vendorPartNumber, customerPartNumber, vendorName, productDescription, unitWeight, quantity, unitPrice, unitOfMeasure, currencyCode, extendedPrice, taxPercentage, taxRate, taxAmount, serialNumbers, quantityOrdered, quantityShipped); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvoiceDetailsv61ResponseLinesInner {\n"); + sb.append(" ingramLineNumber: ").append(toIndentedString(ingramLineNumber)).append("\n"); + sb.append(" customerLineNumber: ").append(toIndentedString(customerLineNumber)).append("\n"); + sb.append(" ingramPartNumber: ").append(toIndentedString(ingramPartNumber)).append("\n"); + sb.append(" vendorPartNumber: ").append(toIndentedString(vendorPartNumber)).append("\n"); + sb.append(" customerPartNumber: ").append(toIndentedString(customerPartNumber)).append("\n"); + sb.append(" vendorName: ").append(toIndentedString(vendorName)).append("\n"); + sb.append(" productDescription: ").append(toIndentedString(productDescription)).append("\n"); + sb.append(" unitWeight: ").append(toIndentedString(unitWeight)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" unitPrice: ").append(toIndentedString(unitPrice)).append("\n"); + sb.append(" unitOfMeasure: ").append(toIndentedString(unitOfMeasure)).append("\n"); + sb.append(" currencyCode: ").append(toIndentedString(currencyCode)).append("\n"); + sb.append(" extendedPrice: ").append(toIndentedString(extendedPrice)).append("\n"); + sb.append(" taxPercentage: ").append(toIndentedString(taxPercentage)).append("\n"); + sb.append(" taxRate: ").append(toIndentedString(taxRate)).append("\n"); + sb.append(" taxAmount: ").append(toIndentedString(taxAmount)).append("\n"); + sb.append(" serialNumbers: ").append(toIndentedString(serialNumbers)).append("\n"); + sb.append(" quantityOrdered: ").append(toIndentedString(quantityOrdered)).append("\n"); + sb.append(" quantityShipped: ").append(toIndentedString(quantityShipped)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("ingramLineNumber"); + openapiFields.add("customerLineNumber"); + openapiFields.add("ingramPartNumber"); + openapiFields.add("vendorPartNumber"); + openapiFields.add("customerPartNumber"); + openapiFields.add("vendorName"); + openapiFields.add("productDescription"); + openapiFields.add("unitWeight"); + openapiFields.add("quantity"); + openapiFields.add("unitPrice"); + openapiFields.add("unitOfMeasure"); + openapiFields.add("currencyCode"); + openapiFields.add("extendedPrice"); + openapiFields.add("taxPercentage"); + openapiFields.add("taxRate"); + openapiFields.add("taxAmount"); + openapiFields.add("serialNumbers"); + openapiFields.add("quantityOrdered"); + openapiFields.add("quantityShipped"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvoiceDetailsv61ResponseLinesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvoiceDetailsv61ResponseLinesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceDetailsv61ResponseLinesInner is not found in the empty JSON string", InvoiceDetailsv61ResponseLinesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvoiceDetailsv61ResponseLinesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvoiceDetailsv61ResponseLinesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("ingramLineNumber") != null && !jsonObj.get("ingramLineNumber").isJsonNull()) && !jsonObj.get("ingramLineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramLineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramLineNumber").toString())); + } + if ((jsonObj.get("customerLineNumber") != null && !jsonObj.get("customerLineNumber").isJsonNull()) && !jsonObj.get("customerLineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerLineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerLineNumber").toString())); + } + if ((jsonObj.get("ingramPartNumber") != null && !jsonObj.get("ingramPartNumber").isJsonNull()) && !jsonObj.get("ingramPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPartNumber").toString())); + } + if ((jsonObj.get("vendorPartNumber") != null && !jsonObj.get("vendorPartNumber").isJsonNull()) && !jsonObj.get("vendorPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorPartNumber").toString())); + } + if ((jsonObj.get("customerPartNumber") != null && !jsonObj.get("customerPartNumber").isJsonNull()) && !jsonObj.get("customerPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerPartNumber").toString())); + } + if ((jsonObj.get("vendorName") != null && !jsonObj.get("vendorName").isJsonNull()) && !jsonObj.get("vendorName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorName").toString())); + } + if ((jsonObj.get("productDescription") != null && !jsonObj.get("productDescription").isJsonNull()) && !jsonObj.get("productDescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `productDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productDescription").toString())); + } + if ((jsonObj.get("unitWeight") != null && !jsonObj.get("unitWeight").isJsonNull()) && !jsonObj.get("unitWeight").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `unitWeight` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unitWeight").toString())); + } + if ((jsonObj.get("unitOfMeasure") != null && !jsonObj.get("unitOfMeasure").isJsonNull()) && !jsonObj.get("unitOfMeasure").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `unitOfMeasure` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unitOfMeasure").toString())); + } + if ((jsonObj.get("currencyCode") != null && !jsonObj.get("currencyCode").isJsonNull()) && !jsonObj.get("currencyCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `currencyCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currencyCode").toString())); + } + if (jsonObj.get("serialNumbers") != null && !jsonObj.get("serialNumbers").isJsonNull()) { + JsonArray jsonArrayserialNumbers = jsonObj.getAsJsonArray("serialNumbers"); + if (jsonArrayserialNumbers != null) { + // ensure the json data is an array + if (!jsonObj.get("serialNumbers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `serialNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("serialNumbers").toString())); + } + + // validate the optional field `serialNumbers` (array) + for (int i = 0; i < jsonArrayserialNumbers.size(); i++) { + InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner.validateJsonElement(jsonArrayserialNumbers.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvoiceDetailsv61ResponseLinesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvoiceDetailsv61ResponseLinesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvoiceDetailsv61ResponseLinesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvoiceDetailsv61ResponseLinesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InvoiceDetailsv61ResponseLinesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvoiceDetailsv61ResponseLinesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvoiceDetailsv61ResponseLinesInner + * @throws IOException if the JSON string is invalid with respect to InvoiceDetailsv61ResponseLinesInner + */ + public static InvoiceDetailsv61ResponseLinesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvoiceDetailsv61ResponseLinesInner.class); + } + + /** + * Convert an instance of InvoiceDetailsv61ResponseLinesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner.java b/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner.java new file mode 100644 index 00000000..f5ba7fd4 --- /dev/null +++ b/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner.java @@ -0,0 +1,218 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner { + public static final String SERIALIZED_NAME_SERIAL_NUMBER = "serialNumber"; + @SerializedName(SERIALIZED_NAME_SERIAL_NUMBER) + private String serialNumber; + + public InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner() { + } + + public InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner serialNumber(String serialNumber) { + this.serialNumber = serialNumber; + return this; + } + + /** + * Serial number of the product. + * @return serialNumber + **/ + @javax.annotation.Nullable + public String getSerialNumber() { + return serialNumber; + } + + public void setSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner invoiceDetailsv61ResponseLinesInnerSerialNumbersInner = (InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner) o; + return Objects.equals(this.serialNumber, invoiceDetailsv61ResponseLinesInnerSerialNumbersInner.serialNumber); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(serialNumber); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner {\n"); + sb.append(" serialNumber: ").append(toIndentedString(serialNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("serialNumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner is not found in the empty JSON string", InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("serialNumber") != null && !jsonObj.get("serialNumber").isJsonNull()) && !jsonObj.get("serialNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `serialNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("serialNumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner + * @throws IOException if the JSON string is invalid with respect to InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner + */ + public static InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner.class); + } + + /** + * Convert an instance of InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponsePaymentTermsInfo.java b/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponsePaymentTermsInfo.java new file mode 100644 index 00000000..2e219838 --- /dev/null +++ b/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponsePaymentTermsInfo.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Payment terms is the agreement between Ingram and the customer by what period they should pay the invoice by + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class InvoiceDetailsv61ResponsePaymentTermsInfo { + public static final String SERIALIZED_NAME_PAYMENT_TERMS_CODE = "paymentTermsCode"; + @SerializedName(SERIALIZED_NAME_PAYMENT_TERMS_CODE) + private String paymentTermsCode; + + public static final String SERIALIZED_NAME_PAYMENT_TERMS_DESCRIPTION = "paymentTermsDescription"; + @SerializedName(SERIALIZED_NAME_PAYMENT_TERMS_DESCRIPTION) + private String paymentTermsDescription; + + public static final String SERIALIZED_NAME_PAYMENT_TERMS_DUE_DATE = "paymentTermsDueDate"; + @SerializedName(SERIALIZED_NAME_PAYMENT_TERMS_DUE_DATE) + private String paymentTermsDueDate; + + public InvoiceDetailsv61ResponsePaymentTermsInfo() { + } + + public InvoiceDetailsv61ResponsePaymentTermsInfo paymentTermsCode(String paymentTermsCode) { + this.paymentTermsCode = paymentTermsCode; + return this; + } + + /** + * Code of the payment terms. + * @return paymentTermsCode + **/ + @javax.annotation.Nullable + public String getPaymentTermsCode() { + return paymentTermsCode; + } + + public void setPaymentTermsCode(String paymentTermsCode) { + this.paymentTermsCode = paymentTermsCode; + } + + + public InvoiceDetailsv61ResponsePaymentTermsInfo paymentTermsDescription(String paymentTermsDescription) { + this.paymentTermsDescription = paymentTermsDescription; + return this; + } + + /** + * Description of the payment terms. + * @return paymentTermsDescription + **/ + @javax.annotation.Nullable + public String getPaymentTermsDescription() { + return paymentTermsDescription; + } + + public void setPaymentTermsDescription(String paymentTermsDescription) { + this.paymentTermsDescription = paymentTermsDescription; + } + + + public InvoiceDetailsv61ResponsePaymentTermsInfo paymentTermsDueDate(String paymentTermsDueDate) { + this.paymentTermsDueDate = paymentTermsDueDate; + return this; + } + + /** + * Due date of the payment terms. + * @return paymentTermsDueDate + **/ + @javax.annotation.Nullable + public String getPaymentTermsDueDate() { + return paymentTermsDueDate; + } + + public void setPaymentTermsDueDate(String paymentTermsDueDate) { + this.paymentTermsDueDate = paymentTermsDueDate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvoiceDetailsv61ResponsePaymentTermsInfo invoiceDetailsv61ResponsePaymentTermsInfo = (InvoiceDetailsv61ResponsePaymentTermsInfo) o; + return Objects.equals(this.paymentTermsCode, invoiceDetailsv61ResponsePaymentTermsInfo.paymentTermsCode) && + Objects.equals(this.paymentTermsDescription, invoiceDetailsv61ResponsePaymentTermsInfo.paymentTermsDescription) && + Objects.equals(this.paymentTermsDueDate, invoiceDetailsv61ResponsePaymentTermsInfo.paymentTermsDueDate); + } + + @Override + public int hashCode() { + return Objects.hash(paymentTermsCode, paymentTermsDescription, paymentTermsDueDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvoiceDetailsv61ResponsePaymentTermsInfo {\n"); + sb.append(" paymentTermsCode: ").append(toIndentedString(paymentTermsCode)).append("\n"); + sb.append(" paymentTermsDescription: ").append(toIndentedString(paymentTermsDescription)).append("\n"); + sb.append(" paymentTermsDueDate: ").append(toIndentedString(paymentTermsDueDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("paymentTermsCode"); + openapiFields.add("paymentTermsDescription"); + openapiFields.add("paymentTermsDueDate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvoiceDetailsv61ResponsePaymentTermsInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvoiceDetailsv61ResponsePaymentTermsInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceDetailsv61ResponsePaymentTermsInfo is not found in the empty JSON string", InvoiceDetailsv61ResponsePaymentTermsInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvoiceDetailsv61ResponsePaymentTermsInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvoiceDetailsv61ResponsePaymentTermsInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("paymentTermsCode") != null && !jsonObj.get("paymentTermsCode").isJsonNull()) && !jsonObj.get("paymentTermsCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `paymentTermsCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentTermsCode").toString())); + } + if ((jsonObj.get("paymentTermsDescription") != null && !jsonObj.get("paymentTermsDescription").isJsonNull()) && !jsonObj.get("paymentTermsDescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `paymentTermsDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentTermsDescription").toString())); + } + if ((jsonObj.get("paymentTermsDueDate") != null && !jsonObj.get("paymentTermsDueDate").isJsonNull()) && !jsonObj.get("paymentTermsDueDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `paymentTermsDueDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentTermsDueDate").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvoiceDetailsv61ResponsePaymentTermsInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvoiceDetailsv61ResponsePaymentTermsInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvoiceDetailsv61ResponsePaymentTermsInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvoiceDetailsv61ResponsePaymentTermsInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InvoiceDetailsv61ResponsePaymentTermsInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvoiceDetailsv61ResponsePaymentTermsInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvoiceDetailsv61ResponsePaymentTermsInfo + * @throws IOException if the JSON string is invalid with respect to InvoiceDetailsv61ResponsePaymentTermsInfo + */ + public static InvoiceDetailsv61ResponsePaymentTermsInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvoiceDetailsv61ResponsePaymentTermsInfo.class); + } + + /** + * Convert an instance of InvoiceDetailsv61ResponsePaymentTermsInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseShipToInfo.java b/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseShipToInfo.java new file mode 100644 index 00000000..a67ea2cc --- /dev/null +++ b/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseShipToInfo.java @@ -0,0 +1,496 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * InvoiceDetailsv61ResponseShipToInfo + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class InvoiceDetailsv61ResponseShipToInfo { + public static final String SERIALIZED_NAME_CONTACT = "contact"; + @SerializedName(SERIALIZED_NAME_CONTACT) + private String contact; + + public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; + @SerializedName(SERIALIZED_NAME_COMPANY_NAME) + private String companyName; + + public static final String SERIALIZED_NAME_ADDRESS_LINE1 = "addressLine1"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE1) + private String addressLine1; + + public static final String SERIALIZED_NAME_ADDRESS_LINE2 = "addressLine2"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE2) + private String addressLine2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE3 = "addressLine3"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE3) + private String addressLine3; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; + @SerializedName(SERIALIZED_NAME_POSTAL_CODE) + private String postalCode; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) + private String phoneNumber; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public InvoiceDetailsv61ResponseShipToInfo() { + } + + public InvoiceDetailsv61ResponseShipToInfo contact(String contact) { + this.contact = contact; + return this; + } + + /** + * Ship to Name. + * @return contact + **/ + @javax.annotation.Nullable + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + + public InvoiceDetailsv61ResponseShipToInfo companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * Ship to company. + * @return companyName + **/ + @javax.annotation.Nullable + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public InvoiceDetailsv61ResponseShipToInfo addressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + return this; + } + + /** + * Ship to Address Line1. + * @return addressLine1 + **/ + @javax.annotation.Nullable + public String getAddressLine1() { + return addressLine1; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + + public InvoiceDetailsv61ResponseShipToInfo addressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + return this; + } + + /** + * Ship to Address Line2. + * @return addressLine2 + **/ + @javax.annotation.Nullable + public String getAddressLine2() { + return addressLine2; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + + public InvoiceDetailsv61ResponseShipToInfo addressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + return this; + } + + /** + * Ship to Address Line3. + * @return addressLine3 + **/ + @javax.annotation.Nullable + public String getAddressLine3() { + return addressLine3; + } + + public void setAddressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + } + + + public InvoiceDetailsv61ResponseShipToInfo city(String city) { + this.city = city; + return this; + } + + /** + * Ship to City. + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public InvoiceDetailsv61ResponseShipToInfo state(String state) { + this.state = state; + return this; + } + + /** + * Ship to State code + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public InvoiceDetailsv61ResponseShipToInfo postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * Ship to Postalcode code. + * @return postalCode + **/ + @javax.annotation.Nullable + public String getPostalCode() { + return postalCode; + } + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public InvoiceDetailsv61ResponseShipToInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Ship to Country code. + * @return countryCode + **/ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public InvoiceDetailsv61ResponseShipToInfo phoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * Phone number of the Ship to company. + * @return phoneNumber + **/ + @javax.annotation.Nullable + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public InvoiceDetailsv61ResponseShipToInfo email(String email) { + this.email = email; + return this; + } + + /** + * Email address of the Ship to company. + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvoiceDetailsv61ResponseShipToInfo invoiceDetailsv61ResponseShipToInfo = (InvoiceDetailsv61ResponseShipToInfo) o; + return Objects.equals(this.contact, invoiceDetailsv61ResponseShipToInfo.contact) && + Objects.equals(this.companyName, invoiceDetailsv61ResponseShipToInfo.companyName) && + Objects.equals(this.addressLine1, invoiceDetailsv61ResponseShipToInfo.addressLine1) && + Objects.equals(this.addressLine2, invoiceDetailsv61ResponseShipToInfo.addressLine2) && + Objects.equals(this.addressLine3, invoiceDetailsv61ResponseShipToInfo.addressLine3) && + Objects.equals(this.city, invoiceDetailsv61ResponseShipToInfo.city) && + Objects.equals(this.state, invoiceDetailsv61ResponseShipToInfo.state) && + Objects.equals(this.postalCode, invoiceDetailsv61ResponseShipToInfo.postalCode) && + Objects.equals(this.countryCode, invoiceDetailsv61ResponseShipToInfo.countryCode) && + Objects.equals(this.phoneNumber, invoiceDetailsv61ResponseShipToInfo.phoneNumber) && + Objects.equals(this.email, invoiceDetailsv61ResponseShipToInfo.email); + } + + @Override + public int hashCode() { + return Objects.hash(contact, companyName, addressLine1, addressLine2, addressLine3, city, state, postalCode, countryCode, phoneNumber, email); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvoiceDetailsv61ResponseShipToInfo {\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); + sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); + sb.append(" addressLine3: ").append(toIndentedString(addressLine3)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("contact"); + openapiFields.add("companyName"); + openapiFields.add("addressLine1"); + openapiFields.add("addressLine2"); + openapiFields.add("addressLine3"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalCode"); + openapiFields.add("countryCode"); + openapiFields.add("phoneNumber"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvoiceDetailsv61ResponseShipToInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvoiceDetailsv61ResponseShipToInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceDetailsv61ResponseShipToInfo is not found in the empty JSON string", InvoiceDetailsv61ResponseShipToInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvoiceDetailsv61ResponseShipToInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvoiceDetailsv61ResponseShipToInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("contact") != null && !jsonObj.get("contact").isJsonNull()) && !jsonObj.get("contact").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contact` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact").toString())); + } + if ((jsonObj.get("companyName") != null && !jsonObj.get("companyName").isJsonNull()) && !jsonObj.get("companyName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); + } + if ((jsonObj.get("addressLine1") != null && !jsonObj.get("addressLine1").isJsonNull()) && !jsonObj.get("addressLine1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine1").toString())); + } + if ((jsonObj.get("addressLine2") != null && !jsonObj.get("addressLine2").isJsonNull()) && !jsonObj.get("addressLine2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine2").toString())); + } + if ((jsonObj.get("addressLine3") != null && !jsonObj.get("addressLine3").isJsonNull()) && !jsonObj.get("addressLine3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine3").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvoiceDetailsv61ResponseShipToInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvoiceDetailsv61ResponseShipToInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvoiceDetailsv61ResponseShipToInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvoiceDetailsv61ResponseShipToInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InvoiceDetailsv61ResponseShipToInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvoiceDetailsv61ResponseShipToInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvoiceDetailsv61ResponseShipToInfo + * @throws IOException if the JSON string is invalid with respect to InvoiceDetailsv61ResponseShipToInfo + */ + public static InvoiceDetailsv61ResponseShipToInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvoiceDetailsv61ResponseShipToInfo.class); + } + + /** + * Convert an instance of InvoiceDetailsv61ResponseShipToInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummary.java b/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummary.java new file mode 100644 index 00000000..05247339 --- /dev/null +++ b/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummary.java @@ -0,0 +1,333 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import xiresellers.client.model.InvoiceDetailsv61ResponseSummaryForeignFxTotals; +import xiresellers.client.model.InvoiceDetailsv61ResponseSummaryLines; +import xiresellers.client.model.InvoiceDetailsv61ResponseSummaryMiscChargesInner; +import xiresellers.client.model.InvoiceDetailsv61ResponseSummaryTotals; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * InvoiceDetailsv61ResponseSummary + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class InvoiceDetailsv61ResponseSummary { + public static final String SERIALIZED_NAME_LINES = "lines"; + @SerializedName(SERIALIZED_NAME_LINES) + private InvoiceDetailsv61ResponseSummaryLines lines; + + public static final String SERIALIZED_NAME_MISC_CHARGES = "miscCharges"; + @SerializedName(SERIALIZED_NAME_MISC_CHARGES) + private List miscCharges; + + public static final String SERIALIZED_NAME_TOTALS = "totals"; + @SerializedName(SERIALIZED_NAME_TOTALS) + private InvoiceDetailsv61ResponseSummaryTotals totals; + + public static final String SERIALIZED_NAME_FOREIGN_FX_TOTALS = "foreignFxTotals"; + @SerializedName(SERIALIZED_NAME_FOREIGN_FX_TOTALS) + private InvoiceDetailsv61ResponseSummaryForeignFxTotals foreignFxTotals; + + public InvoiceDetailsv61ResponseSummary() { + } + + public InvoiceDetailsv61ResponseSummary lines(InvoiceDetailsv61ResponseSummaryLines lines) { + this.lines = lines; + return this; + } + + /** + * Get lines + * @return lines + **/ + @javax.annotation.Nullable + public InvoiceDetailsv61ResponseSummaryLines getLines() { + return lines; + } + + public void setLines(InvoiceDetailsv61ResponseSummaryLines lines) { + this.lines = lines; + } + + + public InvoiceDetailsv61ResponseSummary miscCharges(List miscCharges) { + this.miscCharges = miscCharges; + return this; + } + + public InvoiceDetailsv61ResponseSummary addMiscChargesItem(InvoiceDetailsv61ResponseSummaryMiscChargesInner miscChargesItem) { + if (this.miscCharges == null) { + this.miscCharges = new ArrayList<>(); + } + this.miscCharges.add(miscChargesItem); + return this; + } + + /** + * Miscellaneous charges. + * @return miscCharges + **/ + @javax.annotation.Nullable + public List getMiscCharges() { + return miscCharges; + } + + public void setMiscCharges(List miscCharges) { + this.miscCharges = miscCharges; + } + + + public InvoiceDetailsv61ResponseSummary totals(InvoiceDetailsv61ResponseSummaryTotals totals) { + this.totals = totals; + return this; + } + + /** + * Get totals + * @return totals + **/ + @javax.annotation.Nullable + public InvoiceDetailsv61ResponseSummaryTotals getTotals() { + return totals; + } + + public void setTotals(InvoiceDetailsv61ResponseSummaryTotals totals) { + this.totals = totals; + } + + + public InvoiceDetailsv61ResponseSummary foreignFxTotals(InvoiceDetailsv61ResponseSummaryForeignFxTotals foreignFxTotals) { + this.foreignFxTotals = foreignFxTotals; + return this; + } + + /** + * Get foreignFxTotals + * @return foreignFxTotals + **/ + @javax.annotation.Nullable + public InvoiceDetailsv61ResponseSummaryForeignFxTotals getForeignFxTotals() { + return foreignFxTotals; + } + + public void setForeignFxTotals(InvoiceDetailsv61ResponseSummaryForeignFxTotals foreignFxTotals) { + this.foreignFxTotals = foreignFxTotals; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvoiceDetailsv61ResponseSummary invoiceDetailsv61ResponseSummary = (InvoiceDetailsv61ResponseSummary) o; + return Objects.equals(this.lines, invoiceDetailsv61ResponseSummary.lines) && + Objects.equals(this.miscCharges, invoiceDetailsv61ResponseSummary.miscCharges) && + Objects.equals(this.totals, invoiceDetailsv61ResponseSummary.totals) && + Objects.equals(this.foreignFxTotals, invoiceDetailsv61ResponseSummary.foreignFxTotals); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(lines, miscCharges, totals, foreignFxTotals); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvoiceDetailsv61ResponseSummary {\n"); + sb.append(" lines: ").append(toIndentedString(lines)).append("\n"); + sb.append(" miscCharges: ").append(toIndentedString(miscCharges)).append("\n"); + sb.append(" totals: ").append(toIndentedString(totals)).append("\n"); + sb.append(" foreignFxTotals: ").append(toIndentedString(foreignFxTotals)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("lines"); + openapiFields.add("miscCharges"); + openapiFields.add("totals"); + openapiFields.add("foreignFxTotals"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvoiceDetailsv61ResponseSummary + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvoiceDetailsv61ResponseSummary.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceDetailsv61ResponseSummary is not found in the empty JSON string", InvoiceDetailsv61ResponseSummary.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvoiceDetailsv61ResponseSummary.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvoiceDetailsv61ResponseSummary` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `lines` + if (jsonObj.get("lines") != null && !jsonObj.get("lines").isJsonNull()) { + InvoiceDetailsv61ResponseSummaryLines.validateJsonElement(jsonObj.get("lines")); + } + if (jsonObj.get("miscCharges") != null && !jsonObj.get("miscCharges").isJsonNull()) { + JsonArray jsonArraymiscCharges = jsonObj.getAsJsonArray("miscCharges"); + if (jsonArraymiscCharges != null) { + // ensure the json data is an array + if (!jsonObj.get("miscCharges").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `miscCharges` to be an array in the JSON string but got `%s`", jsonObj.get("miscCharges").toString())); + } + + // validate the optional field `miscCharges` (array) + for (int i = 0; i < jsonArraymiscCharges.size(); i++) { + InvoiceDetailsv61ResponseSummaryMiscChargesInner.validateJsonElement(jsonArraymiscCharges.get(i)); + }; + } + } + // validate the optional field `totals` + if (jsonObj.get("totals") != null && !jsonObj.get("totals").isJsonNull()) { + InvoiceDetailsv61ResponseSummaryTotals.validateJsonElement(jsonObj.get("totals")); + } + // validate the optional field `foreignFxTotals` + if (jsonObj.get("foreignFxTotals") != null && !jsonObj.get("foreignFxTotals").isJsonNull()) { + InvoiceDetailsv61ResponseSummaryForeignFxTotals.validateJsonElement(jsonObj.get("foreignFxTotals")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvoiceDetailsv61ResponseSummary.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvoiceDetailsv61ResponseSummary' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvoiceDetailsv61ResponseSummary.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvoiceDetailsv61ResponseSummary value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InvoiceDetailsv61ResponseSummary read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvoiceDetailsv61ResponseSummary given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvoiceDetailsv61ResponseSummary + * @throws IOException if the JSON string is invalid with respect to InvoiceDetailsv61ResponseSummary + */ + public static InvoiceDetailsv61ResponseSummary fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvoiceDetailsv61ResponseSummary.class); + } + + /** + * Convert an instance of InvoiceDetailsv61ResponseSummary to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryForeignFxTotals.java b/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryForeignFxTotals.java new file mode 100644 index 00000000..8bc59893 --- /dev/null +++ b/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryForeignFxTotals.java @@ -0,0 +1,316 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * InvoiceDetailsv61ResponseSummaryForeignFxTotals + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class InvoiceDetailsv61ResponseSummaryForeignFxTotals { + public static final String SERIALIZED_NAME_FOREIGN_CURRENCY_CODE = "foreignCurrencyCode"; + @SerializedName(SERIALIZED_NAME_FOREIGN_CURRENCY_CODE) + private String foreignCurrencyCode; + + public static final String SERIALIZED_NAME_FOREIGN_CURRENCY_FX_RATE = "foreignCurrencyFxRate"; + @SerializedName(SERIALIZED_NAME_FOREIGN_CURRENCY_FX_RATE) + private Double foreignCurrencyFxRate; + + public static final String SERIALIZED_NAME_FOREIGN_TOTAL_TAXABLE_AMOUNT = "foreignTotalTaxableAmount"; + @SerializedName(SERIALIZED_NAME_FOREIGN_TOTAL_TAXABLE_AMOUNT) + private String foreignTotalTaxableAmount; + + public static final String SERIALIZED_NAME_FOREIGN_TOTAL_TAX_AMOUNT = "foreignTotalTaxAmount"; + @SerializedName(SERIALIZED_NAME_FOREIGN_TOTAL_TAX_AMOUNT) + private Double foreignTotalTaxAmount; + + public static final String SERIALIZED_NAME_FOREIGN_INVOICE_AMOUNT_DUE = "foreignInvoiceAmountDue"; + @SerializedName(SERIALIZED_NAME_FOREIGN_INVOICE_AMOUNT_DUE) + private String foreignInvoiceAmountDue; + + public InvoiceDetailsv61ResponseSummaryForeignFxTotals() { + } + + public InvoiceDetailsv61ResponseSummaryForeignFxTotals foreignCurrencyCode(String foreignCurrencyCode) { + this.foreignCurrencyCode = foreignCurrencyCode; + return this; + } + + /** + * Foreign Currency Code. + * @return foreignCurrencyCode + **/ + @javax.annotation.Nullable + public String getForeignCurrencyCode() { + return foreignCurrencyCode; + } + + public void setForeignCurrencyCode(String foreignCurrencyCode) { + this.foreignCurrencyCode = foreignCurrencyCode; + } + + + public InvoiceDetailsv61ResponseSummaryForeignFxTotals foreignCurrencyFxRate(Double foreignCurrencyFxRate) { + this.foreignCurrencyFxRate = foreignCurrencyFxRate; + return this; + } + + /** + * Foreign rate. + * @return foreignCurrencyFxRate + **/ + @javax.annotation.Nullable + public Double getForeignCurrencyFxRate() { + return foreignCurrencyFxRate; + } + + public void setForeignCurrencyFxRate(Double foreignCurrencyFxRate) { + this.foreignCurrencyFxRate = foreignCurrencyFxRate; + } + + + public InvoiceDetailsv61ResponseSummaryForeignFxTotals foreignTotalTaxableAmount(String foreignTotalTaxableAmount) { + this.foreignTotalTaxableAmount = foreignTotalTaxableAmount; + return this; + } + + /** + * Foreign amount. + * @return foreignTotalTaxableAmount + **/ + @javax.annotation.Nullable + public String getForeignTotalTaxableAmount() { + return foreignTotalTaxableAmount; + } + + public void setForeignTotalTaxableAmount(String foreignTotalTaxableAmount) { + this.foreignTotalTaxableAmount = foreignTotalTaxableAmount; + } + + + public InvoiceDetailsv61ResponseSummaryForeignFxTotals foreignTotalTaxAmount(Double foreignTotalTaxAmount) { + this.foreignTotalTaxAmount = foreignTotalTaxAmount; + return this; + } + + /** + * Foreign amount. + * @return foreignTotalTaxAmount + **/ + @javax.annotation.Nullable + public Double getForeignTotalTaxAmount() { + return foreignTotalTaxAmount; + } + + public void setForeignTotalTaxAmount(Double foreignTotalTaxAmount) { + this.foreignTotalTaxAmount = foreignTotalTaxAmount; + } + + + public InvoiceDetailsv61ResponseSummaryForeignFxTotals foreignInvoiceAmountDue(String foreignInvoiceAmountDue) { + this.foreignInvoiceAmountDue = foreignInvoiceAmountDue; + return this; + } + + /** + * Foreign due. + * @return foreignInvoiceAmountDue + **/ + @javax.annotation.Nullable + public String getForeignInvoiceAmountDue() { + return foreignInvoiceAmountDue; + } + + public void setForeignInvoiceAmountDue(String foreignInvoiceAmountDue) { + this.foreignInvoiceAmountDue = foreignInvoiceAmountDue; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvoiceDetailsv61ResponseSummaryForeignFxTotals invoiceDetailsv61ResponseSummaryForeignFxTotals = (InvoiceDetailsv61ResponseSummaryForeignFxTotals) o; + return Objects.equals(this.foreignCurrencyCode, invoiceDetailsv61ResponseSummaryForeignFxTotals.foreignCurrencyCode) && + Objects.equals(this.foreignCurrencyFxRate, invoiceDetailsv61ResponseSummaryForeignFxTotals.foreignCurrencyFxRate) && + Objects.equals(this.foreignTotalTaxableAmount, invoiceDetailsv61ResponseSummaryForeignFxTotals.foreignTotalTaxableAmount) && + Objects.equals(this.foreignTotalTaxAmount, invoiceDetailsv61ResponseSummaryForeignFxTotals.foreignTotalTaxAmount) && + Objects.equals(this.foreignInvoiceAmountDue, invoiceDetailsv61ResponseSummaryForeignFxTotals.foreignInvoiceAmountDue); + } + + @Override + public int hashCode() { + return Objects.hash(foreignCurrencyCode, foreignCurrencyFxRate, foreignTotalTaxableAmount, foreignTotalTaxAmount, foreignInvoiceAmountDue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvoiceDetailsv61ResponseSummaryForeignFxTotals {\n"); + sb.append(" foreignCurrencyCode: ").append(toIndentedString(foreignCurrencyCode)).append("\n"); + sb.append(" foreignCurrencyFxRate: ").append(toIndentedString(foreignCurrencyFxRate)).append("\n"); + sb.append(" foreignTotalTaxableAmount: ").append(toIndentedString(foreignTotalTaxableAmount)).append("\n"); + sb.append(" foreignTotalTaxAmount: ").append(toIndentedString(foreignTotalTaxAmount)).append("\n"); + sb.append(" foreignInvoiceAmountDue: ").append(toIndentedString(foreignInvoiceAmountDue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("foreignCurrencyCode"); + openapiFields.add("foreignCurrencyFxRate"); + openapiFields.add("foreignTotalTaxableAmount"); + openapiFields.add("foreignTotalTaxAmount"); + openapiFields.add("foreignInvoiceAmountDue"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvoiceDetailsv61ResponseSummaryForeignFxTotals + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvoiceDetailsv61ResponseSummaryForeignFxTotals.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceDetailsv61ResponseSummaryForeignFxTotals is not found in the empty JSON string", InvoiceDetailsv61ResponseSummaryForeignFxTotals.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvoiceDetailsv61ResponseSummaryForeignFxTotals.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvoiceDetailsv61ResponseSummaryForeignFxTotals` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("foreignCurrencyCode") != null && !jsonObj.get("foreignCurrencyCode").isJsonNull()) && !jsonObj.get("foreignCurrencyCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `foreignCurrencyCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignCurrencyCode").toString())); + } + if ((jsonObj.get("foreignTotalTaxableAmount") != null && !jsonObj.get("foreignTotalTaxableAmount").isJsonNull()) && !jsonObj.get("foreignTotalTaxableAmount").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `foreignTotalTaxableAmount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignTotalTaxableAmount").toString())); + } + if ((jsonObj.get("foreignInvoiceAmountDue") != null && !jsonObj.get("foreignInvoiceAmountDue").isJsonNull()) && !jsonObj.get("foreignInvoiceAmountDue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `foreignInvoiceAmountDue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignInvoiceAmountDue").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvoiceDetailsv61ResponseSummaryForeignFxTotals.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvoiceDetailsv61ResponseSummaryForeignFxTotals' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvoiceDetailsv61ResponseSummaryForeignFxTotals.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvoiceDetailsv61ResponseSummaryForeignFxTotals value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InvoiceDetailsv61ResponseSummaryForeignFxTotals read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvoiceDetailsv61ResponseSummaryForeignFxTotals given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvoiceDetailsv61ResponseSummaryForeignFxTotals + * @throws IOException if the JSON string is invalid with respect to InvoiceDetailsv61ResponseSummaryForeignFxTotals + */ + public static InvoiceDetailsv61ResponseSummaryForeignFxTotals fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvoiceDetailsv61ResponseSummaryForeignFxTotals.class); + } + + /** + * Convert an instance of InvoiceDetailsv61ResponseSummaryForeignFxTotals to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryLines.java b/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryLines.java new file mode 100644 index 00000000..8e4031ad --- /dev/null +++ b/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryLines.java @@ -0,0 +1,229 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * InvoiceDetailsv61ResponseSummaryLines + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class InvoiceDetailsv61ResponseSummaryLines { + public static final String SERIALIZED_NAME_PRODUCT_LINE_COUNT = "productLineCount"; + @SerializedName(SERIALIZED_NAME_PRODUCT_LINE_COUNT) + private Integer productLineCount; + + public static final String SERIALIZED_NAME_PRODUCT_LINE_TOTAL_QUANTITY = "productLineTotalQuantity"; + @SerializedName(SERIALIZED_NAME_PRODUCT_LINE_TOTAL_QUANTITY) + private Integer productLineTotalQuantity; + + public InvoiceDetailsv61ResponseSummaryLines() { + } + + public InvoiceDetailsv61ResponseSummaryLines productLineCount(Integer productLineCount) { + this.productLineCount = productLineCount; + return this; + } + + /** + * Number of lines in the order. + * @return productLineCount + **/ + @javax.annotation.Nullable + public Integer getProductLineCount() { + return productLineCount; + } + + public void setProductLineCount(Integer productLineCount) { + this.productLineCount = productLineCount; + } + + + public InvoiceDetailsv61ResponseSummaryLines productLineTotalQuantity(Integer productLineTotalQuantity) { + this.productLineTotalQuantity = productLineTotalQuantity; + return this; + } + + /** + * Total quantity of the order. + * @return productLineTotalQuantity + **/ + @javax.annotation.Nullable + public Integer getProductLineTotalQuantity() { + return productLineTotalQuantity; + } + + public void setProductLineTotalQuantity(Integer productLineTotalQuantity) { + this.productLineTotalQuantity = productLineTotalQuantity; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvoiceDetailsv61ResponseSummaryLines invoiceDetailsv61ResponseSummaryLines = (InvoiceDetailsv61ResponseSummaryLines) o; + return Objects.equals(this.productLineCount, invoiceDetailsv61ResponseSummaryLines.productLineCount) && + Objects.equals(this.productLineTotalQuantity, invoiceDetailsv61ResponseSummaryLines.productLineTotalQuantity); + } + + @Override + public int hashCode() { + return Objects.hash(productLineCount, productLineTotalQuantity); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvoiceDetailsv61ResponseSummaryLines {\n"); + sb.append(" productLineCount: ").append(toIndentedString(productLineCount)).append("\n"); + sb.append(" productLineTotalQuantity: ").append(toIndentedString(productLineTotalQuantity)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("productLineCount"); + openapiFields.add("productLineTotalQuantity"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvoiceDetailsv61ResponseSummaryLines + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvoiceDetailsv61ResponseSummaryLines.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceDetailsv61ResponseSummaryLines is not found in the empty JSON string", InvoiceDetailsv61ResponseSummaryLines.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvoiceDetailsv61ResponseSummaryLines.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvoiceDetailsv61ResponseSummaryLines` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvoiceDetailsv61ResponseSummaryLines.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvoiceDetailsv61ResponseSummaryLines' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvoiceDetailsv61ResponseSummaryLines.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvoiceDetailsv61ResponseSummaryLines value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InvoiceDetailsv61ResponseSummaryLines read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvoiceDetailsv61ResponseSummaryLines given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvoiceDetailsv61ResponseSummaryLines + * @throws IOException if the JSON string is invalid with respect to InvoiceDetailsv61ResponseSummaryLines + */ + public static InvoiceDetailsv61ResponseSummaryLines fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvoiceDetailsv61ResponseSummaryLines.class); + } + + /** + * Convert an instance of InvoiceDetailsv61ResponseSummaryLines to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryMiscChargesInner.java b/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryMiscChargesInner.java new file mode 100644 index 00000000..ae6eca71 --- /dev/null +++ b/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryMiscChargesInner.java @@ -0,0 +1,316 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * InvoiceDetailsv61ResponseSummaryMiscChargesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class InvoiceDetailsv61ResponseSummaryMiscChargesInner { + public static final String SERIALIZED_NAME_CHARGE_DESCRIPTION = "chargeDescription"; + @SerializedName(SERIALIZED_NAME_CHARGE_DESCRIPTION) + private String chargeDescription; + + public static final String SERIALIZED_NAME_MISC_CHARGE_LINE_COUNT = "miscChargeLineCount"; + @SerializedName(SERIALIZED_NAME_MISC_CHARGE_LINE_COUNT) + private Integer miscChargeLineCount; + + public static final String SERIALIZED_NAME_MISC_CHARGE_LINE_TOTAL = "miscChargeLineTotal"; + @SerializedName(SERIALIZED_NAME_MISC_CHARGE_LINE_TOTAL) + private Double miscChargeLineTotal; + + public static final String SERIALIZED_NAME_CHARGE_LINE_REFERENCE = "chargeLineReference"; + @SerializedName(SERIALIZED_NAME_CHARGE_LINE_REFERENCE) + private String chargeLineReference; + + public static final String SERIALIZED_NAME_IS_NON_MISC = "isNonMisc"; + @SerializedName(SERIALIZED_NAME_IS_NON_MISC) + private String isNonMisc; + + public InvoiceDetailsv61ResponseSummaryMiscChargesInner() { + } + + public InvoiceDetailsv61ResponseSummaryMiscChargesInner chargeDescription(String chargeDescription) { + this.chargeDescription = chargeDescription; + return this; + } + + /** + * Description of the charge. + * @return chargeDescription + **/ + @javax.annotation.Nullable + public String getChargeDescription() { + return chargeDescription; + } + + public void setChargeDescription(String chargeDescription) { + this.chargeDescription = chargeDescription; + } + + + public InvoiceDetailsv61ResponseSummaryMiscChargesInner miscChargeLineCount(Integer miscChargeLineCount) { + this.miscChargeLineCount = miscChargeLineCount; + return this; + } + + /** + * The number of lines for which miscellaneous charges are applicable. + * @return miscChargeLineCount + **/ + @javax.annotation.Nullable + public Integer getMiscChargeLineCount() { + return miscChargeLineCount; + } + + public void setMiscChargeLineCount(Integer miscChargeLineCount) { + this.miscChargeLineCount = miscChargeLineCount; + } + + + public InvoiceDetailsv61ResponseSummaryMiscChargesInner miscChargeLineTotal(Double miscChargeLineTotal) { + this.miscChargeLineTotal = miscChargeLineTotal; + return this; + } + + /** + * Miscellaneous charge amount. + * @return miscChargeLineTotal + **/ + @javax.annotation.Nullable + public Double getMiscChargeLineTotal() { + return miscChargeLineTotal; + } + + public void setMiscChargeLineTotal(Double miscChargeLineTotal) { + this.miscChargeLineTotal = miscChargeLineTotal; + } + + + public InvoiceDetailsv61ResponseSummaryMiscChargesInner chargeLineReference(String chargeLineReference) { + this.chargeLineReference = chargeLineReference; + return this; + } + + /** + * Reference of the chargeLine. + * @return chargeLineReference + **/ + @javax.annotation.Nullable + public String getChargeLineReference() { + return chargeLineReference; + } + + public void setChargeLineReference(String chargeLineReference) { + this.chargeLineReference = chargeLineReference; + } + + + public InvoiceDetailsv61ResponseSummaryMiscChargesInner isNonMisc(String isNonMisc) { + this.isNonMisc = isNonMisc; + return this; + } + + /** + * Is charge non miscellaneous. + * @return isNonMisc + **/ + @javax.annotation.Nullable + public String getIsNonMisc() { + return isNonMisc; + } + + public void setIsNonMisc(String isNonMisc) { + this.isNonMisc = isNonMisc; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvoiceDetailsv61ResponseSummaryMiscChargesInner invoiceDetailsv61ResponseSummaryMiscChargesInner = (InvoiceDetailsv61ResponseSummaryMiscChargesInner) o; + return Objects.equals(this.chargeDescription, invoiceDetailsv61ResponseSummaryMiscChargesInner.chargeDescription) && + Objects.equals(this.miscChargeLineCount, invoiceDetailsv61ResponseSummaryMiscChargesInner.miscChargeLineCount) && + Objects.equals(this.miscChargeLineTotal, invoiceDetailsv61ResponseSummaryMiscChargesInner.miscChargeLineTotal) && + Objects.equals(this.chargeLineReference, invoiceDetailsv61ResponseSummaryMiscChargesInner.chargeLineReference) && + Objects.equals(this.isNonMisc, invoiceDetailsv61ResponseSummaryMiscChargesInner.isNonMisc); + } + + @Override + public int hashCode() { + return Objects.hash(chargeDescription, miscChargeLineCount, miscChargeLineTotal, chargeLineReference, isNonMisc); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvoiceDetailsv61ResponseSummaryMiscChargesInner {\n"); + sb.append(" chargeDescription: ").append(toIndentedString(chargeDescription)).append("\n"); + sb.append(" miscChargeLineCount: ").append(toIndentedString(miscChargeLineCount)).append("\n"); + sb.append(" miscChargeLineTotal: ").append(toIndentedString(miscChargeLineTotal)).append("\n"); + sb.append(" chargeLineReference: ").append(toIndentedString(chargeLineReference)).append("\n"); + sb.append(" isNonMisc: ").append(toIndentedString(isNonMisc)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("chargeDescription"); + openapiFields.add("miscChargeLineCount"); + openapiFields.add("miscChargeLineTotal"); + openapiFields.add("chargeLineReference"); + openapiFields.add("isNonMisc"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvoiceDetailsv61ResponseSummaryMiscChargesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvoiceDetailsv61ResponseSummaryMiscChargesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceDetailsv61ResponseSummaryMiscChargesInner is not found in the empty JSON string", InvoiceDetailsv61ResponseSummaryMiscChargesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvoiceDetailsv61ResponseSummaryMiscChargesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvoiceDetailsv61ResponseSummaryMiscChargesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("chargeDescription") != null && !jsonObj.get("chargeDescription").isJsonNull()) && !jsonObj.get("chargeDescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `chargeDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chargeDescription").toString())); + } + if ((jsonObj.get("chargeLineReference") != null && !jsonObj.get("chargeLineReference").isJsonNull()) && !jsonObj.get("chargeLineReference").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `chargeLineReference` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chargeLineReference").toString())); + } + if ((jsonObj.get("isNonMisc") != null && !jsonObj.get("isNonMisc").isJsonNull()) && !jsonObj.get("isNonMisc").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `isNonMisc` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isNonMisc").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvoiceDetailsv61ResponseSummaryMiscChargesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvoiceDetailsv61ResponseSummaryMiscChargesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvoiceDetailsv61ResponseSummaryMiscChargesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvoiceDetailsv61ResponseSummaryMiscChargesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InvoiceDetailsv61ResponseSummaryMiscChargesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvoiceDetailsv61ResponseSummaryMiscChargesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvoiceDetailsv61ResponseSummaryMiscChargesInner + * @throws IOException if the JSON string is invalid with respect to InvoiceDetailsv61ResponseSummaryMiscChargesInner + */ + public static InvoiceDetailsv61ResponseSummaryMiscChargesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvoiceDetailsv61ResponseSummaryMiscChargesInner.class); + } + + /** + * Convert an instance of InvoiceDetailsv61ResponseSummaryMiscChargesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryTotals.java b/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryTotals.java new file mode 100644 index 00000000..3025dc21 --- /dev/null +++ b/src/main/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryTotals.java @@ -0,0 +1,336 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * InvoiceDetailsv61ResponseSummaryTotals + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class InvoiceDetailsv61ResponseSummaryTotals { + public static final String SERIALIZED_NAME_NET_INVOICE_AMOUNT = "netInvoiceAmount"; + @SerializedName(SERIALIZED_NAME_NET_INVOICE_AMOUNT) + private Double netInvoiceAmount; + + public static final String SERIALIZED_NAME_DISCOUNT_AMOUNT = "discountAmount"; + @SerializedName(SERIALIZED_NAME_DISCOUNT_AMOUNT) + private Double discountAmount; + + public static final String SERIALIZED_NAME_DISCOUNT_TYPE = "discountType"; + @SerializedName(SERIALIZED_NAME_DISCOUNT_TYPE) + private String discountType; + + public static final String SERIALIZED_NAME_TOTAL_TAX_AMOUNT = "totalTaxAmount"; + @SerializedName(SERIALIZED_NAME_TOTAL_TAX_AMOUNT) + private Double totalTaxAmount; + + public static final String SERIALIZED_NAME_INVOICED_AMOUNT_DUE = "invoicedAmountDue"; + @SerializedName(SERIALIZED_NAME_INVOICED_AMOUNT_DUE) + private Double invoicedAmountDue; + + public static final String SERIALIZED_NAME_FREIGHT_AMOUNT = "freightAmount"; + @SerializedName(SERIALIZED_NAME_FREIGHT_AMOUNT) + private Double freightAmount; + + public InvoiceDetailsv61ResponseSummaryTotals() { + } + + public InvoiceDetailsv61ResponseSummaryTotals netInvoiceAmount(Double netInvoiceAmount) { + this.netInvoiceAmount = netInvoiceAmount; + return this; + } + + /** + * Net Invoice amount. + * @return netInvoiceAmount + **/ + @javax.annotation.Nullable + public Double getNetInvoiceAmount() { + return netInvoiceAmount; + } + + public void setNetInvoiceAmount(Double netInvoiceAmount) { + this.netInvoiceAmount = netInvoiceAmount; + } + + + public InvoiceDetailsv61ResponseSummaryTotals discountAmount(Double discountAmount) { + this.discountAmount = discountAmount; + return this; + } + + /** + * Discount amount. + * @return discountAmount + **/ + @javax.annotation.Nullable + public Double getDiscountAmount() { + return discountAmount; + } + + public void setDiscountAmount(Double discountAmount) { + this.discountAmount = discountAmount; + } + + + public InvoiceDetailsv61ResponseSummaryTotals discountType(String discountType) { + this.discountType = discountType; + return this; + } + + /** + * Type of discount. + * @return discountType + **/ + @javax.annotation.Nullable + public String getDiscountType() { + return discountType; + } + + public void setDiscountType(String discountType) { + this.discountType = discountType; + } + + + public InvoiceDetailsv61ResponseSummaryTotals totalTaxAmount(Double totalTaxAmount) { + this.totalTaxAmount = totalTaxAmount; + return this; + } + + /** + * Total Tax amount. + * @return totalTaxAmount + **/ + @javax.annotation.Nullable + public Double getTotalTaxAmount() { + return totalTaxAmount; + } + + public void setTotalTaxAmount(Double totalTaxAmount) { + this.totalTaxAmount = totalTaxAmount; + } + + + public InvoiceDetailsv61ResponseSummaryTotals invoicedAmountDue(Double invoicedAmountDue) { + this.invoicedAmountDue = invoicedAmountDue; + return this; + } + + /** + * Total amount due for the invoice. + * @return invoicedAmountDue + **/ + @javax.annotation.Nullable + public Double getInvoicedAmountDue() { + return invoicedAmountDue; + } + + public void setInvoicedAmountDue(Double invoicedAmountDue) { + this.invoicedAmountDue = invoicedAmountDue; + } + + + public InvoiceDetailsv61ResponseSummaryTotals freightAmount(Double freightAmount) { + this.freightAmount = freightAmount; + return this; + } + + /** + * Freight amount + * @return freightAmount + **/ + @javax.annotation.Nullable + public Double getFreightAmount() { + return freightAmount; + } + + public void setFreightAmount(Double freightAmount) { + this.freightAmount = freightAmount; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvoiceDetailsv61ResponseSummaryTotals invoiceDetailsv61ResponseSummaryTotals = (InvoiceDetailsv61ResponseSummaryTotals) o; + return Objects.equals(this.netInvoiceAmount, invoiceDetailsv61ResponseSummaryTotals.netInvoiceAmount) && + Objects.equals(this.discountAmount, invoiceDetailsv61ResponseSummaryTotals.discountAmount) && + Objects.equals(this.discountType, invoiceDetailsv61ResponseSummaryTotals.discountType) && + Objects.equals(this.totalTaxAmount, invoiceDetailsv61ResponseSummaryTotals.totalTaxAmount) && + Objects.equals(this.invoicedAmountDue, invoiceDetailsv61ResponseSummaryTotals.invoicedAmountDue) && + Objects.equals(this.freightAmount, invoiceDetailsv61ResponseSummaryTotals.freightAmount); + } + + @Override + public int hashCode() { + return Objects.hash(netInvoiceAmount, discountAmount, discountType, totalTaxAmount, invoicedAmountDue, freightAmount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvoiceDetailsv61ResponseSummaryTotals {\n"); + sb.append(" netInvoiceAmount: ").append(toIndentedString(netInvoiceAmount)).append("\n"); + sb.append(" discountAmount: ").append(toIndentedString(discountAmount)).append("\n"); + sb.append(" discountType: ").append(toIndentedString(discountType)).append("\n"); + sb.append(" totalTaxAmount: ").append(toIndentedString(totalTaxAmount)).append("\n"); + sb.append(" invoicedAmountDue: ").append(toIndentedString(invoicedAmountDue)).append("\n"); + sb.append(" freightAmount: ").append(toIndentedString(freightAmount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("netInvoiceAmount"); + openapiFields.add("discountAmount"); + openapiFields.add("discountType"); + openapiFields.add("totalTaxAmount"); + openapiFields.add("invoicedAmountDue"); + openapiFields.add("freightAmount"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvoiceDetailsv61ResponseSummaryTotals + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvoiceDetailsv61ResponseSummaryTotals.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceDetailsv61ResponseSummaryTotals is not found in the empty JSON string", InvoiceDetailsv61ResponseSummaryTotals.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvoiceDetailsv61ResponseSummaryTotals.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvoiceDetailsv61ResponseSummaryTotals` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("discountType") != null && !jsonObj.get("discountType").isJsonNull()) && !jsonObj.get("discountType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `discountType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("discountType").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvoiceDetailsv61ResponseSummaryTotals.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvoiceDetailsv61ResponseSummaryTotals' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvoiceDetailsv61ResponseSummaryTotals.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvoiceDetailsv61ResponseSummaryTotals value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InvoiceDetailsv61ResponseSummaryTotals read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvoiceDetailsv61ResponseSummaryTotals given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvoiceDetailsv61ResponseSummaryTotals + * @throws IOException if the JSON string is invalid with respect to InvoiceDetailsv61ResponseSummaryTotals + */ + public static InvoiceDetailsv61ResponseSummaryTotals fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvoiceDetailsv61ResponseSummaryTotals.class); + } + + /** + * Convert an instance of InvoiceDetailsv61ResponseSummaryTotals to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/InvoiceSearchResponse.java b/src/main/java/xiresellers/client/model/InvoiceSearchResponse.java new file mode 100644 index 00000000..c3285c9d --- /dev/null +++ b/src/main/java/xiresellers/client/model/InvoiceSearchResponse.java @@ -0,0 +1,335 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.InvoiceSearchResponseInvoicesInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * InvoiceSearchResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class InvoiceSearchResponse { + public static final String SERIALIZED_NAME_RECORDS_FOUND = "recordsFound"; + @SerializedName(SERIALIZED_NAME_RECORDS_FOUND) + private Integer recordsFound; + + public static final String SERIALIZED_NAME_PAGE_SIZE = "pageSize"; + @SerializedName(SERIALIZED_NAME_PAGE_SIZE) + private Integer pageSize; + + public static final String SERIALIZED_NAME_PAGE_NUMBER = "pageNumber"; + @SerializedName(SERIALIZED_NAME_PAGE_NUMBER) + private Integer pageNumber; + + public static final String SERIALIZED_NAME_INVOICES = "invoices"; + @SerializedName(SERIALIZED_NAME_INVOICES) + private List invoices; + + public static final String SERIALIZED_NAME_NEXT_PAGE = "nextPage"; + @SerializedName(SERIALIZED_NAME_NEXT_PAGE) + private String nextPage; + + public InvoiceSearchResponse() { + } + + public InvoiceSearchResponse recordsFound(Integer recordsFound) { + this.recordsFound = recordsFound; + return this; + } + + /** + * Total count of quotes retrieved in the request response. + * @return recordsFound + **/ + @javax.annotation.Nullable + public Integer getRecordsFound() { + return recordsFound; + } + + public void setRecordsFound(Integer recordsFound) { + this.recordsFound = recordsFound; + } + + + public InvoiceSearchResponse pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Number of records (quotes) displayed per page in the quote list. + * @return pageSize + **/ + @javax.annotation.Nullable + public Integer getPageSize() { + return pageSize; + } + + public void setPageSize(Integer pageSize) { + this.pageSize = pageSize; + } + + + public InvoiceSearchResponse pageNumber(Integer pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Page index or page number for the list of quotes being returned. + * @return pageNumber + **/ + @javax.annotation.Nullable + public Integer getPageNumber() { + return pageNumber; + } + + public void setPageNumber(Integer pageNumber) { + this.pageNumber = pageNumber; + } + + + public InvoiceSearchResponse invoices(List invoices) { + this.invoices = invoices; + return this; + } + + public InvoiceSearchResponse addInvoicesItem(InvoiceSearchResponseInvoicesInner invoicesItem) { + if (this.invoices == null) { + this.invoices = new ArrayList<>(); + } + this.invoices.add(invoicesItem); + return this; + } + + /** + * The Invoices details for the requested criteria. + * @return invoices + **/ + @javax.annotation.Nullable + public List getInvoices() { + return invoices; + } + + public void setInvoices(List invoices) { + this.invoices = invoices; + } + + + public InvoiceSearchResponse nextPage(String nextPage) { + this.nextPage = nextPage; + return this; + } + + /** + * Next page of the pagination. + * @return nextPage + **/ + @javax.annotation.Nullable + public String getNextPage() { + return nextPage; + } + + public void setNextPage(String nextPage) { + this.nextPage = nextPage; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvoiceSearchResponse invoiceSearchResponse = (InvoiceSearchResponse) o; + return Objects.equals(this.recordsFound, invoiceSearchResponse.recordsFound) && + Objects.equals(this.pageSize, invoiceSearchResponse.pageSize) && + Objects.equals(this.pageNumber, invoiceSearchResponse.pageNumber) && + Objects.equals(this.invoices, invoiceSearchResponse.invoices) && + Objects.equals(this.nextPage, invoiceSearchResponse.nextPage); + } + + @Override + public int hashCode() { + return Objects.hash(recordsFound, pageSize, pageNumber, invoices, nextPage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvoiceSearchResponse {\n"); + sb.append(" recordsFound: ").append(toIndentedString(recordsFound)).append("\n"); + sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); + sb.append(" pageNumber: ").append(toIndentedString(pageNumber)).append("\n"); + sb.append(" invoices: ").append(toIndentedString(invoices)).append("\n"); + sb.append(" nextPage: ").append(toIndentedString(nextPage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("recordsFound"); + openapiFields.add("pageSize"); + openapiFields.add("pageNumber"); + openapiFields.add("invoices"); + openapiFields.add("nextPage"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvoiceSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvoiceSearchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceSearchResponse is not found in the empty JSON string", InvoiceSearchResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvoiceSearchResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvoiceSearchResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("invoices") != null && !jsonObj.get("invoices").isJsonNull()) { + JsonArray jsonArrayinvoices = jsonObj.getAsJsonArray("invoices"); + if (jsonArrayinvoices != null) { + // ensure the json data is an array + if (!jsonObj.get("invoices").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `invoices` to be an array in the JSON string but got `%s`", jsonObj.get("invoices").toString())); + } + + // validate the optional field `invoices` (array) + for (int i = 0; i < jsonArrayinvoices.size(); i++) { + InvoiceSearchResponseInvoicesInner.validateJsonElement(jsonArrayinvoices.get(i)); + }; + } + } + if ((jsonObj.get("nextPage") != null && !jsonObj.get("nextPage").isJsonNull()) && !jsonObj.get("nextPage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nextPage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextPage").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvoiceSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvoiceSearchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvoiceSearchResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvoiceSearchResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InvoiceSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvoiceSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvoiceSearchResponse + * @throws IOException if the JSON string is invalid with respect to InvoiceSearchResponse + */ + public static InvoiceSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvoiceSearchResponse.class); + } + + /** + * Convert an instance of InvoiceSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/InvoiceSearchResponseInvoicesInner.java b/src/main/java/xiresellers/client/model/InvoiceSearchResponseInvoicesInner.java new file mode 100644 index 00000000..a8dad850 --- /dev/null +++ b/src/main/java/xiresellers/client/model/InvoiceSearchResponseInvoicesInner.java @@ -0,0 +1,496 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * InvoiceSearchResponseInvoicesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class InvoiceSearchResponseInvoicesInner { + public static final String SERIALIZED_NAME_PAYMENT_TERMS_DUE_DATE = "paymentTermsDueDate"; + @SerializedName(SERIALIZED_NAME_PAYMENT_TERMS_DUE_DATE) + private String paymentTermsDueDate; + + public static final String SERIALIZED_NAME_ERP_ORDER_NUMBER = "erpOrderNumber"; + @SerializedName(SERIALIZED_NAME_ERP_ORDER_NUMBER) + private String erpOrderNumber; + + public static final String SERIALIZED_NAME_INVOICE_NUMBER = "invoiceNumber"; + @SerializedName(SERIALIZED_NAME_INVOICE_NUMBER) + private String invoiceNumber; + + public static final String SERIALIZED_NAME_INVOICE_STATUS = "invoiceStatus"; + @SerializedName(SERIALIZED_NAME_INVOICE_STATUS) + private String invoiceStatus; + + public static final String SERIALIZED_NAME_INVOICE_DATE = "invoiceDate"; + @SerializedName(SERIALIZED_NAME_INVOICE_DATE) + private String invoiceDate; + + public static final String SERIALIZED_NAME_INVOICE_DUE_DATE = "invoiceDueDate"; + @SerializedName(SERIALIZED_NAME_INVOICE_DUE_DATE) + private String invoiceDueDate; + + public static final String SERIALIZED_NAME_INVOICED_AMOUNT_DUE = "invoicedAmountDue"; + @SerializedName(SERIALIZED_NAME_INVOICED_AMOUNT_DUE) + private String invoicedAmountDue; + + public static final String SERIALIZED_NAME_CUSTOMER_ORDER_NUMBER = "customerOrderNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_ORDER_NUMBER) + private String customerOrderNumber; + + public static final String SERIALIZED_NAME_ORDER_CREATE_DATE = "orderCreateDate"; + @SerializedName(SERIALIZED_NAME_ORDER_CREATE_DATE) + private String orderCreateDate; + + public static final String SERIALIZED_NAME_END_CUSTOMER_ORDER_NUMBER = "endCustomerOrderNumber"; + @SerializedName(SERIALIZED_NAME_END_CUSTOMER_ORDER_NUMBER) + private String endCustomerOrderNumber; + + public static final String SERIALIZED_NAME_INVOICE_AMOUNT_INCL_TAX = "invoiceAmountInclTax"; + @SerializedName(SERIALIZED_NAME_INVOICE_AMOUNT_INCL_TAX) + private String invoiceAmountInclTax; + + public InvoiceSearchResponseInvoicesInner() { + } + + public InvoiceSearchResponseInvoicesInner paymentTermsDueDate(String paymentTermsDueDate) { + this.paymentTermsDueDate = paymentTermsDueDate; + return this; + } + + /** + * Payment Terms Due date. + * @return paymentTermsDueDate + **/ + @javax.annotation.Nullable + public String getPaymentTermsDueDate() { + return paymentTermsDueDate; + } + + public void setPaymentTermsDueDate(String paymentTermsDueDate) { + this.paymentTermsDueDate = paymentTermsDueDate; + } + + + public InvoiceSearchResponseInvoicesInner erpOrderNumber(String erpOrderNumber) { + this.erpOrderNumber = erpOrderNumber; + return this; + } + + /** + * Order number + * @return erpOrderNumber + **/ + @javax.annotation.Nullable + public String getErpOrderNumber() { + return erpOrderNumber; + } + + public void setErpOrderNumber(String erpOrderNumber) { + this.erpOrderNumber = erpOrderNumber; + } + + + public InvoiceSearchResponseInvoicesInner invoiceNumber(String invoiceNumber) { + this.invoiceNumber = invoiceNumber; + return this; + } + + /** + * Invoice no. + * @return invoiceNumber + **/ + @javax.annotation.Nullable + public String getInvoiceNumber() { + return invoiceNumber; + } + + public void setInvoiceNumber(String invoiceNumber) { + this.invoiceNumber = invoiceNumber; + } + + + public InvoiceSearchResponseInvoicesInner invoiceStatus(String invoiceStatus) { + this.invoiceStatus = invoiceStatus; + return this; + } + + /** + * Invoice Status. + * @return invoiceStatus + **/ + @javax.annotation.Nullable + public String getInvoiceStatus() { + return invoiceStatus; + } + + public void setInvoiceStatus(String invoiceStatus) { + this.invoiceStatus = invoiceStatus; + } + + + public InvoiceSearchResponseInvoicesInner invoiceDate(String invoiceDate) { + this.invoiceDate = invoiceDate; + return this; + } + + /** + * Invoice Date. + * @return invoiceDate + **/ + @javax.annotation.Nullable + public String getInvoiceDate() { + return invoiceDate; + } + + public void setInvoiceDate(String invoiceDate) { + this.invoiceDate = invoiceDate; + } + + + public InvoiceSearchResponseInvoicesInner invoiceDueDate(String invoiceDueDate) { + this.invoiceDueDate = invoiceDueDate; + return this; + } + + /** + * Invoice Due Date. + * @return invoiceDueDate + **/ + @javax.annotation.Nullable + public String getInvoiceDueDate() { + return invoiceDueDate; + } + + public void setInvoiceDueDate(String invoiceDueDate) { + this.invoiceDueDate = invoiceDueDate; + } + + + public InvoiceSearchResponseInvoicesInner invoicedAmountDue(String invoicedAmountDue) { + this.invoicedAmountDue = invoicedAmountDue; + return this; + } + + /** + * Invoice Amount. + * @return invoicedAmountDue + **/ + @javax.annotation.Nullable + public String getInvoicedAmountDue() { + return invoicedAmountDue; + } + + public void setInvoicedAmountDue(String invoicedAmountDue) { + this.invoicedAmountDue = invoicedAmountDue; + } + + + public InvoiceSearchResponseInvoicesInner customerOrderNumber(String customerOrderNumber) { + this.customerOrderNumber = customerOrderNumber; + return this; + } + + /** + * Customer Order No. + * @return customerOrderNumber + **/ + @javax.annotation.Nullable + public String getCustomerOrderNumber() { + return customerOrderNumber; + } + + public void setCustomerOrderNumber(String customerOrderNumber) { + this.customerOrderNumber = customerOrderNumber; + } + + + public InvoiceSearchResponseInvoicesInner orderCreateDate(String orderCreateDate) { + this.orderCreateDate = orderCreateDate; + return this; + } + + /** + * Order Create Date. + * @return orderCreateDate + **/ + @javax.annotation.Nullable + public String getOrderCreateDate() { + return orderCreateDate; + } + + public void setOrderCreateDate(String orderCreateDate) { + this.orderCreateDate = orderCreateDate; + } + + + public InvoiceSearchResponseInvoicesInner endCustomerOrderNumber(String endCustomerOrderNumber) { + this.endCustomerOrderNumber = endCustomerOrderNumber; + return this; + } + + /** + * End Customer Order number. + * @return endCustomerOrderNumber + **/ + @javax.annotation.Nullable + public String getEndCustomerOrderNumber() { + return endCustomerOrderNumber; + } + + public void setEndCustomerOrderNumber(String endCustomerOrderNumber) { + this.endCustomerOrderNumber = endCustomerOrderNumber; + } + + + public InvoiceSearchResponseInvoicesInner invoiceAmountInclTax(String invoiceAmountInclTax) { + this.invoiceAmountInclTax = invoiceAmountInclTax; + return this; + } + + /** + * Invoice Amount Inclusive of Taxes + * @return invoiceAmountInclTax + **/ + @javax.annotation.Nullable + public String getInvoiceAmountInclTax() { + return invoiceAmountInclTax; + } + + public void setInvoiceAmountInclTax(String invoiceAmountInclTax) { + this.invoiceAmountInclTax = invoiceAmountInclTax; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvoiceSearchResponseInvoicesInner invoiceSearchResponseInvoicesInner = (InvoiceSearchResponseInvoicesInner) o; + return Objects.equals(this.paymentTermsDueDate, invoiceSearchResponseInvoicesInner.paymentTermsDueDate) && + Objects.equals(this.erpOrderNumber, invoiceSearchResponseInvoicesInner.erpOrderNumber) && + Objects.equals(this.invoiceNumber, invoiceSearchResponseInvoicesInner.invoiceNumber) && + Objects.equals(this.invoiceStatus, invoiceSearchResponseInvoicesInner.invoiceStatus) && + Objects.equals(this.invoiceDate, invoiceSearchResponseInvoicesInner.invoiceDate) && + Objects.equals(this.invoiceDueDate, invoiceSearchResponseInvoicesInner.invoiceDueDate) && + Objects.equals(this.invoicedAmountDue, invoiceSearchResponseInvoicesInner.invoicedAmountDue) && + Objects.equals(this.customerOrderNumber, invoiceSearchResponseInvoicesInner.customerOrderNumber) && + Objects.equals(this.orderCreateDate, invoiceSearchResponseInvoicesInner.orderCreateDate) && + Objects.equals(this.endCustomerOrderNumber, invoiceSearchResponseInvoicesInner.endCustomerOrderNumber) && + Objects.equals(this.invoiceAmountInclTax, invoiceSearchResponseInvoicesInner.invoiceAmountInclTax); + } + + @Override + public int hashCode() { + return Objects.hash(paymentTermsDueDate, erpOrderNumber, invoiceNumber, invoiceStatus, invoiceDate, invoiceDueDate, invoicedAmountDue, customerOrderNumber, orderCreateDate, endCustomerOrderNumber, invoiceAmountInclTax); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvoiceSearchResponseInvoicesInner {\n"); + sb.append(" paymentTermsDueDate: ").append(toIndentedString(paymentTermsDueDate)).append("\n"); + sb.append(" erpOrderNumber: ").append(toIndentedString(erpOrderNumber)).append("\n"); + sb.append(" invoiceNumber: ").append(toIndentedString(invoiceNumber)).append("\n"); + sb.append(" invoiceStatus: ").append(toIndentedString(invoiceStatus)).append("\n"); + sb.append(" invoiceDate: ").append(toIndentedString(invoiceDate)).append("\n"); + sb.append(" invoiceDueDate: ").append(toIndentedString(invoiceDueDate)).append("\n"); + sb.append(" invoicedAmountDue: ").append(toIndentedString(invoicedAmountDue)).append("\n"); + sb.append(" customerOrderNumber: ").append(toIndentedString(customerOrderNumber)).append("\n"); + sb.append(" orderCreateDate: ").append(toIndentedString(orderCreateDate)).append("\n"); + sb.append(" endCustomerOrderNumber: ").append(toIndentedString(endCustomerOrderNumber)).append("\n"); + sb.append(" invoiceAmountInclTax: ").append(toIndentedString(invoiceAmountInclTax)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("paymentTermsDueDate"); + openapiFields.add("erpOrderNumber"); + openapiFields.add("invoiceNumber"); + openapiFields.add("invoiceStatus"); + openapiFields.add("invoiceDate"); + openapiFields.add("invoiceDueDate"); + openapiFields.add("invoicedAmountDue"); + openapiFields.add("customerOrderNumber"); + openapiFields.add("orderCreateDate"); + openapiFields.add("endCustomerOrderNumber"); + openapiFields.add("invoiceAmountInclTax"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InvoiceSearchResponseInvoicesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InvoiceSearchResponseInvoicesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceSearchResponseInvoicesInner is not found in the empty JSON string", InvoiceSearchResponseInvoicesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InvoiceSearchResponseInvoicesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InvoiceSearchResponseInvoicesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("paymentTermsDueDate") != null && !jsonObj.get("paymentTermsDueDate").isJsonNull()) && !jsonObj.get("paymentTermsDueDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `paymentTermsDueDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentTermsDueDate").toString())); + } + if ((jsonObj.get("erpOrderNumber") != null && !jsonObj.get("erpOrderNumber").isJsonNull()) && !jsonObj.get("erpOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `erpOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("erpOrderNumber").toString())); + } + if ((jsonObj.get("invoiceNumber") != null && !jsonObj.get("invoiceNumber").isJsonNull()) && !jsonObj.get("invoiceNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `invoiceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoiceNumber").toString())); + } + if ((jsonObj.get("invoiceStatus") != null && !jsonObj.get("invoiceStatus").isJsonNull()) && !jsonObj.get("invoiceStatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `invoiceStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoiceStatus").toString())); + } + if ((jsonObj.get("invoiceDate") != null && !jsonObj.get("invoiceDate").isJsonNull()) && !jsonObj.get("invoiceDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `invoiceDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoiceDate").toString())); + } + if ((jsonObj.get("invoiceDueDate") != null && !jsonObj.get("invoiceDueDate").isJsonNull()) && !jsonObj.get("invoiceDueDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `invoiceDueDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoiceDueDate").toString())); + } + if ((jsonObj.get("invoicedAmountDue") != null && !jsonObj.get("invoicedAmountDue").isJsonNull()) && !jsonObj.get("invoicedAmountDue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `invoicedAmountDue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoicedAmountDue").toString())); + } + if ((jsonObj.get("customerOrderNumber") != null && !jsonObj.get("customerOrderNumber").isJsonNull()) && !jsonObj.get("customerOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerOrderNumber").toString())); + } + if ((jsonObj.get("orderCreateDate") != null && !jsonObj.get("orderCreateDate").isJsonNull()) && !jsonObj.get("orderCreateDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `orderCreateDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orderCreateDate").toString())); + } + if ((jsonObj.get("endCustomerOrderNumber") != null && !jsonObj.get("endCustomerOrderNumber").isJsonNull()) && !jsonObj.get("endCustomerOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endCustomerOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endCustomerOrderNumber").toString())); + } + if ((jsonObj.get("invoiceAmountInclTax") != null && !jsonObj.get("invoiceAmountInclTax").isJsonNull()) && !jsonObj.get("invoiceAmountInclTax").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `invoiceAmountInclTax` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoiceAmountInclTax").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InvoiceSearchResponseInvoicesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InvoiceSearchResponseInvoicesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InvoiceSearchResponseInvoicesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InvoiceSearchResponseInvoicesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InvoiceSearchResponseInvoicesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InvoiceSearchResponseInvoicesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of InvoiceSearchResponseInvoicesInner + * @throws IOException if the JSON string is invalid with respect to InvoiceSearchResponseInvoicesInner + */ + public static InvoiceSearchResponseInvoicesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InvoiceSearchResponseInvoicesInner.class); + } + + /** + * Convert an instance of InvoiceSearchResponseInvoicesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockRequest.java b/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockRequest.java new file mode 100644 index 00000000..71d6e5bc --- /dev/null +++ b/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockRequest.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.MultiSKUPriceAndStockRequestServicerequest; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Request object model for the multi sku price and stock API endpoint + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class MultiSKUPriceAndStockRequest { + public static final String SERIALIZED_NAME_SERVICEREQUEST = "servicerequest"; + @SerializedName(SERIALIZED_NAME_SERVICEREQUEST) + private MultiSKUPriceAndStockRequestServicerequest servicerequest; + + public MultiSKUPriceAndStockRequest() { + } + + public MultiSKUPriceAndStockRequest servicerequest(MultiSKUPriceAndStockRequestServicerequest servicerequest) { + this.servicerequest = servicerequest; + return this; + } + + /** + * Get servicerequest + * @return servicerequest + **/ + @javax.annotation.Nullable + public MultiSKUPriceAndStockRequestServicerequest getServicerequest() { + return servicerequest; + } + + public void setServicerequest(MultiSKUPriceAndStockRequestServicerequest servicerequest) { + this.servicerequest = servicerequest; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MultiSKUPriceAndStockRequest multiSKUPriceAndStockRequest = (MultiSKUPriceAndStockRequest) o; + return Objects.equals(this.servicerequest, multiSKUPriceAndStockRequest.servicerequest); + } + + @Override + public int hashCode() { + return Objects.hash(servicerequest); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MultiSKUPriceAndStockRequest {\n"); + sb.append(" servicerequest: ").append(toIndentedString(servicerequest)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("servicerequest"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MultiSKUPriceAndStockRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MultiSKUPriceAndStockRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in MultiSKUPriceAndStockRequest is not found in the empty JSON string", MultiSKUPriceAndStockRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MultiSKUPriceAndStockRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MultiSKUPriceAndStockRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `servicerequest` + if (jsonObj.get("servicerequest") != null && !jsonObj.get("servicerequest").isJsonNull()) { + MultiSKUPriceAndStockRequestServicerequest.validateJsonElement(jsonObj.get("servicerequest")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MultiSKUPriceAndStockRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MultiSKUPriceAndStockRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MultiSKUPriceAndStockRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MultiSKUPriceAndStockRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MultiSKUPriceAndStockRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MultiSKUPriceAndStockRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of MultiSKUPriceAndStockRequest + * @throws IOException if the JSON string is invalid with respect to MultiSKUPriceAndStockRequest + */ + public static MultiSKUPriceAndStockRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MultiSKUPriceAndStockRequest.class); + } + + /** + * Convert an instance of MultiSKUPriceAndStockRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequest.java b/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequest.java new file mode 100644 index 00000000..4ca51187 --- /dev/null +++ b/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequest.java @@ -0,0 +1,239 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest; +import xiresellers.client.model.MultiSKUPriceAndStockRequestServicerequestRequestpreamble; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * MultiSKUPriceAndStockRequestServicerequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class MultiSKUPriceAndStockRequestServicerequest { + public static final String SERIALIZED_NAME_REQUESTPREAMBLE = "requestpreamble"; + @SerializedName(SERIALIZED_NAME_REQUESTPREAMBLE) + private MultiSKUPriceAndStockRequestServicerequestRequestpreamble requestpreamble; + + public static final String SERIALIZED_NAME_PRICEANDSTOCKREQUEST = "priceandstockrequest"; + @SerializedName(SERIALIZED_NAME_PRICEANDSTOCKREQUEST) + private MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest priceandstockrequest; + + public MultiSKUPriceAndStockRequestServicerequest() { + } + + public MultiSKUPriceAndStockRequestServicerequest requestpreamble(MultiSKUPriceAndStockRequestServicerequestRequestpreamble requestpreamble) { + this.requestpreamble = requestpreamble; + return this; + } + + /** + * Get requestpreamble + * @return requestpreamble + **/ + @javax.annotation.Nullable + public MultiSKUPriceAndStockRequestServicerequestRequestpreamble getRequestpreamble() { + return requestpreamble; + } + + public void setRequestpreamble(MultiSKUPriceAndStockRequestServicerequestRequestpreamble requestpreamble) { + this.requestpreamble = requestpreamble; + } + + + public MultiSKUPriceAndStockRequestServicerequest priceandstockrequest(MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest priceandstockrequest) { + this.priceandstockrequest = priceandstockrequest; + return this; + } + + /** + * Get priceandstockrequest + * @return priceandstockrequest + **/ + @javax.annotation.Nullable + public MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest getPriceandstockrequest() { + return priceandstockrequest; + } + + public void setPriceandstockrequest(MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest priceandstockrequest) { + this.priceandstockrequest = priceandstockrequest; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MultiSKUPriceAndStockRequestServicerequest multiSKUPriceAndStockRequestServicerequest = (MultiSKUPriceAndStockRequestServicerequest) o; + return Objects.equals(this.requestpreamble, multiSKUPriceAndStockRequestServicerequest.requestpreamble) && + Objects.equals(this.priceandstockrequest, multiSKUPriceAndStockRequestServicerequest.priceandstockrequest); + } + + @Override + public int hashCode() { + return Objects.hash(requestpreamble, priceandstockrequest); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MultiSKUPriceAndStockRequestServicerequest {\n"); + sb.append(" requestpreamble: ").append(toIndentedString(requestpreamble)).append("\n"); + sb.append(" priceandstockrequest: ").append(toIndentedString(priceandstockrequest)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("requestpreamble"); + openapiFields.add("priceandstockrequest"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MultiSKUPriceAndStockRequestServicerequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MultiSKUPriceAndStockRequestServicerequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in MultiSKUPriceAndStockRequestServicerequest is not found in the empty JSON string", MultiSKUPriceAndStockRequestServicerequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MultiSKUPriceAndStockRequestServicerequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MultiSKUPriceAndStockRequestServicerequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `requestpreamble` + if (jsonObj.get("requestpreamble") != null && !jsonObj.get("requestpreamble").isJsonNull()) { + MultiSKUPriceAndStockRequestServicerequestRequestpreamble.validateJsonElement(jsonObj.get("requestpreamble")); + } + // validate the optional field `priceandstockrequest` + if (jsonObj.get("priceandstockrequest") != null && !jsonObj.get("priceandstockrequest").isJsonNull()) { + MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest.validateJsonElement(jsonObj.get("priceandstockrequest")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MultiSKUPriceAndStockRequestServicerequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MultiSKUPriceAndStockRequestServicerequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MultiSKUPriceAndStockRequestServicerequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MultiSKUPriceAndStockRequestServicerequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MultiSKUPriceAndStockRequestServicerequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MultiSKUPriceAndStockRequestServicerequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of MultiSKUPriceAndStockRequestServicerequest + * @throws IOException if the JSON string is invalid with respect to MultiSKUPriceAndStockRequestServicerequest + */ + public static MultiSKUPriceAndStockRequestServicerequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MultiSKUPriceAndStockRequestServicerequest.class); + } + + /** + * Convert an instance of MultiSKUPriceAndStockRequestServicerequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest.java b/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest.java new file mode 100644 index 00000000..565c95dd --- /dev/null +++ b/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest.java @@ -0,0 +1,292 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest { + public static final String SERIALIZED_NAME_SHOWWAREHOUSEAVAILABILITY = "showwarehouseavailability"; + @SerializedName(SERIALIZED_NAME_SHOWWAREHOUSEAVAILABILITY) + private String showwarehouseavailability; + + public static final String SERIALIZED_NAME_EXTRAVAILABILITYFLAG = "extravailabilityflag"; + @SerializedName(SERIALIZED_NAME_EXTRAVAILABILITYFLAG) + private String extravailabilityflag; + + public static final String SERIALIZED_NAME_INCLUDEALLSYSTEMS = "includeallsystems"; + @SerializedName(SERIALIZED_NAME_INCLUDEALLSYSTEMS) + private Boolean includeallsystems; + + public static final String SERIALIZED_NAME_ITEM = "item"; + @SerializedName(SERIALIZED_NAME_ITEM) + private MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem item; + + public MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest() { + } + + public MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest showwarehouseavailability(String showwarehouseavailability) { + this.showwarehouseavailability = showwarehouseavailability; + return this; + } + + /** + * True/false to show the availability of individual warehouses + * @return showwarehouseavailability + **/ + @javax.annotation.Nullable + public String getShowwarehouseavailability() { + return showwarehouseavailability; + } + + public void setShowwarehouseavailability(String showwarehouseavailability) { + this.showwarehouseavailability = showwarehouseavailability; + } + + + public MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest extravailabilityflag(String extravailabilityflag) { + this.extravailabilityflag = extravailabilityflag; + return this; + } + + /** + * Y/N to show extra availability flag + * @return extravailabilityflag + **/ + @javax.annotation.Nullable + public String getExtravailabilityflag() { + return extravailabilityflag; + } + + public void setExtravailabilityflag(String extravailabilityflag) { + this.extravailabilityflag = extravailabilityflag; + } + + + public MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest includeallsystems(Boolean includeallsystems) { + this.includeallsystems = includeallsystems; + return this; + } + + /** + * Flag to indicate if the price and stock information is required for all Ingram Micro systems. If it is set to true, the price and stock details will be returned from all Ingram Micro systems and if false, the price and stock will have returned from the system where the reseller number is set up in. + * @return includeallsystems + **/ + @javax.annotation.Nullable + public Boolean getIncludeallsystems() { + return includeallsystems; + } + + public void setIncludeallsystems(Boolean includeallsystems) { + this.includeallsystems = includeallsystems; + } + + + public MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest item(MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem item) { + this.item = item; + return this; + } + + /** + * Get item + * @return item + **/ + @javax.annotation.Nullable + public MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem getItem() { + return item; + } + + public void setItem(MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem item) { + this.item = item; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest multiSKUPriceAndStockRequestServicerequestPriceandstockrequest = (MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest) o; + return Objects.equals(this.showwarehouseavailability, multiSKUPriceAndStockRequestServicerequestPriceandstockrequest.showwarehouseavailability) && + Objects.equals(this.extravailabilityflag, multiSKUPriceAndStockRequestServicerequestPriceandstockrequest.extravailabilityflag) && + Objects.equals(this.includeallsystems, multiSKUPriceAndStockRequestServicerequestPriceandstockrequest.includeallsystems) && + Objects.equals(this.item, multiSKUPriceAndStockRequestServicerequestPriceandstockrequest.item); + } + + @Override + public int hashCode() { + return Objects.hash(showwarehouseavailability, extravailabilityflag, includeallsystems, item); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest {\n"); + sb.append(" showwarehouseavailability: ").append(toIndentedString(showwarehouseavailability)).append("\n"); + sb.append(" extravailabilityflag: ").append(toIndentedString(extravailabilityflag)).append("\n"); + sb.append(" includeallsystems: ").append(toIndentedString(includeallsystems)).append("\n"); + sb.append(" item: ").append(toIndentedString(item)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("showwarehouseavailability"); + openapiFields.add("extravailabilityflag"); + openapiFields.add("includeallsystems"); + openapiFields.add("item"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest is not found in the empty JSON string", MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("showwarehouseavailability") != null && !jsonObj.get("showwarehouseavailability").isJsonNull()) && !jsonObj.get("showwarehouseavailability").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `showwarehouseavailability` to be a primitive type in the JSON string but got `%s`", jsonObj.get("showwarehouseavailability").toString())); + } + if ((jsonObj.get("extravailabilityflag") != null && !jsonObj.get("extravailabilityflag").isJsonNull()) && !jsonObj.get("extravailabilityflag").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `extravailabilityflag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("extravailabilityflag").toString())); + } + // validate the optional field `item` + if (jsonObj.get("item") != null && !jsonObj.get("item").isJsonNull()) { + MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem.validateJsonElement(jsonObj.get("item")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest + * @throws IOException if the JSON string is invalid with respect to MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest + */ + public static MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest.class); + } + + /** + * Convert an instance of MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem.java b/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem.java new file mode 100644 index 00000000..e7b28e34 --- /dev/null +++ b/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem.java @@ -0,0 +1,348 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem { + public static final String SERIALIZED_NAME_INDEX = "index"; + @SerializedName(SERIALIZED_NAME_INDEX) + private Integer index; + + public static final String SERIALIZED_NAME_INGRAMPARTNUMBER = "ingrampartnumber"; + @SerializedName(SERIALIZED_NAME_INGRAMPARTNUMBER) + private String ingrampartnumber; + + public static final String SERIALIZED_NAME_VENDORPARTNUMBER = "vendorpartnumber"; + @SerializedName(SERIALIZED_NAME_VENDORPARTNUMBER) + private String vendorpartnumber; + + public static final String SERIALIZED_NAME_U_P_C = "UPC"; + @SerializedName(SERIALIZED_NAME_U_P_C) + private String UPC; + + public static final String SERIALIZED_NAME_CUSTOMERPARTNUMBER = "customerpartnumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMERPARTNUMBER) + private String customerpartnumber; + + public static final String SERIALIZED_NAME_WAREHOUSEIDLIST = "warehouseidlist"; + @SerializedName(SERIALIZED_NAME_WAREHOUSEIDLIST) + private String warehouseidlist; + + public MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem() { + } + + public MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem index(Integer index) { + this.index = index; + return this; + } + + /** + * Get index + * @return index + **/ + @javax.annotation.Nullable + public Integer getIndex() { + return index; + } + + public void setIndex(Integer index) { + this.index = index; + } + + + public MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem ingrampartnumber(String ingrampartnumber) { + this.ingrampartnumber = ingrampartnumber; + return this; + } + + /** + * Ingram Micro system specific SKU number for the product for which the price is requested at Ingram Micro + * @return ingrampartnumber + **/ + @javax.annotation.Nullable + public String getIngrampartnumber() { + return ingrampartnumber; + } + + public void setIngrampartnumber(String ingrampartnumber) { + this.ingrampartnumber = ingrampartnumber; + } + + + public MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem vendorpartnumber(String vendorpartnumber) { + this.vendorpartnumber = vendorpartnumber; + return this; + } + + /** + * Vendor Part Number for the product for which the price is requested at Ingram Micro + * @return vendorpartnumber + **/ + @javax.annotation.Nullable + public String getVendorpartnumber() { + return vendorpartnumber; + } + + public void setVendorpartnumber(String vendorpartnumber) { + this.vendorpartnumber = vendorpartnumber; + } + + + public MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem UPC(String UPC) { + this.UPC = UPC; + return this; + } + + /** + * Universal Product code for the product for which the price is requested at Ingram Micro + * @return UPC + **/ + @javax.annotation.Nullable + public String getUPC() { + return UPC; + } + + public void setUPC(String UPC) { + this.UPC = UPC; + } + + + public MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem customerpartnumber(String customerpartnumber) { + this.customerpartnumber = customerpartnumber; + return this; + } + + /** + * Unique identification number of customer. For this option the Ingram Micro Sales rep must set up a cross reference table. + * @return customerpartnumber + **/ + @javax.annotation.Nullable + public String getCustomerpartnumber() { + return customerpartnumber; + } + + public void setCustomerpartnumber(String customerpartnumber) { + this.customerpartnumber = customerpartnumber; + } + + + public MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem warehouseidlist(String warehouseidlist) { + this.warehouseidlist = warehouseidlist; + return this; + } + + /** + * Unique identity for Ingram Micro warehouses against which stock details are returned. + * @return warehouseidlist + **/ + @javax.annotation.Nullable + public String getWarehouseidlist() { + return warehouseidlist; + } + + public void setWarehouseidlist(String warehouseidlist) { + this.warehouseidlist = warehouseidlist; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem multiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem = (MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem) o; + return Objects.equals(this.index, multiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem.index) && + Objects.equals(this.ingrampartnumber, multiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem.ingrampartnumber) && + Objects.equals(this.vendorpartnumber, multiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem.vendorpartnumber) && + Objects.equals(this.UPC, multiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem.UPC) && + Objects.equals(this.customerpartnumber, multiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem.customerpartnumber) && + Objects.equals(this.warehouseidlist, multiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem.warehouseidlist); + } + + @Override + public int hashCode() { + return Objects.hash(index, ingrampartnumber, vendorpartnumber, UPC, customerpartnumber, warehouseidlist); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem {\n"); + sb.append(" index: ").append(toIndentedString(index)).append("\n"); + sb.append(" ingrampartnumber: ").append(toIndentedString(ingrampartnumber)).append("\n"); + sb.append(" vendorpartnumber: ").append(toIndentedString(vendorpartnumber)).append("\n"); + sb.append(" UPC: ").append(toIndentedString(UPC)).append("\n"); + sb.append(" customerpartnumber: ").append(toIndentedString(customerpartnumber)).append("\n"); + sb.append(" warehouseidlist: ").append(toIndentedString(warehouseidlist)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("index"); + openapiFields.add("ingrampartnumber"); + openapiFields.add("vendorpartnumber"); + openapiFields.add("UPC"); + openapiFields.add("customerpartnumber"); + openapiFields.add("warehouseidlist"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem is not found in the empty JSON string", MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("ingrampartnumber") != null && !jsonObj.get("ingrampartnumber").isJsonNull()) && !jsonObj.get("ingrampartnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingrampartnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingrampartnumber").toString())); + } + if ((jsonObj.get("vendorpartnumber") != null && !jsonObj.get("vendorpartnumber").isJsonNull()) && !jsonObj.get("vendorpartnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorpartnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorpartnumber").toString())); + } + if ((jsonObj.get("UPC") != null && !jsonObj.get("UPC").isJsonNull()) && !jsonObj.get("UPC").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `UPC` to be a primitive type in the JSON string but got `%s`", jsonObj.get("UPC").toString())); + } + if ((jsonObj.get("customerpartnumber") != null && !jsonObj.get("customerpartnumber").isJsonNull()) && !jsonObj.get("customerpartnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerpartnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerpartnumber").toString())); + } + if ((jsonObj.get("warehouseidlist") != null && !jsonObj.get("warehouseidlist").isJsonNull()) && !jsonObj.get("warehouseidlist").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `warehouseidlist` to be a primitive type in the JSON string but got `%s`", jsonObj.get("warehouseidlist").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem + * @throws IOException if the JSON string is invalid with respect to MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem + */ + public static MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem.class); + } + + /** + * Convert an instance of MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestRequestpreamble.java b/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestRequestpreamble.java new file mode 100644 index 00000000..fe6cf879 --- /dev/null +++ b/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestRequestpreamble.java @@ -0,0 +1,244 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * MultiSKUPriceAndStockRequestServicerequestRequestpreamble + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class MultiSKUPriceAndStockRequestServicerequestRequestpreamble { + public static final String SERIALIZED_NAME_ISOCOUNTRYCODE = "isocountrycode"; + @SerializedName(SERIALIZED_NAME_ISOCOUNTRYCODE) + private String isocountrycode; + + public static final String SERIALIZED_NAME_CUSTOMERNUMBER = "customernumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMERNUMBER) + private String customernumber; + + public MultiSKUPriceAndStockRequestServicerequestRequestpreamble() { + } + + public MultiSKUPriceAndStockRequestServicerequestRequestpreamble isocountrycode(String isocountrycode) { + this.isocountrycode = isocountrycode; + return this; + } + + /** + * 2 Digit code “US”-United States “CA”-Canada + * @return isocountrycode + **/ + @javax.annotation.Nonnull + public String getIsocountrycode() { + return isocountrycode; + } + + public void setIsocountrycode(String isocountrycode) { + this.isocountrycode = isocountrycode; + } + + + public MultiSKUPriceAndStockRequestServicerequestRequestpreamble customernumber(String customernumber) { + this.customernumber = customernumber; + return this; + } + + /** + * Ingram Micro customer number 10-12389 + * @return customernumber + **/ + @javax.annotation.Nonnull + public String getCustomernumber() { + return customernumber; + } + + public void setCustomernumber(String customernumber) { + this.customernumber = customernumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MultiSKUPriceAndStockRequestServicerequestRequestpreamble multiSKUPriceAndStockRequestServicerequestRequestpreamble = (MultiSKUPriceAndStockRequestServicerequestRequestpreamble) o; + return Objects.equals(this.isocountrycode, multiSKUPriceAndStockRequestServicerequestRequestpreamble.isocountrycode) && + Objects.equals(this.customernumber, multiSKUPriceAndStockRequestServicerequestRequestpreamble.customernumber); + } + + @Override + public int hashCode() { + return Objects.hash(isocountrycode, customernumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MultiSKUPriceAndStockRequestServicerequestRequestpreamble {\n"); + sb.append(" isocountrycode: ").append(toIndentedString(isocountrycode)).append("\n"); + sb.append(" customernumber: ").append(toIndentedString(customernumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("isocountrycode"); + openapiFields.add("customernumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("isocountrycode"); + openapiRequiredFields.add("customernumber"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MultiSKUPriceAndStockRequestServicerequestRequestpreamble + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MultiSKUPriceAndStockRequestServicerequestRequestpreamble.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in MultiSKUPriceAndStockRequestServicerequestRequestpreamble is not found in the empty JSON string", MultiSKUPriceAndStockRequestServicerequestRequestpreamble.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MultiSKUPriceAndStockRequestServicerequestRequestpreamble.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MultiSKUPriceAndStockRequestServicerequestRequestpreamble` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : MultiSKUPriceAndStockRequestServicerequestRequestpreamble.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("isocountrycode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `isocountrycode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isocountrycode").toString())); + } + if (!jsonObj.get("customernumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customernumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customernumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MultiSKUPriceAndStockRequestServicerequestRequestpreamble.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MultiSKUPriceAndStockRequestServicerequestRequestpreamble' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MultiSKUPriceAndStockRequestServicerequestRequestpreamble.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MultiSKUPriceAndStockRequestServicerequestRequestpreamble value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MultiSKUPriceAndStockRequestServicerequestRequestpreamble read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MultiSKUPriceAndStockRequestServicerequestRequestpreamble given an JSON string + * + * @param jsonString JSON string + * @return An instance of MultiSKUPriceAndStockRequestServicerequestRequestpreamble + * @throws IOException if the JSON string is invalid with respect to MultiSKUPriceAndStockRequestServicerequestRequestpreamble + */ + public static MultiSKUPriceAndStockRequestServicerequestRequestpreamble fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MultiSKUPriceAndStockRequestServicerequestRequestpreamble.class); + } + + /** + * Convert an instance of MultiSKUPriceAndStockRequestServicerequestRequestpreamble to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockResponse.java b/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockResponse.java new file mode 100644 index 00000000..ee3b05d8 --- /dev/null +++ b/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockResponse.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.MultiSKUPriceAndStockResponseServiceresponse; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Response object model for the multi sku price and stock API endpoint + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class MultiSKUPriceAndStockResponse { + public static final String SERIALIZED_NAME_SERVICERESPONSE = "serviceresponse"; + @SerializedName(SERIALIZED_NAME_SERVICERESPONSE) + private MultiSKUPriceAndStockResponseServiceresponse serviceresponse; + + public MultiSKUPriceAndStockResponse() { + } + + public MultiSKUPriceAndStockResponse serviceresponse(MultiSKUPriceAndStockResponseServiceresponse serviceresponse) { + this.serviceresponse = serviceresponse; + return this; + } + + /** + * Get serviceresponse + * @return serviceresponse + **/ + @javax.annotation.Nullable + public MultiSKUPriceAndStockResponseServiceresponse getServiceresponse() { + return serviceresponse; + } + + public void setServiceresponse(MultiSKUPriceAndStockResponseServiceresponse serviceresponse) { + this.serviceresponse = serviceresponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MultiSKUPriceAndStockResponse multiSKUPriceAndStockResponse = (MultiSKUPriceAndStockResponse) o; + return Objects.equals(this.serviceresponse, multiSKUPriceAndStockResponse.serviceresponse); + } + + @Override + public int hashCode() { + return Objects.hash(serviceresponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MultiSKUPriceAndStockResponse {\n"); + sb.append(" serviceresponse: ").append(toIndentedString(serviceresponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("serviceresponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MultiSKUPriceAndStockResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MultiSKUPriceAndStockResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in MultiSKUPriceAndStockResponse is not found in the empty JSON string", MultiSKUPriceAndStockResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MultiSKUPriceAndStockResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MultiSKUPriceAndStockResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `serviceresponse` + if (jsonObj.get("serviceresponse") != null && !jsonObj.get("serviceresponse").isJsonNull()) { + MultiSKUPriceAndStockResponseServiceresponse.validateJsonElement(jsonObj.get("serviceresponse")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MultiSKUPriceAndStockResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MultiSKUPriceAndStockResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MultiSKUPriceAndStockResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MultiSKUPriceAndStockResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MultiSKUPriceAndStockResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MultiSKUPriceAndStockResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of MultiSKUPriceAndStockResponse + * @throws IOException if the JSON string is invalid with respect to MultiSKUPriceAndStockResponse + */ + public static MultiSKUPriceAndStockResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MultiSKUPriceAndStockResponse.class); + } + + /** + * Convert an instance of MultiSKUPriceAndStockResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponse.java b/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponse.java new file mode 100644 index 00000000..b357fa90 --- /dev/null +++ b/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponse.java @@ -0,0 +1,239 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse; +import xiresellers.client.model.PriceAndAvailabilityResponseServiceresponseResponsepreamble; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * MultiSKUPriceAndStockResponseServiceresponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class MultiSKUPriceAndStockResponseServiceresponse { + public static final String SERIALIZED_NAME_RESPONSEPREAMBLE = "responsepreamble"; + @SerializedName(SERIALIZED_NAME_RESPONSEPREAMBLE) + private PriceAndAvailabilityResponseServiceresponseResponsepreamble responsepreamble; + + public static final String SERIALIZED_NAME_PRICEANDSTOCKRESPONSE = "priceandstockresponse"; + @SerializedName(SERIALIZED_NAME_PRICEANDSTOCKRESPONSE) + private MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse priceandstockresponse; + + public MultiSKUPriceAndStockResponseServiceresponse() { + } + + public MultiSKUPriceAndStockResponseServiceresponse responsepreamble(PriceAndAvailabilityResponseServiceresponseResponsepreamble responsepreamble) { + this.responsepreamble = responsepreamble; + return this; + } + + /** + * Get responsepreamble + * @return responsepreamble + **/ + @javax.annotation.Nullable + public PriceAndAvailabilityResponseServiceresponseResponsepreamble getResponsepreamble() { + return responsepreamble; + } + + public void setResponsepreamble(PriceAndAvailabilityResponseServiceresponseResponsepreamble responsepreamble) { + this.responsepreamble = responsepreamble; + } + + + public MultiSKUPriceAndStockResponseServiceresponse priceandstockresponse(MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse priceandstockresponse) { + this.priceandstockresponse = priceandstockresponse; + return this; + } + + /** + * Get priceandstockresponse + * @return priceandstockresponse + **/ + @javax.annotation.Nullable + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse getPriceandstockresponse() { + return priceandstockresponse; + } + + public void setPriceandstockresponse(MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse priceandstockresponse) { + this.priceandstockresponse = priceandstockresponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MultiSKUPriceAndStockResponseServiceresponse multiSKUPriceAndStockResponseServiceresponse = (MultiSKUPriceAndStockResponseServiceresponse) o; + return Objects.equals(this.responsepreamble, multiSKUPriceAndStockResponseServiceresponse.responsepreamble) && + Objects.equals(this.priceandstockresponse, multiSKUPriceAndStockResponseServiceresponse.priceandstockresponse); + } + + @Override + public int hashCode() { + return Objects.hash(responsepreamble, priceandstockresponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MultiSKUPriceAndStockResponseServiceresponse {\n"); + sb.append(" responsepreamble: ").append(toIndentedString(responsepreamble)).append("\n"); + sb.append(" priceandstockresponse: ").append(toIndentedString(priceandstockresponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("responsepreamble"); + openapiFields.add("priceandstockresponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MultiSKUPriceAndStockResponseServiceresponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MultiSKUPriceAndStockResponseServiceresponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in MultiSKUPriceAndStockResponseServiceresponse is not found in the empty JSON string", MultiSKUPriceAndStockResponseServiceresponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MultiSKUPriceAndStockResponseServiceresponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MultiSKUPriceAndStockResponseServiceresponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `responsepreamble` + if (jsonObj.get("responsepreamble") != null && !jsonObj.get("responsepreamble").isJsonNull()) { + PriceAndAvailabilityResponseServiceresponseResponsepreamble.validateJsonElement(jsonObj.get("responsepreamble")); + } + // validate the optional field `priceandstockresponse` + if (jsonObj.get("priceandstockresponse") != null && !jsonObj.get("priceandstockresponse").isJsonNull()) { + MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse.validateJsonElement(jsonObj.get("priceandstockresponse")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MultiSKUPriceAndStockResponseServiceresponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MultiSKUPriceAndStockResponseServiceresponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MultiSKUPriceAndStockResponseServiceresponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MultiSKUPriceAndStockResponseServiceresponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MultiSKUPriceAndStockResponseServiceresponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MultiSKUPriceAndStockResponseServiceresponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of MultiSKUPriceAndStockResponseServiceresponse + * @throws IOException if the JSON string is invalid with respect to MultiSKUPriceAndStockResponseServiceresponse + */ + public static MultiSKUPriceAndStockResponseServiceresponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MultiSKUPriceAndStockResponseServiceresponse.class); + } + + /** + * Convert an instance of MultiSKUPriceAndStockResponseServiceresponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse.java b/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse.java new file mode 100644 index 00000000..5fbaa13c --- /dev/null +++ b/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse.java @@ -0,0 +1,228 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse { + public static final String SERIALIZED_NAME_DETAILS = "details"; + @SerializedName(SERIALIZED_NAME_DETAILS) + private List details; + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse() { + } + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse details(List details) { + this.details = details; + return this; + } + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse addDetailsItem(MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner detailsItem) { + if (this.details == null) { + this.details = new ArrayList<>(); + } + this.details.add(detailsItem); + return this; + } + + /** + * Get details + * @return details + **/ + @javax.annotation.Nullable + public List getDetails() { + return details; + } + + public void setDetails(List details) { + this.details = details; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse multiSKUPriceAndStockResponseServiceresponsePriceandstockresponse = (MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse) o; + return Objects.equals(this.details, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponse.details); + } + + @Override + public int hashCode() { + return Objects.hash(details); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse {\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("details"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse is not found in the empty JSON string", MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("details") != null && !jsonObj.get("details").isJsonNull()) { + JsonArray jsonArraydetails = jsonObj.getAsJsonArray("details"); + if (jsonArraydetails != null) { + // ensure the json data is an array + if (!jsonObj.get("details").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `details` to be an array in the JSON string but got `%s`", jsonObj.get("details").toString())); + } + + // validate the optional field `details` (array) + for (int i = 0; i < jsonArraydetails.size(); i++) { + MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.validateJsonElement(jsonArraydetails.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse + * @throws IOException if the JSON string is invalid with respect to MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse + */ + public static MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse.class); + } + + /** + * Convert an instance of MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.java b/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.java new file mode 100644 index 00000000..1c82f11a --- /dev/null +++ b/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.java @@ -0,0 +1,1029 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner { + public static final String SERIALIZED_NAME_ITEMSTATUS = "itemstatus"; + @SerializedName(SERIALIZED_NAME_ITEMSTATUS) + private String itemstatus; + + public static final String SERIALIZED_NAME_STATUSMESSAGE = "statusmessage"; + @SerializedName(SERIALIZED_NAME_STATUSMESSAGE) + private String statusmessage; + + public static final String SERIALIZED_NAME_INGRAMPARTNUMBER = "ingrampartnumber"; + @SerializedName(SERIALIZED_NAME_INGRAMPARTNUMBER) + private String ingrampartnumber; + + public static final String SERIALIZED_NAME_VENDORPARTNUMBER = "vendorpartnumber"; + @SerializedName(SERIALIZED_NAME_VENDORPARTNUMBER) + private String vendorpartnumber; + + public static final String SERIALIZED_NAME_GLOBALSKUID = "globalskuid"; + @SerializedName(SERIALIZED_NAME_GLOBALSKUID) + private String globalskuid; + + public static final String SERIALIZED_NAME_CUSTOMERPRICE = "customerprice"; + @SerializedName(SERIALIZED_NAME_CUSTOMERPRICE) + private String customerprice; + + public static final String SERIALIZED_NAME_PARTDESCRIPTION1 = "partdescription1"; + @SerializedName(SERIALIZED_NAME_PARTDESCRIPTION1) + private String partdescription1; + + public static final String SERIALIZED_NAME_PARTDESCRIPTION2 = "partdescription2"; + @SerializedName(SERIALIZED_NAME_PARTDESCRIPTION2) + private String partdescription2; + + public static final String SERIALIZED_NAME_VENDORNUMBER = "vendornumber"; + @SerializedName(SERIALIZED_NAME_VENDORNUMBER) + private String vendornumber; + + public static final String SERIALIZED_NAME_VENDORNAME = "vendorname"; + @SerializedName(SERIALIZED_NAME_VENDORNAME) + private String vendorname; + + public static final String SERIALIZED_NAME_CPUCODE = "cpucode"; + @SerializedName(SERIALIZED_NAME_CPUCODE) + private String cpucode; + + /** + * Ingram Micro assigned product classification. + */ + @JsonAdapter(PropertyClassEnum.Adapter.class) + public enum PropertyClassEnum { + A_STOCKED_PRODUCT_IN_ALL_IM_WAREHOUSES("A-Stocked product in all IM warehouses"), + + B_LIMITED_STOCK_IN_IM_WAREHOUSES("B-Limited stock in IM warehouses"), + + C_STOCKED_IN_FEWER_WARESHOUSES("C-Stocked in fewer wareshouses"), + + D_INGRAM_DISCONTINUED("D-Ingram discontinued"), + + E_PLANNED_TO_BE_PHASED_OUT_AS_PER_THE_VENDOR("E-Planned to be phased out as per the vendor"), + + F_CARRIED_FOR_SPECIFIC_CUSTOMER_AS_PER_THE_CONTRACT("F-Carried for specific customer as per the contract"), + + N_NEW_SKU("N-New SKU"), + + O_DISCONTINUED_TO_BE_LIQUIDATED("O-Discontinued to be liquidated"), + + S_ORDER_FOR_SPECIALIZED_DEMAND("S-Order for specialized demand"), + + V_DISCONTINUED_BY_VENDOR("V-Discontinued by vendor"), + + X_DIRECT_SHIP_PRODUCTS_FROM_VENDOR("X-Direct Ship products from vendor"); + + private String value; + + PropertyClassEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PropertyClassEnum fromValue(String value) { + for (PropertyClassEnum b : PropertyClassEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PropertyClassEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PropertyClassEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PropertyClassEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PropertyClassEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PROPERTY_CLASS = "class"; + @SerializedName(SERIALIZED_NAME_PROPERTY_CLASS) + private PropertyClassEnum propertyClass; + + public static final String SERIALIZED_NAME_SKUSTATUS = "skustatus"; + @SerializedName(SERIALIZED_NAME_SKUSTATUS) + private String skustatus; + + public static final String SERIALIZED_NAME_MEDIACPU = "mediacpu"; + @SerializedName(SERIALIZED_NAME_MEDIACPU) + private String mediacpu; + + public static final String SERIALIZED_NAME_CATEGORYSUBCATEGORY = "categorysubcategory"; + @SerializedName(SERIALIZED_NAME_CATEGORYSUBCATEGORY) + private String categorysubcategory; + + public static final String SERIALIZED_NAME_RETAILPRICE = "retailprice"; + @SerializedName(SERIALIZED_NAME_RETAILPRICE) + private BigDecimal retailprice; + + public static final String SERIALIZED_NAME_NEWMEDIA = "newmedia"; + @SerializedName(SERIALIZED_NAME_NEWMEDIA) + private String newmedia; + + /** + * Y - End user required N - Not required End user + */ + @JsonAdapter(EnduserrequiredEnum.Adapter.class) + public enum EnduserrequiredEnum { + Y_END_USER_DATA_REQUIRED("Y-End user data required"), + + N_END_USER_DATA_NOT_REQUIRED("N-End user data not required"); + + private String value; + + EnduserrequiredEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EnduserrequiredEnum fromValue(String value) { + for (EnduserrequiredEnum b : EnduserrequiredEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EnduserrequiredEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EnduserrequiredEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EnduserrequiredEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + EnduserrequiredEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ENDUSERREQUIRED = "enduserrequired"; + @SerializedName(SERIALIZED_NAME_ENDUSERREQUIRED) + private EnduserrequiredEnum enduserrequired; + + /** + * Y- Allow Backorder Flag N- Not allowed + */ + @JsonAdapter(BackorderflagEnum.Adapter.class) + public enum BackorderflagEnum { + Y_CAN_BE_BACKORDERED("Y- Can be backordered"), + + N_CANNOT_BE_BACKORDERED("N-Cannot be backordered"); + + private String value; + + BackorderflagEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static BackorderflagEnum fromValue(String value) { + for (BackorderflagEnum b : BackorderflagEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final BackorderflagEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public BackorderflagEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return BackorderflagEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + BackorderflagEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_BACKORDERFLAG = "backorderflag"; + @SerializedName(SERIALIZED_NAME_BACKORDERFLAG) + private BackorderflagEnum backorderflag; + + public static final String SERIALIZED_NAME_SKUAUTHORIZED = "skuauthorized"; + @SerializedName(SERIALIZED_NAME_SKUAUTHORIZED) + private String skuauthorized; + + public static final String SERIALIZED_NAME_EXTENDEDVENDORPARTNUMBER = "extendedvendorpartnumber"; + @SerializedName(SERIALIZED_NAME_EXTENDEDVENDORPARTNUMBER) + private String extendedvendorpartnumber; + + public static final String SERIALIZED_NAME_WAREHOUSEDETAILS = "warehousedetails"; + @SerializedName(SERIALIZED_NAME_WAREHOUSEDETAILS) + private List warehousedetails; + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner() { + } + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner itemstatus(String itemstatus) { + this.itemstatus = itemstatus; + return this; + } + + /** + * Get itemstatus + * @return itemstatus + **/ + @javax.annotation.Nullable + public String getItemstatus() { + return itemstatus; + } + + public void setItemstatus(String itemstatus) { + this.itemstatus = itemstatus; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner statusmessage(String statusmessage) { + this.statusmessage = statusmessage; + return this; + } + + /** + * Get statusmessage + * @return statusmessage + **/ + @javax.annotation.Nullable + public String getStatusmessage() { + return statusmessage; + } + + public void setStatusmessage(String statusmessage) { + this.statusmessage = statusmessage; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner ingrampartnumber(String ingrampartnumber) { + this.ingrampartnumber = ingrampartnumber; + return this; + } + + /** + * SKU number for the product for which order needs to be created with Ingram Micro + * @return ingrampartnumber + **/ + @javax.annotation.Nullable + public String getIngrampartnumber() { + return ingrampartnumber; + } + + public void setIngrampartnumber(String ingrampartnumber) { + this.ingrampartnumber = ingrampartnumber; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner vendorpartnumber(String vendorpartnumber) { + this.vendorpartnumber = vendorpartnumber; + return this; + } + + /** + * Vendor Part number for the product + * @return vendorpartnumber + **/ + @javax.annotation.Nullable + public String getVendorpartnumber() { + return vendorpartnumber; + } + + public void setVendorpartnumber(String vendorpartnumber) { + this.vendorpartnumber = vendorpartnumber; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner globalskuid(String globalskuid) { + this.globalskuid = globalskuid; + return this; + } + + /** + * Get globalskuid + * @return globalskuid + **/ + @javax.annotation.Nullable + public String getGlobalskuid() { + return globalskuid; + } + + public void setGlobalskuid(String globalskuid) { + this.globalskuid = globalskuid; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner customerprice(String customerprice) { + this.customerprice = customerprice; + return this; + } + + /** + * Customer specific price for the product, excluding taxes + * @return customerprice + **/ + @javax.annotation.Nullable + public String getCustomerprice() { + return customerprice; + } + + public void setCustomerprice(String customerprice) { + this.customerprice = customerprice; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner partdescription1(String partdescription1) { + this.partdescription1 = partdescription1; + return this; + } + + /** + * Description on the part number that is being requested + * @return partdescription1 + **/ + @javax.annotation.Nullable + public String getPartdescription1() { + return partdescription1; + } + + public void setPartdescription1(String partdescription1) { + this.partdescription1 = partdescription1; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner partdescription2(String partdescription2) { + this.partdescription2 = partdescription2; + return this; + } + + /** + * Contuiation of description on the part number that is being requested + * @return partdescription2 + **/ + @javax.annotation.Nullable + public String getPartdescription2() { + return partdescription2; + } + + public void setPartdescription2(String partdescription2) { + this.partdescription2 = partdescription2; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner vendornumber(String vendornumber) { + this.vendornumber = vendornumber; + return this; + } + + /** + * Internal four digit code assigned by Ingram + * @return vendornumber + **/ + @javax.annotation.Nullable + public String getVendornumber() { + return vendornumber; + } + + public void setVendornumber(String vendornumber) { + this.vendornumber = vendornumber; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner vendorname(String vendorname) { + this.vendorname = vendorname; + return this; + } + + /** + * Name of the vendor + * @return vendorname + **/ + @javax.annotation.Nullable + public String getVendorname() { + return vendorname; + } + + public void setVendorname(String vendorname) { + this.vendorname = vendorname; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner cpucode(String cpucode) { + this.cpucode = cpucode; + return this; + } + + /** + * Ingram internal code for a product + * @return cpucode + **/ + @javax.annotation.Nullable + public String getCpucode() { + return cpucode; + } + + public void setCpucode(String cpucode) { + this.cpucode = cpucode; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner propertyClass(PropertyClassEnum propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Ingram Micro assigned product classification. + * @return propertyClass + **/ + @javax.annotation.Nullable + public PropertyClassEnum getPropertyClass() { + return propertyClass; + } + + public void setPropertyClass(PropertyClassEnum propertyClass) { + this.propertyClass = propertyClass; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner skustatus(String skustatus) { + this.skustatus = skustatus; + return this; + } + + /** + * Identifies if the SKU has been discontinued. Rules must be defined on the values to be sent out to partner. + * @return skustatus + **/ + @javax.annotation.Nullable + public String getSkustatus() { + return skustatus; + } + + public void setSkustatus(String skustatus) { + this.skustatus = skustatus; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner mediacpu(String mediacpu) { + this.mediacpu = mediacpu; + return this; + } + + /** + * Get mediacpu + * @return mediacpu + **/ + @javax.annotation.Nullable + public String getMediacpu() { + return mediacpu; + } + + public void setMediacpu(String mediacpu) { + this.mediacpu = mediacpu; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner categorysubcategory(String categorysubcategory) { + this.categorysubcategory = categorysubcategory; + return this; + } + + /** + * Ingram's internal categorization of the product + * @return categorysubcategory + **/ + @javax.annotation.Nullable + public String getCategorysubcategory() { + return categorysubcategory; + } + + public void setCategorysubcategory(String categorysubcategory) { + this.categorysubcategory = categorysubcategory; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner retailprice(BigDecimal retailprice) { + this.retailprice = retailprice; + return this; + } + + /** + * MSRP Price 0.00 + * @return retailprice + **/ + @javax.annotation.Nonnull + public BigDecimal getRetailprice() { + return retailprice; + } + + public void setRetailprice(BigDecimal retailprice) { + this.retailprice = retailprice; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner newmedia(String newmedia) { + this.newmedia = newmedia; + return this; + } + + /** + * Internal four-digit code assigned by Ingram to represent the item group + * @return newmedia + **/ + @javax.annotation.Nullable + public String getNewmedia() { + return newmedia; + } + + public void setNewmedia(String newmedia) { + this.newmedia = newmedia; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner enduserrequired(EnduserrequiredEnum enduserrequired) { + this.enduserrequired = enduserrequired; + return this; + } + + /** + * Y - End user required N - Not required End user + * @return enduserrequired + **/ + @javax.annotation.Nullable + public EnduserrequiredEnum getEnduserrequired() { + return enduserrequired; + } + + public void setEnduserrequired(EnduserrequiredEnum enduserrequired) { + this.enduserrequired = enduserrequired; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner backorderflag(BackorderflagEnum backorderflag) { + this.backorderflag = backorderflag; + return this; + } + + /** + * Y- Allow Backorder Flag N- Not allowed + * @return backorderflag + **/ + @javax.annotation.Nullable + public BackorderflagEnum getBackorderflag() { + return backorderflag; + } + + public void setBackorderflag(BackorderflagEnum backorderflag) { + this.backorderflag = backorderflag; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner skuauthorized(String skuauthorized) { + this.skuauthorized = skuauthorized; + return this; + } + + /** + * Get skuauthorized + * @return skuauthorized + **/ + @javax.annotation.Nullable + public String getSkuauthorized() { + return skuauthorized; + } + + public void setSkuauthorized(String skuauthorized) { + this.skuauthorized = skuauthorized; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner extendedvendorpartnumber(String extendedvendorpartnumber) { + this.extendedvendorpartnumber = extendedvendorpartnumber; + return this; + } + + /** + * Get extendedvendorpartnumber + * @return extendedvendorpartnumber + **/ + @javax.annotation.Nullable + public String getExtendedvendorpartnumber() { + return extendedvendorpartnumber; + } + + public void setExtendedvendorpartnumber(String extendedvendorpartnumber) { + this.extendedvendorpartnumber = extendedvendorpartnumber; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner warehousedetails(List warehousedetails) { + this.warehousedetails = warehousedetails; + return this; + } + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner addWarehousedetailsItem(MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner warehousedetailsItem) { + if (this.warehousedetails == null) { + this.warehousedetails = new ArrayList<>(); + } + this.warehousedetails.add(warehousedetailsItem); + return this; + } + + /** + * Get warehousedetails + * @return warehousedetails + **/ + @javax.annotation.Nullable + public List getWarehousedetails() { + return warehousedetails; + } + + public void setWarehousedetails(List warehousedetails) { + this.warehousedetails = warehousedetails; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner = (MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner) o; + return Objects.equals(this.itemstatus, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.itemstatus) && + Objects.equals(this.statusmessage, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.statusmessage) && + Objects.equals(this.ingrampartnumber, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.ingrampartnumber) && + Objects.equals(this.vendorpartnumber, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.vendorpartnumber) && + Objects.equals(this.globalskuid, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.globalskuid) && + Objects.equals(this.customerprice, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.customerprice) && + Objects.equals(this.partdescription1, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.partdescription1) && + Objects.equals(this.partdescription2, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.partdescription2) && + Objects.equals(this.vendornumber, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.vendornumber) && + Objects.equals(this.vendorname, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.vendorname) && + Objects.equals(this.cpucode, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.cpucode) && + Objects.equals(this.propertyClass, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.propertyClass) && + Objects.equals(this.skustatus, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.skustatus) && + Objects.equals(this.mediacpu, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.mediacpu) && + Objects.equals(this.categorysubcategory, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.categorysubcategory) && + Objects.equals(this.retailprice, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.retailprice) && + Objects.equals(this.newmedia, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.newmedia) && + Objects.equals(this.enduserrequired, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.enduserrequired) && + Objects.equals(this.backorderflag, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.backorderflag) && + Objects.equals(this.skuauthorized, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.skuauthorized) && + Objects.equals(this.extendedvendorpartnumber, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.extendedvendorpartnumber) && + Objects.equals(this.warehousedetails, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.warehousedetails); + } + + @Override + public int hashCode() { + return Objects.hash(itemstatus, statusmessage, ingrampartnumber, vendorpartnumber, globalskuid, customerprice, partdescription1, partdescription2, vendornumber, vendorname, cpucode, propertyClass, skustatus, mediacpu, categorysubcategory, retailprice, newmedia, enduserrequired, backorderflag, skuauthorized, extendedvendorpartnumber, warehousedetails); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner {\n"); + sb.append(" itemstatus: ").append(toIndentedString(itemstatus)).append("\n"); + sb.append(" statusmessage: ").append(toIndentedString(statusmessage)).append("\n"); + sb.append(" ingrampartnumber: ").append(toIndentedString(ingrampartnumber)).append("\n"); + sb.append(" vendorpartnumber: ").append(toIndentedString(vendorpartnumber)).append("\n"); + sb.append(" globalskuid: ").append(toIndentedString(globalskuid)).append("\n"); + sb.append(" customerprice: ").append(toIndentedString(customerprice)).append("\n"); + sb.append(" partdescription1: ").append(toIndentedString(partdescription1)).append("\n"); + sb.append(" partdescription2: ").append(toIndentedString(partdescription2)).append("\n"); + sb.append(" vendornumber: ").append(toIndentedString(vendornumber)).append("\n"); + sb.append(" vendorname: ").append(toIndentedString(vendorname)).append("\n"); + sb.append(" cpucode: ").append(toIndentedString(cpucode)).append("\n"); + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append(" skustatus: ").append(toIndentedString(skustatus)).append("\n"); + sb.append(" mediacpu: ").append(toIndentedString(mediacpu)).append("\n"); + sb.append(" categorysubcategory: ").append(toIndentedString(categorysubcategory)).append("\n"); + sb.append(" retailprice: ").append(toIndentedString(retailprice)).append("\n"); + sb.append(" newmedia: ").append(toIndentedString(newmedia)).append("\n"); + sb.append(" enduserrequired: ").append(toIndentedString(enduserrequired)).append("\n"); + sb.append(" backorderflag: ").append(toIndentedString(backorderflag)).append("\n"); + sb.append(" skuauthorized: ").append(toIndentedString(skuauthorized)).append("\n"); + sb.append(" extendedvendorpartnumber: ").append(toIndentedString(extendedvendorpartnumber)).append("\n"); + sb.append(" warehousedetails: ").append(toIndentedString(warehousedetails)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("itemstatus"); + openapiFields.add("statusmessage"); + openapiFields.add("ingrampartnumber"); + openapiFields.add("vendorpartnumber"); + openapiFields.add("globalskuid"); + openapiFields.add("customerprice"); + openapiFields.add("partdescription1"); + openapiFields.add("partdescription2"); + openapiFields.add("vendornumber"); + openapiFields.add("vendorname"); + openapiFields.add("cpucode"); + openapiFields.add("class"); + openapiFields.add("skustatus"); + openapiFields.add("mediacpu"); + openapiFields.add("categorysubcategory"); + openapiFields.add("retailprice"); + openapiFields.add("newmedia"); + openapiFields.add("enduserrequired"); + openapiFields.add("backorderflag"); + openapiFields.add("skuauthorized"); + openapiFields.add("extendedvendorpartnumber"); + openapiFields.add("warehousedetails"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("retailprice"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner is not found in the empty JSON string", MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("itemstatus") != null && !jsonObj.get("itemstatus").isJsonNull()) && !jsonObj.get("itemstatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `itemstatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("itemstatus").toString())); + } + if ((jsonObj.get("statusmessage") != null && !jsonObj.get("statusmessage").isJsonNull()) && !jsonObj.get("statusmessage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `statusmessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("statusmessage").toString())); + } + if ((jsonObj.get("ingrampartnumber") != null && !jsonObj.get("ingrampartnumber").isJsonNull()) && !jsonObj.get("ingrampartnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingrampartnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingrampartnumber").toString())); + } + if ((jsonObj.get("vendorpartnumber") != null && !jsonObj.get("vendorpartnumber").isJsonNull()) && !jsonObj.get("vendorpartnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorpartnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorpartnumber").toString())); + } + if ((jsonObj.get("globalskuid") != null && !jsonObj.get("globalskuid").isJsonNull()) && !jsonObj.get("globalskuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `globalskuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("globalskuid").toString())); + } + if ((jsonObj.get("customerprice") != null && !jsonObj.get("customerprice").isJsonNull()) && !jsonObj.get("customerprice").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerprice` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerprice").toString())); + } + if ((jsonObj.get("partdescription1") != null && !jsonObj.get("partdescription1").isJsonNull()) && !jsonObj.get("partdescription1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `partdescription1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("partdescription1").toString())); + } + if ((jsonObj.get("partdescription2") != null && !jsonObj.get("partdescription2").isJsonNull()) && !jsonObj.get("partdescription2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `partdescription2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("partdescription2").toString())); + } + if ((jsonObj.get("vendornumber") != null && !jsonObj.get("vendornumber").isJsonNull()) && !jsonObj.get("vendornumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendornumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendornumber").toString())); + } + if ((jsonObj.get("vendorname") != null && !jsonObj.get("vendorname").isJsonNull()) && !jsonObj.get("vendorname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorname").toString())); + } + if ((jsonObj.get("cpucode") != null && !jsonObj.get("cpucode").isJsonNull()) && !jsonObj.get("cpucode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cpucode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cpucode").toString())); + } + if ((jsonObj.get("class") != null && !jsonObj.get("class").isJsonNull()) && !jsonObj.get("class").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `class` to be a primitive type in the JSON string but got `%s`", jsonObj.get("class").toString())); + } + // validate the optional field `class` + if (jsonObj.get("class") != null && !jsonObj.get("class").isJsonNull()) { + PropertyClassEnum.validateJsonElement(jsonObj.get("class")); + } + if ((jsonObj.get("skustatus") != null && !jsonObj.get("skustatus").isJsonNull()) && !jsonObj.get("skustatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `skustatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("skustatus").toString())); + } + if ((jsonObj.get("mediacpu") != null && !jsonObj.get("mediacpu").isJsonNull()) && !jsonObj.get("mediacpu").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mediacpu` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediacpu").toString())); + } + if ((jsonObj.get("categorysubcategory") != null && !jsonObj.get("categorysubcategory").isJsonNull()) && !jsonObj.get("categorysubcategory").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `categorysubcategory` to be a primitive type in the JSON string but got `%s`", jsonObj.get("categorysubcategory").toString())); + } + if ((jsonObj.get("newmedia") != null && !jsonObj.get("newmedia").isJsonNull()) && !jsonObj.get("newmedia").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `newmedia` to be a primitive type in the JSON string but got `%s`", jsonObj.get("newmedia").toString())); + } + if ((jsonObj.get("enduserrequired") != null && !jsonObj.get("enduserrequired").isJsonNull()) && !jsonObj.get("enduserrequired").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `enduserrequired` to be a primitive type in the JSON string but got `%s`", jsonObj.get("enduserrequired").toString())); + } + // validate the optional field `enduserrequired` + if (jsonObj.get("enduserrequired") != null && !jsonObj.get("enduserrequired").isJsonNull()) { + EnduserrequiredEnum.validateJsonElement(jsonObj.get("enduserrequired")); + } + if ((jsonObj.get("backorderflag") != null && !jsonObj.get("backorderflag").isJsonNull()) && !jsonObj.get("backorderflag").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `backorderflag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("backorderflag").toString())); + } + // validate the optional field `backorderflag` + if (jsonObj.get("backorderflag") != null && !jsonObj.get("backorderflag").isJsonNull()) { + BackorderflagEnum.validateJsonElement(jsonObj.get("backorderflag")); + } + if ((jsonObj.get("skuauthorized") != null && !jsonObj.get("skuauthorized").isJsonNull()) && !jsonObj.get("skuauthorized").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `skuauthorized` to be a primitive type in the JSON string but got `%s`", jsonObj.get("skuauthorized").toString())); + } + if ((jsonObj.get("extendedvendorpartnumber") != null && !jsonObj.get("extendedvendorpartnumber").isJsonNull()) && !jsonObj.get("extendedvendorpartnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `extendedvendorpartnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("extendedvendorpartnumber").toString())); + } + if (jsonObj.get("warehousedetails") != null && !jsonObj.get("warehousedetails").isJsonNull()) { + JsonArray jsonArraywarehousedetails = jsonObj.getAsJsonArray("warehousedetails"); + if (jsonArraywarehousedetails != null) { + // ensure the json data is an array + if (!jsonObj.get("warehousedetails").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warehousedetails` to be an array in the JSON string but got `%s`", jsonObj.get("warehousedetails").toString())); + } + + // validate the optional field `warehousedetails` (array) + for (int i = 0; i < jsonArraywarehousedetails.size(); i++) { + MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner.validateJsonElement(jsonArraywarehousedetails.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner + * @throws IOException if the JSON string is invalid with respect to MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner + */ + public static MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner.class); + } + + /** + * Convert an instance of MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner.java b/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner.java new file mode 100644 index 00000000..08c1a967 --- /dev/null +++ b/src/main/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner.java @@ -0,0 +1,407 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner { + /** + * Unique 2-digit code of the Ingram Micro warehouse + */ + @JsonAdapter(WarehouseidEnum.Adapter.class) + public enum WarehouseidEnum { + _10_MIRA_LOMA_CA("10-Mira Loma CA"), + + _20_CARROLLTON_TX("20-Carrollton TX"), + + _30_MILLINGTON_TN("30-Millington TN"), + + _40_CAROL_STREAM_IL("40-Carol Stream IL"), + + _80_JONESTOWN_PA("80-Jonestown PA"); + + private String value; + + WarehouseidEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static WarehouseidEnum fromValue(String value) { + for (WarehouseidEnum b : WarehouseidEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final WarehouseidEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public WarehouseidEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return WarehouseidEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + WarehouseidEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_WAREHOUSEID = "warehouseid"; + @SerializedName(SERIALIZED_NAME_WAREHOUSEID) + private WarehouseidEnum warehouseid; + + public static final String SERIALIZED_NAME_WAREHOUSEDESCRIPTION = "warehousedescription"; + @SerializedName(SERIALIZED_NAME_WAREHOUSEDESCRIPTION) + private String warehousedescription; + + public static final String SERIALIZED_NAME_AVAILABLEQUANTITY = "availablequantity"; + @SerializedName(SERIALIZED_NAME_AVAILABLEQUANTITY) + private Integer availablequantity; + + public static final String SERIALIZED_NAME_ONORDERQUANTITY = "onorderquantity"; + @SerializedName(SERIALIZED_NAME_ONORDERQUANTITY) + private Integer onorderquantity; + + public static final String SERIALIZED_NAME_ONHOLDQUANTITY = "onholdquantity"; + @SerializedName(SERIALIZED_NAME_ONHOLDQUANTITY) + private String onholdquantity; + + public static final String SERIALIZED_NAME_ETADATE = "etadate"; + @SerializedName(SERIALIZED_NAME_ETADATE) + private String etadate; + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner() { + } + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner warehouseid(WarehouseidEnum warehouseid) { + this.warehouseid = warehouseid; + return this; + } + + /** + * Unique 2-digit code of the Ingram Micro warehouse + * @return warehouseid + **/ + @javax.annotation.Nullable + public WarehouseidEnum getWarehouseid() { + return warehouseid; + } + + public void setWarehouseid(WarehouseidEnum warehouseid) { + this.warehouseid = warehouseid; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner warehousedescription(String warehousedescription) { + this.warehousedescription = warehousedescription; + return this; + } + + /** + * City of the Ingram Micro warehouse location + * @return warehousedescription + **/ + @javax.annotation.Nullable + public String getWarehousedescription() { + return warehousedescription; + } + + public void setWarehousedescription(String warehousedescription) { + this.warehousedescription = warehousedescription; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner availablequantity(Integer availablequantity) { + this.availablequantity = availablequantity; + return this; + } + + /** + * On hand available quantity + * @return availablequantity + **/ + @javax.annotation.Nullable + public Integer getAvailablequantity() { + return availablequantity; + } + + public void setAvailablequantity(Integer availablequantity) { + this.availablequantity = availablequantity; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner onorderquantity(Integer onorderquantity) { + this.onorderquantity = onorderquantity; + return this; + } + + /** + * On Order quantity + * @return onorderquantity + **/ + @javax.annotation.Nullable + public Integer getOnorderquantity() { + return onorderquantity; + } + + public void setOnorderquantity(Integer onorderquantity) { + this.onorderquantity = onorderquantity; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner onholdquantity(String onholdquantity) { + this.onholdquantity = onholdquantity; + return this; + } + + /** + * Get onholdquantity + * @return onholdquantity + **/ + @javax.annotation.Nullable + public String getOnholdquantity() { + return onholdquantity; + } + + public void setOnholdquantity(String onholdquantity) { + this.onholdquantity = onholdquantity; + } + + + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner etadate(String etadate) { + this.etadate = etadate; + return this; + } + + /** + * Get etadate + * @return etadate + **/ + @javax.annotation.Nullable + public String getEtadate() { + return etadate; + } + + public void setEtadate(String etadate) { + this.etadate = etadate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner = (MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner) o; + return Objects.equals(this.warehouseid, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner.warehouseid) && + Objects.equals(this.warehousedescription, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner.warehousedescription) && + Objects.equals(this.availablequantity, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner.availablequantity) && + Objects.equals(this.onorderquantity, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner.onorderquantity) && + Objects.equals(this.onholdquantity, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner.onholdquantity) && + Objects.equals(this.etadate, multiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner.etadate); + } + + @Override + public int hashCode() { + return Objects.hash(warehouseid, warehousedescription, availablequantity, onorderquantity, onholdquantity, etadate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner {\n"); + sb.append(" warehouseid: ").append(toIndentedString(warehouseid)).append("\n"); + sb.append(" warehousedescription: ").append(toIndentedString(warehousedescription)).append("\n"); + sb.append(" availablequantity: ").append(toIndentedString(availablequantity)).append("\n"); + sb.append(" onorderquantity: ").append(toIndentedString(onorderquantity)).append("\n"); + sb.append(" onholdquantity: ").append(toIndentedString(onholdquantity)).append("\n"); + sb.append(" etadate: ").append(toIndentedString(etadate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("warehouseid"); + openapiFields.add("warehousedescription"); + openapiFields.add("availablequantity"); + openapiFields.add("onorderquantity"); + openapiFields.add("onholdquantity"); + openapiFields.add("etadate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner is not found in the empty JSON string", MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("warehouseid") != null && !jsonObj.get("warehouseid").isJsonNull()) && !jsonObj.get("warehouseid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `warehouseid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("warehouseid").toString())); + } + // validate the optional field `warehouseid` + if (jsonObj.get("warehouseid") != null && !jsonObj.get("warehouseid").isJsonNull()) { + WarehouseidEnum.validateJsonElement(jsonObj.get("warehouseid")); + } + if ((jsonObj.get("warehousedescription") != null && !jsonObj.get("warehousedescription").isJsonNull()) && !jsonObj.get("warehousedescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `warehousedescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("warehousedescription").toString())); + } + if ((jsonObj.get("onholdquantity") != null && !jsonObj.get("onholdquantity").isJsonNull()) && !jsonObj.get("onholdquantity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `onholdquantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("onholdquantity").toString())); + } + if ((jsonObj.get("etadate") != null && !jsonObj.get("etadate").isJsonNull()) && !jsonObj.get("etadate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `etadate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("etadate").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner + * @throws IOException if the JSON string is invalid with respect to MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner + */ + public static MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner.class); + } + + /** + * Convert an instance of MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCancelResponse.java b/src/main/java/xiresellers/client/model/OrderCancelResponse.java new file mode 100644 index 00000000..240b7c98 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCancelResponse.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderCancelResponseServiceresponse; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Response schema for order delete endpoint + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCancelResponse { + public static final String SERIALIZED_NAME_SERVICERESPONSE = "serviceresponse"; + @SerializedName(SERIALIZED_NAME_SERVICERESPONSE) + private OrderCancelResponseServiceresponse serviceresponse; + + public OrderCancelResponse() { + } + + public OrderCancelResponse serviceresponse(OrderCancelResponseServiceresponse serviceresponse) { + this.serviceresponse = serviceresponse; + return this; + } + + /** + * Get serviceresponse + * @return serviceresponse + **/ + @javax.annotation.Nullable + public OrderCancelResponseServiceresponse getServiceresponse() { + return serviceresponse; + } + + public void setServiceresponse(OrderCancelResponseServiceresponse serviceresponse) { + this.serviceresponse = serviceresponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCancelResponse orderCancelResponse = (OrderCancelResponse) o; + return Objects.equals(this.serviceresponse, orderCancelResponse.serviceresponse); + } + + @Override + public int hashCode() { + return Objects.hash(serviceresponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCancelResponse {\n"); + sb.append(" serviceresponse: ").append(toIndentedString(serviceresponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("serviceresponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCancelResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCancelResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCancelResponse is not found in the empty JSON string", OrderCancelResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCancelResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCancelResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `serviceresponse` + if (jsonObj.get("serviceresponse") != null && !jsonObj.get("serviceresponse").isJsonNull()) { + OrderCancelResponseServiceresponse.validateJsonElement(jsonObj.get("serviceresponse")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCancelResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCancelResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCancelResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCancelResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCancelResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCancelResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCancelResponse + * @throws IOException if the JSON string is invalid with respect to OrderCancelResponse + */ + public static OrderCancelResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCancelResponse.class); + } + + /** + * Convert an instance of OrderCancelResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCancelResponseServiceresponse.java b/src/main/java/xiresellers/client/model/OrderCancelResponseServiceresponse.java new file mode 100644 index 00000000..36874de3 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCancelResponseServiceresponse.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderCancelResponseServiceresponseResponsepreamble; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCancelResponseServiceresponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCancelResponseServiceresponse { + public static final String SERIALIZED_NAME_RESPONSEPREAMBLE = "responsepreamble"; + @SerializedName(SERIALIZED_NAME_RESPONSEPREAMBLE) + private OrderCancelResponseServiceresponseResponsepreamble responsepreamble; + + public OrderCancelResponseServiceresponse() { + } + + public OrderCancelResponseServiceresponse responsepreamble(OrderCancelResponseServiceresponseResponsepreamble responsepreamble) { + this.responsepreamble = responsepreamble; + return this; + } + + /** + * Get responsepreamble + * @return responsepreamble + **/ + @javax.annotation.Nullable + public OrderCancelResponseServiceresponseResponsepreamble getResponsepreamble() { + return responsepreamble; + } + + public void setResponsepreamble(OrderCancelResponseServiceresponseResponsepreamble responsepreamble) { + this.responsepreamble = responsepreamble; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCancelResponseServiceresponse orderCancelResponseServiceresponse = (OrderCancelResponseServiceresponse) o; + return Objects.equals(this.responsepreamble, orderCancelResponseServiceresponse.responsepreamble); + } + + @Override + public int hashCode() { + return Objects.hash(responsepreamble); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCancelResponseServiceresponse {\n"); + sb.append(" responsepreamble: ").append(toIndentedString(responsepreamble)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("responsepreamble"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCancelResponseServiceresponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCancelResponseServiceresponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCancelResponseServiceresponse is not found in the empty JSON string", OrderCancelResponseServiceresponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCancelResponseServiceresponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCancelResponseServiceresponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `responsepreamble` + if (jsonObj.get("responsepreamble") != null && !jsonObj.get("responsepreamble").isJsonNull()) { + OrderCancelResponseServiceresponseResponsepreamble.validateJsonElement(jsonObj.get("responsepreamble")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCancelResponseServiceresponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCancelResponseServiceresponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCancelResponseServiceresponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCancelResponseServiceresponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCancelResponseServiceresponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCancelResponseServiceresponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCancelResponseServiceresponse + * @throws IOException if the JSON string is invalid with respect to OrderCancelResponseServiceresponse + */ + public static OrderCancelResponseServiceresponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCancelResponseServiceresponse.class); + } + + /** + * Convert an instance of OrderCancelResponseServiceresponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCancelResponseServiceresponseResponsepreamble.java b/src/main/java/xiresellers/client/model/OrderCancelResponseServiceresponseResponsepreamble.java new file mode 100644 index 00000000..4be5f307 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCancelResponseServiceresponseResponsepreamble.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCancelResponseServiceresponseResponsepreamble + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCancelResponseServiceresponseResponsepreamble { + public static final String SERIALIZED_NAME_REQUEST_STATUS = "requestStatus"; + @SerializedName(SERIALIZED_NAME_REQUEST_STATUS) + private String requestStatus; + + public static final String SERIALIZED_NAME_RETURN_CODE = "returnCode"; + @SerializedName(SERIALIZED_NAME_RETURN_CODE) + private String returnCode; + + public static final String SERIALIZED_NAME_RETURN_MESSAGE = "returnMessage"; + @SerializedName(SERIALIZED_NAME_RETURN_MESSAGE) + private String returnMessage; + + public OrderCancelResponseServiceresponseResponsepreamble() { + } + + public OrderCancelResponseServiceresponseResponsepreamble requestStatus(String requestStatus) { + this.requestStatus = requestStatus; + return this; + } + + /** + * Get requestStatus + * @return requestStatus + **/ + @javax.annotation.Nullable + public String getRequestStatus() { + return requestStatus; + } + + public void setRequestStatus(String requestStatus) { + this.requestStatus = requestStatus; + } + + + public OrderCancelResponseServiceresponseResponsepreamble returnCode(String returnCode) { + this.returnCode = returnCode; + return this; + } + + /** + * Get returnCode + * @return returnCode + **/ + @javax.annotation.Nullable + public String getReturnCode() { + return returnCode; + } + + public void setReturnCode(String returnCode) { + this.returnCode = returnCode; + } + + + public OrderCancelResponseServiceresponseResponsepreamble returnMessage(String returnMessage) { + this.returnMessage = returnMessage; + return this; + } + + /** + * Get returnMessage + * @return returnMessage + **/ + @javax.annotation.Nullable + public String getReturnMessage() { + return returnMessage; + } + + public void setReturnMessage(String returnMessage) { + this.returnMessage = returnMessage; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCancelResponseServiceresponseResponsepreamble orderCancelResponseServiceresponseResponsepreamble = (OrderCancelResponseServiceresponseResponsepreamble) o; + return Objects.equals(this.requestStatus, orderCancelResponseServiceresponseResponsepreamble.requestStatus) && + Objects.equals(this.returnCode, orderCancelResponseServiceresponseResponsepreamble.returnCode) && + Objects.equals(this.returnMessage, orderCancelResponseServiceresponseResponsepreamble.returnMessage); + } + + @Override + public int hashCode() { + return Objects.hash(requestStatus, returnCode, returnMessage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCancelResponseServiceresponseResponsepreamble {\n"); + sb.append(" requestStatus: ").append(toIndentedString(requestStatus)).append("\n"); + sb.append(" returnCode: ").append(toIndentedString(returnCode)).append("\n"); + sb.append(" returnMessage: ").append(toIndentedString(returnMessage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("requestStatus"); + openapiFields.add("returnCode"); + openapiFields.add("returnMessage"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCancelResponseServiceresponseResponsepreamble + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCancelResponseServiceresponseResponsepreamble.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCancelResponseServiceresponseResponsepreamble is not found in the empty JSON string", OrderCancelResponseServiceresponseResponsepreamble.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCancelResponseServiceresponseResponsepreamble.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCancelResponseServiceresponseResponsepreamble` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("requestStatus") != null && !jsonObj.get("requestStatus").isJsonNull()) && !jsonObj.get("requestStatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `requestStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestStatus").toString())); + } + if ((jsonObj.get("returnCode") != null && !jsonObj.get("returnCode").isJsonNull()) && !jsonObj.get("returnCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `returnCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("returnCode").toString())); + } + if ((jsonObj.get("returnMessage") != null && !jsonObj.get("returnMessage").isJsonNull()) && !jsonObj.get("returnMessage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `returnMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("returnMessage").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCancelResponseServiceresponseResponsepreamble.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCancelResponseServiceresponseResponsepreamble' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCancelResponseServiceresponseResponsepreamble.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCancelResponseServiceresponseResponsepreamble value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCancelResponseServiceresponseResponsepreamble read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCancelResponseServiceresponseResponsepreamble given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCancelResponseServiceresponseResponsepreamble + * @throws IOException if the JSON string is invalid with respect to OrderCancelResponseServiceresponseResponsepreamble + */ + public static OrderCancelResponseServiceresponseResponsepreamble fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCancelResponseServiceresponseResponsepreamble.class); + } + + /** + * Convert an instance of OrderCancelResponseServiceresponseResponsepreamble to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateRequest.java b/src/main/java/xiresellers/client/model/OrderCreateRequest.java new file mode 100644 index 00000000..410ca22a --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateRequest.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderCreateRequestOrdercreaterequest; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Request schema for order create endpoint + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateRequest { + public static final String SERIALIZED_NAME_ORDERCREATEREQUEST = "ordercreaterequest"; + @SerializedName(SERIALIZED_NAME_ORDERCREATEREQUEST) + private OrderCreateRequestOrdercreaterequest ordercreaterequest; + + public OrderCreateRequest() { + } + + public OrderCreateRequest ordercreaterequest(OrderCreateRequestOrdercreaterequest ordercreaterequest) { + this.ordercreaterequest = ordercreaterequest; + return this; + } + + /** + * Get ordercreaterequest + * @return ordercreaterequest + **/ + @javax.annotation.Nullable + public OrderCreateRequestOrdercreaterequest getOrdercreaterequest() { + return ordercreaterequest; + } + + public void setOrdercreaterequest(OrderCreateRequestOrdercreaterequest ordercreaterequest) { + this.ordercreaterequest = ordercreaterequest; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateRequest orderCreateRequest = (OrderCreateRequest) o; + return Objects.equals(this.ordercreaterequest, orderCreateRequest.ordercreaterequest); + } + + @Override + public int hashCode() { + return Objects.hash(ordercreaterequest); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateRequest {\n"); + sb.append(" ordercreaterequest: ").append(toIndentedString(ordercreaterequest)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("ordercreaterequest"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateRequest is not found in the empty JSON string", OrderCreateRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `ordercreaterequest` + if (jsonObj.get("ordercreaterequest") != null && !jsonObj.get("ordercreaterequest").isJsonNull()) { + OrderCreateRequestOrdercreaterequest.validateJsonElement(jsonObj.get("ordercreaterequest")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateRequest + * @throws IOException if the JSON string is invalid with respect to OrderCreateRequest + */ + public static OrderCreateRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateRequest.class); + } + + /** + * Convert an instance of OrderCreateRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateRequestAdditionalAttributesInner.java b/src/main/java/xiresellers/client/model/OrderCreateRequestAdditionalAttributesInner.java new file mode 100644 index 00000000..9cb22a46 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateRequestAdditionalAttributesInner.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateRequestAdditionalAttributesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateRequestAdditionalAttributesInner { + public static final String SERIALIZED_NAME_ATTRIBUTE_NAME = "attributeName"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_NAME) + private String attributeName; + + public static final String SERIALIZED_NAME_ATTRIBUTE_VALUE = "attributeValue"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_VALUE) + private String attributeValue; + + public OrderCreateRequestAdditionalAttributesInner() { + } + + public OrderCreateRequestAdditionalAttributesInner attributeName(String attributeName) { + this.attributeName = attributeName; + return this; + } + + /** + * allowPartialOrder: Allow orders with failed lines. (SAP) Depends on backorder settings. DpasRating: DX rating by Department of Defense is the highest rating by the highest offices and meant to be top priority. DO any other gov offices at the federal level to priotize. DpasProgramId: Identifies the actual agency that signed off on the DPAS priority. allowDuplicateCustomerOrderNumber: Allow orders with duplicate customer PO numbers. Enables resellers to have the same PO number for multiple orders. channelCode: Determine storage location for Markeplace(SAP) for different orderTypes. customerPOType: Used for pricing, similar to orderType. Possible SAP values- ZXML and ZWEB. storageLocation: Determine the location of the product stock in SAP for Marketplaces. soldTo: To be used in cases when Sold-To is different than Customer ID. orderType: Order Type[SAP]- ZOR and ZLCN. endUserSearchTerm: Search ID for a end user contact is used in SAP to determine the contact name. Z101: Used for end customer details such as name, address, phone, etc. This information flows to SAP and is used by warehouse. euDepId: DEP ID would be the 'End User DEP/ABM Organization ID' up to 32 characters and is assigned by Apple. depOrderNbr: depordernbr is 'End User PO to reseller' Can appear in message lines or dedicated end user po#. govtProgramType: Program type, “PA” for government orders, “ED” for education order. govtEndUserType: Type of end user of the program. F = Federal, S = State, E = Local, K = K-12 school, and H = Higher Education govtSolicitationNumber: Education order’s contract number govtPublicPrivateCode: Determines TAX / NO TAX. 'P' PUBLIC SECTOR, 'R' PRIVATE SECTOR. Value needs only to be provided for EDUCATION order. govtEndUserData: Name of the End user of the program. For example, STATE OF OHIO, CHICAGO SCHOOLDISTRICT etc. govtEndUserPostalCode: 9 CHAR FIELD / Zip Code of the End user of the order. dynamicMessageLine1: Custom Dynamic Message line 1. allowOrderOnCustomerHold: Boolean value flag which allows a customer to create an order with the hold status. + * @return attributeName + **/ + @javax.annotation.Nullable + public String getAttributeName() { + return attributeName; + } + + public void setAttributeName(String attributeName) { + this.attributeName = attributeName; + } + + + public OrderCreateRequestAdditionalAttributesInner attributeValue(String attributeValue) { + this.attributeValue = attributeValue; + return this; + } + + /** + * attributefield data + * @return attributeValue + **/ + @javax.annotation.Nullable + public String getAttributeValue() { + return attributeValue; + } + + public void setAttributeValue(String attributeValue) { + this.attributeValue = attributeValue; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateRequestAdditionalAttributesInner orderCreateRequestAdditionalAttributesInner = (OrderCreateRequestAdditionalAttributesInner) o; + return Objects.equals(this.attributeName, orderCreateRequestAdditionalAttributesInner.attributeName) && + Objects.equals(this.attributeValue, orderCreateRequestAdditionalAttributesInner.attributeValue); + } + + @Override + public int hashCode() { + return Objects.hash(attributeName, attributeValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateRequestAdditionalAttributesInner {\n"); + sb.append(" attributeName: ").append(toIndentedString(attributeName)).append("\n"); + sb.append(" attributeValue: ").append(toIndentedString(attributeValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributeName"); + openapiFields.add("attributeValue"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateRequestAdditionalAttributesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateRequestAdditionalAttributesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateRequestAdditionalAttributesInner is not found in the empty JSON string", OrderCreateRequestAdditionalAttributesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateRequestAdditionalAttributesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateRequestAdditionalAttributesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("attributeName") != null && !jsonObj.get("attributeName").isJsonNull()) && !jsonObj.get("attributeName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeName").toString())); + } + if ((jsonObj.get("attributeValue") != null && !jsonObj.get("attributeValue").isJsonNull()) && !jsonObj.get("attributeValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeValue").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateRequestAdditionalAttributesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateRequestAdditionalAttributesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateRequestAdditionalAttributesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateRequestAdditionalAttributesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateRequestAdditionalAttributesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateRequestAdditionalAttributesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateRequestAdditionalAttributesInner + * @throws IOException if the JSON string is invalid with respect to OrderCreateRequestAdditionalAttributesInner + */ + public static OrderCreateRequestAdditionalAttributesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateRequestAdditionalAttributesInner.class); + } + + /** + * Convert an instance of OrderCreateRequestAdditionalAttributesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateRequestEndUserInfo.java b/src/main/java/xiresellers/client/model/OrderCreateRequestEndUserInfo.java new file mode 100644 index 00000000..df3ce634 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateRequestEndUserInfo.java @@ -0,0 +1,609 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * The contact information for the end user/customer provided by the reseller. Used to determine pricing and discounts. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateRequestEndUserInfo { + public static final String SERIALIZED_NAME_END_USER_ID = "endUserId"; + @SerializedName(SERIALIZED_NAME_END_USER_ID) + private String endUserId; + + public static final String SERIALIZED_NAME_CONTACT = "contact"; + @SerializedName(SERIALIZED_NAME_CONTACT) + private String contact; + + public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; + @SerializedName(SERIALIZED_NAME_COMPANY_NAME) + private String companyName; + + public static final String SERIALIZED_NAME_NAME1 = "name1"; + @SerializedName(SERIALIZED_NAME_NAME1) + private String name1; + + public static final String SERIALIZED_NAME_NAME2 = "name2"; + @SerializedName(SERIALIZED_NAME_NAME2) + private String name2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE1 = "addressLine1"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE1) + private String addressLine1; + + public static final String SERIALIZED_NAME_ADDRESS_LINE2 = "addressLine2"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE2) + private String addressLine2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE3 = "addressLine3"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE3) + private String addressLine3; + + public static final String SERIALIZED_NAME_ADDRESS_LINE4 = "addressLine4"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE4) + private String addressLine4; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; + @SerializedName(SERIALIZED_NAME_POSTAL_CODE) + private String postalCode; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) + private Integer phoneNumber; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public OrderCreateRequestEndUserInfo() { + } + + public OrderCreateRequestEndUserInfo endUserId(String endUserId) { + this.endUserId = endUserId; + return this; + } + + /** + * ID for the end user/customer in Ingram Micro's system. + * @return endUserId + **/ + @javax.annotation.Nullable + public String getEndUserId() { + return endUserId; + } + + public void setEndUserId(String endUserId) { + this.endUserId = endUserId; + } + + + public OrderCreateRequestEndUserInfo contact(String contact) { + this.contact = contact; + return this; + } + + /** + * The contact name for the end user/customer. + * @return contact + **/ + @javax.annotation.Nullable + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + + public OrderCreateRequestEndUserInfo companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * The company name for the end user/customer. Required for Impulse countries. + * @return companyName + **/ + @javax.annotation.Nullable + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public OrderCreateRequestEndUserInfo name1(String name1) { + this.name1 = name1; + return this; + } + + /** + * name1 + * @return name1 + **/ + @javax.annotation.Nullable + public String getName1() { + return name1; + } + + public void setName1(String name1) { + this.name1 = name1; + } + + + public OrderCreateRequestEndUserInfo name2(String name2) { + this.name2 = name2; + return this; + } + + /** + * name2 + * @return name2 + **/ + @javax.annotation.Nullable + public String getName2() { + return name2; + } + + public void setName2(String name2) { + this.name2 = name2; + } + + + public OrderCreateRequestEndUserInfo addressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + return this; + } + + /** + * The end user/customer's street address and building or house number. Required for Impulse countries. + * @return addressLine1 + **/ + @javax.annotation.Nullable + public String getAddressLine1() { + return addressLine1; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + + public OrderCreateRequestEndUserInfo addressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + return this; + } + + /** + * The end user/customer's apartment number. + * @return addressLine2 + **/ + @javax.annotation.Nullable + public String getAddressLine2() { + return addressLine2; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + + public OrderCreateRequestEndUserInfo addressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + return this; + } + + /** + * Line 3 of the address for the end user/customer. + * @return addressLine3 + **/ + @javax.annotation.Nullable + public String getAddressLine3() { + return addressLine3; + } + + public void setAddressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + } + + + public OrderCreateRequestEndUserInfo addressLine4(String addressLine4) { + this.addressLine4 = addressLine4; + return this; + } + + /** + * Street address4 + * @return addressLine4 + **/ + @javax.annotation.Nullable + public String getAddressLine4() { + return addressLine4; + } + + public void setAddressLine4(String addressLine4) { + this.addressLine4 = addressLine4; + } + + + public OrderCreateRequestEndUserInfo city(String city) { + this.city = city; + return this; + } + + /** + * The end user/customer's city. Required for Impulse countries. + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public OrderCreateRequestEndUserInfo state(String state) { + this.state = state; + return this; + } + + /** + * The end user/customer's state. Required for Impulse countries but optional for EMEA countries. + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public OrderCreateRequestEndUserInfo postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * The end user/customer's zip or postal code. Required for Impulse countries. + * @return postalCode + **/ + @javax.annotation.Nullable + public String getPostalCode() { + return postalCode; + } + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public OrderCreateRequestEndUserInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * The end user/customer's two-character ISO country code. + * @return countryCode + **/ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public OrderCreateRequestEndUserInfo phoneNumber(Integer phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * The end user/customer's phone number. + * @return phoneNumber + **/ + @javax.annotation.Nullable + public Integer getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(Integer phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public OrderCreateRequestEndUserInfo email(String email) { + this.email = email; + return this; + } + + /** + * The end user/customer's email. + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateRequestEndUserInfo orderCreateRequestEndUserInfo = (OrderCreateRequestEndUserInfo) o; + return Objects.equals(this.endUserId, orderCreateRequestEndUserInfo.endUserId) && + Objects.equals(this.contact, orderCreateRequestEndUserInfo.contact) && + Objects.equals(this.companyName, orderCreateRequestEndUserInfo.companyName) && + Objects.equals(this.name1, orderCreateRequestEndUserInfo.name1) && + Objects.equals(this.name2, orderCreateRequestEndUserInfo.name2) && + Objects.equals(this.addressLine1, orderCreateRequestEndUserInfo.addressLine1) && + Objects.equals(this.addressLine2, orderCreateRequestEndUserInfo.addressLine2) && + Objects.equals(this.addressLine3, orderCreateRequestEndUserInfo.addressLine3) && + Objects.equals(this.addressLine4, orderCreateRequestEndUserInfo.addressLine4) && + Objects.equals(this.city, orderCreateRequestEndUserInfo.city) && + Objects.equals(this.state, orderCreateRequestEndUserInfo.state) && + Objects.equals(this.postalCode, orderCreateRequestEndUserInfo.postalCode) && + Objects.equals(this.countryCode, orderCreateRequestEndUserInfo.countryCode) && + Objects.equals(this.phoneNumber, orderCreateRequestEndUserInfo.phoneNumber) && + Objects.equals(this.email, orderCreateRequestEndUserInfo.email); + } + + @Override + public int hashCode() { + return Objects.hash(endUserId, contact, companyName, name1, name2, addressLine1, addressLine2, addressLine3, addressLine4, city, state, postalCode, countryCode, phoneNumber, email); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateRequestEndUserInfo {\n"); + sb.append(" endUserId: ").append(toIndentedString(endUserId)).append("\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" name1: ").append(toIndentedString(name1)).append("\n"); + sb.append(" name2: ").append(toIndentedString(name2)).append("\n"); + sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); + sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); + sb.append(" addressLine3: ").append(toIndentedString(addressLine3)).append("\n"); + sb.append(" addressLine4: ").append(toIndentedString(addressLine4)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("endUserId"); + openapiFields.add("contact"); + openapiFields.add("companyName"); + openapiFields.add("name1"); + openapiFields.add("name2"); + openapiFields.add("addressLine1"); + openapiFields.add("addressLine2"); + openapiFields.add("addressLine3"); + openapiFields.add("addressLine4"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalCode"); + openapiFields.add("countryCode"); + openapiFields.add("phoneNumber"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateRequestEndUserInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateRequestEndUserInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateRequestEndUserInfo is not found in the empty JSON string", OrderCreateRequestEndUserInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateRequestEndUserInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateRequestEndUserInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("endUserId") != null && !jsonObj.get("endUserId").isJsonNull()) && !jsonObj.get("endUserId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endUserId").toString())); + } + if ((jsonObj.get("contact") != null && !jsonObj.get("contact").isJsonNull()) && !jsonObj.get("contact").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contact` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact").toString())); + } + if ((jsonObj.get("companyName") != null && !jsonObj.get("companyName").isJsonNull()) && !jsonObj.get("companyName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); + } + if ((jsonObj.get("name1") != null && !jsonObj.get("name1").isJsonNull()) && !jsonObj.get("name1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name1").toString())); + } + if ((jsonObj.get("name2") != null && !jsonObj.get("name2").isJsonNull()) && !jsonObj.get("name2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name2").toString())); + } + if ((jsonObj.get("addressLine1") != null && !jsonObj.get("addressLine1").isJsonNull()) && !jsonObj.get("addressLine1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine1").toString())); + } + if ((jsonObj.get("addressLine2") != null && !jsonObj.get("addressLine2").isJsonNull()) && !jsonObj.get("addressLine2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine2").toString())); + } + if ((jsonObj.get("addressLine3") != null && !jsonObj.get("addressLine3").isJsonNull()) && !jsonObj.get("addressLine3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine3").toString())); + } + if ((jsonObj.get("addressLine4") != null && !jsonObj.get("addressLine4").isJsonNull()) && !jsonObj.get("addressLine4").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine4` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine4").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateRequestEndUserInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateRequestEndUserInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateRequestEndUserInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateRequestEndUserInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateRequestEndUserInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateRequestEndUserInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateRequestEndUserInfo + * @throws IOException if the JSON string is invalid with respect to OrderCreateRequestEndUserInfo + */ + public static OrderCreateRequestEndUserInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateRequestEndUserInfo.class); + } + + /** + * Convert an instance of OrderCreateRequestEndUserInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateRequestLinesInner.java b/src/main/java/xiresellers/client/model/OrderCreateRequestLinesInner.java new file mode 100644 index 00000000..d61aa86a --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateRequestLinesInner.java @@ -0,0 +1,521 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderCreateRequestLinesInnerAdditionalAttributesInner; +import xiresellers.client.model.OrderCreateRequestLinesInnerEndUserInfoInner; +import xiresellers.client.model.OrderCreateRequestLinesInnerWarrantyInfoInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateRequestLinesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateRequestLinesInner { + public static final String SERIALIZED_NAME_CUSTOMER_LINE_NUMBER = "customerLineNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_LINE_NUMBER) + private String customerLineNumber; + + public static final String SERIALIZED_NAME_INGRAM_PART_NUMBER = "ingramPartNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PART_NUMBER) + private String ingramPartNumber; + + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + @SerializedName(SERIALIZED_NAME_QUANTITY) + private Integer quantity; + + public static final String SERIALIZED_NAME_SPECIAL_BID_NUMBER = "specialBidNumber"; + @SerializedName(SERIALIZED_NAME_SPECIAL_BID_NUMBER) + private String specialBidNumber; + + public static final String SERIALIZED_NAME_NOTES = "notes"; + @SerializedName(SERIALIZED_NAME_NOTES) + private String notes; + + public static final String SERIALIZED_NAME_UNIT_PRICE = "unitPrice"; + @SerializedName(SERIALIZED_NAME_UNIT_PRICE) + private BigDecimal unitPrice; + + public static final String SERIALIZED_NAME_END_USER_PRICE = "endUserPrice"; + @SerializedName(SERIALIZED_NAME_END_USER_PRICE) + private BigDecimal endUserPrice; + + public static final String SERIALIZED_NAME_ADDITIONAL_ATTRIBUTES = "additionalAttributes"; + @SerializedName(SERIALIZED_NAME_ADDITIONAL_ATTRIBUTES) + private List additionalAttributes; + + public static final String SERIALIZED_NAME_WARRANTY_INFO = "warrantyInfo"; + @SerializedName(SERIALIZED_NAME_WARRANTY_INFO) + private List warrantyInfo; + + public static final String SERIALIZED_NAME_END_USER_INFO = "endUserInfo"; + @SerializedName(SERIALIZED_NAME_END_USER_INFO) + private List endUserInfo; + + public OrderCreateRequestLinesInner() { + } + + public OrderCreateRequestLinesInner customerLineNumber(String customerLineNumber) { + this.customerLineNumber = customerLineNumber; + return this; + } + + /** + * The reseller's line item number for reference in their system. The customer line number needs to be a unique numeric value between 1 and 884. In the event we receive duplicate values or alphanumeric values in the customer line number, we will re-sequence the customer line number. To prevent re-sequencing, please use a unique numeric value between 1 and 884 in the customer line number. + * @return customerLineNumber + **/ + @javax.annotation.Nullable + public String getCustomerLineNumber() { + return customerLineNumber; + } + + public void setCustomerLineNumber(String customerLineNumber) { + this.customerLineNumber = customerLineNumber; + } + + + public OrderCreateRequestLinesInner ingramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + return this; + } + + /** + * The unique IngramMicro part number. + * @return ingramPartNumber + **/ + @javax.annotation.Nullable + public String getIngramPartNumber() { + return ingramPartNumber; + } + + public void setIngramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + } + + + public OrderCreateRequestLinesInner quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * The requested quantity of the line item. + * @return quantity + **/ + @javax.annotation.Nullable + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + + public OrderCreateRequestLinesInner specialBidNumber(String specialBidNumber) { + this.specialBidNumber = specialBidNumber; + return this; + } + + /** + * The line-level bid number provided to the reseller by the vendor for special pricing and discounts. Used to track the bid number in the case of split orders or where different line items have different bid numbers. Line-level bid number take precedence over header-level bid numbers. + * @return specialBidNumber + **/ + @javax.annotation.Nullable + public String getSpecialBidNumber() { + return specialBidNumber; + } + + public void setSpecialBidNumber(String specialBidNumber) { + this.specialBidNumber = specialBidNumber; + } + + + public OrderCreateRequestLinesInner notes(String notes) { + this.notes = notes; + return this; + } + + /** + * Line-level notes. + * @return notes + **/ + @javax.annotation.Nullable + public String getNotes() { + return notes; + } + + public void setNotes(String notes) { + this.notes = notes; + } + + + public OrderCreateRequestLinesInner unitPrice(BigDecimal unitPrice) { + this.unitPrice = unitPrice; + return this; + } + + /** + * The reseller-requested unit price for the line item. The unit price is not guaranteed. + * @return unitPrice + **/ + @javax.annotation.Nullable + public BigDecimal getUnitPrice() { + return unitPrice; + } + + public void setUnitPrice(BigDecimal unitPrice) { + this.unitPrice = unitPrice; + } + + + public OrderCreateRequestLinesInner endUserPrice(BigDecimal endUserPrice) { + this.endUserPrice = endUserPrice; + return this; + } + + /** + * The end user price. + * @return endUserPrice + **/ + @javax.annotation.Nullable + public BigDecimal getEndUserPrice() { + return endUserPrice; + } + + public void setEndUserPrice(BigDecimal endUserPrice) { + this.endUserPrice = endUserPrice; + } + + + public OrderCreateRequestLinesInner additionalAttributes(List additionalAttributes) { + this.additionalAttributes = additionalAttributes; + return this; + } + + public OrderCreateRequestLinesInner addAdditionalAttributesItem(OrderCreateRequestLinesInnerAdditionalAttributesInner additionalAttributesItem) { + if (this.additionalAttributes == null) { + this.additionalAttributes = new ArrayList<>(); + } + this.additionalAttributes.add(additionalAttributesItem); + return this; + } + + /** + * Get additionalAttributes + * @return additionalAttributes + **/ + @javax.annotation.Nullable + public List getAdditionalAttributes() { + return additionalAttributes; + } + + public void setAdditionalAttributes(List additionalAttributes) { + this.additionalAttributes = additionalAttributes; + } + + + public OrderCreateRequestLinesInner warrantyInfo(List warrantyInfo) { + this.warrantyInfo = warrantyInfo; + return this; + } + + public OrderCreateRequestLinesInner addWarrantyInfoItem(OrderCreateRequestLinesInnerWarrantyInfoInner warrantyInfoItem) { + if (this.warrantyInfo == null) { + this.warrantyInfo = new ArrayList<>(); + } + this.warrantyInfo.add(warrantyInfoItem); + return this; + } + + /** + * Warranty details for the line. This is required in case of warranty orders. + * @return warrantyInfo + **/ + @javax.annotation.Nullable + public List getWarrantyInfo() { + return warrantyInfo; + } + + public void setWarrantyInfo(List warrantyInfo) { + this.warrantyInfo = warrantyInfo; + } + + + public OrderCreateRequestLinesInner endUserInfo(List endUserInfo) { + this.endUserInfo = endUserInfo; + return this; + } + + public OrderCreateRequestLinesInner addEndUserInfoItem(OrderCreateRequestLinesInnerEndUserInfoInner endUserInfoItem) { + if (this.endUserInfo == null) { + this.endUserInfo = new ArrayList<>(); + } + this.endUserInfo.add(endUserInfoItem); + return this; + } + + /** + * Get endUserInfo + * @return endUserInfo + **/ + @javax.annotation.Nullable + public List getEndUserInfo() { + return endUserInfo; + } + + public void setEndUserInfo(List endUserInfo) { + this.endUserInfo = endUserInfo; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateRequestLinesInner orderCreateRequestLinesInner = (OrderCreateRequestLinesInner) o; + return Objects.equals(this.customerLineNumber, orderCreateRequestLinesInner.customerLineNumber) && + Objects.equals(this.ingramPartNumber, orderCreateRequestLinesInner.ingramPartNumber) && + Objects.equals(this.quantity, orderCreateRequestLinesInner.quantity) && + Objects.equals(this.specialBidNumber, orderCreateRequestLinesInner.specialBidNumber) && + Objects.equals(this.notes, orderCreateRequestLinesInner.notes) && + Objects.equals(this.unitPrice, orderCreateRequestLinesInner.unitPrice) && + Objects.equals(this.endUserPrice, orderCreateRequestLinesInner.endUserPrice) && + Objects.equals(this.additionalAttributes, orderCreateRequestLinesInner.additionalAttributes) && + Objects.equals(this.warrantyInfo, orderCreateRequestLinesInner.warrantyInfo) && + Objects.equals(this.endUserInfo, orderCreateRequestLinesInner.endUserInfo); + } + + @Override + public int hashCode() { + return Objects.hash(customerLineNumber, ingramPartNumber, quantity, specialBidNumber, notes, unitPrice, endUserPrice, additionalAttributes, warrantyInfo, endUserInfo); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateRequestLinesInner {\n"); + sb.append(" customerLineNumber: ").append(toIndentedString(customerLineNumber)).append("\n"); + sb.append(" ingramPartNumber: ").append(toIndentedString(ingramPartNumber)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" specialBidNumber: ").append(toIndentedString(specialBidNumber)).append("\n"); + sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); + sb.append(" unitPrice: ").append(toIndentedString(unitPrice)).append("\n"); + sb.append(" endUserPrice: ").append(toIndentedString(endUserPrice)).append("\n"); + sb.append(" additionalAttributes: ").append(toIndentedString(additionalAttributes)).append("\n"); + sb.append(" warrantyInfo: ").append(toIndentedString(warrantyInfo)).append("\n"); + sb.append(" endUserInfo: ").append(toIndentedString(endUserInfo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("customerLineNumber"); + openapiFields.add("ingramPartNumber"); + openapiFields.add("quantity"); + openapiFields.add("specialBidNumber"); + openapiFields.add("notes"); + openapiFields.add("unitPrice"); + openapiFields.add("endUserPrice"); + openapiFields.add("additionalAttributes"); + openapiFields.add("warrantyInfo"); + openapiFields.add("endUserInfo"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateRequestLinesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateRequestLinesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateRequestLinesInner is not found in the empty JSON string", OrderCreateRequestLinesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateRequestLinesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateRequestLinesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("customerLineNumber") != null && !jsonObj.get("customerLineNumber").isJsonNull()) && !jsonObj.get("customerLineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerLineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerLineNumber").toString())); + } + if ((jsonObj.get("ingramPartNumber") != null && !jsonObj.get("ingramPartNumber").isJsonNull()) && !jsonObj.get("ingramPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPartNumber").toString())); + } + if ((jsonObj.get("specialBidNumber") != null && !jsonObj.get("specialBidNumber").isJsonNull()) && !jsonObj.get("specialBidNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `specialBidNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("specialBidNumber").toString())); + } + if ((jsonObj.get("notes") != null && !jsonObj.get("notes").isJsonNull()) && !jsonObj.get("notes").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `notes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("notes").toString())); + } + if (jsonObj.get("additionalAttributes") != null && !jsonObj.get("additionalAttributes").isJsonNull()) { + JsonArray jsonArrayadditionalAttributes = jsonObj.getAsJsonArray("additionalAttributes"); + if (jsonArrayadditionalAttributes != null) { + // ensure the json data is an array + if (!jsonObj.get("additionalAttributes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `additionalAttributes` to be an array in the JSON string but got `%s`", jsonObj.get("additionalAttributes").toString())); + } + + // validate the optional field `additionalAttributes` (array) + for (int i = 0; i < jsonArrayadditionalAttributes.size(); i++) { + OrderCreateRequestLinesInnerAdditionalAttributesInner.validateJsonElement(jsonArrayadditionalAttributes.get(i)); + }; + } + } + if (jsonObj.get("warrantyInfo") != null && !jsonObj.get("warrantyInfo").isJsonNull()) { + JsonArray jsonArraywarrantyInfo = jsonObj.getAsJsonArray("warrantyInfo"); + if (jsonArraywarrantyInfo != null) { + // ensure the json data is an array + if (!jsonObj.get("warrantyInfo").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warrantyInfo` to be an array in the JSON string but got `%s`", jsonObj.get("warrantyInfo").toString())); + } + + // validate the optional field `warrantyInfo` (array) + for (int i = 0; i < jsonArraywarrantyInfo.size(); i++) { + OrderCreateRequestLinesInnerWarrantyInfoInner.validateJsonElement(jsonArraywarrantyInfo.get(i)); + }; + } + } + if (jsonObj.get("endUserInfo") != null && !jsonObj.get("endUserInfo").isJsonNull()) { + JsonArray jsonArrayendUserInfo = jsonObj.getAsJsonArray("endUserInfo"); + if (jsonArrayendUserInfo != null) { + // ensure the json data is an array + if (!jsonObj.get("endUserInfo").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `endUserInfo` to be an array in the JSON string but got `%s`", jsonObj.get("endUserInfo").toString())); + } + + // validate the optional field `endUserInfo` (array) + for (int i = 0; i < jsonArrayendUserInfo.size(); i++) { + OrderCreateRequestLinesInnerEndUserInfoInner.validateJsonElement(jsonArrayendUserInfo.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateRequestLinesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateRequestLinesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateRequestLinesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateRequestLinesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateRequestLinesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateRequestLinesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateRequestLinesInner + * @throws IOException if the JSON string is invalid with respect to OrderCreateRequestLinesInner + */ + public static OrderCreateRequestLinesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateRequestLinesInner.class); + } + + /** + * Convert an instance of OrderCreateRequestLinesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateRequestLinesInnerAdditionalAttributesInner.java b/src/main/java/xiresellers/client/model/OrderCreateRequestLinesInnerAdditionalAttributesInner.java new file mode 100644 index 00000000..57484f83 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateRequestLinesInnerAdditionalAttributesInner.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateRequestLinesInnerAdditionalAttributesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateRequestLinesInnerAdditionalAttributesInner { + public static final String SERIALIZED_NAME_ATTRIBUTE_NAME = "attributeName"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_NAME) + private String attributeName; + + public static final String SERIALIZED_NAME_ATTRIBUTE_VALUE = "attributeValue"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_VALUE) + private String attributeValue; + + public OrderCreateRequestLinesInnerAdditionalAttributesInner() { + } + + public OrderCreateRequestLinesInnerAdditionalAttributesInner attributeName(String attributeName) { + this.attributeName = attributeName; + return this; + } + + /** + * SAP requested and country-specific line level details. + * @return attributeName + **/ + @javax.annotation.Nullable + public String getAttributeName() { + return attributeName; + } + + public void setAttributeName(String attributeName) { + this.attributeName = attributeName; + } + + + public OrderCreateRequestLinesInnerAdditionalAttributesInner attributeValue(String attributeValue) { + this.attributeValue = attributeValue; + return this; + } + + /** + * Line-level additional attributes. + * @return attributeValue + **/ + @javax.annotation.Nullable + public String getAttributeValue() { + return attributeValue; + } + + public void setAttributeValue(String attributeValue) { + this.attributeValue = attributeValue; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateRequestLinesInnerAdditionalAttributesInner orderCreateRequestLinesInnerAdditionalAttributesInner = (OrderCreateRequestLinesInnerAdditionalAttributesInner) o; + return Objects.equals(this.attributeName, orderCreateRequestLinesInnerAdditionalAttributesInner.attributeName) && + Objects.equals(this.attributeValue, orderCreateRequestLinesInnerAdditionalAttributesInner.attributeValue); + } + + @Override + public int hashCode() { + return Objects.hash(attributeName, attributeValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateRequestLinesInnerAdditionalAttributesInner {\n"); + sb.append(" attributeName: ").append(toIndentedString(attributeName)).append("\n"); + sb.append(" attributeValue: ").append(toIndentedString(attributeValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributeName"); + openapiFields.add("attributeValue"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateRequestLinesInnerAdditionalAttributesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateRequestLinesInnerAdditionalAttributesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateRequestLinesInnerAdditionalAttributesInner is not found in the empty JSON string", OrderCreateRequestLinesInnerAdditionalAttributesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateRequestLinesInnerAdditionalAttributesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateRequestLinesInnerAdditionalAttributesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("attributeName") != null && !jsonObj.get("attributeName").isJsonNull()) && !jsonObj.get("attributeName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeName").toString())); + } + if ((jsonObj.get("attributeValue") != null && !jsonObj.get("attributeValue").isJsonNull()) && !jsonObj.get("attributeValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeValue").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateRequestLinesInnerAdditionalAttributesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateRequestLinesInnerAdditionalAttributesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateRequestLinesInnerAdditionalAttributesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateRequestLinesInnerAdditionalAttributesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateRequestLinesInnerAdditionalAttributesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateRequestLinesInnerAdditionalAttributesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateRequestLinesInnerAdditionalAttributesInner + * @throws IOException if the JSON string is invalid with respect to OrderCreateRequestLinesInnerAdditionalAttributesInner + */ + public static OrderCreateRequestLinesInnerAdditionalAttributesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateRequestLinesInnerAdditionalAttributesInner.class); + } + + /** + * Convert an instance of OrderCreateRequestLinesInnerAdditionalAttributesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateRequestLinesInnerEndUserInfoInner.java b/src/main/java/xiresellers/client/model/OrderCreateRequestLinesInnerEndUserInfoInner.java new file mode 100644 index 00000000..8b5204f6 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateRequestLinesInnerEndUserInfoInner.java @@ -0,0 +1,639 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateRequestLinesInnerEndUserInfoInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateRequestLinesInnerEndUserInfoInner { + public static final String SERIALIZED_NAME_END_USER_TYPE = "endUserType"; + @SerializedName(SERIALIZED_NAME_END_USER_TYPE) + private String endUserType; + + public static final String SERIALIZED_NAME_END_USER_ID = "endUserId"; + @SerializedName(SERIALIZED_NAME_END_USER_ID) + private String endUserId; + + public static final String SERIALIZED_NAME_CONTACT = "contact"; + @SerializedName(SERIALIZED_NAME_CONTACT) + private String contact; + + public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; + @SerializedName(SERIALIZED_NAME_COMPANY_NAME) + private String companyName; + + public static final String SERIALIZED_NAME_NAME1 = "name1"; + @SerializedName(SERIALIZED_NAME_NAME1) + private String name1; + + public static final String SERIALIZED_NAME_NAME2 = "name2"; + @SerializedName(SERIALIZED_NAME_NAME2) + private String name2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE1 = "addressLine1"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE1) + private String addressLine1; + + public static final String SERIALIZED_NAME_ADDRESS_LINE2 = "addressLine2"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE2) + private String addressLine2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE3 = "addressLine3"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE3) + private String addressLine3; + + public static final String SERIALIZED_NAME_ADDRESS_LINE4 = "addressLine4"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE4) + private String addressLine4; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; + @SerializedName(SERIALIZED_NAME_POSTAL_CODE) + private String postalCode; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) + private BigDecimal phoneNumber; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public OrderCreateRequestLinesInnerEndUserInfoInner() { + } + + public OrderCreateRequestLinesInnerEndUserInfoInner endUserType(String endUserType) { + this.endUserType = endUserType; + return this; + } + + /** + * Specifies the type of endUser. It can be endUser or endUserContact for SAP flow. + * @return endUserType + **/ + @javax.annotation.Nullable + public String getEndUserType() { + return endUserType; + } + + public void setEndUserType(String endUserType) { + this.endUserType = endUserType; + } + + + public OrderCreateRequestLinesInnerEndUserInfoInner endUserId(String endUserId) { + this.endUserId = endUserId; + return this; + } + + /** + * ID for the end user/customer in Ingram Micro's system. + * @return endUserId + **/ + @javax.annotation.Nullable + public String getEndUserId() { + return endUserId; + } + + public void setEndUserId(String endUserId) { + this.endUserId = endUserId; + } + + + public OrderCreateRequestLinesInnerEndUserInfoInner contact(String contact) { + this.contact = contact; + return this; + } + + /** + * The contact name for the end user/customer. + * @return contact + **/ + @javax.annotation.Nullable + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + + public OrderCreateRequestLinesInnerEndUserInfoInner companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * The company name for the end user/customer. + * @return companyName + **/ + @javax.annotation.Nullable + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public OrderCreateRequestLinesInnerEndUserInfoInner name1(String name1) { + this.name1 = name1; + return this; + } + + /** + * name1 + * @return name1 + **/ + @javax.annotation.Nullable + public String getName1() { + return name1; + } + + public void setName1(String name1) { + this.name1 = name1; + } + + + public OrderCreateRequestLinesInnerEndUserInfoInner name2(String name2) { + this.name2 = name2; + return this; + } + + /** + * name2 + * @return name2 + **/ + @javax.annotation.Nullable + public String getName2() { + return name2; + } + + public void setName2(String name2) { + this.name2 = name2; + } + + + public OrderCreateRequestLinesInnerEndUserInfoInner addressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + return this; + } + + /** + * The end user/customer's street address and building or house number. + * @return addressLine1 + **/ + @javax.annotation.Nullable + public String getAddressLine1() { + return addressLine1; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + + public OrderCreateRequestLinesInnerEndUserInfoInner addressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + return this; + } + + /** + * The end user/customer's apartment number. + * @return addressLine2 + **/ + @javax.annotation.Nullable + public String getAddressLine2() { + return addressLine2; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + + public OrderCreateRequestLinesInnerEndUserInfoInner addressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + return this; + } + + /** + * Line 3 of the address for the end user/customer. + * @return addressLine3 + **/ + @javax.annotation.Nullable + public String getAddressLine3() { + return addressLine3; + } + + public void setAddressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + } + + + public OrderCreateRequestLinesInnerEndUserInfoInner addressLine4(String addressLine4) { + this.addressLine4 = addressLine4; + return this; + } + + /** + * Street address4 + * @return addressLine4 + **/ + @javax.annotation.Nullable + public String getAddressLine4() { + return addressLine4; + } + + public void setAddressLine4(String addressLine4) { + this.addressLine4 = addressLine4; + } + + + public OrderCreateRequestLinesInnerEndUserInfoInner city(String city) { + this.city = city; + return this; + } + + /** + * The end user/customer's city. + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public OrderCreateRequestLinesInnerEndUserInfoInner state(String state) { + this.state = state; + return this; + } + + /** + * The end user/customer's state. + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public OrderCreateRequestLinesInnerEndUserInfoInner postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * The end user/customer's zip or postal code. + * @return postalCode + **/ + @javax.annotation.Nullable + public String getPostalCode() { + return postalCode; + } + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public OrderCreateRequestLinesInnerEndUserInfoInner countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * The end user/customer's two-character ISO country code. + * @return countryCode + **/ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public OrderCreateRequestLinesInnerEndUserInfoInner phoneNumber(BigDecimal phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * The end user/customer's phone number. + * @return phoneNumber + **/ + @javax.annotation.Nullable + public BigDecimal getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(BigDecimal phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public OrderCreateRequestLinesInnerEndUserInfoInner email(String email) { + this.email = email; + return this; + } + + /** + * The end user/customer's email. + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateRequestLinesInnerEndUserInfoInner orderCreateRequestLinesInnerEndUserInfoInner = (OrderCreateRequestLinesInnerEndUserInfoInner) o; + return Objects.equals(this.endUserType, orderCreateRequestLinesInnerEndUserInfoInner.endUserType) && + Objects.equals(this.endUserId, orderCreateRequestLinesInnerEndUserInfoInner.endUserId) && + Objects.equals(this.contact, orderCreateRequestLinesInnerEndUserInfoInner.contact) && + Objects.equals(this.companyName, orderCreateRequestLinesInnerEndUserInfoInner.companyName) && + Objects.equals(this.name1, orderCreateRequestLinesInnerEndUserInfoInner.name1) && + Objects.equals(this.name2, orderCreateRequestLinesInnerEndUserInfoInner.name2) && + Objects.equals(this.addressLine1, orderCreateRequestLinesInnerEndUserInfoInner.addressLine1) && + Objects.equals(this.addressLine2, orderCreateRequestLinesInnerEndUserInfoInner.addressLine2) && + Objects.equals(this.addressLine3, orderCreateRequestLinesInnerEndUserInfoInner.addressLine3) && + Objects.equals(this.addressLine4, orderCreateRequestLinesInnerEndUserInfoInner.addressLine4) && + Objects.equals(this.city, orderCreateRequestLinesInnerEndUserInfoInner.city) && + Objects.equals(this.state, orderCreateRequestLinesInnerEndUserInfoInner.state) && + Objects.equals(this.postalCode, orderCreateRequestLinesInnerEndUserInfoInner.postalCode) && + Objects.equals(this.countryCode, orderCreateRequestLinesInnerEndUserInfoInner.countryCode) && + Objects.equals(this.phoneNumber, orderCreateRequestLinesInnerEndUserInfoInner.phoneNumber) && + Objects.equals(this.email, orderCreateRequestLinesInnerEndUserInfoInner.email); + } + + @Override + public int hashCode() { + return Objects.hash(endUserType, endUserId, contact, companyName, name1, name2, addressLine1, addressLine2, addressLine3, addressLine4, city, state, postalCode, countryCode, phoneNumber, email); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateRequestLinesInnerEndUserInfoInner {\n"); + sb.append(" endUserType: ").append(toIndentedString(endUserType)).append("\n"); + sb.append(" endUserId: ").append(toIndentedString(endUserId)).append("\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" name1: ").append(toIndentedString(name1)).append("\n"); + sb.append(" name2: ").append(toIndentedString(name2)).append("\n"); + sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); + sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); + sb.append(" addressLine3: ").append(toIndentedString(addressLine3)).append("\n"); + sb.append(" addressLine4: ").append(toIndentedString(addressLine4)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("endUserType"); + openapiFields.add("endUserId"); + openapiFields.add("contact"); + openapiFields.add("companyName"); + openapiFields.add("name1"); + openapiFields.add("name2"); + openapiFields.add("addressLine1"); + openapiFields.add("addressLine2"); + openapiFields.add("addressLine3"); + openapiFields.add("addressLine4"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalCode"); + openapiFields.add("countryCode"); + openapiFields.add("phoneNumber"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateRequestLinesInnerEndUserInfoInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateRequestLinesInnerEndUserInfoInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateRequestLinesInnerEndUserInfoInner is not found in the empty JSON string", OrderCreateRequestLinesInnerEndUserInfoInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateRequestLinesInnerEndUserInfoInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateRequestLinesInnerEndUserInfoInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("endUserType") != null && !jsonObj.get("endUserType").isJsonNull()) && !jsonObj.get("endUserType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endUserType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endUserType").toString())); + } + if ((jsonObj.get("endUserId") != null && !jsonObj.get("endUserId").isJsonNull()) && !jsonObj.get("endUserId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endUserId").toString())); + } + if ((jsonObj.get("contact") != null && !jsonObj.get("contact").isJsonNull()) && !jsonObj.get("contact").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contact` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact").toString())); + } + if ((jsonObj.get("companyName") != null && !jsonObj.get("companyName").isJsonNull()) && !jsonObj.get("companyName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); + } + if ((jsonObj.get("name1") != null && !jsonObj.get("name1").isJsonNull()) && !jsonObj.get("name1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name1").toString())); + } + if ((jsonObj.get("name2") != null && !jsonObj.get("name2").isJsonNull()) && !jsonObj.get("name2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name2").toString())); + } + if ((jsonObj.get("addressLine1") != null && !jsonObj.get("addressLine1").isJsonNull()) && !jsonObj.get("addressLine1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine1").toString())); + } + if ((jsonObj.get("addressLine2") != null && !jsonObj.get("addressLine2").isJsonNull()) && !jsonObj.get("addressLine2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine2").toString())); + } + if ((jsonObj.get("addressLine3") != null && !jsonObj.get("addressLine3").isJsonNull()) && !jsonObj.get("addressLine3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine3").toString())); + } + if ((jsonObj.get("addressLine4") != null && !jsonObj.get("addressLine4").isJsonNull()) && !jsonObj.get("addressLine4").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine4` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine4").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateRequestLinesInnerEndUserInfoInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateRequestLinesInnerEndUserInfoInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateRequestLinesInnerEndUserInfoInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateRequestLinesInnerEndUserInfoInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateRequestLinesInnerEndUserInfoInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateRequestLinesInnerEndUserInfoInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateRequestLinesInnerEndUserInfoInner + * @throws IOException if the JSON string is invalid with respect to OrderCreateRequestLinesInnerEndUserInfoInner + */ + public static OrderCreateRequestLinesInnerEndUserInfoInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateRequestLinesInnerEndUserInfoInner.class); + } + + /** + * Convert an instance of OrderCreateRequestLinesInnerEndUserInfoInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateRequestLinesInnerWarrantyInfoInner.java b/src/main/java/xiresellers/client/model/OrderCreateRequestLinesInnerWarrantyInfoInner.java new file mode 100644 index 00000000..c2255bdd --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateRequestLinesInnerWarrantyInfoInner.java @@ -0,0 +1,315 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateRequestLinesInnerWarrantyInfoInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateRequestLinesInnerWarrantyInfoInner { + public static final String SERIALIZED_NAME_DIRECT_LINE_LINK = "directLineLink"; + @SerializedName(SERIALIZED_NAME_DIRECT_LINE_LINK) + private String directLineLink; + + public static final String SERIALIZED_NAME_WARRANTY_LINE_LINK = "warrantyLineLink"; + @SerializedName(SERIALIZED_NAME_WARRANTY_LINE_LINK) + private String warrantyLineLink; + + public static final String SERIALIZED_NAME_HARDWARE_LINE_LINK = "hardwareLineLink"; + @SerializedName(SERIALIZED_NAME_HARDWARE_LINE_LINK) + private String hardwareLineLink; + + public static final String SERIALIZED_NAME_SERIAL_INFO = "serialInfo"; + @SerializedName(SERIALIZED_NAME_SERIAL_INFO) + private List serialInfo; + + public OrderCreateRequestLinesInnerWarrantyInfoInner() { + } + + public OrderCreateRequestLinesInnerWarrantyInfoInner directLineLink(String directLineLink) { + this.directLineLink = directLineLink; + return this; + } + + /** + * Unique value to link hardware and warranty lines. Should be used only when products are purchased from both Ingram and/or vendor but the warranty is purchased through Ingram for them. + * @return directLineLink + **/ + @javax.annotation.Nullable + public String getDirectLineLink() { + return directLineLink; + } + + public void setDirectLineLink(String directLineLink) { + this.directLineLink = directLineLink; + } + + + public OrderCreateRequestLinesInnerWarrantyInfoInner warrantyLineLink(String warrantyLineLink) { + this.warrantyLineLink = warrantyLineLink; + return this; + } + + /** + * Customer line number of the hardware product in this request for linkage, either hardwareLineLink or warrantyLineLink can be used in a line. + * @return warrantyLineLink + **/ + @javax.annotation.Nullable + public String getWarrantyLineLink() { + return warrantyLineLink; + } + + public void setWarrantyLineLink(String warrantyLineLink) { + this.warrantyLineLink = warrantyLineLink; + } + + + public OrderCreateRequestLinesInnerWarrantyInfoInner hardwareLineLink(String hardwareLineLink) { + this.hardwareLineLink = hardwareLineLink; + return this; + } + + /** + * Customer line number of the warranty product in this request for linkage, either hardwareLineLink or warrantyLineLink can be used in a line + * @return hardwareLineLink + **/ + @javax.annotation.Nullable + public String getHardwareLineLink() { + return hardwareLineLink; + } + + public void setHardwareLineLink(String hardwareLineLink) { + this.hardwareLineLink = hardwareLineLink; + } + + + public OrderCreateRequestLinesInnerWarrantyInfoInner serialInfo(List serialInfo) { + this.serialInfo = serialInfo; + return this; + } + + public OrderCreateRequestLinesInnerWarrantyInfoInner addSerialInfoItem(OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner serialInfoItem) { + if (this.serialInfo == null) { + this.serialInfo = new ArrayList<>(); + } + this.serialInfo.add(serialInfoItem); + return this; + } + + /** + * Serial information of the hardware to be associated with the warranty, applicable on post sale orders. + * @return serialInfo + **/ + @javax.annotation.Nullable + public List getSerialInfo() { + return serialInfo; + } + + public void setSerialInfo(List serialInfo) { + this.serialInfo = serialInfo; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateRequestLinesInnerWarrantyInfoInner orderCreateRequestLinesInnerWarrantyInfoInner = (OrderCreateRequestLinesInnerWarrantyInfoInner) o; + return Objects.equals(this.directLineLink, orderCreateRequestLinesInnerWarrantyInfoInner.directLineLink) && + Objects.equals(this.warrantyLineLink, orderCreateRequestLinesInnerWarrantyInfoInner.warrantyLineLink) && + Objects.equals(this.hardwareLineLink, orderCreateRequestLinesInnerWarrantyInfoInner.hardwareLineLink) && + Objects.equals(this.serialInfo, orderCreateRequestLinesInnerWarrantyInfoInner.serialInfo); + } + + @Override + public int hashCode() { + return Objects.hash(directLineLink, warrantyLineLink, hardwareLineLink, serialInfo); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateRequestLinesInnerWarrantyInfoInner {\n"); + sb.append(" directLineLink: ").append(toIndentedString(directLineLink)).append("\n"); + sb.append(" warrantyLineLink: ").append(toIndentedString(warrantyLineLink)).append("\n"); + sb.append(" hardwareLineLink: ").append(toIndentedString(hardwareLineLink)).append("\n"); + sb.append(" serialInfo: ").append(toIndentedString(serialInfo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("directLineLink"); + openapiFields.add("warrantyLineLink"); + openapiFields.add("hardwareLineLink"); + openapiFields.add("serialInfo"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateRequestLinesInnerWarrantyInfoInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateRequestLinesInnerWarrantyInfoInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateRequestLinesInnerWarrantyInfoInner is not found in the empty JSON string", OrderCreateRequestLinesInnerWarrantyInfoInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateRequestLinesInnerWarrantyInfoInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateRequestLinesInnerWarrantyInfoInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("directLineLink") != null && !jsonObj.get("directLineLink").isJsonNull()) && !jsonObj.get("directLineLink").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `directLineLink` to be a primitive type in the JSON string but got `%s`", jsonObj.get("directLineLink").toString())); + } + if ((jsonObj.get("warrantyLineLink") != null && !jsonObj.get("warrantyLineLink").isJsonNull()) && !jsonObj.get("warrantyLineLink").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `warrantyLineLink` to be a primitive type in the JSON string but got `%s`", jsonObj.get("warrantyLineLink").toString())); + } + if ((jsonObj.get("hardwareLineLink") != null && !jsonObj.get("hardwareLineLink").isJsonNull()) && !jsonObj.get("hardwareLineLink").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `hardwareLineLink` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hardwareLineLink").toString())); + } + if (jsonObj.get("serialInfo") != null && !jsonObj.get("serialInfo").isJsonNull()) { + JsonArray jsonArrayserialInfo = jsonObj.getAsJsonArray("serialInfo"); + if (jsonArrayserialInfo != null) { + // ensure the json data is an array + if (!jsonObj.get("serialInfo").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `serialInfo` to be an array in the JSON string but got `%s`", jsonObj.get("serialInfo").toString())); + } + + // validate the optional field `serialInfo` (array) + for (int i = 0; i < jsonArrayserialInfo.size(); i++) { + OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner.validateJsonElement(jsonArrayserialInfo.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateRequestLinesInnerWarrantyInfoInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateRequestLinesInnerWarrantyInfoInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateRequestLinesInnerWarrantyInfoInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateRequestLinesInnerWarrantyInfoInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateRequestLinesInnerWarrantyInfoInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateRequestLinesInnerWarrantyInfoInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateRequestLinesInnerWarrantyInfoInner + * @throws IOException if the JSON string is invalid with respect to OrderCreateRequestLinesInnerWarrantyInfoInner + */ + public static OrderCreateRequestLinesInnerWarrantyInfoInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateRequestLinesInnerWarrantyInfoInner.class); + } + + /** + * Convert an instance of OrderCreateRequestLinesInnerWarrantyInfoInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner.java b/src/main/java/xiresellers/client/model/OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner.java new file mode 100644 index 00000000..c3cabc69 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner.java @@ -0,0 +1,288 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner { + public static final String SERIALIZED_NAME_DATEOF_PURCHASE = "dateofPurchase"; + @SerializedName(SERIALIZED_NAME_DATEOF_PURCHASE) + private LocalDate dateofPurchase; + + public static final String SERIALIZED_NAME_SHIP_DATE = "shipDate"; + @SerializedName(SERIALIZED_NAME_SHIP_DATE) + private LocalDate shipDate; + + public static final String SERIALIZED_NAME_PRIMARY_SERIAL_NUMBER = "primarySerialNumber"; + @SerializedName(SERIALIZED_NAME_PRIMARY_SERIAL_NUMBER) + private String primarySerialNumber; + + public static final String SERIALIZED_NAME_SECONDARY_SERIAL_NUMBER = "secondarySerialNumber"; + @SerializedName(SERIALIZED_NAME_SECONDARY_SERIAL_NUMBER) + private String secondarySerialNumber; + + public OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner() { + } + + public OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner dateofPurchase(LocalDate dateofPurchase) { + this.dateofPurchase = dateofPurchase; + return this; + } + + /** + * Date of purchase of the hardware. + * @return dateofPurchase + **/ + @javax.annotation.Nullable + public LocalDate getDateofPurchase() { + return dateofPurchase; + } + + public void setDateofPurchase(LocalDate dateofPurchase) { + this.dateofPurchase = dateofPurchase; + } + + + public OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner shipDate(LocalDate shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Vendor specific mandatory field, date of hardware/product shipment from vendor. + * @return shipDate + **/ + @javax.annotation.Nullable + public LocalDate getShipDate() { + return shipDate; + } + + public void setShipDate(LocalDate shipDate) { + this.shipDate = shipDate; + } + + + public OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner primarySerialNumber(String primarySerialNumber) { + this.primarySerialNumber = primarySerialNumber; + return this; + } + + /** + * Serial number of the hardware/product. + * @return primarySerialNumber + **/ + @javax.annotation.Nullable + public String getPrimarySerialNumber() { + return primarySerialNumber; + } + + public void setPrimarySerialNumber(String primarySerialNumber) { + this.primarySerialNumber = primarySerialNumber; + } + + + public OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner secondarySerialNumber(String secondarySerialNumber) { + this.secondarySerialNumber = secondarySerialNumber; + return this; + } + + /** + * Serial number of accessory associated with the above hardware/product. + * @return secondarySerialNumber + **/ + @javax.annotation.Nullable + public String getSecondarySerialNumber() { + return secondarySerialNumber; + } + + public void setSecondarySerialNumber(String secondarySerialNumber) { + this.secondarySerialNumber = secondarySerialNumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner orderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner = (OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner) o; + return Objects.equals(this.dateofPurchase, orderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner.dateofPurchase) && + Objects.equals(this.shipDate, orderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner.shipDate) && + Objects.equals(this.primarySerialNumber, orderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner.primarySerialNumber) && + Objects.equals(this.secondarySerialNumber, orderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner.secondarySerialNumber); + } + + @Override + public int hashCode() { + return Objects.hash(dateofPurchase, shipDate, primarySerialNumber, secondarySerialNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner {\n"); + sb.append(" dateofPurchase: ").append(toIndentedString(dateofPurchase)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" primarySerialNumber: ").append(toIndentedString(primarySerialNumber)).append("\n"); + sb.append(" secondarySerialNumber: ").append(toIndentedString(secondarySerialNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("dateofPurchase"); + openapiFields.add("shipDate"); + openapiFields.add("primarySerialNumber"); + openapiFields.add("secondarySerialNumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner is not found in the empty JSON string", OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("primarySerialNumber") != null && !jsonObj.get("primarySerialNumber").isJsonNull()) && !jsonObj.get("primarySerialNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `primarySerialNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("primarySerialNumber").toString())); + } + if ((jsonObj.get("secondarySerialNumber") != null && !jsonObj.get("secondarySerialNumber").isJsonNull()) && !jsonObj.get("secondarySerialNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `secondarySerialNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secondarySerialNumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner + * @throws IOException if the JSON string is invalid with respect to OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner + */ + public static OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner.class); + } + + /** + * Convert an instance of OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequest.java b/src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequest.java new file mode 100644 index 00000000..c45b2081 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequest.java @@ -0,0 +1,245 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderCreateRequestOrdercreaterequestOrdercreatedetails; +import xiresellers.client.model.OrderCreateRequestOrdercreaterequestRequestpreamble; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateRequestOrdercreaterequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateRequestOrdercreaterequest { + public static final String SERIALIZED_NAME_REQUESTPREAMBLE = "requestpreamble"; + @SerializedName(SERIALIZED_NAME_REQUESTPREAMBLE) + private OrderCreateRequestOrdercreaterequestRequestpreamble requestpreamble; + + public static final String SERIALIZED_NAME_ORDERCREATEDETAILS = "ordercreatedetails"; + @SerializedName(SERIALIZED_NAME_ORDERCREATEDETAILS) + private OrderCreateRequestOrdercreaterequestOrdercreatedetails ordercreatedetails; + + public OrderCreateRequestOrdercreaterequest() { + } + + public OrderCreateRequestOrdercreaterequest requestpreamble(OrderCreateRequestOrdercreaterequestRequestpreamble requestpreamble) { + this.requestpreamble = requestpreamble; + return this; + } + + /** + * Get requestpreamble + * @return requestpreamble + **/ + @javax.annotation.Nonnull + public OrderCreateRequestOrdercreaterequestRequestpreamble getRequestpreamble() { + return requestpreamble; + } + + public void setRequestpreamble(OrderCreateRequestOrdercreaterequestRequestpreamble requestpreamble) { + this.requestpreamble = requestpreamble; + } + + + public OrderCreateRequestOrdercreaterequest ordercreatedetails(OrderCreateRequestOrdercreaterequestOrdercreatedetails ordercreatedetails) { + this.ordercreatedetails = ordercreatedetails; + return this; + } + + /** + * Get ordercreatedetails + * @return ordercreatedetails + **/ + @javax.annotation.Nullable + public OrderCreateRequestOrdercreaterequestOrdercreatedetails getOrdercreatedetails() { + return ordercreatedetails; + } + + public void setOrdercreatedetails(OrderCreateRequestOrdercreaterequestOrdercreatedetails ordercreatedetails) { + this.ordercreatedetails = ordercreatedetails; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateRequestOrdercreaterequest orderCreateRequestOrdercreaterequest = (OrderCreateRequestOrdercreaterequest) o; + return Objects.equals(this.requestpreamble, orderCreateRequestOrdercreaterequest.requestpreamble) && + Objects.equals(this.ordercreatedetails, orderCreateRequestOrdercreaterequest.ordercreatedetails); + } + + @Override + public int hashCode() { + return Objects.hash(requestpreamble, ordercreatedetails); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateRequestOrdercreaterequest {\n"); + sb.append(" requestpreamble: ").append(toIndentedString(requestpreamble)).append("\n"); + sb.append(" ordercreatedetails: ").append(toIndentedString(ordercreatedetails)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("requestpreamble"); + openapiFields.add("ordercreatedetails"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("requestpreamble"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateRequestOrdercreaterequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateRequestOrdercreaterequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateRequestOrdercreaterequest is not found in the empty JSON string", OrderCreateRequestOrdercreaterequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateRequestOrdercreaterequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateRequestOrdercreaterequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrderCreateRequestOrdercreaterequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `requestpreamble` + OrderCreateRequestOrdercreaterequestRequestpreamble.validateJsonElement(jsonObj.get("requestpreamble")); + // validate the optional field `ordercreatedetails` + if (jsonObj.get("ordercreatedetails") != null && !jsonObj.get("ordercreatedetails").isJsonNull()) { + OrderCreateRequestOrdercreaterequestOrdercreatedetails.validateJsonElement(jsonObj.get("ordercreatedetails")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateRequestOrdercreaterequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateRequestOrdercreaterequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateRequestOrdercreaterequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateRequestOrdercreaterequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateRequestOrdercreaterequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateRequestOrdercreaterequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateRequestOrdercreaterequest + * @throws IOException if the JSON string is invalid with respect to OrderCreateRequestOrdercreaterequest + */ + public static OrderCreateRequestOrdercreaterequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateRequestOrdercreaterequest.class); + } + + /** + * Convert an instance of OrderCreateRequestOrdercreaterequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetails.java b/src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetails.java new file mode 100644 index 00000000..fed4f6c2 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetails.java @@ -0,0 +1,599 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner; +import xiresellers.client.model.OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner; +import xiresellers.client.model.OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateRequestOrdercreaterequestOrdercreatedetails + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateRequestOrdercreaterequestOrdercreatedetails { + public static final String SERIALIZED_NAME_CUSTOMERPONUMBER = "customerponumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMERPONUMBER) + private String customerponumber; + + /** + * Order Type - Standard orders, Direct ship orders + */ + @JsonAdapter(OrdertypeEnum.Adapter.class) + public enum OrdertypeEnum { + STANDARD("Standard"), + + DIRECT_SHIP("Direct Ship"); + + private String value; + + OrdertypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrdertypeEnum fromValue(String value) { + for (OrdertypeEnum b : OrdertypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OrdertypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrdertypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrdertypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrdertypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ORDERTYPE = "ordertype"; + @SerializedName(SERIALIZED_NAME_ORDERTYPE) + private OrdertypeEnum ordertype; + + public static final String SERIALIZED_NAME_ENDUSERORDERNUMBER = "enduserordernumber"; + @SerializedName(SERIALIZED_NAME_ENDUSERORDERNUMBER) + private String enduserordernumber; + + public static final String SERIALIZED_NAME_BILLTOSUFFIX = "billtosuffix"; + @SerializedName(SERIALIZED_NAME_BILLTOSUFFIX) + private String billtosuffix; + + public static final String SERIALIZED_NAME_SHIPTOSUFFIX = "shiptosuffix"; + @SerializedName(SERIALIZED_NAME_SHIPTOSUFFIX) + private String shiptosuffix; + + public static final String SERIALIZED_NAME_SHIPTOADDRESS = "shiptoaddress"; + @SerializedName(SERIALIZED_NAME_SHIPTOADDRESS) + private OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress shiptoaddress; + + public static final String SERIALIZED_NAME_CARRIERCODE = "carriercode"; + @SerializedName(SERIALIZED_NAME_CARRIERCODE) + private String carriercode; + + public static final String SERIALIZED_NAME_THIRDPARTYFREIGHTACCOUNTNUMBER = "thirdpartyfreightaccountnumber"; + @SerializedName(SERIALIZED_NAME_THIRDPARTYFREIGHTACCOUNTNUMBER) + private String thirdpartyfreightaccountnumber; + + public static final String SERIALIZED_NAME_SPECIALBIDNUMBER = "specialbidnumber"; + @SerializedName(SERIALIZED_NAME_SPECIALBIDNUMBER) + private String specialbidnumber; + + public static final String SERIALIZED_NAME_LINES = "lines"; + @SerializedName(SERIALIZED_NAME_LINES) + private List lines = new ArrayList<>(); + + public static final String SERIALIZED_NAME_EXTENDEDSPECS = "extendedspecs"; + @SerializedName(SERIALIZED_NAME_EXTENDEDSPECS) + private List extendedspecs; + + public OrderCreateRequestOrdercreaterequestOrdercreatedetails() { + } + + public OrderCreateRequestOrdercreaterequestOrdercreatedetails customerponumber(String customerponumber) { + this.customerponumber = customerponumber; + return this; + } + + /** + * The customers unique Purchase Order number. Keep it unique to retrieve order information + * @return customerponumber + **/ + @javax.annotation.Nonnull + public String getCustomerponumber() { + return customerponumber; + } + + public void setCustomerponumber(String customerponumber) { + this.customerponumber = customerponumber; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetails ordertype(OrdertypeEnum ordertype) { + this.ordertype = ordertype; + return this; + } + + /** + * Order Type - Standard orders, Direct ship orders + * @return ordertype + **/ + @javax.annotation.Nonnull + public OrdertypeEnum getOrdertype() { + return ordertype; + } + + public void setOrdertype(OrdertypeEnum ordertype) { + this.ordertype = ordertype; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetails enduserordernumber(String enduserordernumber) { + this.enduserordernumber = enduserordernumber; + return this; + } + + /** + * Customers End-user PO number + * @return enduserordernumber + **/ + @javax.annotation.Nullable + public String getEnduserordernumber() { + return enduserordernumber; + } + + public void setEnduserordernumber(String enduserordernumber) { + this.enduserordernumber = enduserordernumber; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetails billtosuffix(String billtosuffix) { + this.billtosuffix = billtosuffix; + return this; + } + + /** + * Designates flooring acct to be used + * @return billtosuffix + **/ + @javax.annotation.Nullable + public String getBilltosuffix() { + return billtosuffix; + } + + public void setBilltosuffix(String billtosuffix) { + this.billtosuffix = billtosuffix; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetails shiptosuffix(String shiptosuffix) { + this.shiptosuffix = shiptosuffix; + return this; + } + + /** + * Applies to customers with multiple ship to locations (store locations) + * @return shiptosuffix + **/ + @javax.annotation.Nullable + public String getShiptosuffix() { + return shiptosuffix; + } + + public void setShiptosuffix(String shiptosuffix) { + this.shiptosuffix = shiptosuffix; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetails shiptoaddress(OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress shiptoaddress) { + this.shiptoaddress = shiptoaddress; + return this; + } + + /** + * Get shiptoaddress + * @return shiptoaddress + **/ + @javax.annotation.Nonnull + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress getShiptoaddress() { + return shiptoaddress; + } + + public void setShiptoaddress(OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress shiptoaddress) { + this.shiptoaddress = shiptoaddress; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetails carriercode(String carriercode) { + this.carriercode = carriercode; + return this; + } + + /** + * A customer can dictate what carrier to use for their shipment (Ingram 2-digit carrier code is required). Our recommendation is leave this field blank which will allow Ingram Micro to choose the best carrier to gain the best freight rates. + * @return carriercode + **/ + @javax.annotation.Nullable + public String getCarriercode() { + return carriercode; + } + + public void setCarriercode(String carriercode) { + this.carriercode = carriercode; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetails thirdpartyfreightaccountnumber(String thirdpartyfreightaccountnumber) { + this.thirdpartyfreightaccountnumber = thirdpartyfreightaccountnumber; + return this; + } + + /** + * Refers to a third-party freight account number for charging freight against. The account number should be passed within this field and the appropriate carrier code should be supplied within the carrier code tags. Prior to sending your request containing the third-party account number, it must be first entered into our system. Your Ingram Micro Sales Representative can action this for you. If submitted within an order without this preapproval the third-party account number will be ignored. Note: USA partners- For FedEx Air only (carrier codes F1, FO, F2, FG.), please send three leading zeros before your third-party freight account number (i.e.: 000999999999.) + * @return thirdpartyfreightaccountnumber + **/ + @javax.annotation.Nullable + public String getThirdpartyfreightaccountnumber() { + return thirdpartyfreightaccountnumber; + } + + public void setThirdpartyfreightaccountnumber(String thirdpartyfreightaccountnumber) { + this.thirdpartyfreightaccountnumber = thirdpartyfreightaccountnumber; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetails specialbidnumber(String specialbidnumber) { + this.specialbidnumber = specialbidnumber; + return this; + } + + /** + * This is the special quote number given to a customer either by a vendor for special pricing or by Ingram Micro. To receive the special pricing assigned to this number it must be included on the order. + * @return specialbidnumber + **/ + @javax.annotation.Nullable + public String getSpecialbidnumber() { + return specialbidnumber; + } + + public void setSpecialbidnumber(String specialbidnumber) { + this.specialbidnumber = specialbidnumber; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetails lines(List lines) { + this.lines = lines; + return this; + } + + public OrderCreateRequestOrdercreaterequestOrdercreatedetails addLinesItem(OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner linesItem) { + if (this.lines == null) { + this.lines = new ArrayList<>(); + } + this.lines.add(linesItem); + return this; + } + + /** + * Get lines + * @return lines + **/ + @javax.annotation.Nonnull + public List getLines() { + return lines; + } + + public void setLines(List lines) { + this.lines = lines; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetails extendedspecs(List extendedspecs) { + this.extendedspecs = extendedspecs; + return this; + } + + public OrderCreateRequestOrdercreaterequestOrdercreatedetails addExtendedspecsItem(OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner extendedspecsItem) { + if (this.extendedspecs == null) { + this.extendedspecs = new ArrayList<>(); + } + this.extendedspecs.add(extendedspecsItem); + return this; + } + + /** + * Get extendedspecs + * @return extendedspecs + **/ + @javax.annotation.Nullable + public List getExtendedspecs() { + return extendedspecs; + } + + public void setExtendedspecs(List extendedspecs) { + this.extendedspecs = extendedspecs; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateRequestOrdercreaterequestOrdercreatedetails orderCreateRequestOrdercreaterequestOrdercreatedetails = (OrderCreateRequestOrdercreaterequestOrdercreatedetails) o; + return Objects.equals(this.customerponumber, orderCreateRequestOrdercreaterequestOrdercreatedetails.customerponumber) && + Objects.equals(this.ordertype, orderCreateRequestOrdercreaterequestOrdercreatedetails.ordertype) && + Objects.equals(this.enduserordernumber, orderCreateRequestOrdercreaterequestOrdercreatedetails.enduserordernumber) && + Objects.equals(this.billtosuffix, orderCreateRequestOrdercreaterequestOrdercreatedetails.billtosuffix) && + Objects.equals(this.shiptosuffix, orderCreateRequestOrdercreaterequestOrdercreatedetails.shiptosuffix) && + Objects.equals(this.shiptoaddress, orderCreateRequestOrdercreaterequestOrdercreatedetails.shiptoaddress) && + Objects.equals(this.carriercode, orderCreateRequestOrdercreaterequestOrdercreatedetails.carriercode) && + Objects.equals(this.thirdpartyfreightaccountnumber, orderCreateRequestOrdercreaterequestOrdercreatedetails.thirdpartyfreightaccountnumber) && + Objects.equals(this.specialbidnumber, orderCreateRequestOrdercreaterequestOrdercreatedetails.specialbidnumber) && + Objects.equals(this.lines, orderCreateRequestOrdercreaterequestOrdercreatedetails.lines) && + Objects.equals(this.extendedspecs, orderCreateRequestOrdercreaterequestOrdercreatedetails.extendedspecs); + } + + @Override + public int hashCode() { + return Objects.hash(customerponumber, ordertype, enduserordernumber, billtosuffix, shiptosuffix, shiptoaddress, carriercode, thirdpartyfreightaccountnumber, specialbidnumber, lines, extendedspecs); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateRequestOrdercreaterequestOrdercreatedetails {\n"); + sb.append(" customerponumber: ").append(toIndentedString(customerponumber)).append("\n"); + sb.append(" ordertype: ").append(toIndentedString(ordertype)).append("\n"); + sb.append(" enduserordernumber: ").append(toIndentedString(enduserordernumber)).append("\n"); + sb.append(" billtosuffix: ").append(toIndentedString(billtosuffix)).append("\n"); + sb.append(" shiptosuffix: ").append(toIndentedString(shiptosuffix)).append("\n"); + sb.append(" shiptoaddress: ").append(toIndentedString(shiptoaddress)).append("\n"); + sb.append(" carriercode: ").append(toIndentedString(carriercode)).append("\n"); + sb.append(" thirdpartyfreightaccountnumber: ").append(toIndentedString(thirdpartyfreightaccountnumber)).append("\n"); + sb.append(" specialbidnumber: ").append(toIndentedString(specialbidnumber)).append("\n"); + sb.append(" lines: ").append(toIndentedString(lines)).append("\n"); + sb.append(" extendedspecs: ").append(toIndentedString(extendedspecs)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("customerponumber"); + openapiFields.add("ordertype"); + openapiFields.add("enduserordernumber"); + openapiFields.add("billtosuffix"); + openapiFields.add("shiptosuffix"); + openapiFields.add("shiptoaddress"); + openapiFields.add("carriercode"); + openapiFields.add("thirdpartyfreightaccountnumber"); + openapiFields.add("specialbidnumber"); + openapiFields.add("lines"); + openapiFields.add("extendedspecs"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("customerponumber"); + openapiRequiredFields.add("ordertype"); + openapiRequiredFields.add("shiptoaddress"); + openapiRequiredFields.add("lines"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateRequestOrdercreaterequestOrdercreatedetails + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateRequestOrdercreaterequestOrdercreatedetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateRequestOrdercreaterequestOrdercreatedetails is not found in the empty JSON string", OrderCreateRequestOrdercreaterequestOrdercreatedetails.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateRequestOrdercreaterequestOrdercreatedetails.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateRequestOrdercreaterequestOrdercreatedetails` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrderCreateRequestOrdercreaterequestOrdercreatedetails.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("customerponumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerponumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerponumber").toString())); + } + if (!jsonObj.get("ordertype").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ordertype` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ordertype").toString())); + } + // validate the required field `ordertype` + OrdertypeEnum.validateJsonElement(jsonObj.get("ordertype")); + if ((jsonObj.get("enduserordernumber") != null && !jsonObj.get("enduserordernumber").isJsonNull()) && !jsonObj.get("enduserordernumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `enduserordernumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("enduserordernumber").toString())); + } + if ((jsonObj.get("billtosuffix") != null && !jsonObj.get("billtosuffix").isJsonNull()) && !jsonObj.get("billtosuffix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `billtosuffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("billtosuffix").toString())); + } + if ((jsonObj.get("shiptosuffix") != null && !jsonObj.get("shiptosuffix").isJsonNull()) && !jsonObj.get("shiptosuffix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shiptosuffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shiptosuffix").toString())); + } + // validate the required field `shiptoaddress` + OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.validateJsonElement(jsonObj.get("shiptoaddress")); + if ((jsonObj.get("carriercode") != null && !jsonObj.get("carriercode").isJsonNull()) && !jsonObj.get("carriercode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `carriercode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carriercode").toString())); + } + if ((jsonObj.get("thirdpartyfreightaccountnumber") != null && !jsonObj.get("thirdpartyfreightaccountnumber").isJsonNull()) && !jsonObj.get("thirdpartyfreightaccountnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `thirdpartyfreightaccountnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thirdpartyfreightaccountnumber").toString())); + } + if ((jsonObj.get("specialbidnumber") != null && !jsonObj.get("specialbidnumber").isJsonNull()) && !jsonObj.get("specialbidnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `specialbidnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("specialbidnumber").toString())); + } + // ensure the json data is an array + if (!jsonObj.get("lines").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `lines` to be an array in the JSON string but got `%s`", jsonObj.get("lines").toString())); + } + + JsonArray jsonArraylines = jsonObj.getAsJsonArray("lines"); + // validate the required field `lines` (array) + for (int i = 0; i < jsonArraylines.size(); i++) { + OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.validateJsonElement(jsonArraylines.get(i)); + }; + if (jsonObj.get("extendedspecs") != null && !jsonObj.get("extendedspecs").isJsonNull()) { + JsonArray jsonArrayextendedspecs = jsonObj.getAsJsonArray("extendedspecs"); + if (jsonArrayextendedspecs != null) { + // ensure the json data is an array + if (!jsonObj.get("extendedspecs").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `extendedspecs` to be an array in the JSON string but got `%s`", jsonObj.get("extendedspecs").toString())); + } + + // validate the optional field `extendedspecs` (array) + for (int i = 0; i < jsonArrayextendedspecs.size(); i++) { + OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner.validateJsonElement(jsonArrayextendedspecs.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateRequestOrdercreaterequestOrdercreatedetails.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateRequestOrdercreaterequestOrdercreatedetails' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateRequestOrdercreaterequestOrdercreatedetails.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateRequestOrdercreaterequestOrdercreatedetails value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateRequestOrdercreaterequestOrdercreatedetails read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateRequestOrdercreaterequestOrdercreatedetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateRequestOrdercreaterequestOrdercreatedetails + * @throws IOException if the JSON string is invalid with respect to OrderCreateRequestOrdercreaterequestOrdercreatedetails + */ + public static OrderCreateRequestOrdercreaterequestOrdercreatedetails fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateRequestOrdercreaterequestOrdercreatedetails.class); + } + + /** + * Convert an instance of OrderCreateRequestOrdercreaterequestOrdercreatedetails to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner.java b/src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner.java new file mode 100644 index 00000000..fb9e0bbc --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner.java @@ -0,0 +1,311 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Attribute Name and Value: This field identifies if your order is a DIRECT SHIP order (license / warranty) or how you want your Backorders managed as well as other process options like placing your order on hold or adding a comment. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner { + /** + * Gets or Sets attributename + */ + @JsonAdapter(AttributenameEnum.Adapter.class) + public enum AttributenameEnum { + ISDIRECTSHIPORDER("Isdirectshiporder"), + + EMAILADDRESS("emailaddress"), + + ISBACKORDERFLAGALLOWED("Isbackorderflagallowed"), + + PLACEONCUSTOMERHOLD("placeoncustomerhold"), + + SIGNATUREREQUIRED("signaturerequired"), + + COMMENTTEXT("commenttext"), + + RESELLERCTACEMAIL("resellerctacemail"), + + DUPLICATECUSTOMERORDERNUMBERVALIDATE("duplicatecustomerordernumbervalidate"), + + QUOTENUMBER("quotenumber"), + + SHIPCTACPHONE("shipctacphone"), + + VENDAUTHNUMBER("vendauthnumber"), + + CONTINUEONERROR("continueonerror"); + + private String value; + + AttributenameEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AttributenameEnum fromValue(String value) { + for (AttributenameEnum b : AttributenameEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AttributenameEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AttributenameEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AttributenameEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AttributenameEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ATTRIBUTENAME = "attributename"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTENAME) + private AttributenameEnum attributename; + + public static final String SERIALIZED_NAME_ATTRIBUTEVALUE = "attributevalue"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTEVALUE) + private String attributevalue; + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner() { + } + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner attributename(AttributenameEnum attributename) { + this.attributename = attributename; + return this; + } + + /** + * Get attributename + * @return attributename + **/ + @javax.annotation.Nullable + public AttributenameEnum getAttributename() { + return attributename; + } + + public void setAttributename(AttributenameEnum attributename) { + this.attributename = attributename; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner attributevalue(String attributevalue) { + this.attributevalue = attributevalue; + return this; + } + + /** + * Get attributevalue + * @return attributevalue + **/ + @javax.annotation.Nullable + public String getAttributevalue() { + return attributevalue; + } + + public void setAttributevalue(String attributevalue) { + this.attributevalue = attributevalue; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner orderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner = (OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner) o; + return Objects.equals(this.attributename, orderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner.attributename) && + Objects.equals(this.attributevalue, orderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner.attributevalue); + } + + @Override + public int hashCode() { + return Objects.hash(attributename, attributevalue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner {\n"); + sb.append(" attributename: ").append(toIndentedString(attributename)).append("\n"); + sb.append(" attributevalue: ").append(toIndentedString(attributevalue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributename"); + openapiFields.add("attributevalue"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner is not found in the empty JSON string", OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("attributename") != null && !jsonObj.get("attributename").isJsonNull()) && !jsonObj.get("attributename").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributename` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributename").toString())); + } + // validate the optional field `attributename` + if (jsonObj.get("attributename") != null && !jsonObj.get("attributename").isJsonNull()) { + AttributenameEnum.validateJsonElement(jsonObj.get("attributename")); + } + if ((jsonObj.get("attributevalue") != null && !jsonObj.get("attributevalue").isJsonNull()) && !jsonObj.get("attributevalue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributevalue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributevalue").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner + * @throws IOException if the JSON string is invalid with respect to OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner + */ + public static OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner.class); + } + + /** + * Convert an instance of OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.java b/src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.java new file mode 100644 index 00000000..83fb7535 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.java @@ -0,0 +1,584 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser; +import xiresellers.client.model.OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner { + /** + * Values are “P” for product or “C” for comments. This can be left blank when ordering product and a “P” will be assumed. If you are adding a COMMENT, then this value must be “C”. Extended spec for comments: Attribute Name: “commenttext” Attribute Value: “thank you for the order” To make the comment invisible to the packing slip place “///” in front of the comment in the Attribute Value field. This will allow the Ingram sales rep to see the comment on the order but will not forward on to shipping documents. + */ + @JsonAdapter(LinetypeEnum.Adapter.class) + public enum LinetypeEnum { + P("P"), + + C("C"); + + private String value; + + LinetypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static LinetypeEnum fromValue(String value) { + for (LinetypeEnum b : LinetypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final LinetypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public LinetypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return LinetypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + LinetypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_LINETYPE = "linetype"; + @SerializedName(SERIALIZED_NAME_LINETYPE) + private LinetypeEnum linetype; + + public static final String SERIALIZED_NAME_LINENUMBER = "linenumber"; + @SerializedName(SERIALIZED_NAME_LINENUMBER) + private String linenumber; + + public static final String SERIALIZED_NAME_INGRAMPARTNUMBER = "ingrampartnumber"; + @SerializedName(SERIALIZED_NAME_INGRAMPARTNUMBER) + private String ingrampartnumber; + + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + @SerializedName(SERIALIZED_NAME_QUANTITY) + private String quantity; + + public static final String SERIALIZED_NAME_VENDORPARTNUMBER = "vendorpartnumber"; + @SerializedName(SERIALIZED_NAME_VENDORPARTNUMBER) + private String vendorpartnumber; + + public static final String SERIALIZED_NAME_CUSTOMERPARTNUMBER = "customerpartnumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMERPARTNUMBER) + private String customerpartnumber; + + public static final String SERIALIZED_NAME_UP_C_CODE = "UPCCode"; + @SerializedName(SERIALIZED_NAME_UP_C_CODE) + private String upCCode; + + public static final String SERIALIZED_NAME_WAREHOUSEID = "warehouseid"; + @SerializedName(SERIALIZED_NAME_WAREHOUSEID) + private String warehouseid; + + public static final String SERIALIZED_NAME_UNITPRICE = "unitprice"; + @SerializedName(SERIALIZED_NAME_UNITPRICE) + private String unitprice; + + public static final String SERIALIZED_NAME_ENDUSER = "enduser"; + @SerializedName(SERIALIZED_NAME_ENDUSER) + private OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser enduser; + + public static final String SERIALIZED_NAME_PRODUCTEXTENDEDSPECS = "productextendedspecs"; + @SerializedName(SERIALIZED_NAME_PRODUCTEXTENDEDSPECS) + private List productextendedspecs; + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner() { + } + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner linetype(LinetypeEnum linetype) { + this.linetype = linetype; + return this; + } + + /** + * Values are “P” for product or “C” for comments. This can be left blank when ordering product and a “P” will be assumed. If you are adding a COMMENT, then this value must be “C”. Extended spec for comments: Attribute Name: “commenttext” Attribute Value: “thank you for the order” To make the comment invisible to the packing slip place “///” in front of the comment in the Attribute Value field. This will allow the Ingram sales rep to see the comment on the order but will not forward on to shipping documents. + * @return linetype + **/ + @javax.annotation.Nullable + public LinetypeEnum getLinetype() { + return linetype; + } + + public void setLinetype(LinetypeEnum linetype) { + this.linetype = linetype; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner linenumber(String linenumber) { + this.linenumber = linenumber; + return this; + } + + /** + * This is used when a partner wants to use their own line number. Can be left blank. + * @return linenumber + **/ + @javax.annotation.Nullable + public String getLinenumber() { + return linenumber; + } + + public void setLinenumber(String linenumber) { + this.linenumber = linenumber; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner ingrampartnumber(String ingrampartnumber) { + this.ingrampartnumber = ingrampartnumber; + return this; + } + + /** + * This is the Ingram sku number to be used for placing an order. + * @return ingrampartnumber + **/ + @javax.annotation.Nullable + public String getIngrampartnumber() { + return ingrampartnumber; + } + + public void setIngrampartnumber(String ingrampartnumber) { + this.ingrampartnumber = ingrampartnumber; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner quantity(String quantity) { + this.quantity = quantity; + return this; + } + + /** + * The quantity that is to be ordered. + * @return quantity + **/ + @javax.annotation.Nonnull + public String getQuantity() { + return quantity; + } + + public void setQuantity(String quantity) { + this.quantity = quantity; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner vendorpartnumber(String vendorpartnumber) { + this.vendorpartnumber = vendorpartnumber; + return this; + } + + /** + * The Manufacturer part number. Can be used to place an order instead of the Ingram sku. If there are multiple Ingram part numbers to one vendor part number. The order will be rejected. + * @return vendorpartnumber + **/ + @javax.annotation.Nullable + public String getVendorpartnumber() { + return vendorpartnumber; + } + + public void setVendorpartnumber(String vendorpartnumber) { + this.vendorpartnumber = vendorpartnumber; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner customerpartnumber(String customerpartnumber) { + this.customerpartnumber = customerpartnumber; + return this; + } + + /** + * This is the Customers unique part numbers that must be crossed referenced to the Ingram Micro Sku before it can be used. Please contact your sales rep for additional information on how to set this up. + * @return customerpartnumber + **/ + @javax.annotation.Nullable + public String getCustomerpartnumber() { + return customerpartnumber; + } + + public void setCustomerpartnumber(String customerpartnumber) { + this.customerpartnumber = customerpartnumber; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner upCCode(String upCCode) { + this.upCCode = upCCode; + return this; + } + + /** + * Get upCCode + * @return upCCode + **/ + @javax.annotation.Nullable + public String getUpCCode() { + return upCCode; + } + + public void setUpCCode(String upCCode) { + this.upCCode = upCCode; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner warehouseid(String warehouseid) { + this.warehouseid = warehouseid; + return this; + } + + /** + * Get warehouseid + * @return warehouseid + **/ + @javax.annotation.Nullable + public String getWarehouseid() { + return warehouseid; + } + + public void setWarehouseid(String warehouseid) { + this.warehouseid = warehouseid; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner unitprice(String unitprice) { + this.unitprice = unitprice; + return this; + } + + /** + * This is a requested price from the customer. Pre-approval is necessary before using this feature. A methodology called price variance to manage requested pricing needs to be setup in advance by your sales rep. If unit price is provided without this advanced setup the unit price will be ignored and standard Ingram Micro pricing will apply. + * @return unitprice + **/ + @javax.annotation.Nullable + public String getUnitprice() { + return unitprice; + } + + public void setUnitprice(String unitprice) { + this.unitprice = unitprice; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner enduser(OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser enduser) { + this.enduser = enduser; + return this; + } + + /** + * Get enduser + * @return enduser + **/ + @javax.annotation.Nullable + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser getEnduser() { + return enduser; + } + + public void setEnduser(OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser enduser) { + this.enduser = enduser; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner productextendedspecs(List productextendedspecs) { + this.productextendedspecs = productextendedspecs; + return this; + } + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner addProductextendedspecsItem(OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner productextendedspecsItem) { + if (this.productextendedspecs == null) { + this.productextendedspecs = new ArrayList<>(); + } + this.productextendedspecs.add(productextendedspecsItem); + return this; + } + + /** + * Get productextendedspecs + * @return productextendedspecs + **/ + @javax.annotation.Nullable + public List getProductextendedspecs() { + return productextendedspecs; + } + + public void setProductextendedspecs(List productextendedspecs) { + this.productextendedspecs = productextendedspecs; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner = (OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner) o; + return Objects.equals(this.linetype, orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.linetype) && + Objects.equals(this.linenumber, orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.linenumber) && + Objects.equals(this.ingrampartnumber, orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.ingrampartnumber) && + Objects.equals(this.quantity, orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.quantity) && + Objects.equals(this.vendorpartnumber, orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.vendorpartnumber) && + Objects.equals(this.customerpartnumber, orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.customerpartnumber) && + Objects.equals(this.upCCode, orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.upCCode) && + Objects.equals(this.warehouseid, orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.warehouseid) && + Objects.equals(this.unitprice, orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.unitprice) && + Objects.equals(this.enduser, orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.enduser) && + Objects.equals(this.productextendedspecs, orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.productextendedspecs); + } + + @Override + public int hashCode() { + return Objects.hash(linetype, linenumber, ingrampartnumber, quantity, vendorpartnumber, customerpartnumber, upCCode, warehouseid, unitprice, enduser, productextendedspecs); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner {\n"); + sb.append(" linetype: ").append(toIndentedString(linetype)).append("\n"); + sb.append(" linenumber: ").append(toIndentedString(linenumber)).append("\n"); + sb.append(" ingrampartnumber: ").append(toIndentedString(ingrampartnumber)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" vendorpartnumber: ").append(toIndentedString(vendorpartnumber)).append("\n"); + sb.append(" customerpartnumber: ").append(toIndentedString(customerpartnumber)).append("\n"); + sb.append(" upCCode: ").append(toIndentedString(upCCode)).append("\n"); + sb.append(" warehouseid: ").append(toIndentedString(warehouseid)).append("\n"); + sb.append(" unitprice: ").append(toIndentedString(unitprice)).append("\n"); + sb.append(" enduser: ").append(toIndentedString(enduser)).append("\n"); + sb.append(" productextendedspecs: ").append(toIndentedString(productextendedspecs)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("linetype"); + openapiFields.add("linenumber"); + openapiFields.add("ingrampartnumber"); + openapiFields.add("quantity"); + openapiFields.add("vendorpartnumber"); + openapiFields.add("customerpartnumber"); + openapiFields.add("UPCCode"); + openapiFields.add("warehouseid"); + openapiFields.add("unitprice"); + openapiFields.add("enduser"); + openapiFields.add("productextendedspecs"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("quantity"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner is not found in the empty JSON string", OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("linetype") != null && !jsonObj.get("linetype").isJsonNull()) && !jsonObj.get("linetype").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `linetype` to be a primitive type in the JSON string but got `%s`", jsonObj.get("linetype").toString())); + } + // validate the optional field `linetype` + if (jsonObj.get("linetype") != null && !jsonObj.get("linetype").isJsonNull()) { + LinetypeEnum.validateJsonElement(jsonObj.get("linetype")); + } + if ((jsonObj.get("linenumber") != null && !jsonObj.get("linenumber").isJsonNull()) && !jsonObj.get("linenumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `linenumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("linenumber").toString())); + } + if ((jsonObj.get("ingrampartnumber") != null && !jsonObj.get("ingrampartnumber").isJsonNull()) && !jsonObj.get("ingrampartnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingrampartnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingrampartnumber").toString())); + } + if (!jsonObj.get("quantity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quantity").toString())); + } + if ((jsonObj.get("vendorpartnumber") != null && !jsonObj.get("vendorpartnumber").isJsonNull()) && !jsonObj.get("vendorpartnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorpartnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorpartnumber").toString())); + } + if ((jsonObj.get("customerpartnumber") != null && !jsonObj.get("customerpartnumber").isJsonNull()) && !jsonObj.get("customerpartnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerpartnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerpartnumber").toString())); + } + if ((jsonObj.get("UPCCode") != null && !jsonObj.get("UPCCode").isJsonNull()) && !jsonObj.get("UPCCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `UPCCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("UPCCode").toString())); + } + if ((jsonObj.get("warehouseid") != null && !jsonObj.get("warehouseid").isJsonNull()) && !jsonObj.get("warehouseid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `warehouseid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("warehouseid").toString())); + } + if ((jsonObj.get("unitprice") != null && !jsonObj.get("unitprice").isJsonNull()) && !jsonObj.get("unitprice").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `unitprice` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unitprice").toString())); + } + // validate the optional field `enduser` + if (jsonObj.get("enduser") != null && !jsonObj.get("enduser").isJsonNull()) { + OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.validateJsonElement(jsonObj.get("enduser")); + } + if (jsonObj.get("productextendedspecs") != null && !jsonObj.get("productextendedspecs").isJsonNull()) { + JsonArray jsonArrayproductextendedspecs = jsonObj.getAsJsonArray("productextendedspecs"); + if (jsonArrayproductextendedspecs != null) { + // ensure the json data is an array + if (!jsonObj.get("productextendedspecs").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `productextendedspecs` to be an array in the JSON string but got `%s`", jsonObj.get("productextendedspecs").toString())); + } + + // validate the optional field `productextendedspecs` (array) + for (int i = 0; i < jsonArrayproductextendedspecs.size(); i++) { + OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner.validateJsonElement(jsonArrayproductextendedspecs.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner + * @throws IOException if the JSON string is invalid with respect to OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner + */ + public static OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner.class); + } + + /** + * Convert an instance of OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.java b/src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.java new file mode 100644 index 00000000..c586896d --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.java @@ -0,0 +1,525 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_ADDRESSLINE1 = "addressline1"; + @SerializedName(SERIALIZED_NAME_ADDRESSLINE1) + private String addressline1; + + public static final String SERIALIZED_NAME_ADDRESSLINE2 = "addressline2"; + @SerializedName(SERIALIZED_NAME_ADDRESSLINE2) + private String addressline2; + + public static final String SERIALIZED_NAME_ADDRESSLINE3 = "addressline3"; + @SerializedName(SERIALIZED_NAME_ADDRESSLINE3) + private String addressline3; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTALCODE = "postalcode"; + @SerializedName(SERIALIZED_NAME_POSTALCODE) + private String postalcode; + + public static final String SERIALIZED_NAME_COUNTRYCODE = "countrycode"; + @SerializedName(SERIALIZED_NAME_COUNTRYCODE) + private String countrycode; + + public static final String SERIALIZED_NAME_PHONENUMBER = "phonenumber"; + @SerializedName(SERIALIZED_NAME_PHONENUMBER) + private String phonenumber; + + public static final String SERIALIZED_NAME_EXTENSIONNUMBER = "extensionnumber"; + @SerializedName(SERIALIZED_NAME_EXTENSIONNUMBER) + private String extensionnumber; + + public static final String SERIALIZED_NAME_FAXNUMBER = "faxnumber"; + @SerializedName(SERIALIZED_NAME_FAXNUMBER) + private String faxnumber; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser() { + } + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser addressline1(String addressline1) { + this.addressline1 = addressline1; + return this; + } + + /** + * Get addressline1 + * @return addressline1 + **/ + @javax.annotation.Nullable + public String getAddressline1() { + return addressline1; + } + + public void setAddressline1(String addressline1) { + this.addressline1 = addressline1; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser addressline2(String addressline2) { + this.addressline2 = addressline2; + return this; + } + + /** + * Get addressline2 + * @return addressline2 + **/ + @javax.annotation.Nullable + public String getAddressline2() { + return addressline2; + } + + public void setAddressline2(String addressline2) { + this.addressline2 = addressline2; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser addressline3(String addressline3) { + this.addressline3 = addressline3; + return this; + } + + /** + * Get addressline3 + * @return addressline3 + **/ + @javax.annotation.Nullable + public String getAddressline3() { + return addressline3; + } + + public void setAddressline3(String addressline3) { + this.addressline3 = addressline3; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser city(String city) { + this.city = city; + return this; + } + + /** + * Get city + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser state(String state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser postalcode(String postalcode) { + this.postalcode = postalcode; + return this; + } + + /** + * Get postalcode + * @return postalcode + **/ + @javax.annotation.Nullable + public String getPostalcode() { + return postalcode; + } + + public void setPostalcode(String postalcode) { + this.postalcode = postalcode; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser countrycode(String countrycode) { + this.countrycode = countrycode; + return this; + } + + /** + * Get countrycode + * @return countrycode + **/ + @javax.annotation.Nullable + public String getCountrycode() { + return countrycode; + } + + public void setCountrycode(String countrycode) { + this.countrycode = countrycode; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser phonenumber(String phonenumber) { + this.phonenumber = phonenumber; + return this; + } + + /** + * Get phonenumber + * @return phonenumber + **/ + @javax.annotation.Nullable + public String getPhonenumber() { + return phonenumber; + } + + public void setPhonenumber(String phonenumber) { + this.phonenumber = phonenumber; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser extensionnumber(String extensionnumber) { + this.extensionnumber = extensionnumber; + return this; + } + + /** + * Get extensionnumber + * @return extensionnumber + **/ + @javax.annotation.Nullable + public String getExtensionnumber() { + return extensionnumber; + } + + public void setExtensionnumber(String extensionnumber) { + this.extensionnumber = extensionnumber; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser faxnumber(String faxnumber) { + this.faxnumber = faxnumber; + return this; + } + + /** + * Get faxnumber + * @return faxnumber + **/ + @javax.annotation.Nullable + public String getFaxnumber() { + return faxnumber; + } + + public void setFaxnumber(String faxnumber) { + this.faxnumber = faxnumber; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser = (OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser) o; + return Objects.equals(this.id, orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.id) && + Objects.equals(this.addressline1, orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.addressline1) && + Objects.equals(this.addressline2, orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.addressline2) && + Objects.equals(this.addressline3, orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.addressline3) && + Objects.equals(this.city, orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.city) && + Objects.equals(this.state, orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.state) && + Objects.equals(this.postalcode, orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.postalcode) && + Objects.equals(this.countrycode, orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.countrycode) && + Objects.equals(this.phonenumber, orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.phonenumber) && + Objects.equals(this.extensionnumber, orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.extensionnumber) && + Objects.equals(this.faxnumber, orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.faxnumber) && + Objects.equals(this.email, orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.email); + } + + @Override + public int hashCode() { + return Objects.hash(id, addressline1, addressline2, addressline3, city, state, postalcode, countrycode, phonenumber, extensionnumber, faxnumber, email); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" addressline1: ").append(toIndentedString(addressline1)).append("\n"); + sb.append(" addressline2: ").append(toIndentedString(addressline2)).append("\n"); + sb.append(" addressline3: ").append(toIndentedString(addressline3)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalcode: ").append(toIndentedString(postalcode)).append("\n"); + sb.append(" countrycode: ").append(toIndentedString(countrycode)).append("\n"); + sb.append(" phonenumber: ").append(toIndentedString(phonenumber)).append("\n"); + sb.append(" extensionnumber: ").append(toIndentedString(extensionnumber)).append("\n"); + sb.append(" faxnumber: ").append(toIndentedString(faxnumber)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("addressline1"); + openapiFields.add("addressline2"); + openapiFields.add("addressline3"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalcode"); + openapiFields.add("countrycode"); + openapiFields.add("phonenumber"); + openapiFields.add("extensionnumber"); + openapiFields.add("faxnumber"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser is not found in the empty JSON string", OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("addressline1") != null && !jsonObj.get("addressline1").isJsonNull()) && !jsonObj.get("addressline1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressline1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressline1").toString())); + } + if ((jsonObj.get("addressline2") != null && !jsonObj.get("addressline2").isJsonNull()) && !jsonObj.get("addressline2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressline2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressline2").toString())); + } + if ((jsonObj.get("addressline3") != null && !jsonObj.get("addressline3").isJsonNull()) && !jsonObj.get("addressline3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressline3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressline3").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalcode") != null && !jsonObj.get("postalcode").isJsonNull()) && !jsonObj.get("postalcode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalcode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalcode").toString())); + } + if ((jsonObj.get("countrycode") != null && !jsonObj.get("countrycode").isJsonNull()) && !jsonObj.get("countrycode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countrycode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countrycode").toString())); + } + if ((jsonObj.get("phonenumber") != null && !jsonObj.get("phonenumber").isJsonNull()) && !jsonObj.get("phonenumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phonenumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phonenumber").toString())); + } + if ((jsonObj.get("extensionnumber") != null && !jsonObj.get("extensionnumber").isJsonNull()) && !jsonObj.get("extensionnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `extensionnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("extensionnumber").toString())); + } + if ((jsonObj.get("faxnumber") != null && !jsonObj.get("faxnumber").isJsonNull()) && !jsonObj.get("faxnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `faxnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("faxnumber").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser + * @throws IOException if the JSON string is invalid with respect to OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser + */ + public static OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser.class); + } + + /** + * Convert an instance of OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner.java b/src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner.java new file mode 100644 index 00000000..90c51111 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner.java @@ -0,0 +1,301 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner { + /** + * Gets or Sets attributename + */ + @JsonAdapter(AttributenameEnum.Adapter.class) + public enum AttributenameEnum { + SHIPFROM("shipfrom"), + + SPECIALPRICE("specialprice"), + + AUTHBIDNUMBER("authbidnumber"), + + COMMENTTEXT("commenttext"), + + SERIALNUMBER("serialnumber"), + + CONTACTNUMBER("contactnumber"), + + SHIPNOTESTXT("shipnotestxt"); + + private String value; + + AttributenameEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AttributenameEnum fromValue(String value) { + for (AttributenameEnum b : AttributenameEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AttributenameEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AttributenameEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AttributenameEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AttributenameEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ATTRIBUTENAME = "attributename"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTENAME) + private AttributenameEnum attributename; + + public static final String SERIALIZED_NAME_ATTRIBUTEVALUE = "attributevalue"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTEVALUE) + private String attributevalue; + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner() { + } + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner attributename(AttributenameEnum attributename) { + this.attributename = attributename; + return this; + } + + /** + * Get attributename + * @return attributename + **/ + @javax.annotation.Nullable + public AttributenameEnum getAttributename() { + return attributename; + } + + public void setAttributename(AttributenameEnum attributename) { + this.attributename = attributename; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner attributevalue(String attributevalue) { + this.attributevalue = attributevalue; + return this; + } + + /** + * Get attributevalue + * @return attributevalue + **/ + @javax.annotation.Nullable + public String getAttributevalue() { + return attributevalue; + } + + public void setAttributevalue(String attributevalue) { + this.attributevalue = attributevalue; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner = (OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner) o; + return Objects.equals(this.attributename, orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner.attributename) && + Objects.equals(this.attributevalue, orderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner.attributevalue); + } + + @Override + public int hashCode() { + return Objects.hash(attributename, attributevalue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner {\n"); + sb.append(" attributename: ").append(toIndentedString(attributename)).append("\n"); + sb.append(" attributevalue: ").append(toIndentedString(attributevalue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributename"); + openapiFields.add("attributevalue"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner is not found in the empty JSON string", OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("attributename") != null && !jsonObj.get("attributename").isJsonNull()) && !jsonObj.get("attributename").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributename` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributename").toString())); + } + // validate the optional field `attributename` + if (jsonObj.get("attributename") != null && !jsonObj.get("attributename").isJsonNull()) { + AttributenameEnum.validateJsonElement(jsonObj.get("attributename")); + } + if ((jsonObj.get("attributevalue") != null && !jsonObj.get("attributevalue").isJsonNull()) && !jsonObj.get("attributevalue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributevalue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributevalue").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner + * @throws IOException if the JSON string is invalid with respect to OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner + */ + public static OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner.class); + } + + /** + * Convert an instance of OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.java b/src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.java new file mode 100644 index 00000000..9d11f9d9 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.java @@ -0,0 +1,421 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress { + public static final String SERIALIZED_NAME_ATTENTION = "attention"; + @SerializedName(SERIALIZED_NAME_ATTENTION) + private String attention; + + public static final String SERIALIZED_NAME_ADDRESSLINE1 = "addressline1"; + @SerializedName(SERIALIZED_NAME_ADDRESSLINE1) + private String addressline1; + + public static final String SERIALIZED_NAME_ADDRESSLINE2 = "addressline2"; + @SerializedName(SERIALIZED_NAME_ADDRESSLINE2) + private String addressline2; + + public static final String SERIALIZED_NAME_ADDRESSLINE3 = "addressline3"; + @SerializedName(SERIALIZED_NAME_ADDRESSLINE3) + private String addressline3; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTALCODE = "postalcode"; + @SerializedName(SERIALIZED_NAME_POSTALCODE) + private String postalcode; + + public static final String SERIALIZED_NAME_COUNTRYCODE = "countrycode"; + @SerializedName(SERIALIZED_NAME_COUNTRYCODE) + private String countrycode; + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress() { + } + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress attention(String attention) { + this.attention = attention; + return this; + } + + /** + * Customer contact name + * @return attention + **/ + @javax.annotation.Nullable + public String getAttention() { + return attention; + } + + public void setAttention(String attention) { + this.attention = attention; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress addressline1(String addressline1) { + this.addressline1 = addressline1; + return this; + } + + /** + * Company Name or person to deliver. *If there isn’t an attention line please add the company name on address line 1. UPS and FedEx will create surcharges if address line 1 contains a physical address. + * @return addressline1 + **/ + @javax.annotation.Nonnull + public String getAddressline1() { + return addressline1; + } + + public void setAddressline1(String addressline1) { + this.addressline1 = addressline1; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress addressline2(String addressline2) { + this.addressline2 = addressline2; + return this; + } + + /** + * Street address for delivery + * @return addressline2 + **/ + @javax.annotation.Nonnull + public String getAddressline2() { + return addressline2; + } + + public void setAddressline2(String addressline2) { + this.addressline2 = addressline2; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress addressline3(String addressline3) { + this.addressline3 = addressline3; + return this; + } + + /** + * Continuation of address line 2 + * @return addressline3 + **/ + @javax.annotation.Nullable + public String getAddressline3() { + return addressline3; + } + + public void setAddressline3(String addressline3) { + this.addressline3 = addressline3; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress city(String city) { + this.city = city; + return this; + } + + /** + * Ship to city + * @return city + **/ + @javax.annotation.Nonnull + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress state(String state) { + this.state = state; + return this; + } + + /** + * Ship to State or Region + * @return state + **/ + @javax.annotation.Nonnull + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress postalcode(String postalcode) { + this.postalcode = postalcode; + return this; + } + + /** + * Ship to Zip code or Postal code + * @return postalcode + **/ + @javax.annotation.Nonnull + public String getPostalcode() { + return postalcode; + } + + public void setPostalcode(String postalcode) { + this.postalcode = postalcode; + } + + + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress countrycode(String countrycode) { + this.countrycode = countrycode; + return this; + } + + /** + * Ship to country + * @return countrycode + **/ + @javax.annotation.Nullable + public String getCountrycode() { + return countrycode; + } + + public void setCountrycode(String countrycode) { + this.countrycode = countrycode; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress orderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress = (OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress) o; + return Objects.equals(this.attention, orderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.attention) && + Objects.equals(this.addressline1, orderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.addressline1) && + Objects.equals(this.addressline2, orderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.addressline2) && + Objects.equals(this.addressline3, orderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.addressline3) && + Objects.equals(this.city, orderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.city) && + Objects.equals(this.state, orderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.state) && + Objects.equals(this.postalcode, orderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.postalcode) && + Objects.equals(this.countrycode, orderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.countrycode); + } + + @Override + public int hashCode() { + return Objects.hash(attention, addressline1, addressline2, addressline3, city, state, postalcode, countrycode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress {\n"); + sb.append(" attention: ").append(toIndentedString(attention)).append("\n"); + sb.append(" addressline1: ").append(toIndentedString(addressline1)).append("\n"); + sb.append(" addressline2: ").append(toIndentedString(addressline2)).append("\n"); + sb.append(" addressline3: ").append(toIndentedString(addressline3)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalcode: ").append(toIndentedString(postalcode)).append("\n"); + sb.append(" countrycode: ").append(toIndentedString(countrycode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attention"); + openapiFields.add("addressline1"); + openapiFields.add("addressline2"); + openapiFields.add("addressline3"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalcode"); + openapiFields.add("countrycode"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("addressline1"); + openapiRequiredFields.add("addressline2"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("state"); + openapiRequiredFields.add("postalcode"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress is not found in the empty JSON string", OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("attention") != null && !jsonObj.get("attention").isJsonNull()) && !jsonObj.get("attention").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attention` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attention").toString())); + } + if (!jsonObj.get("addressline1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressline1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressline1").toString())); + } + if (!jsonObj.get("addressline2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressline2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressline2").toString())); + } + if ((jsonObj.get("addressline3") != null && !jsonObj.get("addressline3").isJsonNull()) && !jsonObj.get("addressline3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressline3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressline3").toString())); + } + if (!jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if (!jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if (!jsonObj.get("postalcode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalcode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalcode").toString())); + } + if ((jsonObj.get("countrycode") != null && !jsonObj.get("countrycode").isJsonNull()) && !jsonObj.get("countrycode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countrycode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countrycode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress + * @throws IOException if the JSON string is invalid with respect to OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress + */ + public static OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress.class); + } + + /** + * Convert an instance of OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestRequestpreamble.java b/src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestRequestpreamble.java new file mode 100644 index 00000000..b190ee9e --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestRequestpreamble.java @@ -0,0 +1,244 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateRequestOrdercreaterequestRequestpreamble + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateRequestOrdercreaterequestRequestpreamble { + public static final String SERIALIZED_NAME_ISOCOUNTRYCODE = "isocountrycode"; + @SerializedName(SERIALIZED_NAME_ISOCOUNTRYCODE) + private String isocountrycode; + + public static final String SERIALIZED_NAME_CUSTOMERNUMBER = "customernumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMERNUMBER) + private String customernumber; + + public OrderCreateRequestOrdercreaterequestRequestpreamble() { + } + + public OrderCreateRequestOrdercreaterequestRequestpreamble isocountrycode(String isocountrycode) { + this.isocountrycode = isocountrycode; + return this; + } + + /** + * 2 digit ISO country code + * @return isocountrycode + **/ + @javax.annotation.Nonnull + public String getIsocountrycode() { + return isocountrycode; + } + + public void setIsocountrycode(String isocountrycode) { + this.isocountrycode = isocountrycode; + } + + + public OrderCreateRequestOrdercreaterequestRequestpreamble customernumber(String customernumber) { + this.customernumber = customernumber; + return this; + } + + /** + * Your unique Ingram Micro customer number + * @return customernumber + **/ + @javax.annotation.Nonnull + public String getCustomernumber() { + return customernumber; + } + + public void setCustomernumber(String customernumber) { + this.customernumber = customernumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateRequestOrdercreaterequestRequestpreamble orderCreateRequestOrdercreaterequestRequestpreamble = (OrderCreateRequestOrdercreaterequestRequestpreamble) o; + return Objects.equals(this.isocountrycode, orderCreateRequestOrdercreaterequestRequestpreamble.isocountrycode) && + Objects.equals(this.customernumber, orderCreateRequestOrdercreaterequestRequestpreamble.customernumber); + } + + @Override + public int hashCode() { + return Objects.hash(isocountrycode, customernumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateRequestOrdercreaterequestRequestpreamble {\n"); + sb.append(" isocountrycode: ").append(toIndentedString(isocountrycode)).append("\n"); + sb.append(" customernumber: ").append(toIndentedString(customernumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("isocountrycode"); + openapiFields.add("customernumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("isocountrycode"); + openapiRequiredFields.add("customernumber"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateRequestOrdercreaterequestRequestpreamble + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateRequestOrdercreaterequestRequestpreamble.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateRequestOrdercreaterequestRequestpreamble is not found in the empty JSON string", OrderCreateRequestOrdercreaterequestRequestpreamble.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateRequestOrdercreaterequestRequestpreamble.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateRequestOrdercreaterequestRequestpreamble` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrderCreateRequestOrdercreaterequestRequestpreamble.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("isocountrycode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `isocountrycode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isocountrycode").toString())); + } + if (!jsonObj.get("customernumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customernumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customernumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateRequestOrdercreaterequestRequestpreamble.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateRequestOrdercreaterequestRequestpreamble' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateRequestOrdercreaterequestRequestpreamble.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateRequestOrdercreaterequestRequestpreamble value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateRequestOrdercreaterequestRequestpreamble read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateRequestOrdercreaterequestRequestpreamble given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateRequestOrdercreaterequestRequestpreamble + * @throws IOException if the JSON string is invalid with respect to OrderCreateRequestOrdercreaterequestRequestpreamble + */ + public static OrderCreateRequestOrdercreaterequestRequestpreamble fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateRequestOrdercreaterequestRequestpreamble.class); + } + + /** + * Convert an instance of OrderCreateRequestOrdercreaterequestRequestpreamble to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateRequestResellerInfo.java b/src/main/java/xiresellers/client/model/OrderCreateRequestResellerInfo.java new file mode 100644 index 00000000..7ba04638 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateRequestResellerInfo.java @@ -0,0 +1,522 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * The address and contact information provided by the reseller. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateRequestResellerInfo { + public static final String SERIALIZED_NAME_RESELLER_ID = "resellerId"; + @SerializedName(SERIALIZED_NAME_RESELLER_ID) + private String resellerId; + + public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; + @SerializedName(SERIALIZED_NAME_COMPANY_NAME) + private String companyName; + + public static final String SERIALIZED_NAME_CONTACT = "contact"; + @SerializedName(SERIALIZED_NAME_CONTACT) + private String contact; + + public static final String SERIALIZED_NAME_ADDRESS_LINE1 = "addressLine1"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE1) + private String addressLine1; + + public static final String SERIALIZED_NAME_ADDRESS_LINE2 = "addressLine2"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE2) + private String addressLine2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE3 = "addressLine3"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE3) + private String addressLine3; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; + @SerializedName(SERIALIZED_NAME_POSTAL_CODE) + private String postalCode; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) + private Integer phoneNumber; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public OrderCreateRequestResellerInfo() { + } + + public OrderCreateRequestResellerInfo resellerId(String resellerId) { + this.resellerId = resellerId; + return this; + } + + /** + * The reseller's Id. + * @return resellerId + **/ + @javax.annotation.Nullable + public String getResellerId() { + return resellerId; + } + + public void setResellerId(String resellerId) { + this.resellerId = resellerId; + } + + + public OrderCreateRequestResellerInfo companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * The reseller's company name. + * @return companyName + **/ + @javax.annotation.Nullable + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public OrderCreateRequestResellerInfo contact(String contact) { + this.contact = contact; + return this; + } + + /** + * The reseller's contact name. + * @return contact + **/ + @javax.annotation.Nullable + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + + public OrderCreateRequestResellerInfo addressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + return this; + } + + /** + * The reseller's street address. + * @return addressLine1 + **/ + @javax.annotation.Nullable + public String getAddressLine1() { + return addressLine1; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + + public OrderCreateRequestResellerInfo addressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + return this; + } + + /** + * The reseller's building or apartment number. + * @return addressLine2 + **/ + @javax.annotation.Nullable + public String getAddressLine2() { + return addressLine2; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + + public OrderCreateRequestResellerInfo addressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + return this; + } + + /** + * The reseller's address line 3. + * @return addressLine3 + **/ + @javax.annotation.Nullable + public String getAddressLine3() { + return addressLine3; + } + + public void setAddressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + } + + + public OrderCreateRequestResellerInfo city(String city) { + this.city = city; + return this; + } + + /** + * The reseller's city. + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public OrderCreateRequestResellerInfo state(String state) { + this.state = state; + return this; + } + + /** + * The reseller's state. + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public OrderCreateRequestResellerInfo postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * The reseller's zip or postal code. + * @return postalCode + **/ + @javax.annotation.Nullable + public String getPostalCode() { + return postalCode; + } + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public OrderCreateRequestResellerInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * The reseller's two-character ISO country code. + * @return countryCode + **/ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public OrderCreateRequestResellerInfo phoneNumber(Integer phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * The reseller's phone number. + * @return phoneNumber + **/ + @javax.annotation.Nullable + public Integer getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(Integer phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public OrderCreateRequestResellerInfo email(String email) { + this.email = email; + return this; + } + + /** + * The reseller's email address. + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateRequestResellerInfo orderCreateRequestResellerInfo = (OrderCreateRequestResellerInfo) o; + return Objects.equals(this.resellerId, orderCreateRequestResellerInfo.resellerId) && + Objects.equals(this.companyName, orderCreateRequestResellerInfo.companyName) && + Objects.equals(this.contact, orderCreateRequestResellerInfo.contact) && + Objects.equals(this.addressLine1, orderCreateRequestResellerInfo.addressLine1) && + Objects.equals(this.addressLine2, orderCreateRequestResellerInfo.addressLine2) && + Objects.equals(this.addressLine3, orderCreateRequestResellerInfo.addressLine3) && + Objects.equals(this.city, orderCreateRequestResellerInfo.city) && + Objects.equals(this.state, orderCreateRequestResellerInfo.state) && + Objects.equals(this.postalCode, orderCreateRequestResellerInfo.postalCode) && + Objects.equals(this.countryCode, orderCreateRequestResellerInfo.countryCode) && + Objects.equals(this.phoneNumber, orderCreateRequestResellerInfo.phoneNumber) && + Objects.equals(this.email, orderCreateRequestResellerInfo.email); + } + + @Override + public int hashCode() { + return Objects.hash(resellerId, companyName, contact, addressLine1, addressLine2, addressLine3, city, state, postalCode, countryCode, phoneNumber, email); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateRequestResellerInfo {\n"); + sb.append(" resellerId: ").append(toIndentedString(resellerId)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); + sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); + sb.append(" addressLine3: ").append(toIndentedString(addressLine3)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("resellerId"); + openapiFields.add("companyName"); + openapiFields.add("contact"); + openapiFields.add("addressLine1"); + openapiFields.add("addressLine2"); + openapiFields.add("addressLine3"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalCode"); + openapiFields.add("countryCode"); + openapiFields.add("phoneNumber"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateRequestResellerInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateRequestResellerInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateRequestResellerInfo is not found in the empty JSON string", OrderCreateRequestResellerInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateRequestResellerInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateRequestResellerInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("resellerId") != null && !jsonObj.get("resellerId").isJsonNull()) && !jsonObj.get("resellerId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `resellerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("resellerId").toString())); + } + if ((jsonObj.get("companyName") != null && !jsonObj.get("companyName").isJsonNull()) && !jsonObj.get("companyName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); + } + if ((jsonObj.get("contact") != null && !jsonObj.get("contact").isJsonNull()) && !jsonObj.get("contact").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contact` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact").toString())); + } + if ((jsonObj.get("addressLine1") != null && !jsonObj.get("addressLine1").isJsonNull()) && !jsonObj.get("addressLine1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine1").toString())); + } + if ((jsonObj.get("addressLine2") != null && !jsonObj.get("addressLine2").isJsonNull()) && !jsonObj.get("addressLine2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine2").toString())); + } + if ((jsonObj.get("addressLine3") != null && !jsonObj.get("addressLine3").isJsonNull()) && !jsonObj.get("addressLine3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine3").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateRequestResellerInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateRequestResellerInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateRequestResellerInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateRequestResellerInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateRequestResellerInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateRequestResellerInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateRequestResellerInfo + * @throws IOException if the JSON string is invalid with respect to OrderCreateRequestResellerInfo + */ + public static OrderCreateRequestResellerInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateRequestResellerInfo.class); + } + + /** + * Convert an instance of OrderCreateRequestResellerInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateRequestShipToInfo.java b/src/main/java/xiresellers/client/model/OrderCreateRequestShipToInfo.java new file mode 100644 index 00000000..bff28a25 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateRequestShipToInfo.java @@ -0,0 +1,612 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * The shipping information provided by the reseller. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateRequestShipToInfo { + public static final String SERIALIZED_NAME_ADDRESS_ID = "addressId"; + @SerializedName(SERIALIZED_NAME_ADDRESS_ID) + private String addressId; + + public static final String SERIALIZED_NAME_CONTACT = "contact"; + @SerializedName(SERIALIZED_NAME_CONTACT) + private String contact; + + public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; + @SerializedName(SERIALIZED_NAME_COMPANY_NAME) + private String companyName; + + public static final String SERIALIZED_NAME_NAME1 = "name1"; + @SerializedName(SERIALIZED_NAME_NAME1) + private String name1; + + public static final String SERIALIZED_NAME_NAME2 = "name2"; + @SerializedName(SERIALIZED_NAME_NAME2) + private String name2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE1 = "addressLine1"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE1) + private String addressLine1; + + public static final String SERIALIZED_NAME_ADDRESS_LINE2 = "addressLine2"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE2) + private String addressLine2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE3 = "addressLine3"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE3) + private String addressLine3; + + public static final String SERIALIZED_NAME_ADDRESS_LINE4 = "addressLine4"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE4) + private String addressLine4; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; + @SerializedName(SERIALIZED_NAME_POSTAL_CODE) + private String postalCode; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) + private String phoneNumber; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public OrderCreateRequestShipToInfo() { + } + + public OrderCreateRequestShipToInfo addressId(String addressId) { + this.addressId = addressId; + return this; + } + + /** + * The ID references the resellers address in Ingram Micro's system for shipping. Provided to resellers during the onboarding process. + * @return addressId + **/ + @javax.annotation.Nullable + public String getAddressId() { + return addressId; + } + + public void setAddressId(String addressId) { + this.addressId = addressId; + } + + + public OrderCreateRequestShipToInfo contact(String contact) { + this.contact = contact; + return this; + } + + /** + * The company contact provided by the reseller. + * @return contact + **/ + @javax.annotation.Nullable + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + + public OrderCreateRequestShipToInfo companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * The name of the company the order will be shipped to. + * @return companyName + **/ + @javax.annotation.Nullable + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public OrderCreateRequestShipToInfo name1(String name1) { + this.name1 = name1; + return this; + } + + /** + * name1 + * @return name1 + **/ + @javax.annotation.Nullable + public String getName1() { + return name1; + } + + public void setName1(String name1) { + this.name1 = name1; + } + + + public OrderCreateRequestShipToInfo name2(String name2) { + this.name2 = name2; + return this; + } + + /** + * name2 + * @return name2 + **/ + @javax.annotation.Nullable + public String getName2() { + return name2; + } + + public void setName2(String name2) { + this.name2 = name2; + } + + + public OrderCreateRequestShipToInfo addressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + return this; + } + + /** + * The street address and building or house number the order will be shipped to. + * @return addressLine1 + **/ + @javax.annotation.Nullable + public String getAddressLine1() { + return addressLine1; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + + public OrderCreateRequestShipToInfo addressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + return this; + } + + /** + * The apartment number the order will be shipped to. + * @return addressLine2 + **/ + @javax.annotation.Nullable + public String getAddressLine2() { + return addressLine2; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + + public OrderCreateRequestShipToInfo addressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + return this; + } + + /** + * Line 3 of the address the order will be shipped to. + * @return addressLine3 + **/ + @javax.annotation.Nullable + public String getAddressLine3() { + return addressLine3; + } + + public void setAddressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + } + + + public OrderCreateRequestShipToInfo addressLine4(String addressLine4) { + this.addressLine4 = addressLine4; + return this; + } + + /** + * Street address4 + * @return addressLine4 + **/ + @javax.annotation.Nullable + public String getAddressLine4() { + return addressLine4; + } + + public void setAddressLine4(String addressLine4) { + this.addressLine4 = addressLine4; + } + + + public OrderCreateRequestShipToInfo city(String city) { + this.city = city; + return this; + } + + /** + * The city the order will be shipped to. + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public OrderCreateRequestShipToInfo state(String state) { + this.state = state; + return this; + } + + /** + * The state the order will be shipped to. + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public OrderCreateRequestShipToInfo postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * The zip or postal code the order will be shipped to. + * @return postalCode + **/ + @javax.annotation.Nullable + public String getPostalCode() { + return postalCode; + } + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public OrderCreateRequestShipToInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * The two-character ISO country code the order will be shipped to. + * @return countryCode + **/ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public OrderCreateRequestShipToInfo phoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * The company contact phone number. + * @return phoneNumber + **/ + @javax.annotation.Nullable + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public OrderCreateRequestShipToInfo email(String email) { + this.email = email; + return this; + } + + /** + * The company contact email address. + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateRequestShipToInfo orderCreateRequestShipToInfo = (OrderCreateRequestShipToInfo) o; + return Objects.equals(this.addressId, orderCreateRequestShipToInfo.addressId) && + Objects.equals(this.contact, orderCreateRequestShipToInfo.contact) && + Objects.equals(this.companyName, orderCreateRequestShipToInfo.companyName) && + Objects.equals(this.name1, orderCreateRequestShipToInfo.name1) && + Objects.equals(this.name2, orderCreateRequestShipToInfo.name2) && + Objects.equals(this.addressLine1, orderCreateRequestShipToInfo.addressLine1) && + Objects.equals(this.addressLine2, orderCreateRequestShipToInfo.addressLine2) && + Objects.equals(this.addressLine3, orderCreateRequestShipToInfo.addressLine3) && + Objects.equals(this.addressLine4, orderCreateRequestShipToInfo.addressLine4) && + Objects.equals(this.city, orderCreateRequestShipToInfo.city) && + Objects.equals(this.state, orderCreateRequestShipToInfo.state) && + Objects.equals(this.postalCode, orderCreateRequestShipToInfo.postalCode) && + Objects.equals(this.countryCode, orderCreateRequestShipToInfo.countryCode) && + Objects.equals(this.phoneNumber, orderCreateRequestShipToInfo.phoneNumber) && + Objects.equals(this.email, orderCreateRequestShipToInfo.email); + } + + @Override + public int hashCode() { + return Objects.hash(addressId, contact, companyName, name1, name2, addressLine1, addressLine2, addressLine3, addressLine4, city, state, postalCode, countryCode, phoneNumber, email); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateRequestShipToInfo {\n"); + sb.append(" addressId: ").append(toIndentedString(addressId)).append("\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" name1: ").append(toIndentedString(name1)).append("\n"); + sb.append(" name2: ").append(toIndentedString(name2)).append("\n"); + sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); + sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); + sb.append(" addressLine3: ").append(toIndentedString(addressLine3)).append("\n"); + sb.append(" addressLine4: ").append(toIndentedString(addressLine4)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("addressId"); + openapiFields.add("contact"); + openapiFields.add("companyName"); + openapiFields.add("name1"); + openapiFields.add("name2"); + openapiFields.add("addressLine1"); + openapiFields.add("addressLine2"); + openapiFields.add("addressLine3"); + openapiFields.add("addressLine4"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalCode"); + openapiFields.add("countryCode"); + openapiFields.add("phoneNumber"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateRequestShipToInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateRequestShipToInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateRequestShipToInfo is not found in the empty JSON string", OrderCreateRequestShipToInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateRequestShipToInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateRequestShipToInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("addressId") != null && !jsonObj.get("addressId").isJsonNull()) && !jsonObj.get("addressId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressId").toString())); + } + if ((jsonObj.get("contact") != null && !jsonObj.get("contact").isJsonNull()) && !jsonObj.get("contact").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contact` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact").toString())); + } + if ((jsonObj.get("companyName") != null && !jsonObj.get("companyName").isJsonNull()) && !jsonObj.get("companyName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); + } + if ((jsonObj.get("name1") != null && !jsonObj.get("name1").isJsonNull()) && !jsonObj.get("name1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name1").toString())); + } + if ((jsonObj.get("name2") != null && !jsonObj.get("name2").isJsonNull()) && !jsonObj.get("name2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name2").toString())); + } + if ((jsonObj.get("addressLine1") != null && !jsonObj.get("addressLine1").isJsonNull()) && !jsonObj.get("addressLine1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine1").toString())); + } + if ((jsonObj.get("addressLine2") != null && !jsonObj.get("addressLine2").isJsonNull()) && !jsonObj.get("addressLine2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine2").toString())); + } + if ((jsonObj.get("addressLine3") != null && !jsonObj.get("addressLine3").isJsonNull()) && !jsonObj.get("addressLine3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine3").toString())); + } + if ((jsonObj.get("addressLine4") != null && !jsonObj.get("addressLine4").isJsonNull()) && !jsonObj.get("addressLine4").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine4` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine4").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateRequestShipToInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateRequestShipToInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateRequestShipToInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateRequestShipToInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateRequestShipToInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateRequestShipToInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateRequestShipToInfo + * @throws IOException if the JSON string is invalid with respect to OrderCreateRequestShipToInfo + */ + public static OrderCreateRequestShipToInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateRequestShipToInfo.class); + } + + /** + * Convert an instance of OrderCreateRequestShipToInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateRequestShipmentDetails.java b/src/main/java/xiresellers/client/model/OrderCreateRequestShipmentDetails.java new file mode 100644 index 00000000..ba517a89 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateRequestShipmentDetails.java @@ -0,0 +1,346 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Shipping details for the order provided by the customer. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateRequestShipmentDetails { + public static final String SERIALIZED_NAME_CARRIER_CODE = "carrierCode"; + @SerializedName(SERIALIZED_NAME_CARRIER_CODE) + private String carrierCode; + + public static final String SERIALIZED_NAME_FREIGHT_ACCOUNT_NUMBER = "freightAccountNumber"; + @SerializedName(SERIALIZED_NAME_FREIGHT_ACCOUNT_NUMBER) + private String freightAccountNumber; + + public static final String SERIALIZED_NAME_SHIP_COMPLETE = "shipComplete"; + @SerializedName(SERIALIZED_NAME_SHIP_COMPLETE) + private String shipComplete; + + public static final String SERIALIZED_NAME_REQUESTED_DELIVERY_DATE = "requestedDeliveryDate"; + @SerializedName(SERIALIZED_NAME_REQUESTED_DELIVERY_DATE) + private LocalDate requestedDeliveryDate; + + public static final String SERIALIZED_NAME_SIGNATURE_REQUIRED = "signatureRequired"; + @SerializedName(SERIALIZED_NAME_SIGNATURE_REQUIRED) + private Boolean signatureRequired; + + public static final String SERIALIZED_NAME_SHIPPING_INSTRUCTIONS = "shippingInstructions"; + @SerializedName(SERIALIZED_NAME_SHIPPING_INSTRUCTIONS) + private String shippingInstructions; + + public OrderCreateRequestShipmentDetails() { + } + + public OrderCreateRequestShipmentDetails carrierCode(String carrierCode) { + this.carrierCode = carrierCode; + return this; + } + + /** + * The code for the shipping carrier for the line item. + * @return carrierCode + **/ + @javax.annotation.Nullable + public String getCarrierCode() { + return carrierCode; + } + + public void setCarrierCode(String carrierCode) { + this.carrierCode = carrierCode; + } + + + public OrderCreateRequestShipmentDetails freightAccountNumber(String freightAccountNumber) { + this.freightAccountNumber = freightAccountNumber; + return this; + } + + /** + * The reseller 's shipping account number with carrier. Used to bill the shipping carrier directly from the reseller's account with the carrier. + * @return freightAccountNumber + **/ + @javax.annotation.Nullable + public String getFreightAccountNumber() { + return freightAccountNumber; + } + + public void setFreightAccountNumber(String freightAccountNumber) { + this.freightAccountNumber = freightAccountNumber; + } + + + public OrderCreateRequestShipmentDetails shipComplete(String shipComplete) { + this.shipComplete = shipComplete; + return this; + } + + /** + * Specifies whether the shipment will be shipped only when all products are fulfilled. The value of this field along with acceptBackOrder field decides the value of backorderflag. If this field is set, acceptBackOrder field is ignored. Possible values for this field are true, C, P, E. With value as true or C, backorderflag will be set as C. With value as P, or E, backorderflag will be set as P or E respectively. C = Ship complete at distribution level. P = ship complete at line level. E = ship complete across all distributions. + * @return shipComplete + **/ + @javax.annotation.Nullable + public String getShipComplete() { + return shipComplete; + } + + public void setShipComplete(String shipComplete) { + this.shipComplete = shipComplete; + } + + + public OrderCreateRequestShipmentDetails requestedDeliveryDate(LocalDate requestedDeliveryDate) { + this.requestedDeliveryDate = requestedDeliveryDate; + return this; + } + + /** + * The reseller-requested delivery date in UTC format. Delivery date is not guaranteed. + * @return requestedDeliveryDate + **/ + @javax.annotation.Nullable + public LocalDate getRequestedDeliveryDate() { + return requestedDeliveryDate; + } + + public void setRequestedDeliveryDate(LocalDate requestedDeliveryDate) { + this.requestedDeliveryDate = requestedDeliveryDate; + } + + + public OrderCreateRequestShipmentDetails signatureRequired(Boolean signatureRequired) { + this.signatureRequired = signatureRequired; + return this; + } + + /** + * Specifies whether a signature is required for delivery. Default is False. + * @return signatureRequired + **/ + @javax.annotation.Nullable + public Boolean getSignatureRequired() { + return signatureRequired; + } + + public void setSignatureRequired(Boolean signatureRequired) { + this.signatureRequired = signatureRequired; + } + + + public OrderCreateRequestShipmentDetails shippingInstructions(String shippingInstructions) { + this.shippingInstructions = shippingInstructions; + return this; + } + + /** + * Get shippingInstructions + * @return shippingInstructions + **/ + @javax.annotation.Nullable + public String getShippingInstructions() { + return shippingInstructions; + } + + public void setShippingInstructions(String shippingInstructions) { + this.shippingInstructions = shippingInstructions; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateRequestShipmentDetails orderCreateRequestShipmentDetails = (OrderCreateRequestShipmentDetails) o; + return Objects.equals(this.carrierCode, orderCreateRequestShipmentDetails.carrierCode) && + Objects.equals(this.freightAccountNumber, orderCreateRequestShipmentDetails.freightAccountNumber) && + Objects.equals(this.shipComplete, orderCreateRequestShipmentDetails.shipComplete) && + Objects.equals(this.requestedDeliveryDate, orderCreateRequestShipmentDetails.requestedDeliveryDate) && + Objects.equals(this.signatureRequired, orderCreateRequestShipmentDetails.signatureRequired) && + Objects.equals(this.shippingInstructions, orderCreateRequestShipmentDetails.shippingInstructions); + } + + @Override + public int hashCode() { + return Objects.hash(carrierCode, freightAccountNumber, shipComplete, requestedDeliveryDate, signatureRequired, shippingInstructions); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateRequestShipmentDetails {\n"); + sb.append(" carrierCode: ").append(toIndentedString(carrierCode)).append("\n"); + sb.append(" freightAccountNumber: ").append(toIndentedString(freightAccountNumber)).append("\n"); + sb.append(" shipComplete: ").append(toIndentedString(shipComplete)).append("\n"); + sb.append(" requestedDeliveryDate: ").append(toIndentedString(requestedDeliveryDate)).append("\n"); + sb.append(" signatureRequired: ").append(toIndentedString(signatureRequired)).append("\n"); + sb.append(" shippingInstructions: ").append(toIndentedString(shippingInstructions)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("carrierCode"); + openapiFields.add("freightAccountNumber"); + openapiFields.add("shipComplete"); + openapiFields.add("requestedDeliveryDate"); + openapiFields.add("signatureRequired"); + openapiFields.add("shippingInstructions"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateRequestShipmentDetails + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateRequestShipmentDetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateRequestShipmentDetails is not found in the empty JSON string", OrderCreateRequestShipmentDetails.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateRequestShipmentDetails.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateRequestShipmentDetails` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("carrierCode") != null && !jsonObj.get("carrierCode").isJsonNull()) && !jsonObj.get("carrierCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `carrierCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierCode").toString())); + } + if ((jsonObj.get("freightAccountNumber") != null && !jsonObj.get("freightAccountNumber").isJsonNull()) && !jsonObj.get("freightAccountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `freightAccountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("freightAccountNumber").toString())); + } + if ((jsonObj.get("shipComplete") != null && !jsonObj.get("shipComplete").isJsonNull()) && !jsonObj.get("shipComplete").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shipComplete` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shipComplete").toString())); + } + if ((jsonObj.get("shippingInstructions") != null && !jsonObj.get("shippingInstructions").isJsonNull()) && !jsonObj.get("shippingInstructions").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shippingInstructions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shippingInstructions").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateRequestShipmentDetails.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateRequestShipmentDetails' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateRequestShipmentDetails.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateRequestShipmentDetails value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateRequestShipmentDetails read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateRequestShipmentDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateRequestShipmentDetails + * @throws IOException if the JSON string is invalid with respect to OrderCreateRequestShipmentDetails + */ + public static OrderCreateRequestShipmentDetails fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateRequestShipmentDetails.class); + } + + /** + * Convert an instance of OrderCreateRequestShipmentDetails to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateRequestVmf.java b/src/main/java/xiresellers/client/model/OrderCreateRequestVmf.java new file mode 100644 index 00000000..b4686338 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateRequestVmf.java @@ -0,0 +1,206 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Vendor mandatory fields, this is required in case of warranty orders. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateRequestVmf { + public static final String SERIALIZED_NAME_VEND_AUTH_NUMBER = "vendAuthNumber"; + @SerializedName(SERIALIZED_NAME_VEND_AUTH_NUMBER) + private String vendAuthNumber; + + public OrderCreateRequestVmf() { + } + + public OrderCreateRequestVmf vendAuthNumber(String vendAuthNumber) { + this.vendAuthNumber = vendAuthNumber; + return this; + } + + /** + * Authorization number provided by vendor to Ingram's reseller. Orders will be placed on hold without this value, vendor specific mandatory field - please reach out Ingram Sales team for list of vendor for whom this is mandatory. + * @return vendAuthNumber + **/ + @javax.annotation.Nullable + public String getVendAuthNumber() { + return vendAuthNumber; + } + + public void setVendAuthNumber(String vendAuthNumber) { + this.vendAuthNumber = vendAuthNumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateRequestVmf orderCreateRequestVmf = (OrderCreateRequestVmf) o; + return Objects.equals(this.vendAuthNumber, orderCreateRequestVmf.vendAuthNumber); + } + + @Override + public int hashCode() { + return Objects.hash(vendAuthNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateRequestVmf {\n"); + sb.append(" vendAuthNumber: ").append(toIndentedString(vendAuthNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("vendAuthNumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateRequestVmf + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateRequestVmf.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateRequestVmf is not found in the empty JSON string", OrderCreateRequestVmf.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateRequestVmf.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateRequestVmf` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("vendAuthNumber") != null && !jsonObj.get("vendAuthNumber").isJsonNull()) && !jsonObj.get("vendAuthNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendAuthNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendAuthNumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateRequestVmf.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateRequestVmf' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateRequestVmf.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateRequestVmf value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateRequestVmf read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateRequestVmf given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateRequestVmf + * @throws IOException if the JSON string is invalid with respect to OrderCreateRequestVmf + */ + public static OrderCreateRequestVmf fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateRequestVmf.class); + } + + /** + * Convert an instance of OrderCreateRequestVmf to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateResponse.java b/src/main/java/xiresellers/client/model/OrderCreateResponse.java new file mode 100644 index 00000000..25c9b036 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateResponse.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderCreateResponseServiceresponse; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Response schema for order create endpoint + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateResponse { + public static final String SERIALIZED_NAME_SERVICERESPONSE = "serviceresponse"; + @SerializedName(SERIALIZED_NAME_SERVICERESPONSE) + private OrderCreateResponseServiceresponse serviceresponse; + + public OrderCreateResponse() { + } + + public OrderCreateResponse serviceresponse(OrderCreateResponseServiceresponse serviceresponse) { + this.serviceresponse = serviceresponse; + return this; + } + + /** + * Get serviceresponse + * @return serviceresponse + **/ + @javax.annotation.Nullable + public OrderCreateResponseServiceresponse getServiceresponse() { + return serviceresponse; + } + + public void setServiceresponse(OrderCreateResponseServiceresponse serviceresponse) { + this.serviceresponse = serviceresponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateResponse orderCreateResponse = (OrderCreateResponse) o; + return Objects.equals(this.serviceresponse, orderCreateResponse.serviceresponse); + } + + @Override + public int hashCode() { + return Objects.hash(serviceresponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateResponse {\n"); + sb.append(" serviceresponse: ").append(toIndentedString(serviceresponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("serviceresponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateResponse is not found in the empty JSON string", OrderCreateResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `serviceresponse` + if (jsonObj.get("serviceresponse") != null && !jsonObj.get("serviceresponse").isJsonNull()) { + OrderCreateResponseServiceresponse.validateJsonElement(jsonObj.get("serviceresponse")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateResponse + * @throws IOException if the JSON string is invalid with respect to OrderCreateResponse + */ + public static OrderCreateResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateResponse.class); + } + + /** + * Convert an instance of OrderCreateResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateResponseEndUserInfo.java b/src/main/java/xiresellers/client/model/OrderCreateResponseEndUserInfo.java new file mode 100644 index 00000000..6a4c714c --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateResponseEndUserInfo.java @@ -0,0 +1,612 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * The contact information for the end user/customer provided by the reseller. Used to determine pricing and discounts. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateResponseEndUserInfo { + public static final String SERIALIZED_NAME_END_USER_ID = "endUserId"; + @SerializedName(SERIALIZED_NAME_END_USER_ID) + private String endUserId; + + public static final String SERIALIZED_NAME_CONTACT = "contact"; + @SerializedName(SERIALIZED_NAME_CONTACT) + private String contact; + + public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; + @SerializedName(SERIALIZED_NAME_COMPANY_NAME) + private String companyName; + + public static final String SERIALIZED_NAME_NAME1 = "name1"; + @SerializedName(SERIALIZED_NAME_NAME1) + private String name1; + + public static final String SERIALIZED_NAME_NAME2 = "name2"; + @SerializedName(SERIALIZED_NAME_NAME2) + private String name2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE1 = "addressLine1"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE1) + private String addressLine1; + + public static final String SERIALIZED_NAME_ADDRESS_LINE2 = "addressLine2"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE2) + private String addressLine2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE3 = "addressLine3"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE3) + private String addressLine3; + + public static final String SERIALIZED_NAME_ADDRESS_LINE4 = "addressLine4"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE4) + private String addressLine4; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; + @SerializedName(SERIALIZED_NAME_POSTAL_CODE) + private String postalCode; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) + private String phoneNumber; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public OrderCreateResponseEndUserInfo() { + } + + public OrderCreateResponseEndUserInfo endUserId(String endUserId) { + this.endUserId = endUserId; + return this; + } + + /** + * The unique ID provided by the reseller for the end user/customer. + * @return endUserId + **/ + @javax.annotation.Nullable + public String getEndUserId() { + return endUserId; + } + + public void setEndUserId(String endUserId) { + this.endUserId = endUserId; + } + + + public OrderCreateResponseEndUserInfo contact(String contact) { + this.contact = contact; + return this; + } + + /** + * The contact name for the end user/customer. + * @return contact + **/ + @javax.annotation.Nullable + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + + public OrderCreateResponseEndUserInfo companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * The company name for the end user/customer. + * @return companyName + **/ + @javax.annotation.Nullable + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public OrderCreateResponseEndUserInfo name1(String name1) { + this.name1 = name1; + return this; + } + + /** + * name1 + * @return name1 + **/ + @javax.annotation.Nullable + public String getName1() { + return name1; + } + + public void setName1(String name1) { + this.name1 = name1; + } + + + public OrderCreateResponseEndUserInfo name2(String name2) { + this.name2 = name2; + return this; + } + + /** + * name2 + * @return name2 + **/ + @javax.annotation.Nullable + public String getName2() { + return name2; + } + + public void setName2(String name2) { + this.name2 = name2; + } + + + public OrderCreateResponseEndUserInfo addressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + return this; + } + + /** + * The street adress and building or house number for the end user/customer. + * @return addressLine1 + **/ + @javax.annotation.Nullable + public String getAddressLine1() { + return addressLine1; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + + public OrderCreateResponseEndUserInfo addressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + return this; + } + + /** + * The apartment number for the end user/customer. + * @return addressLine2 + **/ + @javax.annotation.Nullable + public String getAddressLine2() { + return addressLine2; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + + public OrderCreateResponseEndUserInfo addressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + return this; + } + + /** + * Line 3 of the address for the end user/customer. + * @return addressLine3 + **/ + @javax.annotation.Nullable + public String getAddressLine3() { + return addressLine3; + } + + public void setAddressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + } + + + public OrderCreateResponseEndUserInfo addressLine4(String addressLine4) { + this.addressLine4 = addressLine4; + return this; + } + + /** + * Street address4 + * @return addressLine4 + **/ + @javax.annotation.Nullable + public String getAddressLine4() { + return addressLine4; + } + + public void setAddressLine4(String addressLine4) { + this.addressLine4 = addressLine4; + } + + + public OrderCreateResponseEndUserInfo city(String city) { + this.city = city; + return this; + } + + /** + * The end user/customer's city. + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public OrderCreateResponseEndUserInfo state(String state) { + this.state = state; + return this; + } + + /** + * The end user/customer's state. + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public OrderCreateResponseEndUserInfo postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * The end user/customer's zip or postal code. + * @return postalCode + **/ + @javax.annotation.Nullable + public String getPostalCode() { + return postalCode; + } + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public OrderCreateResponseEndUserInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * The end user/customer's two-character ISO country code. + * @return countryCode + **/ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public OrderCreateResponseEndUserInfo phoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * The end user/customer's phone number. + * @return phoneNumber + **/ + @javax.annotation.Nullable + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public OrderCreateResponseEndUserInfo email(String email) { + this.email = email; + return this; + } + + /** + * The end user/customer's email. + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateResponseEndUserInfo orderCreateResponseEndUserInfo = (OrderCreateResponseEndUserInfo) o; + return Objects.equals(this.endUserId, orderCreateResponseEndUserInfo.endUserId) && + Objects.equals(this.contact, orderCreateResponseEndUserInfo.contact) && + Objects.equals(this.companyName, orderCreateResponseEndUserInfo.companyName) && + Objects.equals(this.name1, orderCreateResponseEndUserInfo.name1) && + Objects.equals(this.name2, orderCreateResponseEndUserInfo.name2) && + Objects.equals(this.addressLine1, orderCreateResponseEndUserInfo.addressLine1) && + Objects.equals(this.addressLine2, orderCreateResponseEndUserInfo.addressLine2) && + Objects.equals(this.addressLine3, orderCreateResponseEndUserInfo.addressLine3) && + Objects.equals(this.addressLine4, orderCreateResponseEndUserInfo.addressLine4) && + Objects.equals(this.city, orderCreateResponseEndUserInfo.city) && + Objects.equals(this.state, orderCreateResponseEndUserInfo.state) && + Objects.equals(this.postalCode, orderCreateResponseEndUserInfo.postalCode) && + Objects.equals(this.countryCode, orderCreateResponseEndUserInfo.countryCode) && + Objects.equals(this.phoneNumber, orderCreateResponseEndUserInfo.phoneNumber) && + Objects.equals(this.email, orderCreateResponseEndUserInfo.email); + } + + @Override + public int hashCode() { + return Objects.hash(endUserId, contact, companyName, name1, name2, addressLine1, addressLine2, addressLine3, addressLine4, city, state, postalCode, countryCode, phoneNumber, email); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateResponseEndUserInfo {\n"); + sb.append(" endUserId: ").append(toIndentedString(endUserId)).append("\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" name1: ").append(toIndentedString(name1)).append("\n"); + sb.append(" name2: ").append(toIndentedString(name2)).append("\n"); + sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); + sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); + sb.append(" addressLine3: ").append(toIndentedString(addressLine3)).append("\n"); + sb.append(" addressLine4: ").append(toIndentedString(addressLine4)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("endUserId"); + openapiFields.add("contact"); + openapiFields.add("companyName"); + openapiFields.add("name1"); + openapiFields.add("name2"); + openapiFields.add("addressLine1"); + openapiFields.add("addressLine2"); + openapiFields.add("addressLine3"); + openapiFields.add("addressLine4"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalCode"); + openapiFields.add("countryCode"); + openapiFields.add("phoneNumber"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateResponseEndUserInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateResponseEndUserInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateResponseEndUserInfo is not found in the empty JSON string", OrderCreateResponseEndUserInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateResponseEndUserInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateResponseEndUserInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("endUserId") != null && !jsonObj.get("endUserId").isJsonNull()) && !jsonObj.get("endUserId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endUserId").toString())); + } + if ((jsonObj.get("contact") != null && !jsonObj.get("contact").isJsonNull()) && !jsonObj.get("contact").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contact` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact").toString())); + } + if ((jsonObj.get("companyName") != null && !jsonObj.get("companyName").isJsonNull()) && !jsonObj.get("companyName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); + } + if ((jsonObj.get("name1") != null && !jsonObj.get("name1").isJsonNull()) && !jsonObj.get("name1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name1").toString())); + } + if ((jsonObj.get("name2") != null && !jsonObj.get("name2").isJsonNull()) && !jsonObj.get("name2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name2").toString())); + } + if ((jsonObj.get("addressLine1") != null && !jsonObj.get("addressLine1").isJsonNull()) && !jsonObj.get("addressLine1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine1").toString())); + } + if ((jsonObj.get("addressLine2") != null && !jsonObj.get("addressLine2").isJsonNull()) && !jsonObj.get("addressLine2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine2").toString())); + } + if ((jsonObj.get("addressLine3") != null && !jsonObj.get("addressLine3").isJsonNull()) && !jsonObj.get("addressLine3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine3").toString())); + } + if ((jsonObj.get("addressLine4") != null && !jsonObj.get("addressLine4").isJsonNull()) && !jsonObj.get("addressLine4").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine4` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine4").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateResponseEndUserInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateResponseEndUserInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateResponseEndUserInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateResponseEndUserInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateResponseEndUserInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateResponseEndUserInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateResponseEndUserInfo + * @throws IOException if the JSON string is invalid with respect to OrderCreateResponseEndUserInfo + */ + public static OrderCreateResponseEndUserInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateResponseEndUserInfo.class); + } + + /** + * Convert an instance of OrderCreateResponseEndUserInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInner.java b/src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInner.java new file mode 100644 index 00000000..3152e638 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInner.java @@ -0,0 +1,726 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderCreateResponseOrdersInnerAdditionalAttributesInner; +import xiresellers.client.model.OrderCreateResponseOrdersInnerLinesInner; +import xiresellers.client.model.OrderCreateResponseOrdersInnerLinksInner; +import xiresellers.client.model.OrderCreateResponseOrdersInnerMiscellaneousChargesInner; +import xiresellers.client.model.OrderCreateResponseOrdersInnerRejectedLineItemsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateResponseOrdersInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateResponseOrdersInner { + public static final String SERIALIZED_NAME_NUMBER_OF_LINES_WITH_SUCCESS = "numberOfLinesWithSuccess"; + @SerializedName(SERIALIZED_NAME_NUMBER_OF_LINES_WITH_SUCCESS) + private Integer numberOfLinesWithSuccess; + + public static final String SERIALIZED_NAME_NUMBER_OF_LINES_WITH_ERROR = "numberOfLinesWithError"; + @SerializedName(SERIALIZED_NAME_NUMBER_OF_LINES_WITH_ERROR) + private Integer numberOfLinesWithError; + + public static final String SERIALIZED_NAME_NUMBER_OF_LINES_WITH_WARNING = "numberOfLinesWithWarning"; + @SerializedName(SERIALIZED_NAME_NUMBER_OF_LINES_WITH_WARNING) + private Integer numberOfLinesWithWarning; + + public static final String SERIALIZED_NAME_INGRAM_ORDER_NUMBER = "ingramOrderNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_ORDER_NUMBER) + private String ingramOrderNumber; + + public static final String SERIALIZED_NAME_INGRAM_ORDER_DATE = "ingramOrderDate"; + @SerializedName(SERIALIZED_NAME_INGRAM_ORDER_DATE) + private String ingramOrderDate; + + public static final String SERIALIZED_NAME_NOTES = "notes"; + @SerializedName(SERIALIZED_NAME_NOTES) + private String notes; + + public static final String SERIALIZED_NAME_ORDER_TYPE = "orderType"; + @SerializedName(SERIALIZED_NAME_ORDER_TYPE) + private String orderType; + + public static final String SERIALIZED_NAME_ORDER_TOTAL = "orderTotal"; + @SerializedName(SERIALIZED_NAME_ORDER_TOTAL) + private BigDecimal orderTotal; + + public static final String SERIALIZED_NAME_FREIGHT_CHARGES = "freightCharges"; + @SerializedName(SERIALIZED_NAME_FREIGHT_CHARGES) + private BigDecimal freightCharges; + + public static final String SERIALIZED_NAME_TOTAL_TAX = "totalTax"; + @SerializedName(SERIALIZED_NAME_TOTAL_TAX) + private BigDecimal totalTax; + + public static final String SERIALIZED_NAME_CURRENCY_CODE = "currencyCode"; + @SerializedName(SERIALIZED_NAME_CURRENCY_CODE) + private String currencyCode; + + public static final String SERIALIZED_NAME_LINES = "lines"; + @SerializedName(SERIALIZED_NAME_LINES) + private List lines; + + public static final String SERIALIZED_NAME_MISCELLANEOUS_CHARGES = "miscellaneousCharges"; + @SerializedName(SERIALIZED_NAME_MISCELLANEOUS_CHARGES) + private List miscellaneousCharges; + + public static final String SERIALIZED_NAME_LINKS = "links"; + @SerializedName(SERIALIZED_NAME_LINKS) + private List links; + + public static final String SERIALIZED_NAME_REJECTED_LINE_ITEMS = "rejectedLineItems"; + @SerializedName(SERIALIZED_NAME_REJECTED_LINE_ITEMS) + private List rejectedLineItems; + + public static final String SERIALIZED_NAME_ADDITIONAL_ATTRIBUTES = "additionalAttributes"; + @SerializedName(SERIALIZED_NAME_ADDITIONAL_ATTRIBUTES) + private List additionalAttributes; + + public OrderCreateResponseOrdersInner() { + } + + public OrderCreateResponseOrdersInner numberOfLinesWithSuccess(Integer numberOfLinesWithSuccess) { + this.numberOfLinesWithSuccess = numberOfLinesWithSuccess; + return this; + } + + /** + * The number of lines in the order that were successful. + * @return numberOfLinesWithSuccess + **/ + @javax.annotation.Nullable + public Integer getNumberOfLinesWithSuccess() { + return numberOfLinesWithSuccess; + } + + public void setNumberOfLinesWithSuccess(Integer numberOfLinesWithSuccess) { + this.numberOfLinesWithSuccess = numberOfLinesWithSuccess; + } + + + public OrderCreateResponseOrdersInner numberOfLinesWithError(Integer numberOfLinesWithError) { + this.numberOfLinesWithError = numberOfLinesWithError; + return this; + } + + /** + * The number of lines in the order that have errors. + * @return numberOfLinesWithError + **/ + @javax.annotation.Nullable + public Integer getNumberOfLinesWithError() { + return numberOfLinesWithError; + } + + public void setNumberOfLinesWithError(Integer numberOfLinesWithError) { + this.numberOfLinesWithError = numberOfLinesWithError; + } + + + public OrderCreateResponseOrdersInner numberOfLinesWithWarning(Integer numberOfLinesWithWarning) { + this.numberOfLinesWithWarning = numberOfLinesWithWarning; + return this; + } + + /** + * The number of lines in the order that have a warning. + * @return numberOfLinesWithWarning + **/ + @javax.annotation.Nullable + public Integer getNumberOfLinesWithWarning() { + return numberOfLinesWithWarning; + } + + public void setNumberOfLinesWithWarning(Integer numberOfLinesWithWarning) { + this.numberOfLinesWithWarning = numberOfLinesWithWarning; + } + + + public OrderCreateResponseOrdersInner ingramOrderNumber(String ingramOrderNumber) { + this.ingramOrderNumber = ingramOrderNumber; + return this; + } + + /** + * The Ingram Micro order number. + * @return ingramOrderNumber + **/ + @javax.annotation.Nullable + public String getIngramOrderNumber() { + return ingramOrderNumber; + } + + public void setIngramOrderNumber(String ingramOrderNumber) { + this.ingramOrderNumber = ingramOrderNumber; + } + + + public OrderCreateResponseOrdersInner ingramOrderDate(String ingramOrderDate) { + this.ingramOrderDate = ingramOrderDate; + return this; + } + + /** + * The date in UTC format that the order was created in Ingram Micro's system. + * @return ingramOrderDate + **/ + @javax.annotation.Nullable + public String getIngramOrderDate() { + return ingramOrderDate; + } + + public void setIngramOrderDate(String ingramOrderDate) { + this.ingramOrderDate = ingramOrderDate; + } + + + public OrderCreateResponseOrdersInner notes(String notes) { + this.notes = notes; + return this; + } + + /** + * Order-level notes. + * @return notes + **/ + @javax.annotation.Nullable + public String getNotes() { + return notes; + } + + public void setNotes(String notes) { + this.notes = notes; + } + + + public OrderCreateResponseOrdersInner orderType(String orderType) { + this.orderType = orderType; + return this; + } + + /** + * The order typer. One of: S=Stocked PO D=Direct Ship PO + * @return orderType + **/ + @javax.annotation.Nullable + public String getOrderType() { + return orderType; + } + + public void setOrderType(String orderType) { + this.orderType = orderType; + } + + + public OrderCreateResponseOrdersInner orderTotal(BigDecimal orderTotal) { + this.orderTotal = orderTotal; + return this; + } + + /** + * The total price for the order. + * @return orderTotal + **/ + @javax.annotation.Nullable + public BigDecimal getOrderTotal() { + return orderTotal; + } + + public void setOrderTotal(BigDecimal orderTotal) { + this.orderTotal = orderTotal; + } + + + public OrderCreateResponseOrdersInner freightCharges(BigDecimal freightCharges) { + this.freightCharges = freightCharges; + return this; + } + + /** + * The total freight charges for the order. + * @return freightCharges + **/ + @javax.annotation.Nullable + public BigDecimal getFreightCharges() { + return freightCharges; + } + + public void setFreightCharges(BigDecimal freightCharges) { + this.freightCharges = freightCharges; + } + + + public OrderCreateResponseOrdersInner totalTax(BigDecimal totalTax) { + this.totalTax = totalTax; + return this; + } + + /** + * The total tax for the order. + * @return totalTax + **/ + @javax.annotation.Nullable + public BigDecimal getTotalTax() { + return totalTax; + } + + public void setTotalTax(BigDecimal totalTax) { + this.totalTax = totalTax; + } + + + public OrderCreateResponseOrdersInner currencyCode(String currencyCode) { + this.currencyCode = currencyCode; + return this; + } + + /** + * The country-specific three character ISO 4217 currency code used for the order. + * @return currencyCode + **/ + @javax.annotation.Nullable + public String getCurrencyCode() { + return currencyCode; + } + + public void setCurrencyCode(String currencyCode) { + this.currencyCode = currencyCode; + } + + + public OrderCreateResponseOrdersInner lines(List lines) { + this.lines = lines; + return this; + } + + public OrderCreateResponseOrdersInner addLinesItem(OrderCreateResponseOrdersInnerLinesInner linesItem) { + if (this.lines == null) { + this.lines = new ArrayList<>(); + } + this.lines.add(linesItem); + return this; + } + + /** + * The line-level details for the order. + * @return lines + **/ + @javax.annotation.Nullable + public List getLines() { + return lines; + } + + public void setLines(List lines) { + this.lines = lines; + } + + + public OrderCreateResponseOrdersInner miscellaneousCharges(List miscellaneousCharges) { + this.miscellaneousCharges = miscellaneousCharges; + return this; + } + + public OrderCreateResponseOrdersInner addMiscellaneousChargesItem(OrderCreateResponseOrdersInnerMiscellaneousChargesInner miscellaneousChargesItem) { + if (this.miscellaneousCharges == null) { + this.miscellaneousCharges = new ArrayList<>(); + } + this.miscellaneousCharges.add(miscellaneousChargesItem); + return this; + } + + /** + * Get miscellaneousCharges + * @return miscellaneousCharges + **/ + @javax.annotation.Nullable + public List getMiscellaneousCharges() { + return miscellaneousCharges; + } + + public void setMiscellaneousCharges(List miscellaneousCharges) { + this.miscellaneousCharges = miscellaneousCharges; + } + + + public OrderCreateResponseOrdersInner links(List links) { + this.links = links; + return this; + } + + public OrderCreateResponseOrdersInner addLinksItem(OrderCreateResponseOrdersInnerLinksInner linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * Link to Order Details for the order(s). + * @return links + **/ + @javax.annotation.Nullable + public List getLinks() { + return links; + } + + public void setLinks(List links) { + this.links = links; + } + + + public OrderCreateResponseOrdersInner rejectedLineItems(List rejectedLineItems) { + this.rejectedLineItems = rejectedLineItems; + return this; + } + + public OrderCreateResponseOrdersInner addRejectedLineItemsItem(OrderCreateResponseOrdersInnerRejectedLineItemsInner rejectedLineItemsItem) { + if (this.rejectedLineItems == null) { + this.rejectedLineItems = new ArrayList<>(); + } + this.rejectedLineItems.add(rejectedLineItemsItem); + return this; + } + + /** + * A list of rejected line items. + * @return rejectedLineItems + **/ + @javax.annotation.Nullable + public List getRejectedLineItems() { + return rejectedLineItems; + } + + public void setRejectedLineItems(List rejectedLineItems) { + this.rejectedLineItems = rejectedLineItems; + } + + + public OrderCreateResponseOrdersInner additionalAttributes(List additionalAttributes) { + this.additionalAttributes = additionalAttributes; + return this; + } + + public OrderCreateResponseOrdersInner addAdditionalAttributesItem(OrderCreateResponseOrdersInnerAdditionalAttributesInner additionalAttributesItem) { + if (this.additionalAttributes == null) { + this.additionalAttributes = new ArrayList<>(); + } + this.additionalAttributes.add(additionalAttributesItem); + return this; + } + + /** + * Get additionalAttributes + * @return additionalAttributes + **/ + @javax.annotation.Nullable + public List getAdditionalAttributes() { + return additionalAttributes; + } + + public void setAdditionalAttributes(List additionalAttributes) { + this.additionalAttributes = additionalAttributes; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateResponseOrdersInner orderCreateResponseOrdersInner = (OrderCreateResponseOrdersInner) o; + return Objects.equals(this.numberOfLinesWithSuccess, orderCreateResponseOrdersInner.numberOfLinesWithSuccess) && + Objects.equals(this.numberOfLinesWithError, orderCreateResponseOrdersInner.numberOfLinesWithError) && + Objects.equals(this.numberOfLinesWithWarning, orderCreateResponseOrdersInner.numberOfLinesWithWarning) && + Objects.equals(this.ingramOrderNumber, orderCreateResponseOrdersInner.ingramOrderNumber) && + Objects.equals(this.ingramOrderDate, orderCreateResponseOrdersInner.ingramOrderDate) && + Objects.equals(this.notes, orderCreateResponseOrdersInner.notes) && + Objects.equals(this.orderType, orderCreateResponseOrdersInner.orderType) && + Objects.equals(this.orderTotal, orderCreateResponseOrdersInner.orderTotal) && + Objects.equals(this.freightCharges, orderCreateResponseOrdersInner.freightCharges) && + Objects.equals(this.totalTax, orderCreateResponseOrdersInner.totalTax) && + Objects.equals(this.currencyCode, orderCreateResponseOrdersInner.currencyCode) && + Objects.equals(this.lines, orderCreateResponseOrdersInner.lines) && + Objects.equals(this.miscellaneousCharges, orderCreateResponseOrdersInner.miscellaneousCharges) && + Objects.equals(this.links, orderCreateResponseOrdersInner.links) && + Objects.equals(this.rejectedLineItems, orderCreateResponseOrdersInner.rejectedLineItems) && + Objects.equals(this.additionalAttributes, orderCreateResponseOrdersInner.additionalAttributes); + } + + @Override + public int hashCode() { + return Objects.hash(numberOfLinesWithSuccess, numberOfLinesWithError, numberOfLinesWithWarning, ingramOrderNumber, ingramOrderDate, notes, orderType, orderTotal, freightCharges, totalTax, currencyCode, lines, miscellaneousCharges, links, rejectedLineItems, additionalAttributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateResponseOrdersInner {\n"); + sb.append(" numberOfLinesWithSuccess: ").append(toIndentedString(numberOfLinesWithSuccess)).append("\n"); + sb.append(" numberOfLinesWithError: ").append(toIndentedString(numberOfLinesWithError)).append("\n"); + sb.append(" numberOfLinesWithWarning: ").append(toIndentedString(numberOfLinesWithWarning)).append("\n"); + sb.append(" ingramOrderNumber: ").append(toIndentedString(ingramOrderNumber)).append("\n"); + sb.append(" ingramOrderDate: ").append(toIndentedString(ingramOrderDate)).append("\n"); + sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); + sb.append(" orderType: ").append(toIndentedString(orderType)).append("\n"); + sb.append(" orderTotal: ").append(toIndentedString(orderTotal)).append("\n"); + sb.append(" freightCharges: ").append(toIndentedString(freightCharges)).append("\n"); + sb.append(" totalTax: ").append(toIndentedString(totalTax)).append("\n"); + sb.append(" currencyCode: ").append(toIndentedString(currencyCode)).append("\n"); + sb.append(" lines: ").append(toIndentedString(lines)).append("\n"); + sb.append(" miscellaneousCharges: ").append(toIndentedString(miscellaneousCharges)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" rejectedLineItems: ").append(toIndentedString(rejectedLineItems)).append("\n"); + sb.append(" additionalAttributes: ").append(toIndentedString(additionalAttributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("numberOfLinesWithSuccess"); + openapiFields.add("numberOfLinesWithError"); + openapiFields.add("numberOfLinesWithWarning"); + openapiFields.add("ingramOrderNumber"); + openapiFields.add("ingramOrderDate"); + openapiFields.add("notes"); + openapiFields.add("orderType"); + openapiFields.add("orderTotal"); + openapiFields.add("freightCharges"); + openapiFields.add("totalTax"); + openapiFields.add("currencyCode"); + openapiFields.add("lines"); + openapiFields.add("miscellaneousCharges"); + openapiFields.add("links"); + openapiFields.add("rejectedLineItems"); + openapiFields.add("additionalAttributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateResponseOrdersInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateResponseOrdersInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateResponseOrdersInner is not found in the empty JSON string", OrderCreateResponseOrdersInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateResponseOrdersInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateResponseOrdersInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("ingramOrderNumber") != null && !jsonObj.get("ingramOrderNumber").isJsonNull()) && !jsonObj.get("ingramOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramOrderNumber").toString())); + } + if ((jsonObj.get("ingramOrderDate") != null && !jsonObj.get("ingramOrderDate").isJsonNull()) && !jsonObj.get("ingramOrderDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramOrderDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramOrderDate").toString())); + } + if ((jsonObj.get("notes") != null && !jsonObj.get("notes").isJsonNull()) && !jsonObj.get("notes").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `notes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("notes").toString())); + } + if ((jsonObj.get("orderType") != null && !jsonObj.get("orderType").isJsonNull()) && !jsonObj.get("orderType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `orderType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orderType").toString())); + } + if ((jsonObj.get("currencyCode") != null && !jsonObj.get("currencyCode").isJsonNull()) && !jsonObj.get("currencyCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `currencyCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currencyCode").toString())); + } + if (jsonObj.get("lines") != null && !jsonObj.get("lines").isJsonNull()) { + JsonArray jsonArraylines = jsonObj.getAsJsonArray("lines"); + if (jsonArraylines != null) { + // ensure the json data is an array + if (!jsonObj.get("lines").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `lines` to be an array in the JSON string but got `%s`", jsonObj.get("lines").toString())); + } + + // validate the optional field `lines` (array) + for (int i = 0; i < jsonArraylines.size(); i++) { + OrderCreateResponseOrdersInnerLinesInner.validateJsonElement(jsonArraylines.get(i)); + }; + } + } + if (jsonObj.get("miscellaneousCharges") != null && !jsonObj.get("miscellaneousCharges").isJsonNull()) { + JsonArray jsonArraymiscellaneousCharges = jsonObj.getAsJsonArray("miscellaneousCharges"); + if (jsonArraymiscellaneousCharges != null) { + // ensure the json data is an array + if (!jsonObj.get("miscellaneousCharges").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `miscellaneousCharges` to be an array in the JSON string but got `%s`", jsonObj.get("miscellaneousCharges").toString())); + } + + // validate the optional field `miscellaneousCharges` (array) + for (int i = 0; i < jsonArraymiscellaneousCharges.size(); i++) { + OrderCreateResponseOrdersInnerMiscellaneousChargesInner.validateJsonElement(jsonArraymiscellaneousCharges.get(i)); + }; + } + } + if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull()) { + JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); + if (jsonArraylinks != null) { + // ensure the json data is an array + if (!jsonObj.get("links").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + } + + // validate the optional field `links` (array) + for (int i = 0; i < jsonArraylinks.size(); i++) { + OrderCreateResponseOrdersInnerLinksInner.validateJsonElement(jsonArraylinks.get(i)); + }; + } + } + if (jsonObj.get("rejectedLineItems") != null && !jsonObj.get("rejectedLineItems").isJsonNull()) { + JsonArray jsonArrayrejectedLineItems = jsonObj.getAsJsonArray("rejectedLineItems"); + if (jsonArrayrejectedLineItems != null) { + // ensure the json data is an array + if (!jsonObj.get("rejectedLineItems").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `rejectedLineItems` to be an array in the JSON string but got `%s`", jsonObj.get("rejectedLineItems").toString())); + } + + // validate the optional field `rejectedLineItems` (array) + for (int i = 0; i < jsonArrayrejectedLineItems.size(); i++) { + OrderCreateResponseOrdersInnerRejectedLineItemsInner.validateJsonElement(jsonArrayrejectedLineItems.get(i)); + }; + } + } + if (jsonObj.get("additionalAttributes") != null && !jsonObj.get("additionalAttributes").isJsonNull()) { + JsonArray jsonArrayadditionalAttributes = jsonObj.getAsJsonArray("additionalAttributes"); + if (jsonArrayadditionalAttributes != null) { + // ensure the json data is an array + if (!jsonObj.get("additionalAttributes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `additionalAttributes` to be an array in the JSON string but got `%s`", jsonObj.get("additionalAttributes").toString())); + } + + // validate the optional field `additionalAttributes` (array) + for (int i = 0; i < jsonArrayadditionalAttributes.size(); i++) { + OrderCreateResponseOrdersInnerAdditionalAttributesInner.validateJsonElement(jsonArrayadditionalAttributes.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateResponseOrdersInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateResponseOrdersInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateResponseOrdersInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateResponseOrdersInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateResponseOrdersInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateResponseOrdersInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateResponseOrdersInner + * @throws IOException if the JSON string is invalid with respect to OrderCreateResponseOrdersInner + */ + public static OrderCreateResponseOrdersInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateResponseOrdersInner.class); + } + + /** + * Convert an instance of OrderCreateResponseOrdersInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerAdditionalAttributesInner.java b/src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerAdditionalAttributesInner.java new file mode 100644 index 00000000..82ee743e --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerAdditionalAttributesInner.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateResponseOrdersInnerAdditionalAttributesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateResponseOrdersInnerAdditionalAttributesInner { + public static final String SERIALIZED_NAME_ATTRIBUTE_NAME = "attributeName"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_NAME) + private String attributeName; + + public static final String SERIALIZED_NAME_ATTRIBUTE_VALUE = "attributeValue"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_VALUE) + private String attributeValue; + + public OrderCreateResponseOrdersInnerAdditionalAttributesInner() { + } + + public OrderCreateResponseOrdersInnerAdditionalAttributesInner attributeName(String attributeName) { + this.attributeName = attributeName; + return this; + } + + /** + * allowPartialOrder: Allow orders with failed lines. (SAP) Depends on backorder settings. dpasRating: DX rating by Department of Defense is the highest rating by the highest offices and meant to be top priority. DO any other gov offices at the federal level to priotize. dpasProgramId: Identifies the actual agency that signed off on the DPAS priority. storageLocation: Determine the location of the product stock in SAP for Marketplaces. soldTo: To be used in cases when Sold-To is different than Customer ID. Z101: Used for end customer details such as name, address, phone, etc. This information flows to SAP and is used by warehouse. euDepId: DEP ID would be the 'End User DEP/ABM Organization ID' up to 32 characters and is assigned by Apple. depOrderNbr: depordernbr is 'End User PO to reseller' Can appear in message lines or dedicated end user po#. + * @return attributeName + **/ + @javax.annotation.Nullable + public String getAttributeName() { + return attributeName; + } + + public void setAttributeName(String attributeName) { + this.attributeName = attributeName; + } + + + public OrderCreateResponseOrdersInnerAdditionalAttributesInner attributeValue(String attributeValue) { + this.attributeValue = attributeValue; + return this; + } + + /** + * Attribute value + * @return attributeValue + **/ + @javax.annotation.Nullable + public String getAttributeValue() { + return attributeValue; + } + + public void setAttributeValue(String attributeValue) { + this.attributeValue = attributeValue; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateResponseOrdersInnerAdditionalAttributesInner orderCreateResponseOrdersInnerAdditionalAttributesInner = (OrderCreateResponseOrdersInnerAdditionalAttributesInner) o; + return Objects.equals(this.attributeName, orderCreateResponseOrdersInnerAdditionalAttributesInner.attributeName) && + Objects.equals(this.attributeValue, orderCreateResponseOrdersInnerAdditionalAttributesInner.attributeValue); + } + + @Override + public int hashCode() { + return Objects.hash(attributeName, attributeValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateResponseOrdersInnerAdditionalAttributesInner {\n"); + sb.append(" attributeName: ").append(toIndentedString(attributeName)).append("\n"); + sb.append(" attributeValue: ").append(toIndentedString(attributeValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributeName"); + openapiFields.add("attributeValue"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateResponseOrdersInnerAdditionalAttributesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateResponseOrdersInnerAdditionalAttributesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateResponseOrdersInnerAdditionalAttributesInner is not found in the empty JSON string", OrderCreateResponseOrdersInnerAdditionalAttributesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateResponseOrdersInnerAdditionalAttributesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateResponseOrdersInnerAdditionalAttributesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("attributeName") != null && !jsonObj.get("attributeName").isJsonNull()) && !jsonObj.get("attributeName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeName").toString())); + } + if ((jsonObj.get("attributeValue") != null && !jsonObj.get("attributeValue").isJsonNull()) && !jsonObj.get("attributeValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeValue").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateResponseOrdersInnerAdditionalAttributesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateResponseOrdersInnerAdditionalAttributesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateResponseOrdersInnerAdditionalAttributesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateResponseOrdersInnerAdditionalAttributesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateResponseOrdersInnerAdditionalAttributesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateResponseOrdersInnerAdditionalAttributesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateResponseOrdersInnerAdditionalAttributesInner + * @throws IOException if the JSON string is invalid with respect to OrderCreateResponseOrdersInnerAdditionalAttributesInner + */ + public static OrderCreateResponseOrdersInnerAdditionalAttributesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateResponseOrdersInnerAdditionalAttributesInner.class); + } + + /** + * Convert an instance of OrderCreateResponseOrdersInnerAdditionalAttributesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinesInner.java b/src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinesInner.java new file mode 100644 index 00000000..82e04418 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinesInner.java @@ -0,0 +1,640 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner; +import xiresellers.client.model.OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateResponseOrdersInnerLinesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateResponseOrdersInnerLinesInner { + public static final String SERIALIZED_NAME_SUB_ORDER_NUMBER = "subOrderNumber"; + @SerializedName(SERIALIZED_NAME_SUB_ORDER_NUMBER) + private String subOrderNumber; + + public static final String SERIALIZED_NAME_INGRAM_LINE_NUMBER = "ingramLineNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_LINE_NUMBER) + private String ingramLineNumber; + + public static final String SERIALIZED_NAME_CUSTOMER_LINE_NUMBER = "customerLineNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_LINE_NUMBER) + private String customerLineNumber; + + public static final String SERIALIZED_NAME_LINE_STATUS = "lineStatus"; + @SerializedName(SERIALIZED_NAME_LINE_STATUS) + private String lineStatus; + + public static final String SERIALIZED_NAME_INGRAM_PART_NUMBER = "ingramPartNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PART_NUMBER) + private String ingramPartNumber; + + public static final String SERIALIZED_NAME_VENDOR_PART_NUMBER = "vendorPartNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_PART_NUMBER) + private String vendorPartNumber; + + public static final String SERIALIZED_NAME_UNIT_PRICE = "unitPrice"; + @SerializedName(SERIALIZED_NAME_UNIT_PRICE) + private BigDecimal unitPrice; + + public static final String SERIALIZED_NAME_EXTENDED_UNIT_PRICE = "extendedUnitPrice"; + @SerializedName(SERIALIZED_NAME_EXTENDED_UNIT_PRICE) + private BigDecimal extendedUnitPrice; + + public static final String SERIALIZED_NAME_QUANTITY_ORDERED = "quantityOrdered"; + @SerializedName(SERIALIZED_NAME_QUANTITY_ORDERED) + private Integer quantityOrdered; + + public static final String SERIALIZED_NAME_QUANTITY_CONFIRMED = "quantityConfirmed"; + @SerializedName(SERIALIZED_NAME_QUANTITY_CONFIRMED) + private Integer quantityConfirmed; + + public static final String SERIALIZED_NAME_QUANTITY_BACK_ORDERED = "quantityBackOrdered"; + @SerializedName(SERIALIZED_NAME_QUANTITY_BACK_ORDERED) + private Integer quantityBackOrdered; + + public static final String SERIALIZED_NAME_SPECIAL_BID_NUMBER = "specialBidNumber"; + @SerializedName(SERIALIZED_NAME_SPECIAL_BID_NUMBER) + private String specialBidNumber; + + public static final String SERIALIZED_NAME_NOTES = "notes"; + @SerializedName(SERIALIZED_NAME_NOTES) + private String notes; + + public static final String SERIALIZED_NAME_SHIPMENT_DETAILS = "shipmentDetails"; + @SerializedName(SERIALIZED_NAME_SHIPMENT_DETAILS) + private List shipmentDetails; + + public static final String SERIALIZED_NAME_ADDITIONAL_ATTRIBUTES = "additionalAttributes"; + @SerializedName(SERIALIZED_NAME_ADDITIONAL_ATTRIBUTES) + private List additionalAttributes; + + public OrderCreateResponseOrdersInnerLinesInner() { + } + + public OrderCreateResponseOrdersInnerLinesInner subOrderNumber(String subOrderNumber) { + this.subOrderNumber = subOrderNumber; + return this; + } + + /** + * The sub order number. The two-digit prefix is the warehouse code of the warehouse nearest the reseller. The middle number is the order number. The two-digit suffix is the sub order number. + * @return subOrderNumber + **/ + @javax.annotation.Nullable + public String getSubOrderNumber() { + return subOrderNumber; + } + + public void setSubOrderNumber(String subOrderNumber) { + this.subOrderNumber = subOrderNumber; + } + + + public OrderCreateResponseOrdersInnerLinesInner ingramLineNumber(String ingramLineNumber) { + this.ingramLineNumber = ingramLineNumber; + return this; + } + + /** + * The Ingram Micro line number for the product. + * @return ingramLineNumber + **/ + @javax.annotation.Nullable + public String getIngramLineNumber() { + return ingramLineNumber; + } + + public void setIngramLineNumber(String ingramLineNumber) { + this.ingramLineNumber = ingramLineNumber; + } + + + public OrderCreateResponseOrdersInnerLinesInner customerLineNumber(String customerLineNumber) { + this.customerLineNumber = customerLineNumber; + return this; + } + + /** + * The reseller's line number for reference in their system. + * @return customerLineNumber + **/ + @javax.annotation.Nullable + public String getCustomerLineNumber() { + return customerLineNumber; + } + + public void setCustomerLineNumber(String customerLineNumber) { + this.customerLineNumber = customerLineNumber; + } + + + public OrderCreateResponseOrdersInnerLinesInner lineStatus(String lineStatus) { + this.lineStatus = lineStatus; + return this; + } + + /** + * The status for the line item in the order. One of: Backordered, Open + * @return lineStatus + **/ + @javax.annotation.Nullable + public String getLineStatus() { + return lineStatus; + } + + public void setLineStatus(String lineStatus) { + this.lineStatus = lineStatus; + } + + + public OrderCreateResponseOrdersInnerLinesInner ingramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + return this; + } + + /** + * The Ingram Micro part number for the line item. + * @return ingramPartNumber + **/ + @javax.annotation.Nullable + public String getIngramPartNumber() { + return ingramPartNumber; + } + + public void setIngramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + } + + + public OrderCreateResponseOrdersInnerLinesInner vendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + return this; + } + + /** + * The vendor part number for the line item. + * @return vendorPartNumber + **/ + @javax.annotation.Nullable + public String getVendorPartNumber() { + return vendorPartNumber; + } + + public void setVendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + } + + + public OrderCreateResponseOrdersInnerLinesInner unitPrice(BigDecimal unitPrice) { + this.unitPrice = unitPrice; + return this; + } + + /** + * The unit price for the line item. + * @return unitPrice + **/ + @javax.annotation.Nullable + public BigDecimal getUnitPrice() { + return unitPrice; + } + + public void setUnitPrice(BigDecimal unitPrice) { + this.unitPrice = unitPrice; + } + + + public OrderCreateResponseOrdersInnerLinesInner extendedUnitPrice(BigDecimal extendedUnitPrice) { + this.extendedUnitPrice = extendedUnitPrice; + return this; + } + + /** + * The extended list price (unit price X quantity) for the line item. + * @return extendedUnitPrice + **/ + @javax.annotation.Nullable + public BigDecimal getExtendedUnitPrice() { + return extendedUnitPrice; + } + + public void setExtendedUnitPrice(BigDecimal extendedUnitPrice) { + this.extendedUnitPrice = extendedUnitPrice; + } + + + public OrderCreateResponseOrdersInnerLinesInner quantityOrdered(Integer quantityOrdered) { + this.quantityOrdered = quantityOrdered; + return this; + } + + /** + * The quantity of the line item ordered. + * @return quantityOrdered + **/ + @javax.annotation.Nullable + public Integer getQuantityOrdered() { + return quantityOrdered; + } + + public void setQuantityOrdered(Integer quantityOrdered) { + this.quantityOrdered = quantityOrdered; + } + + + public OrderCreateResponseOrdersInnerLinesInner quantityConfirmed(Integer quantityConfirmed) { + this.quantityConfirmed = quantityConfirmed; + return this; + } + + /** + * The quantity of the line item that has been confirmed. + * @return quantityConfirmed + **/ + @javax.annotation.Nullable + public Integer getQuantityConfirmed() { + return quantityConfirmed; + } + + public void setQuantityConfirmed(Integer quantityConfirmed) { + this.quantityConfirmed = quantityConfirmed; + } + + + public OrderCreateResponseOrdersInnerLinesInner quantityBackOrdered(Integer quantityBackOrdered) { + this.quantityBackOrdered = quantityBackOrdered; + return this; + } + + /** + * The quantity of the line item that is backordered. + * @return quantityBackOrdered + **/ + @javax.annotation.Nullable + public Integer getQuantityBackOrdered() { + return quantityBackOrdered; + } + + public void setQuantityBackOrdered(Integer quantityBackOrdered) { + this.quantityBackOrdered = quantityBackOrdered; + } + + + public OrderCreateResponseOrdersInnerLinesInner specialBidNumber(String specialBidNumber) { + this.specialBidNumber = specialBidNumber; + return this; + } + + /** + * The bid number for the line item provided to the reseller by the vendor for special pricing and discounts. Line-level bid numbers take precedence over header-level bid numbers. + * @return specialBidNumber + **/ + @javax.annotation.Nullable + public String getSpecialBidNumber() { + return specialBidNumber; + } + + public void setSpecialBidNumber(String specialBidNumber) { + this.specialBidNumber = specialBidNumber; + } + + + public OrderCreateResponseOrdersInnerLinesInner notes(String notes) { + this.notes = notes; + return this; + } + + /** + * Line-level notes. + * @return notes + **/ + @javax.annotation.Nullable + public String getNotes() { + return notes; + } + + public void setNotes(String notes) { + this.notes = notes; + } + + + public OrderCreateResponseOrdersInnerLinesInner shipmentDetails(List shipmentDetails) { + this.shipmentDetails = shipmentDetails; + return this; + } + + public OrderCreateResponseOrdersInnerLinesInner addShipmentDetailsItem(OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner shipmentDetailsItem) { + if (this.shipmentDetails == null) { + this.shipmentDetails = new ArrayList<>(); + } + this.shipmentDetails.add(shipmentDetailsItem); + return this; + } + + /** + * The shipment details for the line item. + * @return shipmentDetails + **/ + @javax.annotation.Nullable + public List getShipmentDetails() { + return shipmentDetails; + } + + public void setShipmentDetails(List shipmentDetails) { + this.shipmentDetails = shipmentDetails; + } + + + public OrderCreateResponseOrdersInnerLinesInner additionalAttributes(List additionalAttributes) { + this.additionalAttributes = additionalAttributes; + return this; + } + + public OrderCreateResponseOrdersInnerLinesInner addAdditionalAttributesItem(OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner additionalAttributesItem) { + if (this.additionalAttributes == null) { + this.additionalAttributes = new ArrayList<>(); + } + this.additionalAttributes.add(additionalAttributesItem); + return this; + } + + /** + * SAP requested and country-specific line level details. + * @return additionalAttributes + **/ + @javax.annotation.Nullable + public List getAdditionalAttributes() { + return additionalAttributes; + } + + public void setAdditionalAttributes(List additionalAttributes) { + this.additionalAttributes = additionalAttributes; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateResponseOrdersInnerLinesInner orderCreateResponseOrdersInnerLinesInner = (OrderCreateResponseOrdersInnerLinesInner) o; + return Objects.equals(this.subOrderNumber, orderCreateResponseOrdersInnerLinesInner.subOrderNumber) && + Objects.equals(this.ingramLineNumber, orderCreateResponseOrdersInnerLinesInner.ingramLineNumber) && + Objects.equals(this.customerLineNumber, orderCreateResponseOrdersInnerLinesInner.customerLineNumber) && + Objects.equals(this.lineStatus, orderCreateResponseOrdersInnerLinesInner.lineStatus) && + Objects.equals(this.ingramPartNumber, orderCreateResponseOrdersInnerLinesInner.ingramPartNumber) && + Objects.equals(this.vendorPartNumber, orderCreateResponseOrdersInnerLinesInner.vendorPartNumber) && + Objects.equals(this.unitPrice, orderCreateResponseOrdersInnerLinesInner.unitPrice) && + Objects.equals(this.extendedUnitPrice, orderCreateResponseOrdersInnerLinesInner.extendedUnitPrice) && + Objects.equals(this.quantityOrdered, orderCreateResponseOrdersInnerLinesInner.quantityOrdered) && + Objects.equals(this.quantityConfirmed, orderCreateResponseOrdersInnerLinesInner.quantityConfirmed) && + Objects.equals(this.quantityBackOrdered, orderCreateResponseOrdersInnerLinesInner.quantityBackOrdered) && + Objects.equals(this.specialBidNumber, orderCreateResponseOrdersInnerLinesInner.specialBidNumber) && + Objects.equals(this.notes, orderCreateResponseOrdersInnerLinesInner.notes) && + Objects.equals(this.shipmentDetails, orderCreateResponseOrdersInnerLinesInner.shipmentDetails) && + Objects.equals(this.additionalAttributes, orderCreateResponseOrdersInnerLinesInner.additionalAttributes); + } + + @Override + public int hashCode() { + return Objects.hash(subOrderNumber, ingramLineNumber, customerLineNumber, lineStatus, ingramPartNumber, vendorPartNumber, unitPrice, extendedUnitPrice, quantityOrdered, quantityConfirmed, quantityBackOrdered, specialBidNumber, notes, shipmentDetails, additionalAttributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateResponseOrdersInnerLinesInner {\n"); + sb.append(" subOrderNumber: ").append(toIndentedString(subOrderNumber)).append("\n"); + sb.append(" ingramLineNumber: ").append(toIndentedString(ingramLineNumber)).append("\n"); + sb.append(" customerLineNumber: ").append(toIndentedString(customerLineNumber)).append("\n"); + sb.append(" lineStatus: ").append(toIndentedString(lineStatus)).append("\n"); + sb.append(" ingramPartNumber: ").append(toIndentedString(ingramPartNumber)).append("\n"); + sb.append(" vendorPartNumber: ").append(toIndentedString(vendorPartNumber)).append("\n"); + sb.append(" unitPrice: ").append(toIndentedString(unitPrice)).append("\n"); + sb.append(" extendedUnitPrice: ").append(toIndentedString(extendedUnitPrice)).append("\n"); + sb.append(" quantityOrdered: ").append(toIndentedString(quantityOrdered)).append("\n"); + sb.append(" quantityConfirmed: ").append(toIndentedString(quantityConfirmed)).append("\n"); + sb.append(" quantityBackOrdered: ").append(toIndentedString(quantityBackOrdered)).append("\n"); + sb.append(" specialBidNumber: ").append(toIndentedString(specialBidNumber)).append("\n"); + sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); + sb.append(" shipmentDetails: ").append(toIndentedString(shipmentDetails)).append("\n"); + sb.append(" additionalAttributes: ").append(toIndentedString(additionalAttributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("subOrderNumber"); + openapiFields.add("ingramLineNumber"); + openapiFields.add("customerLineNumber"); + openapiFields.add("lineStatus"); + openapiFields.add("ingramPartNumber"); + openapiFields.add("vendorPartNumber"); + openapiFields.add("unitPrice"); + openapiFields.add("extendedUnitPrice"); + openapiFields.add("quantityOrdered"); + openapiFields.add("quantityConfirmed"); + openapiFields.add("quantityBackOrdered"); + openapiFields.add("specialBidNumber"); + openapiFields.add("notes"); + openapiFields.add("shipmentDetails"); + openapiFields.add("additionalAttributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateResponseOrdersInnerLinesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateResponseOrdersInnerLinesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateResponseOrdersInnerLinesInner is not found in the empty JSON string", OrderCreateResponseOrdersInnerLinesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateResponseOrdersInnerLinesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateResponseOrdersInnerLinesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("subOrderNumber") != null && !jsonObj.get("subOrderNumber").isJsonNull()) && !jsonObj.get("subOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subOrderNumber").toString())); + } + if ((jsonObj.get("ingramLineNumber") != null && !jsonObj.get("ingramLineNumber").isJsonNull()) && !jsonObj.get("ingramLineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramLineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramLineNumber").toString())); + } + if ((jsonObj.get("customerLineNumber") != null && !jsonObj.get("customerLineNumber").isJsonNull()) && !jsonObj.get("customerLineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerLineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerLineNumber").toString())); + } + if ((jsonObj.get("lineStatus") != null && !jsonObj.get("lineStatus").isJsonNull()) && !jsonObj.get("lineStatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lineStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lineStatus").toString())); + } + if ((jsonObj.get("ingramPartNumber") != null && !jsonObj.get("ingramPartNumber").isJsonNull()) && !jsonObj.get("ingramPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPartNumber").toString())); + } + if ((jsonObj.get("vendorPartNumber") != null && !jsonObj.get("vendorPartNumber").isJsonNull()) && !jsonObj.get("vendorPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorPartNumber").toString())); + } + if ((jsonObj.get("specialBidNumber") != null && !jsonObj.get("specialBidNumber").isJsonNull()) && !jsonObj.get("specialBidNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `specialBidNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("specialBidNumber").toString())); + } + if ((jsonObj.get("notes") != null && !jsonObj.get("notes").isJsonNull()) && !jsonObj.get("notes").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `notes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("notes").toString())); + } + if (jsonObj.get("shipmentDetails") != null && !jsonObj.get("shipmentDetails").isJsonNull()) { + JsonArray jsonArrayshipmentDetails = jsonObj.getAsJsonArray("shipmentDetails"); + if (jsonArrayshipmentDetails != null) { + // ensure the json data is an array + if (!jsonObj.get("shipmentDetails").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `shipmentDetails` to be an array in the JSON string but got `%s`", jsonObj.get("shipmentDetails").toString())); + } + + // validate the optional field `shipmentDetails` (array) + for (int i = 0; i < jsonArrayshipmentDetails.size(); i++) { + OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner.validateJsonElement(jsonArrayshipmentDetails.get(i)); + }; + } + } + if (jsonObj.get("additionalAttributes") != null && !jsonObj.get("additionalAttributes").isJsonNull()) { + JsonArray jsonArrayadditionalAttributes = jsonObj.getAsJsonArray("additionalAttributes"); + if (jsonArrayadditionalAttributes != null) { + // ensure the json data is an array + if (!jsonObj.get("additionalAttributes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `additionalAttributes` to be an array in the JSON string but got `%s`", jsonObj.get("additionalAttributes").toString())); + } + + // validate the optional field `additionalAttributes` (array) + for (int i = 0; i < jsonArrayadditionalAttributes.size(); i++) { + OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner.validateJsonElement(jsonArrayadditionalAttributes.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateResponseOrdersInnerLinesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateResponseOrdersInnerLinesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateResponseOrdersInnerLinesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateResponseOrdersInnerLinesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateResponseOrdersInnerLinesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateResponseOrdersInnerLinesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateResponseOrdersInnerLinesInner + * @throws IOException if the JSON string is invalid with respect to OrderCreateResponseOrdersInnerLinesInner + */ + public static OrderCreateResponseOrdersInnerLinesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateResponseOrdersInnerLinesInner.class); + } + + /** + * Convert an instance of OrderCreateResponseOrdersInnerLinesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner.java b/src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner.java new file mode 100644 index 00000000..f3290d57 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner { + public static final String SERIALIZED_NAME_ATTRIBUTE_NAME = "attributeName"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_NAME) + private String attributeName; + + public static final String SERIALIZED_NAME_ATTRIBUTE_VALUE = "attributeValue"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_VALUE) + private String attributeValue; + + public OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner() { + } + + public OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner attributeName(String attributeName) { + this.attributeName = attributeName; + return this; + } + + /** + * Get attributeName + * @return attributeName + **/ + @javax.annotation.Nullable + public String getAttributeName() { + return attributeName; + } + + public void setAttributeName(String attributeName) { + this.attributeName = attributeName; + } + + + public OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner attributeValue(String attributeValue) { + this.attributeValue = attributeValue; + return this; + } + + /** + * Get attributeValue + * @return attributeValue + **/ + @javax.annotation.Nullable + public String getAttributeValue() { + return attributeValue; + } + + public void setAttributeValue(String attributeValue) { + this.attributeValue = attributeValue; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner orderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner = (OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner) o; + return Objects.equals(this.attributeName, orderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner.attributeName) && + Objects.equals(this.attributeValue, orderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner.attributeValue); + } + + @Override + public int hashCode() { + return Objects.hash(attributeName, attributeValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner {\n"); + sb.append(" attributeName: ").append(toIndentedString(attributeName)).append("\n"); + sb.append(" attributeValue: ").append(toIndentedString(attributeValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributeName"); + openapiFields.add("attributeValue"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner is not found in the empty JSON string", OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("attributeName") != null && !jsonObj.get("attributeName").isJsonNull()) && !jsonObj.get("attributeName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeName").toString())); + } + if ((jsonObj.get("attributeValue") != null && !jsonObj.get("attributeValue").isJsonNull()) && !jsonObj.get("attributeValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeValue").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner + * @throws IOException if the JSON string is invalid with respect to OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner + */ + public static OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner.class); + } + + /** + * Convert an instance of OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner.java b/src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner.java new file mode 100644 index 00000000..535d066c --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner.java @@ -0,0 +1,380 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner { + public static final String SERIALIZED_NAME_CARRIER_CODE = "carrierCode"; + @SerializedName(SERIALIZED_NAME_CARRIER_CODE) + private String carrierCode; + + public static final String SERIALIZED_NAME_CARRIER_NAME = "carrierName"; + @SerializedName(SERIALIZED_NAME_CARRIER_NAME) + private String carrierName; + + public static final String SERIALIZED_NAME_SHIP_FROM_WAREHOUSE_ID = "shipFromWarehouseId"; + @SerializedName(SERIALIZED_NAME_SHIP_FROM_WAREHOUSE_ID) + private String shipFromWarehouseId; + + public static final String SERIALIZED_NAME_SHIP_FROM_LOCATION = "shipFromLocation"; + @SerializedName(SERIALIZED_NAME_SHIP_FROM_LOCATION) + private String shipFromLocation; + + public static final String SERIALIZED_NAME_FREIGHT_ACCOUNT_NUMBER = "freightAccountNumber"; + @SerializedName(SERIALIZED_NAME_FREIGHT_ACCOUNT_NUMBER) + private String freightAccountNumber; + + public static final String SERIALIZED_NAME_SIGNATURE_REQUIRED = "signatureRequired"; + @SerializedName(SERIALIZED_NAME_SIGNATURE_REQUIRED) + private String signatureRequired; + + public static final String SERIALIZED_NAME_SHIPPING_INSTRUCTIONS = "shippingInstructions"; + @SerializedName(SERIALIZED_NAME_SHIPPING_INSTRUCTIONS) + private String shippingInstructions; + + public OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner() { + } + + public OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner carrierCode(String carrierCode) { + this.carrierCode = carrierCode; + return this; + } + + /** + * The code for the shipping carrier for the line item. + * @return carrierCode + **/ + @javax.annotation.Nullable + public String getCarrierCode() { + return carrierCode; + } + + public void setCarrierCode(String carrierCode) { + this.carrierCode = carrierCode; + } + + + public OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner carrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** + * The name of the shipping carrier for the line item. + * @return carrierName + **/ + @javax.annotation.Nullable + public String getCarrierName() { + return carrierName; + } + + public void setCarrierName(String carrierName) { + this.carrierName = carrierName; + } + + + public OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner shipFromWarehouseId(String shipFromWarehouseId) { + this.shipFromWarehouseId = shipFromWarehouseId; + return this; + } + + /** + * The ID of the warehouse the line item will ship from. + * @return shipFromWarehouseId + **/ + @javax.annotation.Nullable + public String getShipFromWarehouseId() { + return shipFromWarehouseId; + } + + public void setShipFromWarehouseId(String shipFromWarehouseId) { + this.shipFromWarehouseId = shipFromWarehouseId; + } + + + public OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner shipFromLocation(String shipFromLocation) { + this.shipFromLocation = shipFromLocation; + return this; + } + + /** + * Location from which order is shipped. + * @return shipFromLocation + **/ + @javax.annotation.Nullable + public String getShipFromLocation() { + return shipFromLocation; + } + + public void setShipFromLocation(String shipFromLocation) { + this.shipFromLocation = shipFromLocation; + } + + + public OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner freightAccountNumber(String freightAccountNumber) { + this.freightAccountNumber = freightAccountNumber; + return this; + } + + /** + * The reseller's shipping account number with carrier. Used to bill the shipping carrier directly from the reseller's account with the carrier. + * @return freightAccountNumber + **/ + @javax.annotation.Nullable + public String getFreightAccountNumber() { + return freightAccountNumber; + } + + public void setFreightAccountNumber(String freightAccountNumber) { + this.freightAccountNumber = freightAccountNumber; + } + + + public OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner signatureRequired(String signatureRequired) { + this.signatureRequired = signatureRequired; + return this; + } + + /** + * Specifies whether a signature is required for delivery. Default is False. + * @return signatureRequired + **/ + @javax.annotation.Nullable + public String getSignatureRequired() { + return signatureRequired; + } + + public void setSignatureRequired(String signatureRequired) { + this.signatureRequired = signatureRequired; + } + + + public OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner shippingInstructions(String shippingInstructions) { + this.shippingInstructions = shippingInstructions; + return this; + } + + /** + * The shipping instructions for the order. + * @return shippingInstructions + **/ + @javax.annotation.Nullable + public String getShippingInstructions() { + return shippingInstructions; + } + + public void setShippingInstructions(String shippingInstructions) { + this.shippingInstructions = shippingInstructions; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner orderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner = (OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner) o; + return Objects.equals(this.carrierCode, orderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner.carrierCode) && + Objects.equals(this.carrierName, orderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner.carrierName) && + Objects.equals(this.shipFromWarehouseId, orderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner.shipFromWarehouseId) && + Objects.equals(this.shipFromLocation, orderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner.shipFromLocation) && + Objects.equals(this.freightAccountNumber, orderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner.freightAccountNumber) && + Objects.equals(this.signatureRequired, orderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner.signatureRequired) && + Objects.equals(this.shippingInstructions, orderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner.shippingInstructions); + } + + @Override + public int hashCode() { + return Objects.hash(carrierCode, carrierName, shipFromWarehouseId, shipFromLocation, freightAccountNumber, signatureRequired, shippingInstructions); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner {\n"); + sb.append(" carrierCode: ").append(toIndentedString(carrierCode)).append("\n"); + sb.append(" carrierName: ").append(toIndentedString(carrierName)).append("\n"); + sb.append(" shipFromWarehouseId: ").append(toIndentedString(shipFromWarehouseId)).append("\n"); + sb.append(" shipFromLocation: ").append(toIndentedString(shipFromLocation)).append("\n"); + sb.append(" freightAccountNumber: ").append(toIndentedString(freightAccountNumber)).append("\n"); + sb.append(" signatureRequired: ").append(toIndentedString(signatureRequired)).append("\n"); + sb.append(" shippingInstructions: ").append(toIndentedString(shippingInstructions)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("carrierCode"); + openapiFields.add("carrierName"); + openapiFields.add("shipFromWarehouseId"); + openapiFields.add("shipFromLocation"); + openapiFields.add("freightAccountNumber"); + openapiFields.add("signatureRequired"); + openapiFields.add("shippingInstructions"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner is not found in the empty JSON string", OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("carrierCode") != null && !jsonObj.get("carrierCode").isJsonNull()) && !jsonObj.get("carrierCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `carrierCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierCode").toString())); + } + if ((jsonObj.get("carrierName") != null && !jsonObj.get("carrierName").isJsonNull()) && !jsonObj.get("carrierName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `carrierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierName").toString())); + } + if ((jsonObj.get("shipFromWarehouseId") != null && !jsonObj.get("shipFromWarehouseId").isJsonNull()) && !jsonObj.get("shipFromWarehouseId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shipFromWarehouseId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shipFromWarehouseId").toString())); + } + if ((jsonObj.get("shipFromLocation") != null && !jsonObj.get("shipFromLocation").isJsonNull()) && !jsonObj.get("shipFromLocation").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shipFromLocation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shipFromLocation").toString())); + } + if ((jsonObj.get("freightAccountNumber") != null && !jsonObj.get("freightAccountNumber").isJsonNull()) && !jsonObj.get("freightAccountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `freightAccountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("freightAccountNumber").toString())); + } + if ((jsonObj.get("signatureRequired") != null && !jsonObj.get("signatureRequired").isJsonNull()) && !jsonObj.get("signatureRequired").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signatureRequired` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signatureRequired").toString())); + } + if ((jsonObj.get("shippingInstructions") != null && !jsonObj.get("shippingInstructions").isJsonNull()) && !jsonObj.get("shippingInstructions").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shippingInstructions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shippingInstructions").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner + * @throws IOException if the JSON string is invalid with respect to OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner + */ + public static OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner.class); + } + + /** + * Convert an instance of OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinksInner.java b/src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinksInner.java new file mode 100644 index 00000000..5d8d75d6 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinksInner.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateResponseOrdersInnerLinksInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateResponseOrdersInnerLinksInner { + public static final String SERIALIZED_NAME_TOPIC = "topic"; + @SerializedName(SERIALIZED_NAME_TOPIC) + private String topic; + + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + private String href; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public OrderCreateResponseOrdersInnerLinksInner() { + } + + public OrderCreateResponseOrdersInnerLinksInner topic(String topic) { + this.topic = topic; + return this; + } + + /** + * Provides the details of the orders. + * @return topic + **/ + @javax.annotation.Nullable + public String getTopic() { + return topic; + } + + public void setTopic(String topic) { + this.topic = topic; + } + + + public OrderCreateResponseOrdersInnerLinksInner href(String href) { + this.href = href; + return this; + } + + /** + * The URL endpoint for accessing the relevant data. + * @return href + **/ + @javax.annotation.Nullable + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + + public OrderCreateResponseOrdersInnerLinksInner type(String type) { + this.type = type; + return this; + } + + /** + * The type of call that can be made to the href link (GET, POST, Etc.). + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateResponseOrdersInnerLinksInner orderCreateResponseOrdersInnerLinksInner = (OrderCreateResponseOrdersInnerLinksInner) o; + return Objects.equals(this.topic, orderCreateResponseOrdersInnerLinksInner.topic) && + Objects.equals(this.href, orderCreateResponseOrdersInnerLinksInner.href) && + Objects.equals(this.type, orderCreateResponseOrdersInnerLinksInner.type); + } + + @Override + public int hashCode() { + return Objects.hash(topic, href, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateResponseOrdersInnerLinksInner {\n"); + sb.append(" topic: ").append(toIndentedString(topic)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("topic"); + openapiFields.add("href"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateResponseOrdersInnerLinksInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateResponseOrdersInnerLinksInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateResponseOrdersInnerLinksInner is not found in the empty JSON string", OrderCreateResponseOrdersInnerLinksInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateResponseOrdersInnerLinksInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateResponseOrdersInnerLinksInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("topic") != null && !jsonObj.get("topic").isJsonNull()) && !jsonObj.get("topic").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `topic` to be a primitive type in the JSON string but got `%s`", jsonObj.get("topic").toString())); + } + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateResponseOrdersInnerLinksInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateResponseOrdersInnerLinksInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateResponseOrdersInnerLinksInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateResponseOrdersInnerLinksInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateResponseOrdersInnerLinksInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateResponseOrdersInnerLinksInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateResponseOrdersInnerLinksInner + * @throws IOException if the JSON string is invalid with respect to OrderCreateResponseOrdersInnerLinksInner + */ + public static OrderCreateResponseOrdersInnerLinksInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateResponseOrdersInnerLinksInner.class); + } + + /** + * Convert an instance of OrderCreateResponseOrdersInnerLinksInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerMiscellaneousChargesInner.java b/src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerMiscellaneousChargesInner.java new file mode 100644 index 00000000..60238603 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerMiscellaneousChargesInner.java @@ -0,0 +1,291 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateResponseOrdersInnerMiscellaneousChargesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateResponseOrdersInnerMiscellaneousChargesInner { + public static final String SERIALIZED_NAME_SUB_ORDER_NUMBER = "subOrderNumber"; + @SerializedName(SERIALIZED_NAME_SUB_ORDER_NUMBER) + private String subOrderNumber; + + public static final String SERIALIZED_NAME_CHARGE_LINE_REFERENCE = "chargeLineReference"; + @SerializedName(SERIALIZED_NAME_CHARGE_LINE_REFERENCE) + private String chargeLineReference; + + public static final String SERIALIZED_NAME_CHARGE_DESCRIPTION = "chargeDescription"; + @SerializedName(SERIALIZED_NAME_CHARGE_DESCRIPTION) + private String chargeDescription; + + public static final String SERIALIZED_NAME_CHARGE_AMOUNT = "chargeAmount"; + @SerializedName(SERIALIZED_NAME_CHARGE_AMOUNT) + private BigDecimal chargeAmount; + + public OrderCreateResponseOrdersInnerMiscellaneousChargesInner() { + } + + public OrderCreateResponseOrdersInnerMiscellaneousChargesInner subOrderNumber(String subOrderNumber) { + this.subOrderNumber = subOrderNumber; + return this; + } + + /** + * The sub order number. The two-digit prefix is the warehouse code of the warehouse nearest the reseller. The middle number is the order number. The two-digit suffix is the sub order number. + * @return subOrderNumber + **/ + @javax.annotation.Nullable + public String getSubOrderNumber() { + return subOrderNumber; + } + + public void setSubOrderNumber(String subOrderNumber) { + this.subOrderNumber = subOrderNumber; + } + + + public OrderCreateResponseOrdersInnerMiscellaneousChargesInner chargeLineReference(String chargeLineReference) { + this.chargeLineReference = chargeLineReference; + return this; + } + + /** + * Impulse line number for the miscellaneous charge. + * @return chargeLineReference + **/ + @javax.annotation.Nullable + public String getChargeLineReference() { + return chargeLineReference; + } + + public void setChargeLineReference(String chargeLineReference) { + this.chargeLineReference = chargeLineReference; + } + + + public OrderCreateResponseOrdersInnerMiscellaneousChargesInner chargeDescription(String chargeDescription) { + this.chargeDescription = chargeDescription; + return this; + } + + /** + * Description of the miscellaneous charges for the order. + * @return chargeDescription + **/ + @javax.annotation.Nullable + public String getChargeDescription() { + return chargeDescription; + } + + public void setChargeDescription(String chargeDescription) { + this.chargeDescription = chargeDescription; + } + + + public OrderCreateResponseOrdersInnerMiscellaneousChargesInner chargeAmount(BigDecimal chargeAmount) { + this.chargeAmount = chargeAmount; + return this; + } + + /** + * The total amount of miscellaneous charges for the order. + * @return chargeAmount + **/ + @javax.annotation.Nullable + public BigDecimal getChargeAmount() { + return chargeAmount; + } + + public void setChargeAmount(BigDecimal chargeAmount) { + this.chargeAmount = chargeAmount; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateResponseOrdersInnerMiscellaneousChargesInner orderCreateResponseOrdersInnerMiscellaneousChargesInner = (OrderCreateResponseOrdersInnerMiscellaneousChargesInner) o; + return Objects.equals(this.subOrderNumber, orderCreateResponseOrdersInnerMiscellaneousChargesInner.subOrderNumber) && + Objects.equals(this.chargeLineReference, orderCreateResponseOrdersInnerMiscellaneousChargesInner.chargeLineReference) && + Objects.equals(this.chargeDescription, orderCreateResponseOrdersInnerMiscellaneousChargesInner.chargeDescription) && + Objects.equals(this.chargeAmount, orderCreateResponseOrdersInnerMiscellaneousChargesInner.chargeAmount); + } + + @Override + public int hashCode() { + return Objects.hash(subOrderNumber, chargeLineReference, chargeDescription, chargeAmount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateResponseOrdersInnerMiscellaneousChargesInner {\n"); + sb.append(" subOrderNumber: ").append(toIndentedString(subOrderNumber)).append("\n"); + sb.append(" chargeLineReference: ").append(toIndentedString(chargeLineReference)).append("\n"); + sb.append(" chargeDescription: ").append(toIndentedString(chargeDescription)).append("\n"); + sb.append(" chargeAmount: ").append(toIndentedString(chargeAmount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("subOrderNumber"); + openapiFields.add("chargeLineReference"); + openapiFields.add("chargeDescription"); + openapiFields.add("chargeAmount"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateResponseOrdersInnerMiscellaneousChargesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateResponseOrdersInnerMiscellaneousChargesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateResponseOrdersInnerMiscellaneousChargesInner is not found in the empty JSON string", OrderCreateResponseOrdersInnerMiscellaneousChargesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateResponseOrdersInnerMiscellaneousChargesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateResponseOrdersInnerMiscellaneousChargesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("subOrderNumber") != null && !jsonObj.get("subOrderNumber").isJsonNull()) && !jsonObj.get("subOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subOrderNumber").toString())); + } + if ((jsonObj.get("chargeLineReference") != null && !jsonObj.get("chargeLineReference").isJsonNull()) && !jsonObj.get("chargeLineReference").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `chargeLineReference` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chargeLineReference").toString())); + } + if ((jsonObj.get("chargeDescription") != null && !jsonObj.get("chargeDescription").isJsonNull()) && !jsonObj.get("chargeDescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `chargeDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chargeDescription").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateResponseOrdersInnerMiscellaneousChargesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateResponseOrdersInnerMiscellaneousChargesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateResponseOrdersInnerMiscellaneousChargesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateResponseOrdersInnerMiscellaneousChargesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateResponseOrdersInnerMiscellaneousChargesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateResponseOrdersInnerMiscellaneousChargesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateResponseOrdersInnerMiscellaneousChargesInner + * @throws IOException if the JSON string is invalid with respect to OrderCreateResponseOrdersInnerMiscellaneousChargesInner + */ + public static OrderCreateResponseOrdersInnerMiscellaneousChargesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateResponseOrdersInnerMiscellaneousChargesInner.class); + } + + /** + * Convert an instance of OrderCreateResponseOrdersInnerMiscellaneousChargesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerRejectedLineItemsInner.java b/src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerRejectedLineItemsInner.java new file mode 100644 index 00000000..10b26118 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateResponseOrdersInnerRejectedLineItemsInner.java @@ -0,0 +1,348 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateResponseOrdersInnerRejectedLineItemsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateResponseOrdersInnerRejectedLineItemsInner { + public static final String SERIALIZED_NAME_CUSTOMER_LINENUMBER = "customerLinenumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_LINENUMBER) + private String customerLinenumber; + + public static final String SERIALIZED_NAME_INGRAM_PART_NUMBER = "ingramPartNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PART_NUMBER) + private String ingramPartNumber; + + public static final String SERIALIZED_NAME_VENDOR_PART_NUMBER = "vendorPartNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_PART_NUMBER) + private String vendorPartNumber; + + public static final String SERIALIZED_NAME_QUANTITY_ORDERED = "quantityOrdered"; + @SerializedName(SERIALIZED_NAME_QUANTITY_ORDERED) + private Integer quantityOrdered; + + public static final String SERIALIZED_NAME_REJECT_CODE = "rejectCode"; + @SerializedName(SERIALIZED_NAME_REJECT_CODE) + private String rejectCode; + + public static final String SERIALIZED_NAME_REJECT_REASON = "rejectReason"; + @SerializedName(SERIALIZED_NAME_REJECT_REASON) + private String rejectReason; + + public OrderCreateResponseOrdersInnerRejectedLineItemsInner() { + } + + public OrderCreateResponseOrdersInnerRejectedLineItemsInner customerLinenumber(String customerLinenumber) { + this.customerLinenumber = customerLinenumber; + return this; + } + + /** + * The reseller's line item number of the rejected item for their reference. Number + * @return customerLinenumber + **/ + @javax.annotation.Nullable + public String getCustomerLinenumber() { + return customerLinenumber; + } + + public void setCustomerLinenumber(String customerLinenumber) { + this.customerLinenumber = customerLinenumber; + } + + + public OrderCreateResponseOrdersInnerRejectedLineItemsInner ingramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + return this; + } + + /** + * The Ingram Micro part number for the rejected line item. + * @return ingramPartNumber + **/ + @javax.annotation.Nullable + public String getIngramPartNumber() { + return ingramPartNumber; + } + + public void setIngramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + } + + + public OrderCreateResponseOrdersInnerRejectedLineItemsInner vendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + return this; + } + + /** + * The vendor part number for the rejected line item. + * @return vendorPartNumber + **/ + @javax.annotation.Nullable + public String getVendorPartNumber() { + return vendorPartNumber; + } + + public void setVendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + } + + + public OrderCreateResponseOrdersInnerRejectedLineItemsInner quantityOrdered(Integer quantityOrdered) { + this.quantityOrdered = quantityOrdered; + return this; + } + + /** + * The quantity ordered of the rejected line item. + * @return quantityOrdered + **/ + @javax.annotation.Nullable + public Integer getQuantityOrdered() { + return quantityOrdered; + } + + public void setQuantityOrdered(Integer quantityOrdered) { + this.quantityOrdered = quantityOrdered; + } + + + public OrderCreateResponseOrdersInnerRejectedLineItemsInner rejectCode(String rejectCode) { + this.rejectCode = rejectCode; + return this; + } + + /** + * The rejection code for the rejected line item. Ex: 'EN' + * @return rejectCode + **/ + @javax.annotation.Nullable + public String getRejectCode() { + return rejectCode; + } + + public void setRejectCode(String rejectCode) { + this.rejectCode = rejectCode; + } + + + public OrderCreateResponseOrdersInnerRejectedLineItemsInner rejectReason(String rejectReason) { + this.rejectReason = rejectReason; + return this; + } + + /** + * The rejection reason for the rejected line item. Ex: 'SKU-NOTFOUND DF41281' + * @return rejectReason + **/ + @javax.annotation.Nullable + public String getRejectReason() { + return rejectReason; + } + + public void setRejectReason(String rejectReason) { + this.rejectReason = rejectReason; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateResponseOrdersInnerRejectedLineItemsInner orderCreateResponseOrdersInnerRejectedLineItemsInner = (OrderCreateResponseOrdersInnerRejectedLineItemsInner) o; + return Objects.equals(this.customerLinenumber, orderCreateResponseOrdersInnerRejectedLineItemsInner.customerLinenumber) && + Objects.equals(this.ingramPartNumber, orderCreateResponseOrdersInnerRejectedLineItemsInner.ingramPartNumber) && + Objects.equals(this.vendorPartNumber, orderCreateResponseOrdersInnerRejectedLineItemsInner.vendorPartNumber) && + Objects.equals(this.quantityOrdered, orderCreateResponseOrdersInnerRejectedLineItemsInner.quantityOrdered) && + Objects.equals(this.rejectCode, orderCreateResponseOrdersInnerRejectedLineItemsInner.rejectCode) && + Objects.equals(this.rejectReason, orderCreateResponseOrdersInnerRejectedLineItemsInner.rejectReason); + } + + @Override + public int hashCode() { + return Objects.hash(customerLinenumber, ingramPartNumber, vendorPartNumber, quantityOrdered, rejectCode, rejectReason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateResponseOrdersInnerRejectedLineItemsInner {\n"); + sb.append(" customerLinenumber: ").append(toIndentedString(customerLinenumber)).append("\n"); + sb.append(" ingramPartNumber: ").append(toIndentedString(ingramPartNumber)).append("\n"); + sb.append(" vendorPartNumber: ").append(toIndentedString(vendorPartNumber)).append("\n"); + sb.append(" quantityOrdered: ").append(toIndentedString(quantityOrdered)).append("\n"); + sb.append(" rejectCode: ").append(toIndentedString(rejectCode)).append("\n"); + sb.append(" rejectReason: ").append(toIndentedString(rejectReason)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("customerLinenumber"); + openapiFields.add("ingramPartNumber"); + openapiFields.add("vendorPartNumber"); + openapiFields.add("quantityOrdered"); + openapiFields.add("rejectCode"); + openapiFields.add("rejectReason"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateResponseOrdersInnerRejectedLineItemsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateResponseOrdersInnerRejectedLineItemsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateResponseOrdersInnerRejectedLineItemsInner is not found in the empty JSON string", OrderCreateResponseOrdersInnerRejectedLineItemsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateResponseOrdersInnerRejectedLineItemsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateResponseOrdersInnerRejectedLineItemsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("customerLinenumber") != null && !jsonObj.get("customerLinenumber").isJsonNull()) && !jsonObj.get("customerLinenumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerLinenumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerLinenumber").toString())); + } + if ((jsonObj.get("ingramPartNumber") != null && !jsonObj.get("ingramPartNumber").isJsonNull()) && !jsonObj.get("ingramPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPartNumber").toString())); + } + if ((jsonObj.get("vendorPartNumber") != null && !jsonObj.get("vendorPartNumber").isJsonNull()) && !jsonObj.get("vendorPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorPartNumber").toString())); + } + if ((jsonObj.get("rejectCode") != null && !jsonObj.get("rejectCode").isJsonNull()) && !jsonObj.get("rejectCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `rejectCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rejectCode").toString())); + } + if ((jsonObj.get("rejectReason") != null && !jsonObj.get("rejectReason").isJsonNull()) && !jsonObj.get("rejectReason").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `rejectReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rejectReason").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateResponseOrdersInnerRejectedLineItemsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateResponseOrdersInnerRejectedLineItemsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateResponseOrdersInnerRejectedLineItemsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateResponseOrdersInnerRejectedLineItemsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateResponseOrdersInnerRejectedLineItemsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateResponseOrdersInnerRejectedLineItemsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateResponseOrdersInnerRejectedLineItemsInner + * @throws IOException if the JSON string is invalid with respect to OrderCreateResponseOrdersInnerRejectedLineItemsInner + */ + public static OrderCreateResponseOrdersInnerRejectedLineItemsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateResponseOrdersInnerRejectedLineItemsInner.class); + } + + /** + * Convert an instance of OrderCreateResponseOrdersInnerRejectedLineItemsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateResponseServiceresponse.java b/src/main/java/xiresellers/client/model/OrderCreateResponseServiceresponse.java new file mode 100644 index 00000000..78e7aee1 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateResponseServiceresponse.java @@ -0,0 +1,290 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.InvoiceDetailResponseServiceresponseResponsepreamble; +import xiresellers.client.model.OrderCreateResponseServiceresponseOrdercreateresponseInner; +import xiresellers.client.model.OrderCreateResponseServiceresponseOrdersummary; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateResponseServiceresponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateResponseServiceresponse { + public static final String SERIALIZED_NAME_RESPONSEPREAMBLE = "responsepreamble"; + @SerializedName(SERIALIZED_NAME_RESPONSEPREAMBLE) + private InvoiceDetailResponseServiceresponseResponsepreamble responsepreamble; + + public static final String SERIALIZED_NAME_ORDERSUMMARY = "ordersummary"; + @SerializedName(SERIALIZED_NAME_ORDERSUMMARY) + private OrderCreateResponseServiceresponseOrdersummary ordersummary; + + public static final String SERIALIZED_NAME_ORDERCREATERESPONSE = "ordercreateresponse"; + @SerializedName(SERIALIZED_NAME_ORDERCREATERESPONSE) + private List ordercreateresponse; + + public OrderCreateResponseServiceresponse() { + } + + public OrderCreateResponseServiceresponse responsepreamble(InvoiceDetailResponseServiceresponseResponsepreamble responsepreamble) { + this.responsepreamble = responsepreamble; + return this; + } + + /** + * Get responsepreamble + * @return responsepreamble + **/ + @javax.annotation.Nullable + public InvoiceDetailResponseServiceresponseResponsepreamble getResponsepreamble() { + return responsepreamble; + } + + public void setResponsepreamble(InvoiceDetailResponseServiceresponseResponsepreamble responsepreamble) { + this.responsepreamble = responsepreamble; + } + + + public OrderCreateResponseServiceresponse ordersummary(OrderCreateResponseServiceresponseOrdersummary ordersummary) { + this.ordersummary = ordersummary; + return this; + } + + /** + * Get ordersummary + * @return ordersummary + **/ + @javax.annotation.Nullable + public OrderCreateResponseServiceresponseOrdersummary getOrdersummary() { + return ordersummary; + } + + public void setOrdersummary(OrderCreateResponseServiceresponseOrdersummary ordersummary) { + this.ordersummary = ordersummary; + } + + + public OrderCreateResponseServiceresponse ordercreateresponse(List ordercreateresponse) { + this.ordercreateresponse = ordercreateresponse; + return this; + } + + public OrderCreateResponseServiceresponse addOrdercreateresponseItem(OrderCreateResponseServiceresponseOrdercreateresponseInner ordercreateresponseItem) { + if (this.ordercreateresponse == null) { + this.ordercreateresponse = new ArrayList<>(); + } + this.ordercreateresponse.add(ordercreateresponseItem); + return this; + } + + /** + * Collection of orders + * @return ordercreateresponse + **/ + @javax.annotation.Nullable + public List getOrdercreateresponse() { + return ordercreateresponse; + } + + public void setOrdercreateresponse(List ordercreateresponse) { + this.ordercreateresponse = ordercreateresponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateResponseServiceresponse orderCreateResponseServiceresponse = (OrderCreateResponseServiceresponse) o; + return Objects.equals(this.responsepreamble, orderCreateResponseServiceresponse.responsepreamble) && + Objects.equals(this.ordersummary, orderCreateResponseServiceresponse.ordersummary) && + Objects.equals(this.ordercreateresponse, orderCreateResponseServiceresponse.ordercreateresponse); + } + + @Override + public int hashCode() { + return Objects.hash(responsepreamble, ordersummary, ordercreateresponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateResponseServiceresponse {\n"); + sb.append(" responsepreamble: ").append(toIndentedString(responsepreamble)).append("\n"); + sb.append(" ordersummary: ").append(toIndentedString(ordersummary)).append("\n"); + sb.append(" ordercreateresponse: ").append(toIndentedString(ordercreateresponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("responsepreamble"); + openapiFields.add("ordersummary"); + openapiFields.add("ordercreateresponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateResponseServiceresponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateResponseServiceresponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateResponseServiceresponse is not found in the empty JSON string", OrderCreateResponseServiceresponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateResponseServiceresponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateResponseServiceresponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `responsepreamble` + if (jsonObj.get("responsepreamble") != null && !jsonObj.get("responsepreamble").isJsonNull()) { + InvoiceDetailResponseServiceresponseResponsepreamble.validateJsonElement(jsonObj.get("responsepreamble")); + } + // validate the optional field `ordersummary` + if (jsonObj.get("ordersummary") != null && !jsonObj.get("ordersummary").isJsonNull()) { + OrderCreateResponseServiceresponseOrdersummary.validateJsonElement(jsonObj.get("ordersummary")); + } + if (jsonObj.get("ordercreateresponse") != null && !jsonObj.get("ordercreateresponse").isJsonNull()) { + JsonArray jsonArrayordercreateresponse = jsonObj.getAsJsonArray("ordercreateresponse"); + if (jsonArrayordercreateresponse != null) { + // ensure the json data is an array + if (!jsonObj.get("ordercreateresponse").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `ordercreateresponse` to be an array in the JSON string but got `%s`", jsonObj.get("ordercreateresponse").toString())); + } + + // validate the optional field `ordercreateresponse` (array) + for (int i = 0; i < jsonArrayordercreateresponse.size(); i++) { + OrderCreateResponseServiceresponseOrdercreateresponseInner.validateJsonElement(jsonArrayordercreateresponse.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateResponseServiceresponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateResponseServiceresponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateResponseServiceresponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateResponseServiceresponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateResponseServiceresponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateResponseServiceresponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateResponseServiceresponse + * @throws IOException if the JSON string is invalid with respect to OrderCreateResponseServiceresponse + */ + public static OrderCreateResponseServiceresponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateResponseServiceresponse.class); + } + + /** + * Convert an instance of OrderCreateResponseServiceresponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdercreateresponseInner.java b/src/main/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdercreateresponseInner.java new file mode 100644 index 00000000..f672b770 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdercreateresponseInner.java @@ -0,0 +1,566 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateResponseServiceresponseOrdercreateresponseInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateResponseServiceresponseOrdercreateresponseInner { + public static final String SERIALIZED_NAME_NUMBEROFLINESWITHSUCCESS = "numberoflineswithsuccess"; + @SerializedName(SERIALIZED_NAME_NUMBEROFLINESWITHSUCCESS) + private String numberoflineswithsuccess; + + public static final String SERIALIZED_NAME_NUMBEROFLINESWITHERROR = "numberoflineswitherror"; + @SerializedName(SERIALIZED_NAME_NUMBEROFLINESWITHERROR) + private String numberoflineswitherror; + + public static final String SERIALIZED_NAME_NUMBEROFLINESWITHWARNING = "numberoflineswithwarning"; + @SerializedName(SERIALIZED_NAME_NUMBEROFLINESWITHWARNING) + private String numberoflineswithwarning; + + public static final String SERIALIZED_NAME_GLOBALORDERID = "globalorderid"; + @SerializedName(SERIALIZED_NAME_GLOBALORDERID) + private String globalorderid; + + /** + * S=Stocked PO D=Direct Ship PO + */ + @JsonAdapter(OrdertypeEnum.Adapter.class) + public enum OrdertypeEnum { + S("S"), + + D("D"); + + private String value; + + OrdertypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrdertypeEnum fromValue(String value) { + for (OrdertypeEnum b : OrdertypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OrdertypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrdertypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrdertypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrdertypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ORDERTYPE = "ordertype"; + @SerializedName(SERIALIZED_NAME_ORDERTYPE) + private OrdertypeEnum ordertype; + + public static final String SERIALIZED_NAME_ORDERTIMESTAMP = "ordertimestamp"; + @SerializedName(SERIALIZED_NAME_ORDERTIMESTAMP) + private String ordertimestamp; + + public static final String SERIALIZED_NAME_INVOICINGSYSTEMORDERID = "invoicingsystemorderid"; + @SerializedName(SERIALIZED_NAME_INVOICINGSYSTEMORDERID) + private String invoicingsystemorderid; + + public static final String SERIALIZED_NAME_TAXAMOUNT = "taxamount"; + @SerializedName(SERIALIZED_NAME_TAXAMOUNT) + private BigDecimal taxamount; + + public static final String SERIALIZED_NAME_FREIGHTAMOUNT = "freightamount"; + @SerializedName(SERIALIZED_NAME_FREIGHTAMOUNT) + private BigDecimal freightamount; + + public static final String SERIALIZED_NAME_ORDERAMOUNT = "orderamount"; + @SerializedName(SERIALIZED_NAME_ORDERAMOUNT) + private BigDecimal orderamount; + + public static final String SERIALIZED_NAME_LINES = "Lines"; + @SerializedName(SERIALIZED_NAME_LINES) + private List lines; + + public OrderCreateResponseServiceresponseOrdercreateresponseInner() { + } + + public OrderCreateResponseServiceresponseOrdercreateresponseInner numberoflineswithsuccess(String numberoflineswithsuccess) { + this.numberoflineswithsuccess = numberoflineswithsuccess; + return this; + } + + /** + * Number of line items that were successful + * @return numberoflineswithsuccess + **/ + @javax.annotation.Nullable + public String getNumberoflineswithsuccess() { + return numberoflineswithsuccess; + } + + public void setNumberoflineswithsuccess(String numberoflineswithsuccess) { + this.numberoflineswithsuccess = numberoflineswithsuccess; + } + + + public OrderCreateResponseServiceresponseOrdercreateresponseInner numberoflineswitherror(String numberoflineswitherror) { + this.numberoflineswitherror = numberoflineswitherror; + return this; + } + + /** + * Number of line items with error + * @return numberoflineswitherror + **/ + @javax.annotation.Nullable + public String getNumberoflineswitherror() { + return numberoflineswitherror; + } + + public void setNumberoflineswitherror(String numberoflineswitherror) { + this.numberoflineswitherror = numberoflineswitherror; + } + + + public OrderCreateResponseServiceresponseOrdercreateresponseInner numberoflineswithwarning(String numberoflineswithwarning) { + this.numberoflineswithwarning = numberoflineswithwarning; + return this; + } + + /** + * Number of line items with warnings + * @return numberoflineswithwarning + **/ + @javax.annotation.Nullable + public String getNumberoflineswithwarning() { + return numberoflineswithwarning; + } + + public void setNumberoflineswithwarning(String numberoflineswithwarning) { + this.numberoflineswithwarning = numberoflineswithwarning; + } + + + public OrderCreateResponseServiceresponseOrdercreateresponseInner globalorderid(String globalorderid) { + this.globalorderid = globalorderid; + return this; + } + + /** + * Ingram sales order number + * @return globalorderid + **/ + @javax.annotation.Nullable + public String getGlobalorderid() { + return globalorderid; + } + + public void setGlobalorderid(String globalorderid) { + this.globalorderid = globalorderid; + } + + + public OrderCreateResponseServiceresponseOrdercreateresponseInner ordertype(OrdertypeEnum ordertype) { + this.ordertype = ordertype; + return this; + } + + /** + * S=Stocked PO D=Direct Ship PO + * @return ordertype + **/ + @javax.annotation.Nullable + public OrdertypeEnum getOrdertype() { + return ordertype; + } + + public void setOrdertype(OrdertypeEnum ordertype) { + this.ordertype = ordertype; + } + + + public OrderCreateResponseServiceresponseOrdercreateresponseInner ordertimestamp(String ordertimestamp) { + this.ordertimestamp = ordertimestamp; + return this; + } + + /** + * Time order received + * @return ordertimestamp + **/ + @javax.annotation.Nullable + public String getOrdertimestamp() { + return ordertimestamp; + } + + public void setOrdertimestamp(String ordertimestamp) { + this.ordertimestamp = ordertimestamp; + } + + + public OrderCreateResponseServiceresponseOrdercreateresponseInner invoicingsystemorderid(String invoicingsystemorderid) { + this.invoicingsystemorderid = invoicingsystemorderid; + return this; + } + + /** + * Ingram Micro generated order number + * @return invoicingsystemorderid + **/ + @javax.annotation.Nullable + public String getInvoicingsystemorderid() { + return invoicingsystemorderid; + } + + public void setInvoicingsystemorderid(String invoicingsystemorderid) { + this.invoicingsystemorderid = invoicingsystemorderid; + } + + + public OrderCreateResponseServiceresponseOrdercreateresponseInner taxamount(BigDecimal taxamount) { + this.taxamount = taxamount; + return this; + } + + /** + * Get taxamount + * @return taxamount + **/ + @javax.annotation.Nullable + public BigDecimal getTaxamount() { + return taxamount; + } + + public void setTaxamount(BigDecimal taxamount) { + this.taxamount = taxamount; + } + + + public OrderCreateResponseServiceresponseOrdercreateresponseInner freightamount(BigDecimal freightamount) { + this.freightamount = freightamount; + return this; + } + + /** + * Freight amount customer pays for freight + * @return freightamount + **/ + @javax.annotation.Nullable + public BigDecimal getFreightamount() { + return freightamount; + } + + public void setFreightamount(BigDecimal freightamount) { + this.freightamount = freightamount; + } + + + public OrderCreateResponseServiceresponseOrdercreateresponseInner orderamount(BigDecimal orderamount) { + this.orderamount = orderamount; + return this; + } + + /** + * Total amount of order with freight and taxes + * @return orderamount + **/ + @javax.annotation.Nullable + public BigDecimal getOrderamount() { + return orderamount; + } + + public void setOrderamount(BigDecimal orderamount) { + this.orderamount = orderamount; + } + + + public OrderCreateResponseServiceresponseOrdercreateresponseInner lines(List lines) { + this.lines = lines; + return this; + } + + public OrderCreateResponseServiceresponseOrdercreateresponseInner addLinesItem(OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner linesItem) { + if (this.lines == null) { + this.lines = new ArrayList<>(); + } + this.lines.add(linesItem); + return this; + } + + /** + * Collection of lines + * @return lines + **/ + @javax.annotation.Nullable + public List getLines() { + return lines; + } + + public void setLines(List lines) { + this.lines = lines; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateResponseServiceresponseOrdercreateresponseInner orderCreateResponseServiceresponseOrdercreateresponseInner = (OrderCreateResponseServiceresponseOrdercreateresponseInner) o; + return Objects.equals(this.numberoflineswithsuccess, orderCreateResponseServiceresponseOrdercreateresponseInner.numberoflineswithsuccess) && + Objects.equals(this.numberoflineswitherror, orderCreateResponseServiceresponseOrdercreateresponseInner.numberoflineswitherror) && + Objects.equals(this.numberoflineswithwarning, orderCreateResponseServiceresponseOrdercreateresponseInner.numberoflineswithwarning) && + Objects.equals(this.globalorderid, orderCreateResponseServiceresponseOrdercreateresponseInner.globalorderid) && + Objects.equals(this.ordertype, orderCreateResponseServiceresponseOrdercreateresponseInner.ordertype) && + Objects.equals(this.ordertimestamp, orderCreateResponseServiceresponseOrdercreateresponseInner.ordertimestamp) && + Objects.equals(this.invoicingsystemorderid, orderCreateResponseServiceresponseOrdercreateresponseInner.invoicingsystemorderid) && + Objects.equals(this.taxamount, orderCreateResponseServiceresponseOrdercreateresponseInner.taxamount) && + Objects.equals(this.freightamount, orderCreateResponseServiceresponseOrdercreateresponseInner.freightamount) && + Objects.equals(this.orderamount, orderCreateResponseServiceresponseOrdercreateresponseInner.orderamount) && + Objects.equals(this.lines, orderCreateResponseServiceresponseOrdercreateresponseInner.lines); + } + + @Override + public int hashCode() { + return Objects.hash(numberoflineswithsuccess, numberoflineswitherror, numberoflineswithwarning, globalorderid, ordertype, ordertimestamp, invoicingsystemorderid, taxamount, freightamount, orderamount, lines); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateResponseServiceresponseOrdercreateresponseInner {\n"); + sb.append(" numberoflineswithsuccess: ").append(toIndentedString(numberoflineswithsuccess)).append("\n"); + sb.append(" numberoflineswitherror: ").append(toIndentedString(numberoflineswitherror)).append("\n"); + sb.append(" numberoflineswithwarning: ").append(toIndentedString(numberoflineswithwarning)).append("\n"); + sb.append(" globalorderid: ").append(toIndentedString(globalorderid)).append("\n"); + sb.append(" ordertype: ").append(toIndentedString(ordertype)).append("\n"); + sb.append(" ordertimestamp: ").append(toIndentedString(ordertimestamp)).append("\n"); + sb.append(" invoicingsystemorderid: ").append(toIndentedString(invoicingsystemorderid)).append("\n"); + sb.append(" taxamount: ").append(toIndentedString(taxamount)).append("\n"); + sb.append(" freightamount: ").append(toIndentedString(freightamount)).append("\n"); + sb.append(" orderamount: ").append(toIndentedString(orderamount)).append("\n"); + sb.append(" lines: ").append(toIndentedString(lines)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("numberoflineswithsuccess"); + openapiFields.add("numberoflineswitherror"); + openapiFields.add("numberoflineswithwarning"); + openapiFields.add("globalorderid"); + openapiFields.add("ordertype"); + openapiFields.add("ordertimestamp"); + openapiFields.add("invoicingsystemorderid"); + openapiFields.add("taxamount"); + openapiFields.add("freightamount"); + openapiFields.add("orderamount"); + openapiFields.add("Lines"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateResponseServiceresponseOrdercreateresponseInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateResponseServiceresponseOrdercreateresponseInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateResponseServiceresponseOrdercreateresponseInner is not found in the empty JSON string", OrderCreateResponseServiceresponseOrdercreateresponseInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateResponseServiceresponseOrdercreateresponseInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateResponseServiceresponseOrdercreateresponseInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("numberoflineswithsuccess") != null && !jsonObj.get("numberoflineswithsuccess").isJsonNull()) && !jsonObj.get("numberoflineswithsuccess").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `numberoflineswithsuccess` to be a primitive type in the JSON string but got `%s`", jsonObj.get("numberoflineswithsuccess").toString())); + } + if ((jsonObj.get("numberoflineswitherror") != null && !jsonObj.get("numberoflineswitherror").isJsonNull()) && !jsonObj.get("numberoflineswitherror").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `numberoflineswitherror` to be a primitive type in the JSON string but got `%s`", jsonObj.get("numberoflineswitherror").toString())); + } + if ((jsonObj.get("numberoflineswithwarning") != null && !jsonObj.get("numberoflineswithwarning").isJsonNull()) && !jsonObj.get("numberoflineswithwarning").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `numberoflineswithwarning` to be a primitive type in the JSON string but got `%s`", jsonObj.get("numberoflineswithwarning").toString())); + } + if ((jsonObj.get("globalorderid") != null && !jsonObj.get("globalorderid").isJsonNull()) && !jsonObj.get("globalorderid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `globalorderid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("globalorderid").toString())); + } + if ((jsonObj.get("ordertype") != null && !jsonObj.get("ordertype").isJsonNull()) && !jsonObj.get("ordertype").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ordertype` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ordertype").toString())); + } + // validate the optional field `ordertype` + if (jsonObj.get("ordertype") != null && !jsonObj.get("ordertype").isJsonNull()) { + OrdertypeEnum.validateJsonElement(jsonObj.get("ordertype")); + } + if ((jsonObj.get("ordertimestamp") != null && !jsonObj.get("ordertimestamp").isJsonNull()) && !jsonObj.get("ordertimestamp").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ordertimestamp` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ordertimestamp").toString())); + } + if ((jsonObj.get("invoicingsystemorderid") != null && !jsonObj.get("invoicingsystemorderid").isJsonNull()) && !jsonObj.get("invoicingsystemorderid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `invoicingsystemorderid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoicingsystemorderid").toString())); + } + if (jsonObj.get("Lines") != null && !jsonObj.get("Lines").isJsonNull()) { + JsonArray jsonArraylines = jsonObj.getAsJsonArray("Lines"); + if (jsonArraylines != null) { + // ensure the json data is an array + if (!jsonObj.get("Lines").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `Lines` to be an array in the JSON string but got `%s`", jsonObj.get("Lines").toString())); + } + + // validate the optional field `Lines` (array) + for (int i = 0; i < jsonArraylines.size(); i++) { + OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.validateJsonElement(jsonArraylines.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateResponseServiceresponseOrdercreateresponseInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateResponseServiceresponseOrdercreateresponseInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateResponseServiceresponseOrdercreateresponseInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateResponseServiceresponseOrdercreateresponseInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateResponseServiceresponseOrdercreateresponseInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateResponseServiceresponseOrdercreateresponseInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateResponseServiceresponseOrdercreateresponseInner + * @throws IOException if the JSON string is invalid with respect to OrderCreateResponseServiceresponseOrdercreateresponseInner + */ + public static OrderCreateResponseServiceresponseOrdercreateresponseInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateResponseServiceresponseOrdercreateresponseInner.class); + } + + /** + * Convert an instance of OrderCreateResponseServiceresponseOrdercreateresponseInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.java b/src/main/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.java new file mode 100644 index 00000000..928d862c --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.java @@ -0,0 +1,595 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner { + public static final String SERIALIZED_NAME_LINETYPE = "linetype"; + @SerializedName(SERIALIZED_NAME_LINETYPE) + private String linetype; + + public static final String SERIALIZED_NAME_GLOBALLINENUMBER = "globallinenumber"; + @SerializedName(SERIALIZED_NAME_GLOBALLINENUMBER) + private String globallinenumber; + + public static final String SERIALIZED_NAME_PARTNUMBER = "partnumber"; + @SerializedName(SERIALIZED_NAME_PARTNUMBER) + private String partnumber; + + public static final String SERIALIZED_NAME_GLOBALSKUID = "globalskuid"; + @SerializedName(SERIALIZED_NAME_GLOBALSKUID) + private String globalskuid; + + public static final String SERIALIZED_NAME_LINENUMBER = "linenumber"; + @SerializedName(SERIALIZED_NAME_LINENUMBER) + private String linenumber; + + public static final String SERIALIZED_NAME_CARRIERCODE = "carriercode"; + @SerializedName(SERIALIZED_NAME_CARRIERCODE) + private String carriercode; + + public static final String SERIALIZED_NAME_CARRIERDESCRIPTION = "carrierdescription"; + @SerializedName(SERIALIZED_NAME_CARRIERDESCRIPTION) + private String carrierdescription; + + public static final String SERIALIZED_NAME_REQUESTEDUNITPRICE = "requestedunitprice"; + @SerializedName(SERIALIZED_NAME_REQUESTEDUNITPRICE) + private BigDecimal requestedunitprice; + + public static final String SERIALIZED_NAME_REQUESTEDQUANTITY = "requestedquantity"; + @SerializedName(SERIALIZED_NAME_REQUESTEDQUANTITY) + private Integer requestedquantity; + + public static final String SERIALIZED_NAME_CONFIRMEDQUANTITY = "confirmedquantity"; + @SerializedName(SERIALIZED_NAME_CONFIRMEDQUANTITY) + private Integer confirmedquantity; + + public static final String SERIALIZED_NAME_BACKORDEREDQUANTITY = "backorderedquantity"; + @SerializedName(SERIALIZED_NAME_BACKORDEREDQUANTITY) + private Integer backorderedquantity; + + public static final String SERIALIZED_NAME_UNITPRODUCTPRICE = "unitproductprice"; + @SerializedName(SERIALIZED_NAME_UNITPRODUCTPRICE) + private BigDecimal unitproductprice; + + public static final String SERIALIZED_NAME_NETAMOUNT = "netamount"; + @SerializedName(SERIALIZED_NAME_NETAMOUNT) + private BigDecimal netamount; + + public static final String SERIALIZED_NAME_WAREHOUSEID = "warehouseid"; + @SerializedName(SERIALIZED_NAME_WAREHOUSEID) + private String warehouseid; + + public static final String SERIALIZED_NAME_ORDERSUFFIX = "ordersuffix"; + @SerializedName(SERIALIZED_NAME_ORDERSUFFIX) + private String ordersuffix; + + public OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner() { + } + + public OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner linetype(String linetype) { + this.linetype = linetype; + return this; + } + + /** + * “P”-Line or SKU Number “C”-Comment Line + * @return linetype + **/ + @javax.annotation.Nullable + public String getLinetype() { + return linetype; + } + + public void setLinetype(String linetype) { + this.linetype = linetype; + } + + + public OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner globallinenumber(String globallinenumber) { + this.globallinenumber = globallinenumber; + return this; + } + + /** + * Ingram generated line number + * @return globallinenumber + **/ + @javax.annotation.Nullable + public String getGloballinenumber() { + return globallinenumber; + } + + public void setGloballinenumber(String globallinenumber) { + this.globallinenumber = globallinenumber; + } + + + public OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner partnumber(String partnumber) { + this.partnumber = partnumber; + return this; + } + + /** + * Ingram Micro Sku Number + * @return partnumber + **/ + @javax.annotation.Nullable + public String getPartnumber() { + return partnumber; + } + + public void setPartnumber(String partnumber) { + this.partnumber = partnumber; + } + + + public OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner globalskuid(String globalskuid) { + this.globalskuid = globalskuid; + return this; + } + + /** + * Get globalskuid + * @return globalskuid + **/ + @javax.annotation.Nullable + public String getGlobalskuid() { + return globalskuid; + } + + public void setGlobalskuid(String globalskuid) { + this.globalskuid = globalskuid; + } + + + public OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner linenumber(String linenumber) { + this.linenumber = linenumber; + return this; + } + + /** + * Get linenumber + * @return linenumber + **/ + @javax.annotation.Nullable + public String getLinenumber() { + return linenumber; + } + + public void setLinenumber(String linenumber) { + this.linenumber = linenumber; + } + + + public OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner carriercode(String carriercode) { + this.carriercode = carriercode; + return this; + } + + /** + * Transportation 2 digit codes + * @return carriercode + **/ + @javax.annotation.Nullable + public String getCarriercode() { + return carriercode; + } + + public void setCarriercode(String carriercode) { + this.carriercode = carriercode; + } + + + public OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner carrierdescription(String carrierdescription) { + this.carrierdescription = carrierdescription; + return this; + } + + /** + * Transportation Carrier Name + * @return carrierdescription + **/ + @javax.annotation.Nullable + public String getCarrierdescription() { + return carrierdescription; + } + + public void setCarrierdescription(String carrierdescription) { + this.carrierdescription = carrierdescription; + } + + + public OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner requestedunitprice(BigDecimal requestedunitprice) { + this.requestedunitprice = requestedunitprice; + return this; + } + + /** + * Price requested by reseller. Price Variance can be set up by Ingram Micro Sales Rep + * @return requestedunitprice + **/ + @javax.annotation.Nullable + public BigDecimal getRequestedunitprice() { + return requestedunitprice; + } + + public void setRequestedunitprice(BigDecimal requestedunitprice) { + this.requestedunitprice = requestedunitprice; + } + + + public OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner requestedquantity(Integer requestedquantity) { + this.requestedquantity = requestedquantity; + return this; + } + + /** + * Quanity Requested + * @return requestedquantity + **/ + @javax.annotation.Nullable + public Integer getRequestedquantity() { + return requestedquantity; + } + + public void setRequestedquantity(Integer requestedquantity) { + this.requestedquantity = requestedquantity; + } + + + public OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner confirmedquantity(Integer confirmedquantity) { + this.confirmedquantity = confirmedquantity; + return this; + } + + /** + * Quanity Shipped + * @return confirmedquantity + **/ + @javax.annotation.Nullable + public Integer getConfirmedquantity() { + return confirmedquantity; + } + + public void setConfirmedquantity(Integer confirmedquantity) { + this.confirmedquantity = confirmedquantity; + } + + + public OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner backorderedquantity(Integer backorderedquantity) { + this.backorderedquantity = backorderedquantity; + return this; + } + + /** + * Quanity of units that didn’t ship + * @return backorderedquantity + **/ + @javax.annotation.Nullable + public Integer getBackorderedquantity() { + return backorderedquantity; + } + + public void setBackorderedquantity(Integer backorderedquantity) { + this.backorderedquantity = backorderedquantity; + } + + + public OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner unitproductprice(BigDecimal unitproductprice) { + this.unitproductprice = unitproductprice; + return this; + } + + /** + * Price Per Unit + * @return unitproductprice + **/ + @javax.annotation.Nullable + public BigDecimal getUnitproductprice() { + return unitproductprice; + } + + public void setUnitproductprice(BigDecimal unitproductprice) { + this.unitproductprice = unitproductprice; + } + + + public OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner netamount(BigDecimal netamount) { + this.netamount = netamount; + return this; + } + + /** + * Total amount. Quantity X Unit Price + * @return netamount + **/ + @javax.annotation.Nullable + public BigDecimal getNetamount() { + return netamount; + } + + public void setNetamount(BigDecimal netamount) { + this.netamount = netamount; + } + + + public OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner warehouseid(String warehouseid) { + this.warehouseid = warehouseid; + return this; + } + + /** + * Get warehouseid + * @return warehouseid + **/ + @javax.annotation.Nullable + public String getWarehouseid() { + return warehouseid; + } + + public void setWarehouseid(String warehouseid) { + this.warehouseid = warehouseid; + } + + + public OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner ordersuffix(String ordersuffix) { + this.ordersuffix = ordersuffix; + return this; + } + + /** + * Use order suffix with the globalorderid for this line item. + * @return ordersuffix + **/ + @javax.annotation.Nullable + public String getOrdersuffix() { + return ordersuffix; + } + + public void setOrdersuffix(String ordersuffix) { + this.ordersuffix = ordersuffix; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner orderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner = (OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner) o; + return Objects.equals(this.linetype, orderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.linetype) && + Objects.equals(this.globallinenumber, orderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.globallinenumber) && + Objects.equals(this.partnumber, orderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.partnumber) && + Objects.equals(this.globalskuid, orderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.globalskuid) && + Objects.equals(this.linenumber, orderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.linenumber) && + Objects.equals(this.carriercode, orderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.carriercode) && + Objects.equals(this.carrierdescription, orderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.carrierdescription) && + Objects.equals(this.requestedunitprice, orderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.requestedunitprice) && + Objects.equals(this.requestedquantity, orderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.requestedquantity) && + Objects.equals(this.confirmedquantity, orderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.confirmedquantity) && + Objects.equals(this.backorderedquantity, orderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.backorderedquantity) && + Objects.equals(this.unitproductprice, orderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.unitproductprice) && + Objects.equals(this.netamount, orderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.netamount) && + Objects.equals(this.warehouseid, orderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.warehouseid) && + Objects.equals(this.ordersuffix, orderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.ordersuffix); + } + + @Override + public int hashCode() { + return Objects.hash(linetype, globallinenumber, partnumber, globalskuid, linenumber, carriercode, carrierdescription, requestedunitprice, requestedquantity, confirmedquantity, backorderedquantity, unitproductprice, netamount, warehouseid, ordersuffix); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner {\n"); + sb.append(" linetype: ").append(toIndentedString(linetype)).append("\n"); + sb.append(" globallinenumber: ").append(toIndentedString(globallinenumber)).append("\n"); + sb.append(" partnumber: ").append(toIndentedString(partnumber)).append("\n"); + sb.append(" globalskuid: ").append(toIndentedString(globalskuid)).append("\n"); + sb.append(" linenumber: ").append(toIndentedString(linenumber)).append("\n"); + sb.append(" carriercode: ").append(toIndentedString(carriercode)).append("\n"); + sb.append(" carrierdescription: ").append(toIndentedString(carrierdescription)).append("\n"); + sb.append(" requestedunitprice: ").append(toIndentedString(requestedunitprice)).append("\n"); + sb.append(" requestedquantity: ").append(toIndentedString(requestedquantity)).append("\n"); + sb.append(" confirmedquantity: ").append(toIndentedString(confirmedquantity)).append("\n"); + sb.append(" backorderedquantity: ").append(toIndentedString(backorderedquantity)).append("\n"); + sb.append(" unitproductprice: ").append(toIndentedString(unitproductprice)).append("\n"); + sb.append(" netamount: ").append(toIndentedString(netamount)).append("\n"); + sb.append(" warehouseid: ").append(toIndentedString(warehouseid)).append("\n"); + sb.append(" ordersuffix: ").append(toIndentedString(ordersuffix)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("linetype"); + openapiFields.add("globallinenumber"); + openapiFields.add("partnumber"); + openapiFields.add("globalskuid"); + openapiFields.add("linenumber"); + openapiFields.add("carriercode"); + openapiFields.add("carrierdescription"); + openapiFields.add("requestedunitprice"); + openapiFields.add("requestedquantity"); + openapiFields.add("confirmedquantity"); + openapiFields.add("backorderedquantity"); + openapiFields.add("unitproductprice"); + openapiFields.add("netamount"); + openapiFields.add("warehouseid"); + openapiFields.add("ordersuffix"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner is not found in the empty JSON string", OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("linetype") != null && !jsonObj.get("linetype").isJsonNull()) && !jsonObj.get("linetype").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `linetype` to be a primitive type in the JSON string but got `%s`", jsonObj.get("linetype").toString())); + } + if ((jsonObj.get("globallinenumber") != null && !jsonObj.get("globallinenumber").isJsonNull()) && !jsonObj.get("globallinenumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `globallinenumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("globallinenumber").toString())); + } + if ((jsonObj.get("partnumber") != null && !jsonObj.get("partnumber").isJsonNull()) && !jsonObj.get("partnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `partnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("partnumber").toString())); + } + if ((jsonObj.get("globalskuid") != null && !jsonObj.get("globalskuid").isJsonNull()) && !jsonObj.get("globalskuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `globalskuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("globalskuid").toString())); + } + if ((jsonObj.get("linenumber") != null && !jsonObj.get("linenumber").isJsonNull()) && !jsonObj.get("linenumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `linenumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("linenumber").toString())); + } + if ((jsonObj.get("carriercode") != null && !jsonObj.get("carriercode").isJsonNull()) && !jsonObj.get("carriercode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `carriercode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carriercode").toString())); + } + if ((jsonObj.get("carrierdescription") != null && !jsonObj.get("carrierdescription").isJsonNull()) && !jsonObj.get("carrierdescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `carrierdescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierdescription").toString())); + } + if ((jsonObj.get("warehouseid") != null && !jsonObj.get("warehouseid").isJsonNull()) && !jsonObj.get("warehouseid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `warehouseid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("warehouseid").toString())); + } + if ((jsonObj.get("ordersuffix") != null && !jsonObj.get("ordersuffix").isJsonNull()) && !jsonObj.get("ordersuffix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ordersuffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ordersuffix").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner + * @throws IOException if the JSON string is invalid with respect to OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner + */ + public static OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner.class); + } + + /** + * Convert an instance of OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdersummary.java b/src/main/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdersummary.java new file mode 100644 index 00000000..c98a6e90 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdersummary.java @@ -0,0 +1,295 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderCreateResponseServiceresponseOrdersummaryShiptoaddress; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateResponseServiceresponseOrdersummary + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateResponseServiceresponseOrdersummary { + public static final String SERIALIZED_NAME_CUSTOMERPONUMBER = "customerponumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMERPONUMBER) + private String customerponumber; + + public static final String SERIALIZED_NAME_TOTALORDERAMOUNT = "totalorderamount"; + @SerializedName(SERIALIZED_NAME_TOTALORDERAMOUNT) + private String totalorderamount; + + public static final String SERIALIZED_NAME_TOTALORDERCREATED = "totalordercreated"; + @SerializedName(SERIALIZED_NAME_TOTALORDERCREATED) + private String totalordercreated; + + public static final String SERIALIZED_NAME_SHIPTOADDRESS = "shiptoaddress"; + @SerializedName(SERIALIZED_NAME_SHIPTOADDRESS) + private OrderCreateResponseServiceresponseOrdersummaryShiptoaddress shiptoaddress; + + public OrderCreateResponseServiceresponseOrdersummary() { + } + + public OrderCreateResponseServiceresponseOrdersummary customerponumber(String customerponumber) { + this.customerponumber = customerponumber; + return this; + } + + /** + * Get customerponumber + * @return customerponumber + **/ + @javax.annotation.Nullable + public String getCustomerponumber() { + return customerponumber; + } + + public void setCustomerponumber(String customerponumber) { + this.customerponumber = customerponumber; + } + + + public OrderCreateResponseServiceresponseOrdersummary totalorderamount(String totalorderamount) { + this.totalorderamount = totalorderamount; + return this; + } + + /** + * Total of all the orders including taxes and fees + * @return totalorderamount + **/ + @javax.annotation.Nullable + public String getTotalorderamount() { + return totalorderamount; + } + + public void setTotalorderamount(String totalorderamount) { + this.totalorderamount = totalorderamount; + } + + + public OrderCreateResponseServiceresponseOrdersummary totalordercreated(String totalordercreated) { + this.totalordercreated = totalordercreated; + return this; + } + + /** + * Number of orders created, in some cases we may create more than one order. + * @return totalordercreated + **/ + @javax.annotation.Nullable + public String getTotalordercreated() { + return totalordercreated; + } + + public void setTotalordercreated(String totalordercreated) { + this.totalordercreated = totalordercreated; + } + + + public OrderCreateResponseServiceresponseOrdersummary shiptoaddress(OrderCreateResponseServiceresponseOrdersummaryShiptoaddress shiptoaddress) { + this.shiptoaddress = shiptoaddress; + return this; + } + + /** + * Get shiptoaddress + * @return shiptoaddress + **/ + @javax.annotation.Nullable + public OrderCreateResponseServiceresponseOrdersummaryShiptoaddress getShiptoaddress() { + return shiptoaddress; + } + + public void setShiptoaddress(OrderCreateResponseServiceresponseOrdersummaryShiptoaddress shiptoaddress) { + this.shiptoaddress = shiptoaddress; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateResponseServiceresponseOrdersummary orderCreateResponseServiceresponseOrdersummary = (OrderCreateResponseServiceresponseOrdersummary) o; + return Objects.equals(this.customerponumber, orderCreateResponseServiceresponseOrdersummary.customerponumber) && + Objects.equals(this.totalorderamount, orderCreateResponseServiceresponseOrdersummary.totalorderamount) && + Objects.equals(this.totalordercreated, orderCreateResponseServiceresponseOrdersummary.totalordercreated) && + Objects.equals(this.shiptoaddress, orderCreateResponseServiceresponseOrdersummary.shiptoaddress); + } + + @Override + public int hashCode() { + return Objects.hash(customerponumber, totalorderamount, totalordercreated, shiptoaddress); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateResponseServiceresponseOrdersummary {\n"); + sb.append(" customerponumber: ").append(toIndentedString(customerponumber)).append("\n"); + sb.append(" totalorderamount: ").append(toIndentedString(totalorderamount)).append("\n"); + sb.append(" totalordercreated: ").append(toIndentedString(totalordercreated)).append("\n"); + sb.append(" shiptoaddress: ").append(toIndentedString(shiptoaddress)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("customerponumber"); + openapiFields.add("totalorderamount"); + openapiFields.add("totalordercreated"); + openapiFields.add("shiptoaddress"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateResponseServiceresponseOrdersummary + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateResponseServiceresponseOrdersummary.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateResponseServiceresponseOrdersummary is not found in the empty JSON string", OrderCreateResponseServiceresponseOrdersummary.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateResponseServiceresponseOrdersummary.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateResponseServiceresponseOrdersummary` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("customerponumber") != null && !jsonObj.get("customerponumber").isJsonNull()) && !jsonObj.get("customerponumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerponumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerponumber").toString())); + } + if ((jsonObj.get("totalorderamount") != null && !jsonObj.get("totalorderamount").isJsonNull()) && !jsonObj.get("totalorderamount").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `totalorderamount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("totalorderamount").toString())); + } + if ((jsonObj.get("totalordercreated") != null && !jsonObj.get("totalordercreated").isJsonNull()) && !jsonObj.get("totalordercreated").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `totalordercreated` to be a primitive type in the JSON string but got `%s`", jsonObj.get("totalordercreated").toString())); + } + // validate the optional field `shiptoaddress` + if (jsonObj.get("shiptoaddress") != null && !jsonObj.get("shiptoaddress").isJsonNull()) { + OrderCreateResponseServiceresponseOrdersummaryShiptoaddress.validateJsonElement(jsonObj.get("shiptoaddress")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateResponseServiceresponseOrdersummary.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateResponseServiceresponseOrdersummary' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateResponseServiceresponseOrdersummary.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateResponseServiceresponseOrdersummary value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateResponseServiceresponseOrdersummary read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateResponseServiceresponseOrdersummary given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateResponseServiceresponseOrdersummary + * @throws IOException if the JSON string is invalid with respect to OrderCreateResponseServiceresponseOrdersummary + */ + public static OrderCreateResponseServiceresponseOrdersummary fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateResponseServiceresponseOrdersummary.class); + } + + /** + * Convert an instance of OrderCreateResponseServiceresponseOrdersummary to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdersummaryShiptoaddress.java b/src/main/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdersummaryShiptoaddress.java new file mode 100644 index 00000000..638483ea --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdersummaryShiptoaddress.java @@ -0,0 +1,438 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderCreateResponseServiceresponseOrdersummaryShiptoaddress + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateResponseServiceresponseOrdersummaryShiptoaddress { + public static final String SERIALIZED_NAME_ATTENTION = "attention"; + @SerializedName(SERIALIZED_NAME_ATTENTION) + private String attention; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_ADDRESSLINE1 = "addressline1"; + @SerializedName(SERIALIZED_NAME_ADDRESSLINE1) + private String addressline1; + + public static final String SERIALIZED_NAME_ADDRESSLINE2 = "addressline2"; + @SerializedName(SERIALIZED_NAME_ADDRESSLINE2) + private String addressline2; + + public static final String SERIALIZED_NAME_ADDRESSLINE3 = "addressline3"; + @SerializedName(SERIALIZED_NAME_ADDRESSLINE3) + private String addressline3; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTALCODE = "postalcode"; + @SerializedName(SERIALIZED_NAME_POSTALCODE) + private String postalcode; + + public static final String SERIALIZED_NAME_COUNTRYCODE = "countrycode"; + @SerializedName(SERIALIZED_NAME_COUNTRYCODE) + private String countrycode; + + public OrderCreateResponseServiceresponseOrdersummaryShiptoaddress() { + } + + public OrderCreateResponseServiceresponseOrdersummaryShiptoaddress attention(String attention) { + this.attention = attention; + return this; + } + + /** + * Get attention + * @return attention + **/ + @javax.annotation.Nullable + public String getAttention() { + return attention; + } + + public void setAttention(String attention) { + this.attention = attention; + } + + + public OrderCreateResponseServiceresponseOrdersummaryShiptoaddress name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public OrderCreateResponseServiceresponseOrdersummaryShiptoaddress addressline1(String addressline1) { + this.addressline1 = addressline1; + return this; + } + + /** + * Get addressline1 + * @return addressline1 + **/ + @javax.annotation.Nullable + public String getAddressline1() { + return addressline1; + } + + public void setAddressline1(String addressline1) { + this.addressline1 = addressline1; + } + + + public OrderCreateResponseServiceresponseOrdersummaryShiptoaddress addressline2(String addressline2) { + this.addressline2 = addressline2; + return this; + } + + /** + * Get addressline2 + * @return addressline2 + **/ + @javax.annotation.Nullable + public String getAddressline2() { + return addressline2; + } + + public void setAddressline2(String addressline2) { + this.addressline2 = addressline2; + } + + + public OrderCreateResponseServiceresponseOrdersummaryShiptoaddress addressline3(String addressline3) { + this.addressline3 = addressline3; + return this; + } + + /** + * Get addressline3 + * @return addressline3 + **/ + @javax.annotation.Nullable + public String getAddressline3() { + return addressline3; + } + + public void setAddressline3(String addressline3) { + this.addressline3 = addressline3; + } + + + public OrderCreateResponseServiceresponseOrdersummaryShiptoaddress city(String city) { + this.city = city; + return this; + } + + /** + * Get city + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public OrderCreateResponseServiceresponseOrdersummaryShiptoaddress state(String state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public OrderCreateResponseServiceresponseOrdersummaryShiptoaddress postalcode(String postalcode) { + this.postalcode = postalcode; + return this; + } + + /** + * Get postalcode + * @return postalcode + **/ + @javax.annotation.Nullable + public String getPostalcode() { + return postalcode; + } + + public void setPostalcode(String postalcode) { + this.postalcode = postalcode; + } + + + public OrderCreateResponseServiceresponseOrdersummaryShiptoaddress countrycode(String countrycode) { + this.countrycode = countrycode; + return this; + } + + /** + * Get countrycode + * @return countrycode + **/ + @javax.annotation.Nullable + public String getCountrycode() { + return countrycode; + } + + public void setCountrycode(String countrycode) { + this.countrycode = countrycode; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateResponseServiceresponseOrdersummaryShiptoaddress orderCreateResponseServiceresponseOrdersummaryShiptoaddress = (OrderCreateResponseServiceresponseOrdersummaryShiptoaddress) o; + return Objects.equals(this.attention, orderCreateResponseServiceresponseOrdersummaryShiptoaddress.attention) && + Objects.equals(this.name, orderCreateResponseServiceresponseOrdersummaryShiptoaddress.name) && + Objects.equals(this.addressline1, orderCreateResponseServiceresponseOrdersummaryShiptoaddress.addressline1) && + Objects.equals(this.addressline2, orderCreateResponseServiceresponseOrdersummaryShiptoaddress.addressline2) && + Objects.equals(this.addressline3, orderCreateResponseServiceresponseOrdersummaryShiptoaddress.addressline3) && + Objects.equals(this.city, orderCreateResponseServiceresponseOrdersummaryShiptoaddress.city) && + Objects.equals(this.state, orderCreateResponseServiceresponseOrdersummaryShiptoaddress.state) && + Objects.equals(this.postalcode, orderCreateResponseServiceresponseOrdersummaryShiptoaddress.postalcode) && + Objects.equals(this.countrycode, orderCreateResponseServiceresponseOrdersummaryShiptoaddress.countrycode); + } + + @Override + public int hashCode() { + return Objects.hash(attention, name, addressline1, addressline2, addressline3, city, state, postalcode, countrycode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateResponseServiceresponseOrdersummaryShiptoaddress {\n"); + sb.append(" attention: ").append(toIndentedString(attention)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" addressline1: ").append(toIndentedString(addressline1)).append("\n"); + sb.append(" addressline2: ").append(toIndentedString(addressline2)).append("\n"); + sb.append(" addressline3: ").append(toIndentedString(addressline3)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalcode: ").append(toIndentedString(postalcode)).append("\n"); + sb.append(" countrycode: ").append(toIndentedString(countrycode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attention"); + openapiFields.add("name"); + openapiFields.add("addressline1"); + openapiFields.add("addressline2"); + openapiFields.add("addressline3"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalcode"); + openapiFields.add("countrycode"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateResponseServiceresponseOrdersummaryShiptoaddress + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateResponseServiceresponseOrdersummaryShiptoaddress.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateResponseServiceresponseOrdersummaryShiptoaddress is not found in the empty JSON string", OrderCreateResponseServiceresponseOrdersummaryShiptoaddress.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateResponseServiceresponseOrdersummaryShiptoaddress.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateResponseServiceresponseOrdersummaryShiptoaddress` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("attention") != null && !jsonObj.get("attention").isJsonNull()) && !jsonObj.get("attention").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attention` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attention").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("addressline1") != null && !jsonObj.get("addressline1").isJsonNull()) && !jsonObj.get("addressline1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressline1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressline1").toString())); + } + if ((jsonObj.get("addressline2") != null && !jsonObj.get("addressline2").isJsonNull()) && !jsonObj.get("addressline2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressline2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressline2").toString())); + } + if ((jsonObj.get("addressline3") != null && !jsonObj.get("addressline3").isJsonNull()) && !jsonObj.get("addressline3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressline3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressline3").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalcode") != null && !jsonObj.get("postalcode").isJsonNull()) && !jsonObj.get("postalcode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalcode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalcode").toString())); + } + if ((jsonObj.get("countrycode") != null && !jsonObj.get("countrycode").isJsonNull()) && !jsonObj.get("countrycode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countrycode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countrycode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateResponseServiceresponseOrdersummaryShiptoaddress.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateResponseServiceresponseOrdersummaryShiptoaddress' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateResponseServiceresponseOrdersummaryShiptoaddress.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateResponseServiceresponseOrdersummaryShiptoaddress value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateResponseServiceresponseOrdersummaryShiptoaddress read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateResponseServiceresponseOrdersummaryShiptoaddress given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateResponseServiceresponseOrdersummaryShiptoaddress + * @throws IOException if the JSON string is invalid with respect to OrderCreateResponseServiceresponseOrdersummaryShiptoaddress + */ + public static OrderCreateResponseServiceresponseOrdersummaryShiptoaddress fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateResponseServiceresponseOrdersummaryShiptoaddress.class); + } + + /** + * Convert an instance of OrderCreateResponseServiceresponseOrdersummaryShiptoaddress to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderCreateResponseShipToInfo.java b/src/main/java/xiresellers/client/model/OrderCreateResponseShipToInfo.java new file mode 100644 index 00000000..8c38130e --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderCreateResponseShipToInfo.java @@ -0,0 +1,612 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * The shipping information provided by the reseller. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderCreateResponseShipToInfo { + public static final String SERIALIZED_NAME_ADDRESS_ID = "addressId"; + @SerializedName(SERIALIZED_NAME_ADDRESS_ID) + private String addressId; + + public static final String SERIALIZED_NAME_CONTACT = "contact"; + @SerializedName(SERIALIZED_NAME_CONTACT) + private String contact; + + public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; + @SerializedName(SERIALIZED_NAME_COMPANY_NAME) + private String companyName; + + public static final String SERIALIZED_NAME_NAME1 = "name1"; + @SerializedName(SERIALIZED_NAME_NAME1) + private String name1; + + public static final String SERIALIZED_NAME_NAME2 = "name2"; + @SerializedName(SERIALIZED_NAME_NAME2) + private String name2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE1 = "addressLine1"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE1) + private String addressLine1; + + public static final String SERIALIZED_NAME_ADDRESS_LINE2 = "addressLine2"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE2) + private String addressLine2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE3 = "addressLine3"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE3) + private String addressLine3; + + public static final String SERIALIZED_NAME_ADDRESS_LINE4 = "addressLine4"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE4) + private String addressLine4; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; + @SerializedName(SERIALIZED_NAME_POSTAL_CODE) + private String postalCode; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) + private String phoneNumber; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public OrderCreateResponseShipToInfo() { + } + + public OrderCreateResponseShipToInfo addressId(String addressId) { + this.addressId = addressId; + return this; + } + + /** + * The ID references the resellers address in Ingram Micro's system for shipping. Provided to resellers during the onboarding process. + * @return addressId + **/ + @javax.annotation.Nullable + public String getAddressId() { + return addressId; + } + + public void setAddressId(String addressId) { + this.addressId = addressId; + } + + + public OrderCreateResponseShipToInfo contact(String contact) { + this.contact = contact; + return this; + } + + /** + * The company contact provided by the reseller. + * @return contact + **/ + @javax.annotation.Nullable + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + + public OrderCreateResponseShipToInfo companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * The name of the company the order will be shipped to. + * @return companyName + **/ + @javax.annotation.Nullable + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public OrderCreateResponseShipToInfo name1(String name1) { + this.name1 = name1; + return this; + } + + /** + * name1 + * @return name1 + **/ + @javax.annotation.Nullable + public String getName1() { + return name1; + } + + public void setName1(String name1) { + this.name1 = name1; + } + + + public OrderCreateResponseShipToInfo name2(String name2) { + this.name2 = name2; + return this; + } + + /** + * name2 + * @return name2 + **/ + @javax.annotation.Nullable + public String getName2() { + return name2; + } + + public void setName2(String name2) { + this.name2 = name2; + } + + + public OrderCreateResponseShipToInfo addressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + return this; + } + + /** + * The street address and building or house number the order will be shipped to. + * @return addressLine1 + **/ + @javax.annotation.Nullable + public String getAddressLine1() { + return addressLine1; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + + public OrderCreateResponseShipToInfo addressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + return this; + } + + /** + * The apartment number the order will be shipped to. + * @return addressLine2 + **/ + @javax.annotation.Nullable + public String getAddressLine2() { + return addressLine2; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + + public OrderCreateResponseShipToInfo addressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + return this; + } + + /** + * Line 3 of the address the order will be shipped to. + * @return addressLine3 + **/ + @javax.annotation.Nullable + public String getAddressLine3() { + return addressLine3; + } + + public void setAddressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + } + + + public OrderCreateResponseShipToInfo addressLine4(String addressLine4) { + this.addressLine4 = addressLine4; + return this; + } + + /** + * Street address4 + * @return addressLine4 + **/ + @javax.annotation.Nullable + public String getAddressLine4() { + return addressLine4; + } + + public void setAddressLine4(String addressLine4) { + this.addressLine4 = addressLine4; + } + + + public OrderCreateResponseShipToInfo city(String city) { + this.city = city; + return this; + } + + /** + * The city the order will be shipped to. + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public OrderCreateResponseShipToInfo state(String state) { + this.state = state; + return this; + } + + /** + * The state the order will be shipped to. + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public OrderCreateResponseShipToInfo postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * The zip or postal code the order will be shipped to. + * @return postalCode + **/ + @javax.annotation.Nullable + public String getPostalCode() { + return postalCode; + } + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public OrderCreateResponseShipToInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * The two-character ISO country code the order will be shipped to. + * @return countryCode + **/ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public OrderCreateResponseShipToInfo phoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * The company contact phone number. + * @return phoneNumber + **/ + @javax.annotation.Nullable + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public OrderCreateResponseShipToInfo email(String email) { + this.email = email; + return this; + } + + /** + * The company contact email address. + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderCreateResponseShipToInfo orderCreateResponseShipToInfo = (OrderCreateResponseShipToInfo) o; + return Objects.equals(this.addressId, orderCreateResponseShipToInfo.addressId) && + Objects.equals(this.contact, orderCreateResponseShipToInfo.contact) && + Objects.equals(this.companyName, orderCreateResponseShipToInfo.companyName) && + Objects.equals(this.name1, orderCreateResponseShipToInfo.name1) && + Objects.equals(this.name2, orderCreateResponseShipToInfo.name2) && + Objects.equals(this.addressLine1, orderCreateResponseShipToInfo.addressLine1) && + Objects.equals(this.addressLine2, orderCreateResponseShipToInfo.addressLine2) && + Objects.equals(this.addressLine3, orderCreateResponseShipToInfo.addressLine3) && + Objects.equals(this.addressLine4, orderCreateResponseShipToInfo.addressLine4) && + Objects.equals(this.city, orderCreateResponseShipToInfo.city) && + Objects.equals(this.state, orderCreateResponseShipToInfo.state) && + Objects.equals(this.postalCode, orderCreateResponseShipToInfo.postalCode) && + Objects.equals(this.countryCode, orderCreateResponseShipToInfo.countryCode) && + Objects.equals(this.phoneNumber, orderCreateResponseShipToInfo.phoneNumber) && + Objects.equals(this.email, orderCreateResponseShipToInfo.email); + } + + @Override + public int hashCode() { + return Objects.hash(addressId, contact, companyName, name1, name2, addressLine1, addressLine2, addressLine3, addressLine4, city, state, postalCode, countryCode, phoneNumber, email); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderCreateResponseShipToInfo {\n"); + sb.append(" addressId: ").append(toIndentedString(addressId)).append("\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" name1: ").append(toIndentedString(name1)).append("\n"); + sb.append(" name2: ").append(toIndentedString(name2)).append("\n"); + sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); + sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); + sb.append(" addressLine3: ").append(toIndentedString(addressLine3)).append("\n"); + sb.append(" addressLine4: ").append(toIndentedString(addressLine4)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("addressId"); + openapiFields.add("contact"); + openapiFields.add("companyName"); + openapiFields.add("name1"); + openapiFields.add("name2"); + openapiFields.add("addressLine1"); + openapiFields.add("addressLine2"); + openapiFields.add("addressLine3"); + openapiFields.add("addressLine4"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalCode"); + openapiFields.add("countryCode"); + openapiFields.add("phoneNumber"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderCreateResponseShipToInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderCreateResponseShipToInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCreateResponseShipToInfo is not found in the empty JSON string", OrderCreateResponseShipToInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderCreateResponseShipToInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCreateResponseShipToInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("addressId") != null && !jsonObj.get("addressId").isJsonNull()) && !jsonObj.get("addressId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressId").toString())); + } + if ((jsonObj.get("contact") != null && !jsonObj.get("contact").isJsonNull()) && !jsonObj.get("contact").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contact` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact").toString())); + } + if ((jsonObj.get("companyName") != null && !jsonObj.get("companyName").isJsonNull()) && !jsonObj.get("companyName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); + } + if ((jsonObj.get("name1") != null && !jsonObj.get("name1").isJsonNull()) && !jsonObj.get("name1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name1").toString())); + } + if ((jsonObj.get("name2") != null && !jsonObj.get("name2").isJsonNull()) && !jsonObj.get("name2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name2").toString())); + } + if ((jsonObj.get("addressLine1") != null && !jsonObj.get("addressLine1").isJsonNull()) && !jsonObj.get("addressLine1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine1").toString())); + } + if ((jsonObj.get("addressLine2") != null && !jsonObj.get("addressLine2").isJsonNull()) && !jsonObj.get("addressLine2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine2").toString())); + } + if ((jsonObj.get("addressLine3") != null && !jsonObj.get("addressLine3").isJsonNull()) && !jsonObj.get("addressLine3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine3").toString())); + } + if ((jsonObj.get("addressLine4") != null && !jsonObj.get("addressLine4").isJsonNull()) && !jsonObj.get("addressLine4").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine4` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine4").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderCreateResponseShipToInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderCreateResponseShipToInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderCreateResponseShipToInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderCreateResponseShipToInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderCreateResponseShipToInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderCreateResponseShipToInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderCreateResponseShipToInfo + * @throws IOException if the JSON string is invalid with respect to OrderCreateResponseShipToInfo + */ + public static OrderCreateResponseShipToInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderCreateResponseShipToInfo.class); + } + + /** + * Convert an instance of OrderCreateResponseShipToInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDeleteRequest.java b/src/main/java/xiresellers/client/model/OrderDeleteRequest.java new file mode 100644 index 00000000..fa460b1f --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDeleteRequest.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderDeleteRequestServicerequest; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Request schema for order delete endpoint + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDeleteRequest { + public static final String SERIALIZED_NAME_SERVICEREQUEST = "servicerequest"; + @SerializedName(SERIALIZED_NAME_SERVICEREQUEST) + private OrderDeleteRequestServicerequest servicerequest; + + public OrderDeleteRequest() { + } + + public OrderDeleteRequest servicerequest(OrderDeleteRequestServicerequest servicerequest) { + this.servicerequest = servicerequest; + return this; + } + + /** + * Get servicerequest + * @return servicerequest + **/ + @javax.annotation.Nullable + public OrderDeleteRequestServicerequest getServicerequest() { + return servicerequest; + } + + public void setServicerequest(OrderDeleteRequestServicerequest servicerequest) { + this.servicerequest = servicerequest; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDeleteRequest orderDeleteRequest = (OrderDeleteRequest) o; + return Objects.equals(this.servicerequest, orderDeleteRequest.servicerequest); + } + + @Override + public int hashCode() { + return Objects.hash(servicerequest); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDeleteRequest {\n"); + sb.append(" servicerequest: ").append(toIndentedString(servicerequest)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("servicerequest"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDeleteRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDeleteRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDeleteRequest is not found in the empty JSON string", OrderDeleteRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDeleteRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDeleteRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `servicerequest` + if (jsonObj.get("servicerequest") != null && !jsonObj.get("servicerequest").isJsonNull()) { + OrderDeleteRequestServicerequest.validateJsonElement(jsonObj.get("servicerequest")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDeleteRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDeleteRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDeleteRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDeleteRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDeleteRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDeleteRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDeleteRequest + * @throws IOException if the JSON string is invalid with respect to OrderDeleteRequest + */ + public static OrderDeleteRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDeleteRequest.class); + } + + /** + * Convert an instance of OrderDeleteRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDeleteRequestServicerequest.java b/src/main/java/xiresellers/client/model/OrderDeleteRequestServicerequest.java new file mode 100644 index 00000000..ba3092e4 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDeleteRequestServicerequest.java @@ -0,0 +1,245 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderDeleteRequestServicerequestOrderDeleteRequestDetails; +import xiresellers.client.model.OrderDeleteRequestServicerequestRequestpreamble; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDeleteRequestServicerequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDeleteRequestServicerequest { + public static final String SERIALIZED_NAME_REQUESTPREAMBLE = "requestpreamble"; + @SerializedName(SERIALIZED_NAME_REQUESTPREAMBLE) + private OrderDeleteRequestServicerequestRequestpreamble requestpreamble; + + public static final String SERIALIZED_NAME_ORDER_DELETE_REQUEST_DETAILS = "OrderDeleteRequestDetails"; + @SerializedName(SERIALIZED_NAME_ORDER_DELETE_REQUEST_DETAILS) + private OrderDeleteRequestServicerequestOrderDeleteRequestDetails orderDeleteRequestDetails; + + public OrderDeleteRequestServicerequest() { + } + + public OrderDeleteRequestServicerequest requestpreamble(OrderDeleteRequestServicerequestRequestpreamble requestpreamble) { + this.requestpreamble = requestpreamble; + return this; + } + + /** + * Get requestpreamble + * @return requestpreamble + **/ + @javax.annotation.Nonnull + public OrderDeleteRequestServicerequestRequestpreamble getRequestpreamble() { + return requestpreamble; + } + + public void setRequestpreamble(OrderDeleteRequestServicerequestRequestpreamble requestpreamble) { + this.requestpreamble = requestpreamble; + } + + + public OrderDeleteRequestServicerequest orderDeleteRequestDetails(OrderDeleteRequestServicerequestOrderDeleteRequestDetails orderDeleteRequestDetails) { + this.orderDeleteRequestDetails = orderDeleteRequestDetails; + return this; + } + + /** + * Get orderDeleteRequestDetails + * @return orderDeleteRequestDetails + **/ + @javax.annotation.Nullable + public OrderDeleteRequestServicerequestOrderDeleteRequestDetails getOrderDeleteRequestDetails() { + return orderDeleteRequestDetails; + } + + public void setOrderDeleteRequestDetails(OrderDeleteRequestServicerequestOrderDeleteRequestDetails orderDeleteRequestDetails) { + this.orderDeleteRequestDetails = orderDeleteRequestDetails; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDeleteRequestServicerequest orderDeleteRequestServicerequest = (OrderDeleteRequestServicerequest) o; + return Objects.equals(this.requestpreamble, orderDeleteRequestServicerequest.requestpreamble) && + Objects.equals(this.orderDeleteRequestDetails, orderDeleteRequestServicerequest.orderDeleteRequestDetails); + } + + @Override + public int hashCode() { + return Objects.hash(requestpreamble, orderDeleteRequestDetails); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDeleteRequestServicerequest {\n"); + sb.append(" requestpreamble: ").append(toIndentedString(requestpreamble)).append("\n"); + sb.append(" orderDeleteRequestDetails: ").append(toIndentedString(orderDeleteRequestDetails)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("requestpreamble"); + openapiFields.add("OrderDeleteRequestDetails"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("requestpreamble"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDeleteRequestServicerequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDeleteRequestServicerequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDeleteRequestServicerequest is not found in the empty JSON string", OrderDeleteRequestServicerequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDeleteRequestServicerequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDeleteRequestServicerequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrderDeleteRequestServicerequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `requestpreamble` + OrderDeleteRequestServicerequestRequestpreamble.validateJsonElement(jsonObj.get("requestpreamble")); + // validate the optional field `OrderDeleteRequestDetails` + if (jsonObj.get("OrderDeleteRequestDetails") != null && !jsonObj.get("OrderDeleteRequestDetails").isJsonNull()) { + OrderDeleteRequestServicerequestOrderDeleteRequestDetails.validateJsonElement(jsonObj.get("OrderDeleteRequestDetails")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDeleteRequestServicerequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDeleteRequestServicerequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDeleteRequestServicerequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDeleteRequestServicerequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDeleteRequestServicerequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDeleteRequestServicerequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDeleteRequestServicerequest + * @throws IOException if the JSON string is invalid with respect to OrderDeleteRequestServicerequest + */ + public static OrderDeleteRequestServicerequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDeleteRequestServicerequest.class); + } + + /** + * Convert an instance of OrderDeleteRequestServicerequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDeleteRequestServicerequestOrderDeleteRequestDetails.java b/src/main/java/xiresellers/client/model/OrderDeleteRequestServicerequestOrderDeleteRequestDetails.java new file mode 100644 index 00000000..f6621994 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDeleteRequestServicerequestOrderDeleteRequestDetails.java @@ -0,0 +1,390 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDeleteRequestServicerequestOrderDeleteRequestDetails + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDeleteRequestServicerequestOrderDeleteRequestDetails { + public static final String SERIALIZED_NAME_ENTRY_DATE = "entryDate"; + @SerializedName(SERIALIZED_NAME_ENTRY_DATE) + private String entryDate; + + public static final String SERIALIZED_NAME_ORDER_BRANCH = "orderBranch"; + @SerializedName(SERIALIZED_NAME_ORDER_BRANCH) + private String orderBranch; + + public static final String SERIALIZED_NAME_ORDER_NUMBER = "orderNumber"; + @SerializedName(SERIALIZED_NAME_ORDER_NUMBER) + private String orderNumber; + + public static final String SERIALIZED_NAME_REJECTION_CODE = "rejectionCode"; + @SerializedName(SERIALIZED_NAME_REJECTION_CODE) + private String rejectionCode; + + public static final String SERIALIZED_NAME_DISTRIBUTION_NUMBER = "distributionNumber"; + @SerializedName(SERIALIZED_NAME_DISTRIBUTION_NUMBER) + private String distributionNumber; + + public static final String SERIALIZED_NAME_SHIPMENT_NUMBER = "shipmentNumber"; + @SerializedName(SERIALIZED_NAME_SHIPMENT_NUMBER) + private String shipmentNumber; + + public static final String SERIALIZED_NAME_OPERATOR_I_D = "operatorID"; + @SerializedName(SERIALIZED_NAME_OPERATOR_I_D) + private String operatorID; + + public OrderDeleteRequestServicerequestOrderDeleteRequestDetails() { + } + + public OrderDeleteRequestServicerequestOrderDeleteRequestDetails entryDate(String entryDate) { + this.entryDate = entryDate; + return this; + } + + /** + * Date order entered + * @return entryDate + **/ + @javax.annotation.Nonnull + public String getEntryDate() { + return entryDate; + } + + public void setEntryDate(String entryDate) { + this.entryDate = entryDate; + } + + + public OrderDeleteRequestServicerequestOrderDeleteRequestDetails orderBranch(String orderBranch) { + this.orderBranch = orderBranch; + return this; + } + + /** + * Ingram Micro's first 2 numbers of the order number + * @return orderBranch + **/ + @javax.annotation.Nonnull + public String getOrderBranch() { + return orderBranch; + } + + public void setOrderBranch(String orderBranch) { + this.orderBranch = orderBranch; + } + + + public OrderDeleteRequestServicerequestOrderDeleteRequestDetails orderNumber(String orderNumber) { + this.orderNumber = orderNumber; + return this; + } + + /** + * Ingram Micro's middle 6 numbers of the order# + * @return orderNumber + **/ + @javax.annotation.Nonnull + public String getOrderNumber() { + return orderNumber; + } + + public void setOrderNumber(String orderNumber) { + this.orderNumber = orderNumber; + } + + + public OrderDeleteRequestServicerequestOrderDeleteRequestDetails rejectionCode(String rejectionCode) { + this.rejectionCode = rejectionCode; + return this; + } + + /** + * Get rejectionCode + * @return rejectionCode + **/ + @javax.annotation.Nullable + public String getRejectionCode() { + return rejectionCode; + } + + public void setRejectionCode(String rejectionCode) { + this.rejectionCode = rejectionCode; + } + + + public OrderDeleteRequestServicerequestOrderDeleteRequestDetails distributionNumber(String distributionNumber) { + this.distributionNumber = distributionNumber; + return this; + } + + /** + * Ingram Micro's suffix number of the order# + * @return distributionNumber + **/ + @javax.annotation.Nullable + public String getDistributionNumber() { + return distributionNumber; + } + + public void setDistributionNumber(String distributionNumber) { + this.distributionNumber = distributionNumber; + } + + + public OrderDeleteRequestServicerequestOrderDeleteRequestDetails shipmentNumber(String shipmentNumber) { + this.shipmentNumber = shipmentNumber; + return this; + } + + /** + * Ingram Micro's last number of the order# + * @return shipmentNumber + **/ + @javax.annotation.Nullable + public String getShipmentNumber() { + return shipmentNumber; + } + + public void setShipmentNumber(String shipmentNumber) { + this.shipmentNumber = shipmentNumber; + } + + + public OrderDeleteRequestServicerequestOrderDeleteRequestDetails operatorID(String operatorID) { + this.operatorID = operatorID; + return this; + } + + /** + * Ingram ID(not required) + * @return operatorID + **/ + @javax.annotation.Nullable + public String getOperatorID() { + return operatorID; + } + + public void setOperatorID(String operatorID) { + this.operatorID = operatorID; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDeleteRequestServicerequestOrderDeleteRequestDetails orderDeleteRequestServicerequestOrderDeleteRequestDetails = (OrderDeleteRequestServicerequestOrderDeleteRequestDetails) o; + return Objects.equals(this.entryDate, orderDeleteRequestServicerequestOrderDeleteRequestDetails.entryDate) && + Objects.equals(this.orderBranch, orderDeleteRequestServicerequestOrderDeleteRequestDetails.orderBranch) && + Objects.equals(this.orderNumber, orderDeleteRequestServicerequestOrderDeleteRequestDetails.orderNumber) && + Objects.equals(this.rejectionCode, orderDeleteRequestServicerequestOrderDeleteRequestDetails.rejectionCode) && + Objects.equals(this.distributionNumber, orderDeleteRequestServicerequestOrderDeleteRequestDetails.distributionNumber) && + Objects.equals(this.shipmentNumber, orderDeleteRequestServicerequestOrderDeleteRequestDetails.shipmentNumber) && + Objects.equals(this.operatorID, orderDeleteRequestServicerequestOrderDeleteRequestDetails.operatorID); + } + + @Override + public int hashCode() { + return Objects.hash(entryDate, orderBranch, orderNumber, rejectionCode, distributionNumber, shipmentNumber, operatorID); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDeleteRequestServicerequestOrderDeleteRequestDetails {\n"); + sb.append(" entryDate: ").append(toIndentedString(entryDate)).append("\n"); + sb.append(" orderBranch: ").append(toIndentedString(orderBranch)).append("\n"); + sb.append(" orderNumber: ").append(toIndentedString(orderNumber)).append("\n"); + sb.append(" rejectionCode: ").append(toIndentedString(rejectionCode)).append("\n"); + sb.append(" distributionNumber: ").append(toIndentedString(distributionNumber)).append("\n"); + sb.append(" shipmentNumber: ").append(toIndentedString(shipmentNumber)).append("\n"); + sb.append(" operatorID: ").append(toIndentedString(operatorID)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("entryDate"); + openapiFields.add("orderBranch"); + openapiFields.add("orderNumber"); + openapiFields.add("rejectionCode"); + openapiFields.add("distributionNumber"); + openapiFields.add("shipmentNumber"); + openapiFields.add("operatorID"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("entryDate"); + openapiRequiredFields.add("orderBranch"); + openapiRequiredFields.add("orderNumber"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDeleteRequestServicerequestOrderDeleteRequestDetails + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDeleteRequestServicerequestOrderDeleteRequestDetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDeleteRequestServicerequestOrderDeleteRequestDetails is not found in the empty JSON string", OrderDeleteRequestServicerequestOrderDeleteRequestDetails.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDeleteRequestServicerequestOrderDeleteRequestDetails.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDeleteRequestServicerequestOrderDeleteRequestDetails` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrderDeleteRequestServicerequestOrderDeleteRequestDetails.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("entryDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `entryDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("entryDate").toString())); + } + if (!jsonObj.get("orderBranch").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `orderBranch` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orderBranch").toString())); + } + if (!jsonObj.get("orderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `orderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orderNumber").toString())); + } + if ((jsonObj.get("rejectionCode") != null && !jsonObj.get("rejectionCode").isJsonNull()) && !jsonObj.get("rejectionCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `rejectionCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rejectionCode").toString())); + } + if ((jsonObj.get("distributionNumber") != null && !jsonObj.get("distributionNumber").isJsonNull()) && !jsonObj.get("distributionNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `distributionNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("distributionNumber").toString())); + } + if ((jsonObj.get("shipmentNumber") != null && !jsonObj.get("shipmentNumber").isJsonNull()) && !jsonObj.get("shipmentNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shipmentNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shipmentNumber").toString())); + } + if ((jsonObj.get("operatorID") != null && !jsonObj.get("operatorID").isJsonNull()) && !jsonObj.get("operatorID").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `operatorID` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operatorID").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDeleteRequestServicerequestOrderDeleteRequestDetails.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDeleteRequestServicerequestOrderDeleteRequestDetails' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDeleteRequestServicerequestOrderDeleteRequestDetails.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDeleteRequestServicerequestOrderDeleteRequestDetails value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDeleteRequestServicerequestOrderDeleteRequestDetails read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDeleteRequestServicerequestOrderDeleteRequestDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDeleteRequestServicerequestOrderDeleteRequestDetails + * @throws IOException if the JSON string is invalid with respect to OrderDeleteRequestServicerequestOrderDeleteRequestDetails + */ + public static OrderDeleteRequestServicerequestOrderDeleteRequestDetails fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDeleteRequestServicerequestOrderDeleteRequestDetails.class); + } + + /** + * Convert an instance of OrderDeleteRequestServicerequestOrderDeleteRequestDetails to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDeleteRequestServicerequestRequestpreamble.java b/src/main/java/xiresellers/client/model/OrderDeleteRequestServicerequestRequestpreamble.java new file mode 100644 index 00000000..21ebeb41 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDeleteRequestServicerequestRequestpreamble.java @@ -0,0 +1,244 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDeleteRequestServicerequestRequestpreamble + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDeleteRequestServicerequestRequestpreamble { + public static final String SERIALIZED_NAME_ISOCOUNTRYCODE = "isocountrycode"; + @SerializedName(SERIALIZED_NAME_ISOCOUNTRYCODE) + private String isocountrycode; + + public static final String SERIALIZED_NAME_CUSTOMER_NUMBER = "customerNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_NUMBER) + private String customerNumber; + + public OrderDeleteRequestServicerequestRequestpreamble() { + } + + public OrderDeleteRequestServicerequestRequestpreamble isocountrycode(String isocountrycode) { + this.isocountrycode = isocountrycode; + return this; + } + + /** + * Country that Order is being place in. + * @return isocountrycode + **/ + @javax.annotation.Nonnull + public String getIsocountrycode() { + return isocountrycode; + } + + public void setIsocountrycode(String isocountrycode) { + this.isocountrycode = isocountrycode; + } + + + public OrderDeleteRequestServicerequestRequestpreamble customerNumber(String customerNumber) { + this.customerNumber = customerNumber; + return this; + } + + /** + * Account number order will be billed to. INGRAM MICRO ACCOUNT NUMBER REQUIRED + * @return customerNumber + **/ + @javax.annotation.Nonnull + public String getCustomerNumber() { + return customerNumber; + } + + public void setCustomerNumber(String customerNumber) { + this.customerNumber = customerNumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDeleteRequestServicerequestRequestpreamble orderDeleteRequestServicerequestRequestpreamble = (OrderDeleteRequestServicerequestRequestpreamble) o; + return Objects.equals(this.isocountrycode, orderDeleteRequestServicerequestRequestpreamble.isocountrycode) && + Objects.equals(this.customerNumber, orderDeleteRequestServicerequestRequestpreamble.customerNumber); + } + + @Override + public int hashCode() { + return Objects.hash(isocountrycode, customerNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDeleteRequestServicerequestRequestpreamble {\n"); + sb.append(" isocountrycode: ").append(toIndentedString(isocountrycode)).append("\n"); + sb.append(" customerNumber: ").append(toIndentedString(customerNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("isocountrycode"); + openapiFields.add("customerNumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("isocountrycode"); + openapiRequiredFields.add("customerNumber"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDeleteRequestServicerequestRequestpreamble + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDeleteRequestServicerequestRequestpreamble.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDeleteRequestServicerequestRequestpreamble is not found in the empty JSON string", OrderDeleteRequestServicerequestRequestpreamble.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDeleteRequestServicerequestRequestpreamble.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDeleteRequestServicerequestRequestpreamble` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrderDeleteRequestServicerequestRequestpreamble.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("isocountrycode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `isocountrycode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isocountrycode").toString())); + } + if (!jsonObj.get("customerNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerNumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDeleteRequestServicerequestRequestpreamble.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDeleteRequestServicerequestRequestpreamble' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDeleteRequestServicerequestRequestpreamble.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDeleteRequestServicerequestRequestpreamble value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDeleteRequestServicerequestRequestpreamble read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDeleteRequestServicerequestRequestpreamble given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDeleteRequestServicerequestRequestpreamble + * @throws IOException if the JSON string is invalid with respect to OrderDeleteRequestServicerequestRequestpreamble + */ + public static OrderDeleteRequestServicerequestRequestpreamble fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDeleteRequestServicerequestRequestpreamble.class); + } + + /** + * Convert an instance of OrderDeleteRequestServicerequestRequestpreamble to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDeleteResponse.java b/src/main/java/xiresellers/client/model/OrderDeleteResponse.java new file mode 100644 index 00000000..c1511c5b --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDeleteResponse.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderCancelResponseServiceresponse; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Response schema for order delete endpoint + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDeleteResponse { + public static final String SERIALIZED_NAME_SERVICERESPONSE = "serviceresponse"; + @SerializedName(SERIALIZED_NAME_SERVICERESPONSE) + private OrderCancelResponseServiceresponse serviceresponse; + + public OrderDeleteResponse() { + } + + public OrderDeleteResponse serviceresponse(OrderCancelResponseServiceresponse serviceresponse) { + this.serviceresponse = serviceresponse; + return this; + } + + /** + * Get serviceresponse + * @return serviceresponse + **/ + @javax.annotation.Nullable + public OrderCancelResponseServiceresponse getServiceresponse() { + return serviceresponse; + } + + public void setServiceresponse(OrderCancelResponseServiceresponse serviceresponse) { + this.serviceresponse = serviceresponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDeleteResponse orderDeleteResponse = (OrderDeleteResponse) o; + return Objects.equals(this.serviceresponse, orderDeleteResponse.serviceresponse); + } + + @Override + public int hashCode() { + return Objects.hash(serviceresponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDeleteResponse {\n"); + sb.append(" serviceresponse: ").append(toIndentedString(serviceresponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("serviceresponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDeleteResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDeleteResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDeleteResponse is not found in the empty JSON string", OrderDeleteResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDeleteResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDeleteResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `serviceresponse` + if (jsonObj.get("serviceresponse") != null && !jsonObj.get("serviceresponse").isJsonNull()) { + OrderCancelResponseServiceresponse.validateJsonElement(jsonObj.get("serviceresponse")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDeleteResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDeleteResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDeleteResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDeleteResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDeleteResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDeleteResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDeleteResponse + * @throws IOException if the JSON string is invalid with respect to OrderDeleteResponse + */ + public static OrderDeleteResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDeleteResponse.class); + } + + /** + * Convert an instance of OrderDeleteResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailB2B.java b/src/main/java/xiresellers/client/model/OrderDetailB2B.java new file mode 100644 index 00000000..b781e6c4 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailB2B.java @@ -0,0 +1,907 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import xiresellers.client.model.OrderDetailB2BAdditionalAttributesInner; +import xiresellers.client.model.OrderDetailB2BBillToInfo; +import xiresellers.client.model.OrderDetailB2BEndUserInfo; +import xiresellers.client.model.OrderDetailB2BLinesInner; +import xiresellers.client.model.OrderDetailB2BMiscellaneousChargesInner; +import xiresellers.client.model.OrderDetailB2BShipToInfo; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailB2B + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailB2B { + public static final String SERIALIZED_NAME_INGRAM_ORDER_NUMBER = "ingramOrderNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_ORDER_NUMBER) + private String ingramOrderNumber; + + public static final String SERIALIZED_NAME_INGRAM_ORDER_DATE = "ingramOrderDate"; + @SerializedName(SERIALIZED_NAME_INGRAM_ORDER_DATE) + private OffsetDateTime ingramOrderDate; + + public static final String SERIALIZED_NAME_ORDER_TYPE = "orderType"; + @SerializedName(SERIALIZED_NAME_ORDER_TYPE) + private String orderType; + + public static final String SERIALIZED_NAME_CUSTOMER_ORDER_NUMBER = "customerOrderNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_ORDER_NUMBER) + private String customerOrderNumber; + + public static final String SERIALIZED_NAME_END_CUSTOMER_ORDER_NUMBER = "endCustomerOrderNumber"; + @SerializedName(SERIALIZED_NAME_END_CUSTOMER_ORDER_NUMBER) + private String endCustomerOrderNumber; + + public static final String SERIALIZED_NAME_WEB_ORDER_ID = "webOrderId"; + @SerializedName(SERIALIZED_NAME_WEB_ORDER_ID) + private String webOrderId; + + public static final String SERIALIZED_NAME_VENDOR_SALES_ORDER_NUMBER = "vendorSalesOrderNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_SALES_ORDER_NUMBER) + private String vendorSalesOrderNumber; + + public static final String SERIALIZED_NAME_INGRAM_PURCHASE_ORDER_NUMBER = "ingramPurchaseOrderNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PURCHASE_ORDER_NUMBER) + private String ingramPurchaseOrderNumber; + + public static final String SERIALIZED_NAME_ORDER_STATUS = "orderStatus"; + @SerializedName(SERIALIZED_NAME_ORDER_STATUS) + private String orderStatus; + + public static final String SERIALIZED_NAME_ORDER_TOTAL = "orderTotal"; + @SerializedName(SERIALIZED_NAME_ORDER_TOTAL) + private Double orderTotal; + + public static final String SERIALIZED_NAME_ORDER_SUB_TOTAL = "orderSubTotal"; + @SerializedName(SERIALIZED_NAME_ORDER_SUB_TOTAL) + private Double orderSubTotal; + + public static final String SERIALIZED_NAME_FREIGHT_CHARGES = "freightCharges"; + @SerializedName(SERIALIZED_NAME_FREIGHT_CHARGES) + private Double freightCharges; + + public static final String SERIALIZED_NAME_CURRENCY_CODE = "currencyCode"; + @SerializedName(SERIALIZED_NAME_CURRENCY_CODE) + private String currencyCode; + + public static final String SERIALIZED_NAME_TOTAL_WEIGHT = "totalWeight"; + @SerializedName(SERIALIZED_NAME_TOTAL_WEIGHT) + private Double totalWeight; + + public static final String SERIALIZED_NAME_TOTAL_TAX = "totalTax"; + @SerializedName(SERIALIZED_NAME_TOTAL_TAX) + private Double totalTax; + + public static final String SERIALIZED_NAME_PAYMENT_TERMS = "paymentTerms"; + @SerializedName(SERIALIZED_NAME_PAYMENT_TERMS) + private String paymentTerms; + + public static final String SERIALIZED_NAME_NOTES = "notes"; + @SerializedName(SERIALIZED_NAME_NOTES) + private String notes; + + public static final String SERIALIZED_NAME_BILL_TO_INFO = "billToInfo"; + @SerializedName(SERIALIZED_NAME_BILL_TO_INFO) + private OrderDetailB2BBillToInfo billToInfo; + + public static final String SERIALIZED_NAME_SHIP_TO_INFO = "shipToInfo"; + @SerializedName(SERIALIZED_NAME_SHIP_TO_INFO) + private OrderDetailB2BShipToInfo shipToInfo; + + public static final String SERIALIZED_NAME_END_USER_INFO = "endUserInfo"; + @SerializedName(SERIALIZED_NAME_END_USER_INFO) + private OrderDetailB2BEndUserInfo endUserInfo; + + public static final String SERIALIZED_NAME_LINES = "lines"; + @SerializedName(SERIALIZED_NAME_LINES) + private List lines; + + public static final String SERIALIZED_NAME_MISCELLANEOUS_CHARGES = "miscellaneousCharges"; + @SerializedName(SERIALIZED_NAME_MISCELLANEOUS_CHARGES) + private List miscellaneousCharges; + + public static final String SERIALIZED_NAME_ADDITIONAL_ATTRIBUTES = "additionalAttributes"; + @SerializedName(SERIALIZED_NAME_ADDITIONAL_ATTRIBUTES) + private List additionalAttributes; + + public OrderDetailB2B() { + } + + public OrderDetailB2B ingramOrderNumber(String ingramOrderNumber) { + this.ingramOrderNumber = ingramOrderNumber; + return this; + } + + /** + * The IngramMicro sales order number. + * @return ingramOrderNumber + **/ + @javax.annotation.Nullable + public String getIngramOrderNumber() { + return ingramOrderNumber; + } + + public void setIngramOrderNumber(String ingramOrderNumber) { + this.ingramOrderNumber = ingramOrderNumber; + } + + + public OrderDetailB2B ingramOrderDate(OffsetDateTime ingramOrderDate) { + this.ingramOrderDate = ingramOrderDate; + return this; + } + + /** + * The IngramMicro sales order date. + * @return ingramOrderDate + **/ + @javax.annotation.Nullable + public OffsetDateTime getIngramOrderDate() { + return ingramOrderDate; + } + + public void setIngramOrderDate(OffsetDateTime ingramOrderDate) { + this.ingramOrderDate = ingramOrderDate; + } + + + public OrderDetailB2B orderType(String orderType) { + this.orderType = orderType; + return this; + } + + /** + * The IngramMicro sales order type. + * @return orderType + **/ + @javax.annotation.Nullable + public String getOrderType() { + return orderType; + } + + public void setOrderType(String orderType) { + this.orderType = orderType; + } + + + public OrderDetailB2B customerOrderNumber(String customerOrderNumber) { + this.customerOrderNumber = customerOrderNumber; + return this; + } + + /** + * The reseller's order number for reference in their system. + * @return customerOrderNumber + **/ + @javax.annotation.Nullable + public String getCustomerOrderNumber() { + return customerOrderNumber; + } + + public void setCustomerOrderNumber(String customerOrderNumber) { + this.customerOrderNumber = customerOrderNumber; + } + + + public OrderDetailB2B endCustomerOrderNumber(String endCustomerOrderNumber) { + this.endCustomerOrderNumber = endCustomerOrderNumber; + return this; + } + + /** + * The end customer's order number for reference in their system. + * @return endCustomerOrderNumber + **/ + @javax.annotation.Nullable + public String getEndCustomerOrderNumber() { + return endCustomerOrderNumber; + } + + public void setEndCustomerOrderNumber(String endCustomerOrderNumber) { + this.endCustomerOrderNumber = endCustomerOrderNumber; + } + + + public OrderDetailB2B webOrderId(String webOrderId) { + this.webOrderId = webOrderId; + return this; + } + + /** + * The web order id of the order. + * @return webOrderId + **/ + @javax.annotation.Nullable + public String getWebOrderId() { + return webOrderId; + } + + public void setWebOrderId(String webOrderId) { + this.webOrderId = webOrderId; + } + + + public OrderDetailB2B vendorSalesOrderNumber(String vendorSalesOrderNumber) { + this.vendorSalesOrderNumber = vendorSalesOrderNumber; + return this; + } + + /** + * The vendor's order number for reference in their system + * @return vendorSalesOrderNumber + **/ + @javax.annotation.Nullable + public String getVendorSalesOrderNumber() { + return vendorSalesOrderNumber; + } + + public void setVendorSalesOrderNumber(String vendorSalesOrderNumber) { + this.vendorSalesOrderNumber = vendorSalesOrderNumber; + } + + + public OrderDetailB2B ingramPurchaseOrderNumber(String ingramPurchaseOrderNumber) { + this.ingramPurchaseOrderNumber = ingramPurchaseOrderNumber; + return this; + } + + /** + * Ingram purchase order number. + * @return ingramPurchaseOrderNumber + **/ + @javax.annotation.Nullable + public String getIngramPurchaseOrderNumber() { + return ingramPurchaseOrderNumber; + } + + public void setIngramPurchaseOrderNumber(String ingramPurchaseOrderNumber) { + this.ingramPurchaseOrderNumber = ingramPurchaseOrderNumber; + } + + + public OrderDetailB2B orderStatus(String orderStatus) { + this.orderStatus = orderStatus; + return this; + } + + /** + * The header-level status of the order. One of- Shipped, Canceled, Backordered, Processing, On Hold, Delivered. + * @return orderStatus + **/ + @javax.annotation.Nullable + public String getOrderStatus() { + return orderStatus; + } + + public void setOrderStatus(String orderStatus) { + this.orderStatus = orderStatus; + } + + + public OrderDetailB2B orderTotal(Double orderTotal) { + this.orderTotal = orderTotal; + return this; + } + + /** + * The total cost for the order, includes subtotal, freight charges, and tax. + * @return orderTotal + **/ + @javax.annotation.Nullable + public Double getOrderTotal() { + return orderTotal; + } + + public void setOrderTotal(Double orderTotal) { + this.orderTotal = orderTotal; + } + + + public OrderDetailB2B orderSubTotal(Double orderSubTotal) { + this.orderSubTotal = orderSubTotal; + return this; + } + + /** + * The sub total cost for the order, not including tax and freight. + * @return orderSubTotal + **/ + @javax.annotation.Nullable + public Double getOrderSubTotal() { + return orderSubTotal; + } + + public void setOrderSubTotal(Double orderSubTotal) { + this.orderSubTotal = orderSubTotal; + } + + + public OrderDetailB2B freightCharges(Double freightCharges) { + this.freightCharges = freightCharges; + return this; + } + + /** + * The freight charges for the order. + * @return freightCharges + **/ + @javax.annotation.Nullable + public Double getFreightCharges() { + return freightCharges; + } + + public void setFreightCharges(Double freightCharges) { + this.freightCharges = freightCharges; + } + + + public OrderDetailB2B currencyCode(String currencyCode) { + this.currencyCode = currencyCode; + return this; + } + + /** + * The country-specific three digit ISO 4217 currency code for the order. + * @return currencyCode + **/ + @javax.annotation.Nullable + public String getCurrencyCode() { + return currencyCode; + } + + public void setCurrencyCode(String currencyCode) { + this.currencyCode = currencyCode; + } + + + public OrderDetailB2B totalWeight(Double totalWeight) { + this.totalWeight = totalWeight; + return this; + } + + /** + * Total order weight. unit -- North america - Pounds , other countries will be KG. + * @return totalWeight + **/ + @javax.annotation.Nullable + public Double getTotalWeight() { + return totalWeight; + } + + public void setTotalWeight(Double totalWeight) { + this.totalWeight = totalWeight; + } + + + public OrderDetailB2B totalTax(Double totalTax) { + this.totalTax = totalTax; + return this; + } + + /** + * Total tax on the orders placed. + * @return totalTax + **/ + @javax.annotation.Nullable + public Double getTotalTax() { + return totalTax; + } + + public void setTotalTax(Double totalTax) { + this.totalTax = totalTax; + } + + + public OrderDetailB2B paymentTerms(String paymentTerms) { + this.paymentTerms = paymentTerms; + return this; + } + + /** + * The payment terms of the order. (Ex- Net 30 days). + * @return paymentTerms + **/ + @javax.annotation.Nullable + public String getPaymentTerms() { + return paymentTerms; + } + + public void setPaymentTerms(String paymentTerms) { + this.paymentTerms = paymentTerms; + } + + + public OrderDetailB2B notes(String notes) { + this.notes = notes; + return this; + } + + /** + * The header-level notes for the order. + * @return notes + **/ + @javax.annotation.Nullable + public String getNotes() { + return notes; + } + + public void setNotes(String notes) { + this.notes = notes; + } + + + public OrderDetailB2B billToInfo(OrderDetailB2BBillToInfo billToInfo) { + this.billToInfo = billToInfo; + return this; + } + + /** + * Get billToInfo + * @return billToInfo + **/ + @javax.annotation.Nullable + public OrderDetailB2BBillToInfo getBillToInfo() { + return billToInfo; + } + + public void setBillToInfo(OrderDetailB2BBillToInfo billToInfo) { + this.billToInfo = billToInfo; + } + + + public OrderDetailB2B shipToInfo(OrderDetailB2BShipToInfo shipToInfo) { + this.shipToInfo = shipToInfo; + return this; + } + + /** + * Get shipToInfo + * @return shipToInfo + **/ + @javax.annotation.Nullable + public OrderDetailB2BShipToInfo getShipToInfo() { + return shipToInfo; + } + + public void setShipToInfo(OrderDetailB2BShipToInfo shipToInfo) { + this.shipToInfo = shipToInfo; + } + + + public OrderDetailB2B endUserInfo(OrderDetailB2BEndUserInfo endUserInfo) { + this.endUserInfo = endUserInfo; + return this; + } + + /** + * Get endUserInfo + * @return endUserInfo + **/ + @javax.annotation.Nullable + public OrderDetailB2BEndUserInfo getEndUserInfo() { + return endUserInfo; + } + + public void setEndUserInfo(OrderDetailB2BEndUserInfo endUserInfo) { + this.endUserInfo = endUserInfo; + } + + + public OrderDetailB2B lines(List lines) { + this.lines = lines; + return this; + } + + public OrderDetailB2B addLinesItem(OrderDetailB2BLinesInner linesItem) { + if (this.lines == null) { + this.lines = new ArrayList<>(); + } + this.lines.add(linesItem); + return this; + } + + /** + * Get lines + * @return lines + **/ + @javax.annotation.Nullable + public List getLines() { + return lines; + } + + public void setLines(List lines) { + this.lines = lines; + } + + + public OrderDetailB2B miscellaneousCharges(List miscellaneousCharges) { + this.miscellaneousCharges = miscellaneousCharges; + return this; + } + + public OrderDetailB2B addMiscellaneousChargesItem(OrderDetailB2BMiscellaneousChargesInner miscellaneousChargesItem) { + if (this.miscellaneousCharges == null) { + this.miscellaneousCharges = new ArrayList<>(); + } + this.miscellaneousCharges.add(miscellaneousChargesItem); + return this; + } + + /** + * Get miscellaneousCharges + * @return miscellaneousCharges + **/ + @javax.annotation.Nullable + public List getMiscellaneousCharges() { + return miscellaneousCharges; + } + + public void setMiscellaneousCharges(List miscellaneousCharges) { + this.miscellaneousCharges = miscellaneousCharges; + } + + + public OrderDetailB2B additionalAttributes(List additionalAttributes) { + this.additionalAttributes = additionalAttributes; + return this; + } + + public OrderDetailB2B addAdditionalAttributesItem(OrderDetailB2BAdditionalAttributesInner additionalAttributesItem) { + if (this.additionalAttributes == null) { + this.additionalAttributes = new ArrayList<>(); + } + this.additionalAttributes.add(additionalAttributesItem); + return this; + } + + /** + * Get additionalAttributes + * @return additionalAttributes + **/ + @javax.annotation.Nullable + public List getAdditionalAttributes() { + return additionalAttributes; + } + + public void setAdditionalAttributes(List additionalAttributes) { + this.additionalAttributes = additionalAttributes; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailB2B orderDetailB2B = (OrderDetailB2B) o; + return Objects.equals(this.ingramOrderNumber, orderDetailB2B.ingramOrderNumber) && + Objects.equals(this.ingramOrderDate, orderDetailB2B.ingramOrderDate) && + Objects.equals(this.orderType, orderDetailB2B.orderType) && + Objects.equals(this.customerOrderNumber, orderDetailB2B.customerOrderNumber) && + Objects.equals(this.endCustomerOrderNumber, orderDetailB2B.endCustomerOrderNumber) && + Objects.equals(this.webOrderId, orderDetailB2B.webOrderId) && + Objects.equals(this.vendorSalesOrderNumber, orderDetailB2B.vendorSalesOrderNumber) && + Objects.equals(this.ingramPurchaseOrderNumber, orderDetailB2B.ingramPurchaseOrderNumber) && + Objects.equals(this.orderStatus, orderDetailB2B.orderStatus) && + Objects.equals(this.orderTotal, orderDetailB2B.orderTotal) && + Objects.equals(this.orderSubTotal, orderDetailB2B.orderSubTotal) && + Objects.equals(this.freightCharges, orderDetailB2B.freightCharges) && + Objects.equals(this.currencyCode, orderDetailB2B.currencyCode) && + Objects.equals(this.totalWeight, orderDetailB2B.totalWeight) && + Objects.equals(this.totalTax, orderDetailB2B.totalTax) && + Objects.equals(this.paymentTerms, orderDetailB2B.paymentTerms) && + Objects.equals(this.notes, orderDetailB2B.notes) && + Objects.equals(this.billToInfo, orderDetailB2B.billToInfo) && + Objects.equals(this.shipToInfo, orderDetailB2B.shipToInfo) && + Objects.equals(this.endUserInfo, orderDetailB2B.endUserInfo) && + Objects.equals(this.lines, orderDetailB2B.lines) && + Objects.equals(this.miscellaneousCharges, orderDetailB2B.miscellaneousCharges) && + Objects.equals(this.additionalAttributes, orderDetailB2B.additionalAttributes); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(ingramOrderNumber, ingramOrderDate, orderType, customerOrderNumber, endCustomerOrderNumber, webOrderId, vendorSalesOrderNumber, ingramPurchaseOrderNumber, orderStatus, orderTotal, orderSubTotal, freightCharges, currencyCode, totalWeight, totalTax, paymentTerms, notes, billToInfo, shipToInfo, endUserInfo, lines, miscellaneousCharges, additionalAttributes); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailB2B {\n"); + sb.append(" ingramOrderNumber: ").append(toIndentedString(ingramOrderNumber)).append("\n"); + sb.append(" ingramOrderDate: ").append(toIndentedString(ingramOrderDate)).append("\n"); + sb.append(" orderType: ").append(toIndentedString(orderType)).append("\n"); + sb.append(" customerOrderNumber: ").append(toIndentedString(customerOrderNumber)).append("\n"); + sb.append(" endCustomerOrderNumber: ").append(toIndentedString(endCustomerOrderNumber)).append("\n"); + sb.append(" webOrderId: ").append(toIndentedString(webOrderId)).append("\n"); + sb.append(" vendorSalesOrderNumber: ").append(toIndentedString(vendorSalesOrderNumber)).append("\n"); + sb.append(" ingramPurchaseOrderNumber: ").append(toIndentedString(ingramPurchaseOrderNumber)).append("\n"); + sb.append(" orderStatus: ").append(toIndentedString(orderStatus)).append("\n"); + sb.append(" orderTotal: ").append(toIndentedString(orderTotal)).append("\n"); + sb.append(" orderSubTotal: ").append(toIndentedString(orderSubTotal)).append("\n"); + sb.append(" freightCharges: ").append(toIndentedString(freightCharges)).append("\n"); + sb.append(" currencyCode: ").append(toIndentedString(currencyCode)).append("\n"); + sb.append(" totalWeight: ").append(toIndentedString(totalWeight)).append("\n"); + sb.append(" totalTax: ").append(toIndentedString(totalTax)).append("\n"); + sb.append(" paymentTerms: ").append(toIndentedString(paymentTerms)).append("\n"); + sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); + sb.append(" billToInfo: ").append(toIndentedString(billToInfo)).append("\n"); + sb.append(" shipToInfo: ").append(toIndentedString(shipToInfo)).append("\n"); + sb.append(" endUserInfo: ").append(toIndentedString(endUserInfo)).append("\n"); + sb.append(" lines: ").append(toIndentedString(lines)).append("\n"); + sb.append(" miscellaneousCharges: ").append(toIndentedString(miscellaneousCharges)).append("\n"); + sb.append(" additionalAttributes: ").append(toIndentedString(additionalAttributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("ingramOrderNumber"); + openapiFields.add("ingramOrderDate"); + openapiFields.add("orderType"); + openapiFields.add("customerOrderNumber"); + openapiFields.add("endCustomerOrderNumber"); + openapiFields.add("webOrderId"); + openapiFields.add("vendorSalesOrderNumber"); + openapiFields.add("ingramPurchaseOrderNumber"); + openapiFields.add("orderStatus"); + openapiFields.add("orderTotal"); + openapiFields.add("orderSubTotal"); + openapiFields.add("freightCharges"); + openapiFields.add("currencyCode"); + openapiFields.add("totalWeight"); + openapiFields.add("totalTax"); + openapiFields.add("paymentTerms"); + openapiFields.add("notes"); + openapiFields.add("billToInfo"); + openapiFields.add("shipToInfo"); + openapiFields.add("endUserInfo"); + openapiFields.add("lines"); + openapiFields.add("miscellaneousCharges"); + openapiFields.add("additionalAttributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailB2B + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailB2B.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailB2B is not found in the empty JSON string", OrderDetailB2B.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailB2B.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailB2B` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("ingramOrderNumber") != null && !jsonObj.get("ingramOrderNumber").isJsonNull()) && !jsonObj.get("ingramOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramOrderNumber").toString())); + } + if ((jsonObj.get("orderType") != null && !jsonObj.get("orderType").isJsonNull()) && !jsonObj.get("orderType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `orderType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orderType").toString())); + } + if ((jsonObj.get("customerOrderNumber") != null && !jsonObj.get("customerOrderNumber").isJsonNull()) && !jsonObj.get("customerOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerOrderNumber").toString())); + } + if ((jsonObj.get("endCustomerOrderNumber") != null && !jsonObj.get("endCustomerOrderNumber").isJsonNull()) && !jsonObj.get("endCustomerOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endCustomerOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endCustomerOrderNumber").toString())); + } + if ((jsonObj.get("webOrderId") != null && !jsonObj.get("webOrderId").isJsonNull()) && !jsonObj.get("webOrderId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `webOrderId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("webOrderId").toString())); + } + if ((jsonObj.get("vendorSalesOrderNumber") != null && !jsonObj.get("vendorSalesOrderNumber").isJsonNull()) && !jsonObj.get("vendorSalesOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorSalesOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorSalesOrderNumber").toString())); + } + if ((jsonObj.get("ingramPurchaseOrderNumber") != null && !jsonObj.get("ingramPurchaseOrderNumber").isJsonNull()) && !jsonObj.get("ingramPurchaseOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPurchaseOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPurchaseOrderNumber").toString())); + } + if ((jsonObj.get("orderStatus") != null && !jsonObj.get("orderStatus").isJsonNull()) && !jsonObj.get("orderStatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `orderStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orderStatus").toString())); + } + if ((jsonObj.get("currencyCode") != null && !jsonObj.get("currencyCode").isJsonNull()) && !jsonObj.get("currencyCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `currencyCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currencyCode").toString())); + } + if ((jsonObj.get("paymentTerms") != null && !jsonObj.get("paymentTerms").isJsonNull()) && !jsonObj.get("paymentTerms").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `paymentTerms` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentTerms").toString())); + } + if ((jsonObj.get("notes") != null && !jsonObj.get("notes").isJsonNull()) && !jsonObj.get("notes").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `notes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("notes").toString())); + } + // validate the optional field `billToInfo` + if (jsonObj.get("billToInfo") != null && !jsonObj.get("billToInfo").isJsonNull()) { + OrderDetailB2BBillToInfo.validateJsonElement(jsonObj.get("billToInfo")); + } + // validate the optional field `shipToInfo` + if (jsonObj.get("shipToInfo") != null && !jsonObj.get("shipToInfo").isJsonNull()) { + OrderDetailB2BShipToInfo.validateJsonElement(jsonObj.get("shipToInfo")); + } + // validate the optional field `endUserInfo` + if (jsonObj.get("endUserInfo") != null && !jsonObj.get("endUserInfo").isJsonNull()) { + OrderDetailB2BEndUserInfo.validateJsonElement(jsonObj.get("endUserInfo")); + } + if (jsonObj.get("lines") != null && !jsonObj.get("lines").isJsonNull()) { + JsonArray jsonArraylines = jsonObj.getAsJsonArray("lines"); + if (jsonArraylines != null) { + // ensure the json data is an array + if (!jsonObj.get("lines").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `lines` to be an array in the JSON string but got `%s`", jsonObj.get("lines").toString())); + } + + // validate the optional field `lines` (array) + for (int i = 0; i < jsonArraylines.size(); i++) { + OrderDetailB2BLinesInner.validateJsonElement(jsonArraylines.get(i)); + }; + } + } + if (jsonObj.get("miscellaneousCharges") != null && !jsonObj.get("miscellaneousCharges").isJsonNull()) { + JsonArray jsonArraymiscellaneousCharges = jsonObj.getAsJsonArray("miscellaneousCharges"); + if (jsonArraymiscellaneousCharges != null) { + // ensure the json data is an array + if (!jsonObj.get("miscellaneousCharges").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `miscellaneousCharges` to be an array in the JSON string but got `%s`", jsonObj.get("miscellaneousCharges").toString())); + } + + // validate the optional field `miscellaneousCharges` (array) + for (int i = 0; i < jsonArraymiscellaneousCharges.size(); i++) { + OrderDetailB2BMiscellaneousChargesInner.validateJsonElement(jsonArraymiscellaneousCharges.get(i)); + }; + } + } + if (jsonObj.get("additionalAttributes") != null && !jsonObj.get("additionalAttributes").isJsonNull()) { + JsonArray jsonArrayadditionalAttributes = jsonObj.getAsJsonArray("additionalAttributes"); + if (jsonArrayadditionalAttributes != null) { + // ensure the json data is an array + if (!jsonObj.get("additionalAttributes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `additionalAttributes` to be an array in the JSON string but got `%s`", jsonObj.get("additionalAttributes").toString())); + } + + // validate the optional field `additionalAttributes` (array) + for (int i = 0; i < jsonArrayadditionalAttributes.size(); i++) { + OrderDetailB2BAdditionalAttributesInner.validateJsonElement(jsonArrayadditionalAttributes.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailB2B.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailB2B' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailB2B.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailB2B value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailB2B read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailB2B given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailB2B + * @throws IOException if the JSON string is invalid with respect to OrderDetailB2B + */ + public static OrderDetailB2B fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailB2B.class); + } + + /** + * Convert an instance of OrderDetailB2B to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailB2BAdditionalAttributesInner.java b/src/main/java/xiresellers/client/model/OrderDetailB2BAdditionalAttributesInner.java new file mode 100644 index 00000000..564e29cd --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailB2BAdditionalAttributesInner.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailB2BAdditionalAttributesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailB2BAdditionalAttributesInner { + public static final String SERIALIZED_NAME_ATTRIBUTE_NAME = "attributeName"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_NAME) + private String attributeName; + + public static final String SERIALIZED_NAME_ATTRIBUTE_VALUE = "attributeValue"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_VALUE) + private String attributeValue; + + public OrderDetailB2BAdditionalAttributesInner() { + } + + public OrderDetailB2BAdditionalAttributesInner attributeName(String attributeName) { + this.attributeName = attributeName; + return this; + } + + /** + * Header level custom field names. + * @return attributeName + **/ + @javax.annotation.Nullable + public String getAttributeName() { + return attributeName; + } + + public void setAttributeName(String attributeName) { + this.attributeName = attributeName; + } + + + public OrderDetailB2BAdditionalAttributesInner attributeValue(String attributeValue) { + this.attributeValue = attributeValue; + return this; + } + + /** + * Value of the custom fields. + * @return attributeValue + **/ + @javax.annotation.Nullable + public String getAttributeValue() { + return attributeValue; + } + + public void setAttributeValue(String attributeValue) { + this.attributeValue = attributeValue; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailB2BAdditionalAttributesInner orderDetailB2BAdditionalAttributesInner = (OrderDetailB2BAdditionalAttributesInner) o; + return Objects.equals(this.attributeName, orderDetailB2BAdditionalAttributesInner.attributeName) && + Objects.equals(this.attributeValue, orderDetailB2BAdditionalAttributesInner.attributeValue); + } + + @Override + public int hashCode() { + return Objects.hash(attributeName, attributeValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailB2BAdditionalAttributesInner {\n"); + sb.append(" attributeName: ").append(toIndentedString(attributeName)).append("\n"); + sb.append(" attributeValue: ").append(toIndentedString(attributeValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributeName"); + openapiFields.add("attributeValue"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailB2BAdditionalAttributesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailB2BAdditionalAttributesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailB2BAdditionalAttributesInner is not found in the empty JSON string", OrderDetailB2BAdditionalAttributesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailB2BAdditionalAttributesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailB2BAdditionalAttributesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("attributeName") != null && !jsonObj.get("attributeName").isJsonNull()) && !jsonObj.get("attributeName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeName").toString())); + } + if ((jsonObj.get("attributeValue") != null && !jsonObj.get("attributeValue").isJsonNull()) && !jsonObj.get("attributeValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeValue").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailB2BAdditionalAttributesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailB2BAdditionalAttributesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailB2BAdditionalAttributesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailB2BAdditionalAttributesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailB2BAdditionalAttributesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailB2BAdditionalAttributesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailB2BAdditionalAttributesInner + * @throws IOException if the JSON string is invalid with respect to OrderDetailB2BAdditionalAttributesInner + */ + public static OrderDetailB2BAdditionalAttributesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailB2BAdditionalAttributesInner.class); + } + + /** + * Convert an instance of OrderDetailB2BAdditionalAttributesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailB2BBillToInfo.java b/src/main/java/xiresellers/client/model/OrderDetailB2BBillToInfo.java new file mode 100644 index 00000000..8cd8b353 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailB2BBillToInfo.java @@ -0,0 +1,496 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * The billing information provided by the reseller. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailB2BBillToInfo { + public static final String SERIALIZED_NAME_CONTACT = "contact"; + @SerializedName(SERIALIZED_NAME_CONTACT) + private String contact; + + public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; + @SerializedName(SERIALIZED_NAME_COMPANY_NAME) + private String companyName; + + public static final String SERIALIZED_NAME_ADDRESS_LINE1 = "addressLine1"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE1) + private String addressLine1; + + public static final String SERIALIZED_NAME_ADDRESS_LINE2 = "addressLine2"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE2) + private String addressLine2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE3 = "addressLine3"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE3) + private String addressLine3; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; + @SerializedName(SERIALIZED_NAME_POSTAL_CODE) + private String postalCode; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) + private String phoneNumber; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public OrderDetailB2BBillToInfo() { + } + + public OrderDetailB2BBillToInfo contact(String contact) { + this.contact = contact; + return this; + } + + /** + * The company contact provided by the reseller. + * @return contact + **/ + @javax.annotation.Nullable + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + + public OrderDetailB2BBillToInfo companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * The name of the company the order will be billed to. + * @return companyName + **/ + @javax.annotation.Nullable + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public OrderDetailB2BBillToInfo addressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + return this; + } + + /** + * The address line 1 the order will be billed to. + * @return addressLine1 + **/ + @javax.annotation.Nullable + public String getAddressLine1() { + return addressLine1; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + + public OrderDetailB2BBillToInfo addressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + return this; + } + + /** + * The address line 2 the order will be billed to. + * @return addressLine2 + **/ + @javax.annotation.Nullable + public String getAddressLine2() { + return addressLine2; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + + public OrderDetailB2BBillToInfo addressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + return this; + } + + /** + * The address line 3 the order will be billed to. + * @return addressLine3 + **/ + @javax.annotation.Nullable + public String getAddressLine3() { + return addressLine3; + } + + public void setAddressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + } + + + public OrderDetailB2BBillToInfo city(String city) { + this.city = city; + return this; + } + + /** + * The city the order will be billed to. + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public OrderDetailB2BBillToInfo state(String state) { + this.state = state; + return this; + } + + /** + * The state the order will be billed to. + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public OrderDetailB2BBillToInfo postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * The zip or postal code the order will be billed to. + * @return postalCode + **/ + @javax.annotation.Nullable + public String getPostalCode() { + return postalCode; + } + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public OrderDetailB2BBillToInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * The two-character ISO country code the order will be billed to. + * @return countryCode + **/ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public OrderDetailB2BBillToInfo phoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * The company contact phone number. + * @return phoneNumber + **/ + @javax.annotation.Nullable + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public OrderDetailB2BBillToInfo email(String email) { + this.email = email; + return this; + } + + /** + * The company contact email address. + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailB2BBillToInfo orderDetailB2BBillToInfo = (OrderDetailB2BBillToInfo) o; + return Objects.equals(this.contact, orderDetailB2BBillToInfo.contact) && + Objects.equals(this.companyName, orderDetailB2BBillToInfo.companyName) && + Objects.equals(this.addressLine1, orderDetailB2BBillToInfo.addressLine1) && + Objects.equals(this.addressLine2, orderDetailB2BBillToInfo.addressLine2) && + Objects.equals(this.addressLine3, orderDetailB2BBillToInfo.addressLine3) && + Objects.equals(this.city, orderDetailB2BBillToInfo.city) && + Objects.equals(this.state, orderDetailB2BBillToInfo.state) && + Objects.equals(this.postalCode, orderDetailB2BBillToInfo.postalCode) && + Objects.equals(this.countryCode, orderDetailB2BBillToInfo.countryCode) && + Objects.equals(this.phoneNumber, orderDetailB2BBillToInfo.phoneNumber) && + Objects.equals(this.email, orderDetailB2BBillToInfo.email); + } + + @Override + public int hashCode() { + return Objects.hash(contact, companyName, addressLine1, addressLine2, addressLine3, city, state, postalCode, countryCode, phoneNumber, email); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailB2BBillToInfo {\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); + sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); + sb.append(" addressLine3: ").append(toIndentedString(addressLine3)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("contact"); + openapiFields.add("companyName"); + openapiFields.add("addressLine1"); + openapiFields.add("addressLine2"); + openapiFields.add("addressLine3"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalCode"); + openapiFields.add("countryCode"); + openapiFields.add("phoneNumber"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailB2BBillToInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailB2BBillToInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailB2BBillToInfo is not found in the empty JSON string", OrderDetailB2BBillToInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailB2BBillToInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailB2BBillToInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("contact") != null && !jsonObj.get("contact").isJsonNull()) && !jsonObj.get("contact").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contact` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact").toString())); + } + if ((jsonObj.get("companyName") != null && !jsonObj.get("companyName").isJsonNull()) && !jsonObj.get("companyName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); + } + if ((jsonObj.get("addressLine1") != null && !jsonObj.get("addressLine1").isJsonNull()) && !jsonObj.get("addressLine1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine1").toString())); + } + if ((jsonObj.get("addressLine2") != null && !jsonObj.get("addressLine2").isJsonNull()) && !jsonObj.get("addressLine2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine2").toString())); + } + if ((jsonObj.get("addressLine3") != null && !jsonObj.get("addressLine3").isJsonNull()) && !jsonObj.get("addressLine3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine3").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailB2BBillToInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailB2BBillToInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailB2BBillToInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailB2BBillToInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailB2BBillToInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailB2BBillToInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailB2BBillToInfo + * @throws IOException if the JSON string is invalid with respect to OrderDetailB2BBillToInfo + */ + public static OrderDetailB2BBillToInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailB2BBillToInfo.class); + } + + /** + * Convert an instance of OrderDetailB2BBillToInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailB2BEndUserInfo.java b/src/main/java/xiresellers/client/model/OrderDetailB2BEndUserInfo.java new file mode 100644 index 00000000..4cb61f6c --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailB2BEndUserInfo.java @@ -0,0 +1,496 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * The contact information for the end user/customer provided by the reseller. Used to determine pricing and discounts. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailB2BEndUserInfo { + public static final String SERIALIZED_NAME_CONTACT = "contact"; + @SerializedName(SERIALIZED_NAME_CONTACT) + private String contact; + + public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; + @SerializedName(SERIALIZED_NAME_COMPANY_NAME) + private String companyName; + + public static final String SERIALIZED_NAME_ADDRESS_LINE1 = "addressLine1"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE1) + private String addressLine1; + + public static final String SERIALIZED_NAME_ADDRESS_LINE2 = "addressLine2"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE2) + private String addressLine2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE3 = "addressLine3"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE3) + private String addressLine3; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; + @SerializedName(SERIALIZED_NAME_POSTAL_CODE) + private String postalCode; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) + private String phoneNumber; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public OrderDetailB2BEndUserInfo() { + } + + public OrderDetailB2BEndUserInfo contact(String contact) { + this.contact = contact; + return this; + } + + /** + * The contact name for the end user/customer. + * @return contact + **/ + @javax.annotation.Nullable + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + + public OrderDetailB2BEndUserInfo companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * The company name for the end user/customer. + * @return companyName + **/ + @javax.annotation.Nullable + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public OrderDetailB2BEndUserInfo addressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + return this; + } + + /** + * The address line 1 for the end user/customer. + * @return addressLine1 + **/ + @javax.annotation.Nullable + public String getAddressLine1() { + return addressLine1; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + + public OrderDetailB2BEndUserInfo addressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + return this; + } + + /** + * The address line 2 for the end user/customer. + * @return addressLine2 + **/ + @javax.annotation.Nullable + public String getAddressLine2() { + return addressLine2; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + + public OrderDetailB2BEndUserInfo addressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + return this; + } + + /** + * The address line 3 for the end user/customer. + * @return addressLine3 + **/ + @javax.annotation.Nullable + public String getAddressLine3() { + return addressLine3; + } + + public void setAddressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + } + + + public OrderDetailB2BEndUserInfo city(String city) { + this.city = city; + return this; + } + + /** + * The end user/customer's city. + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public OrderDetailB2BEndUserInfo state(String state) { + this.state = state; + return this; + } + + /** + * The end user/customer's state. + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public OrderDetailB2BEndUserInfo postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * The end user/customer's zip or postal code. + * @return postalCode + **/ + @javax.annotation.Nullable + public String getPostalCode() { + return postalCode; + } + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public OrderDetailB2BEndUserInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * The end user/customer's two character ISO country code. + * @return countryCode + **/ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public OrderDetailB2BEndUserInfo phoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * The end user/customer's phone number. + * @return phoneNumber + **/ + @javax.annotation.Nullable + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public OrderDetailB2BEndUserInfo email(String email) { + this.email = email; + return this; + } + + /** + * The end user/customer's email. + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailB2BEndUserInfo orderDetailB2BEndUserInfo = (OrderDetailB2BEndUserInfo) o; + return Objects.equals(this.contact, orderDetailB2BEndUserInfo.contact) && + Objects.equals(this.companyName, orderDetailB2BEndUserInfo.companyName) && + Objects.equals(this.addressLine1, orderDetailB2BEndUserInfo.addressLine1) && + Objects.equals(this.addressLine2, orderDetailB2BEndUserInfo.addressLine2) && + Objects.equals(this.addressLine3, orderDetailB2BEndUserInfo.addressLine3) && + Objects.equals(this.city, orderDetailB2BEndUserInfo.city) && + Objects.equals(this.state, orderDetailB2BEndUserInfo.state) && + Objects.equals(this.postalCode, orderDetailB2BEndUserInfo.postalCode) && + Objects.equals(this.countryCode, orderDetailB2BEndUserInfo.countryCode) && + Objects.equals(this.phoneNumber, orderDetailB2BEndUserInfo.phoneNumber) && + Objects.equals(this.email, orderDetailB2BEndUserInfo.email); + } + + @Override + public int hashCode() { + return Objects.hash(contact, companyName, addressLine1, addressLine2, addressLine3, city, state, postalCode, countryCode, phoneNumber, email); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailB2BEndUserInfo {\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); + sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); + sb.append(" addressLine3: ").append(toIndentedString(addressLine3)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("contact"); + openapiFields.add("companyName"); + openapiFields.add("addressLine1"); + openapiFields.add("addressLine2"); + openapiFields.add("addressLine3"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalCode"); + openapiFields.add("countryCode"); + openapiFields.add("phoneNumber"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailB2BEndUserInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailB2BEndUserInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailB2BEndUserInfo is not found in the empty JSON string", OrderDetailB2BEndUserInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailB2BEndUserInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailB2BEndUserInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("contact") != null && !jsonObj.get("contact").isJsonNull()) && !jsonObj.get("contact").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contact` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact").toString())); + } + if ((jsonObj.get("companyName") != null && !jsonObj.get("companyName").isJsonNull()) && !jsonObj.get("companyName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); + } + if ((jsonObj.get("addressLine1") != null && !jsonObj.get("addressLine1").isJsonNull()) && !jsonObj.get("addressLine1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine1").toString())); + } + if ((jsonObj.get("addressLine2") != null && !jsonObj.get("addressLine2").isJsonNull()) && !jsonObj.get("addressLine2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine2").toString())); + } + if ((jsonObj.get("addressLine3") != null && !jsonObj.get("addressLine3").isJsonNull()) && !jsonObj.get("addressLine3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine3").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailB2BEndUserInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailB2BEndUserInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailB2BEndUserInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailB2BEndUserInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailB2BEndUserInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailB2BEndUserInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailB2BEndUserInfo + * @throws IOException if the JSON string is invalid with respect to OrderDetailB2BEndUserInfo + */ + public static OrderDetailB2BEndUserInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailB2BEndUserInfo.class); + } + + /** + * Convert an instance of OrderDetailB2BEndUserInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInner.java b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInner.java new file mode 100644 index 00000000..e2505814 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInner.java @@ -0,0 +1,1162 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import xiresellers.client.model.OrderDetailB2BLinesInnerAdditionalAttributesInner; +import xiresellers.client.model.OrderDetailB2BLinesInnerEstimatedDatesInner; +import xiresellers.client.model.OrderDetailB2BLinesInnerLinksInner; +import xiresellers.client.model.OrderDetailB2BLinesInnerMultipleShipmentsInner; +import xiresellers.client.model.OrderDetailB2BLinesInnerScheduleLinesInner; +import xiresellers.client.model.OrderDetailB2BLinesInnerServiceContractInfo; +import xiresellers.client.model.OrderDetailB2BLinesInnerShipmentDetailsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailB2BLinesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailB2BLinesInner { + public static final String SERIALIZED_NAME_SUB_ORDER_NUMBER = "subOrderNumber"; + @SerializedName(SERIALIZED_NAME_SUB_ORDER_NUMBER) + private String subOrderNumber; + + public static final String SERIALIZED_NAME_INGRAM_ORDER_LINE_NUMBER = "ingramOrderLineNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_ORDER_LINE_NUMBER) + private String ingramOrderLineNumber; + + public static final String SERIALIZED_NAME_VENDOR_SALES_ORDER_LINE_NUMBER = "vendorSalesOrderLineNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_SALES_ORDER_LINE_NUMBER) + private String vendorSalesOrderLineNumber; + + public static final String SERIALIZED_NAME_CUSTOMER_LINE_NUMBER = "customerLineNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_LINE_NUMBER) + private String customerLineNumber; + + public static final String SERIALIZED_NAME_LINE_STATUS = "lineStatus"; + @SerializedName(SERIALIZED_NAME_LINE_STATUS) + private String lineStatus; + + public static final String SERIALIZED_NAME_INGRAM_PART_NUMBER = "ingramPartNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PART_NUMBER) + private String ingramPartNumber; + + public static final String SERIALIZED_NAME_VENDOR_PART_NUMBER = "vendorPartNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_PART_NUMBER) + private String vendorPartNumber; + + public static final String SERIALIZED_NAME_VENDOR_NAME = "vendorName"; + @SerializedName(SERIALIZED_NAME_VENDOR_NAME) + private String vendorName; + + public static final String SERIALIZED_NAME_PART_DESCRIPTION = "partDescription"; + @SerializedName(SERIALIZED_NAME_PART_DESCRIPTION) + private String partDescription; + + public static final String SERIALIZED_NAME_UNIT_WEIGHT = "unitWeight"; + @SerializedName(SERIALIZED_NAME_UNIT_WEIGHT) + private Double unitWeight; + + public static final String SERIALIZED_NAME_WEIGHT_UOM = "weightUom"; + @SerializedName(SERIALIZED_NAME_WEIGHT_UOM) + private String weightUom; + + public static final String SERIALIZED_NAME_UNIT_PRICE = "unitPrice"; + @SerializedName(SERIALIZED_NAME_UNIT_PRICE) + private Double unitPrice; + + public static final String SERIALIZED_NAME_UPC_CODE = "upcCode"; + @SerializedName(SERIALIZED_NAME_UPC_CODE) + private String upcCode; + + public static final String SERIALIZED_NAME_EXTENDED_PRICE = "extendedPrice"; + @SerializedName(SERIALIZED_NAME_EXTENDED_PRICE) + private Double extendedPrice; + + public static final String SERIALIZED_NAME_TAX_AMOUNT = "taxAmount"; + @SerializedName(SERIALIZED_NAME_TAX_AMOUNT) + private Double taxAmount; + + public static final String SERIALIZED_NAME_CURRENCY_CODE = "currencyCode"; + @SerializedName(SERIALIZED_NAME_CURRENCY_CODE) + private String currencyCode; + + public static final String SERIALIZED_NAME_QUANTITY_ORDERED = "quantityOrdered"; + @SerializedName(SERIALIZED_NAME_QUANTITY_ORDERED) + private Integer quantityOrdered; + + public static final String SERIALIZED_NAME_QUANTITY_CONFIRMED = "quantityConfirmed"; + @SerializedName(SERIALIZED_NAME_QUANTITY_CONFIRMED) + private Integer quantityConfirmed; + + public static final String SERIALIZED_NAME_QUANTITY_BACK_ORDERED = "quantityBackOrdered"; + @SerializedName(SERIALIZED_NAME_QUANTITY_BACK_ORDERED) + private Integer quantityBackOrdered; + + public static final String SERIALIZED_NAME_SPECIAL_BID_NUMBER = "specialBidNumber"; + @SerializedName(SERIALIZED_NAME_SPECIAL_BID_NUMBER) + private String specialBidNumber; + + public static final String SERIALIZED_NAME_REQUESTED_DELIVERYDATE = "requestedDeliverydate"; + @SerializedName(SERIALIZED_NAME_REQUESTED_DELIVERYDATE) + private String requestedDeliverydate; + + public static final String SERIALIZED_NAME_PROMISED_DELIVERY_DATE = "promisedDeliveryDate"; + @SerializedName(SERIALIZED_NAME_PROMISED_DELIVERY_DATE) + private String promisedDeliveryDate; + + public static final String SERIALIZED_NAME_LINE_NOTES = "lineNotes"; + @SerializedName(SERIALIZED_NAME_LINE_NOTES) + private String lineNotes; + + public static final String SERIALIZED_NAME_SHIPMENT_DETAILS = "shipmentDetails"; + @SerializedName(SERIALIZED_NAME_SHIPMENT_DETAILS) + private List shipmentDetails; + + public static final String SERIALIZED_NAME_SERVICE_CONTRACT_INFO = "serviceContractInfo"; + @SerializedName(SERIALIZED_NAME_SERVICE_CONTRACT_INFO) + private OrderDetailB2BLinesInnerServiceContractInfo serviceContractInfo; + + public static final String SERIALIZED_NAME_ADDITIONAL_ATTRIBUTES = "additionalAttributes"; + @SerializedName(SERIALIZED_NAME_ADDITIONAL_ATTRIBUTES) + private List additionalAttributes; + + public static final String SERIALIZED_NAME_LINKS = "links"; + @SerializedName(SERIALIZED_NAME_LINKS) + private List links; + + public static final String SERIALIZED_NAME_ESTIMATED_DATES = "estimatedDates"; + @SerializedName(SERIALIZED_NAME_ESTIMATED_DATES) + private List estimatedDates; + + public static final String SERIALIZED_NAME_SCHEDULE_LINES = "scheduleLines"; + @SerializedName(SERIALIZED_NAME_SCHEDULE_LINES) + private List scheduleLines; + + public static final String SERIALIZED_NAME_MULTIPLE_SHIPMENTS = "multipleShipments"; + @SerializedName(SERIALIZED_NAME_MULTIPLE_SHIPMENTS) + private List multipleShipments; + + public OrderDetailB2BLinesInner() { + } + + public OrderDetailB2BLinesInner subOrderNumber(String subOrderNumber) { + this.subOrderNumber = subOrderNumber; + return this; + } + + /** + * The sub order number. The two-digit prefix is the warehouse code of the warehouse nearest the reseller. The middle number is the order number. The two-digit suffix is the sub order number. + * @return subOrderNumber + **/ + @javax.annotation.Nullable + public String getSubOrderNumber() { + return subOrderNumber; + } + + public void setSubOrderNumber(String subOrderNumber) { + this.subOrderNumber = subOrderNumber; + } + + + public OrderDetailB2BLinesInner ingramOrderLineNumber(String ingramOrderLineNumber) { + this.ingramOrderLineNumber = ingramOrderLineNumber; + return this; + } + + /** + * Unique Ingram Micro line number. Starts with 001. + * @return ingramOrderLineNumber + **/ + @javax.annotation.Nullable + public String getIngramOrderLineNumber() { + return ingramOrderLineNumber; + } + + public void setIngramOrderLineNumber(String ingramOrderLineNumber) { + this.ingramOrderLineNumber = ingramOrderLineNumber; + } + + + public OrderDetailB2BLinesInner vendorSalesOrderLineNumber(String vendorSalesOrderLineNumber) { + this.vendorSalesOrderLineNumber = vendorSalesOrderLineNumber; + return this; + } + + /** + * The vendor's sales order line number. + * @return vendorSalesOrderLineNumber + **/ + @javax.annotation.Nullable + public String getVendorSalesOrderLineNumber() { + return vendorSalesOrderLineNumber; + } + + public void setVendorSalesOrderLineNumber(String vendorSalesOrderLineNumber) { + this.vendorSalesOrderLineNumber = vendorSalesOrderLineNumber; + } + + + public OrderDetailB2BLinesInner customerLineNumber(String customerLineNumber) { + this.customerLineNumber = customerLineNumber; + return this; + } + + /** + * The reseller's line item number for reference in their system. + * @return customerLineNumber + **/ + @javax.annotation.Nullable + public String getCustomerLineNumber() { + return customerLineNumber; + } + + public void setCustomerLineNumber(String customerLineNumber) { + this.customerLineNumber = customerLineNumber; + } + + + public OrderDetailB2BLinesInner lineStatus(String lineStatus) { + this.lineStatus = lineStatus; + return this; + } + + /** + * The status for the line item in the order. One of- Backordered, In Progress, Shipped, Delivered, Canceled, On Hold. + * @return lineStatus + **/ + @javax.annotation.Nullable + public String getLineStatus() { + return lineStatus; + } + + public void setLineStatus(String lineStatus) { + this.lineStatus = lineStatus; + } + + + public OrderDetailB2BLinesInner ingramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + return this; + } + + /** + * Unique IngramMicro part number. + * @return ingramPartNumber + **/ + @javax.annotation.Nullable + public String getIngramPartNumber() { + return ingramPartNumber; + } + + public void setIngramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + } + + + public OrderDetailB2BLinesInner vendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + return this; + } + + /** + * The vendor's part number for the line item. + * @return vendorPartNumber + **/ + @javax.annotation.Nullable + public String getVendorPartNumber() { + return vendorPartNumber; + } + + public void setVendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + } + + + public OrderDetailB2BLinesInner vendorName(String vendorName) { + this.vendorName = vendorName; + return this; + } + + /** + * The vendor's name for the part in their system. + * @return vendorName + **/ + @javax.annotation.Nullable + public String getVendorName() { + return vendorName; + } + + public void setVendorName(String vendorName) { + this.vendorName = vendorName; + } + + + public OrderDetailB2BLinesInner partDescription(String partDescription) { + this.partDescription = partDescription; + return this; + } + + /** + * The vendor's description of the part in their system. + * @return partDescription + **/ + @javax.annotation.Nullable + public String getPartDescription() { + return partDescription; + } + + public void setPartDescription(String partDescription) { + this.partDescription = partDescription; + } + + + public OrderDetailB2BLinesInner unitWeight(Double unitWeight) { + this.unitWeight = unitWeight; + return this; + } + + /** + * The unit weight of the line item. + * @return unitWeight + **/ + @javax.annotation.Nullable + public Double getUnitWeight() { + return unitWeight; + } + + public void setUnitWeight(Double unitWeight) { + this.unitWeight = unitWeight; + } + + + public OrderDetailB2BLinesInner weightUom(String weightUom) { + this.weightUom = weightUom; + return this; + } + + /** + * The unit of measure for the line item. + * @return weightUom + **/ + @javax.annotation.Nullable + public String getWeightUom() { + return weightUom; + } + + public void setWeightUom(String weightUom) { + this.weightUom = weightUom; + } + + + public OrderDetailB2BLinesInner unitPrice(Double unitPrice) { + this.unitPrice = unitPrice; + return this; + } + + /** + * The unit price of the line item. + * @return unitPrice + **/ + @javax.annotation.Nullable + public Double getUnitPrice() { + return unitPrice; + } + + public void setUnitPrice(Double unitPrice) { + this.unitPrice = unitPrice; + } + + + public OrderDetailB2BLinesInner upcCode(String upcCode) { + this.upcCode = upcCode; + return this; + } + + /** + * The UPC code of a product. + * @return upcCode + **/ + @javax.annotation.Nullable + public String getUpcCode() { + return upcCode; + } + + public void setUpcCode(String upcCode) { + this.upcCode = upcCode; + } + + + public OrderDetailB2BLinesInner extendedPrice(Double extendedPrice) { + this.extendedPrice = extendedPrice; + return this; + } + + /** + * Unit price X quantity for the line item. + * @return extendedPrice + **/ + @javax.annotation.Nullable + public Double getExtendedPrice() { + return extendedPrice; + } + + public void setExtendedPrice(Double extendedPrice) { + this.extendedPrice = extendedPrice; + } + + + public OrderDetailB2BLinesInner taxAmount(Double taxAmount) { + this.taxAmount = taxAmount; + return this; + } + + /** + * The tax amount for the line item. + * @return taxAmount + **/ + @javax.annotation.Nullable + public Double getTaxAmount() { + return taxAmount; + } + + public void setTaxAmount(Double taxAmount) { + this.taxAmount = taxAmount; + } + + + public OrderDetailB2BLinesInner currencyCode(String currencyCode) { + this.currencyCode = currencyCode; + return this; + } + + /** + * The country-specific three character ISO 4217 currency code for the line item. + * @return currencyCode + **/ + @javax.annotation.Nullable + public String getCurrencyCode() { + return currencyCode; + } + + public void setCurrencyCode(String currencyCode) { + this.currencyCode = currencyCode; + } + + + public OrderDetailB2BLinesInner quantityOrdered(Integer quantityOrdered) { + this.quantityOrdered = quantityOrdered; + return this; + } + + /** + * The quantity ordered of the line item. + * @return quantityOrdered + **/ + @javax.annotation.Nullable + public Integer getQuantityOrdered() { + return quantityOrdered; + } + + public void setQuantityOrdered(Integer quantityOrdered) { + this.quantityOrdered = quantityOrdered; + } + + + public OrderDetailB2BLinesInner quantityConfirmed(Integer quantityConfirmed) { + this.quantityConfirmed = quantityConfirmed; + return this; + } + + /** + * The quantity confirmed for the line item. + * @return quantityConfirmed + **/ + @javax.annotation.Nullable + public Integer getQuantityConfirmed() { + return quantityConfirmed; + } + + public void setQuantityConfirmed(Integer quantityConfirmed) { + this.quantityConfirmed = quantityConfirmed; + } + + + public OrderDetailB2BLinesInner quantityBackOrdered(Integer quantityBackOrdered) { + this.quantityBackOrdered = quantityBackOrdered; + return this; + } + + /** + * The quantity backordered for the line item. + * @return quantityBackOrdered + **/ + @javax.annotation.Nullable + public Integer getQuantityBackOrdered() { + return quantityBackOrdered; + } + + public void setQuantityBackOrdered(Integer quantityBackOrdered) { + this.quantityBackOrdered = quantityBackOrdered; + } + + + public OrderDetailB2BLinesInner specialBidNumber(String specialBidNumber) { + this.specialBidNumber = specialBidNumber; + return this; + } + + /** + * The line-level bid number provided to the reseller by the vendor for special pricing and discounts. Used to track the bid number in the case of split orders or where different line items have different bid numbers. Line-level bid numbers take precedence over header-level bid numbers. + * @return specialBidNumber + **/ + @javax.annotation.Nullable + public String getSpecialBidNumber() { + return specialBidNumber; + } + + public void setSpecialBidNumber(String specialBidNumber) { + this.specialBidNumber = specialBidNumber; + } + + + public OrderDetailB2BLinesInner requestedDeliverydate(String requestedDeliverydate) { + this.requestedDeliverydate = requestedDeliverydate; + return this; + } + + /** + * Reseller-requested delivery date. Delivery date is not guaranteed. + * @return requestedDeliverydate + **/ + @javax.annotation.Nullable + public String getRequestedDeliverydate() { + return requestedDeliverydate; + } + + public void setRequestedDeliverydate(String requestedDeliverydate) { + this.requestedDeliverydate = requestedDeliverydate; + } + + + public OrderDetailB2BLinesInner promisedDeliveryDate(String promisedDeliveryDate) { + this.promisedDeliveryDate = promisedDeliveryDate; + return this; + } + + /** + * The delivery date promised by IngramMicro. + * @return promisedDeliveryDate + **/ + @javax.annotation.Nullable + public String getPromisedDeliveryDate() { + return promisedDeliveryDate; + } + + public void setPromisedDeliveryDate(String promisedDeliveryDate) { + this.promisedDeliveryDate = promisedDeliveryDate; + } + + + public OrderDetailB2BLinesInner lineNotes(String lineNotes) { + this.lineNotes = lineNotes; + return this; + } + + /** + * Line-level notes for the order. + * @return lineNotes + **/ + @javax.annotation.Nullable + public String getLineNotes() { + return lineNotes; + } + + public void setLineNotes(String lineNotes) { + this.lineNotes = lineNotes; + } + + + public OrderDetailB2BLinesInner shipmentDetails(List shipmentDetails) { + this.shipmentDetails = shipmentDetails; + return this; + } + + public OrderDetailB2BLinesInner addShipmentDetailsItem(OrderDetailB2BLinesInnerShipmentDetailsInner shipmentDetailsItem) { + if (this.shipmentDetails == null) { + this.shipmentDetails = new ArrayList<>(); + } + this.shipmentDetails.add(shipmentDetailsItem); + return this; + } + + /** + * Shipping details for the line item. + * @return shipmentDetails + **/ + @javax.annotation.Nullable + public List getShipmentDetails() { + return shipmentDetails; + } + + public void setShipmentDetails(List shipmentDetails) { + this.shipmentDetails = shipmentDetails; + } + + + public OrderDetailB2BLinesInner serviceContractInfo(OrderDetailB2BLinesInnerServiceContractInfo serviceContractInfo) { + this.serviceContractInfo = serviceContractInfo; + return this; + } + + /** + * Get serviceContractInfo + * @return serviceContractInfo + **/ + @javax.annotation.Nullable + public OrderDetailB2BLinesInnerServiceContractInfo getServiceContractInfo() { + return serviceContractInfo; + } + + public void setServiceContractInfo(OrderDetailB2BLinesInnerServiceContractInfo serviceContractInfo) { + this.serviceContractInfo = serviceContractInfo; + } + + + public OrderDetailB2BLinesInner additionalAttributes(List additionalAttributes) { + this.additionalAttributes = additionalAttributes; + return this; + } + + public OrderDetailB2BLinesInner addAdditionalAttributesItem(OrderDetailB2BLinesInnerAdditionalAttributesInner additionalAttributesItem) { + if (this.additionalAttributes == null) { + this.additionalAttributes = new ArrayList<>(); + } + this.additionalAttributes.add(additionalAttributesItem); + return this; + } + + /** + * Get additionalAttributes + * @return additionalAttributes + **/ + @javax.annotation.Nullable + public List getAdditionalAttributes() { + return additionalAttributes; + } + + public void setAdditionalAttributes(List additionalAttributes) { + this.additionalAttributes = additionalAttributes; + } + + + public OrderDetailB2BLinesInner links(List links) { + this.links = links; + return this; + } + + public OrderDetailB2BLinesInner addLinksItem(OrderDetailB2BLinesInnerLinksInner linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * Get links + * @return links + **/ + @javax.annotation.Nullable + public List getLinks() { + return links; + } + + public void setLinks(List links) { + this.links = links; + } + + + public OrderDetailB2BLinesInner estimatedDates(List estimatedDates) { + this.estimatedDates = estimatedDates; + return this; + } + + public OrderDetailB2BLinesInner addEstimatedDatesItem(OrderDetailB2BLinesInnerEstimatedDatesInner estimatedDatesItem) { + if (this.estimatedDates == null) { + this.estimatedDates = new ArrayList<>(); + } + this.estimatedDates.add(estimatedDatesItem); + return this; + } + + /** + * Get estimatedDates + * @return estimatedDates + **/ + @javax.annotation.Nullable + public List getEstimatedDates() { + return estimatedDates; + } + + public void setEstimatedDates(List estimatedDates) { + this.estimatedDates = estimatedDates; + } + + + public OrderDetailB2BLinesInner scheduleLines(List scheduleLines) { + this.scheduleLines = scheduleLines; + return this; + } + + public OrderDetailB2BLinesInner addScheduleLinesItem(OrderDetailB2BLinesInnerScheduleLinesInner scheduleLinesItem) { + if (this.scheduleLines == null) { + this.scheduleLines = new ArrayList<>(); + } + this.scheduleLines.add(scheduleLinesItem); + return this; + } + + /** + * Get scheduleLines + * @return scheduleLines + **/ + @javax.annotation.Nullable + public List getScheduleLines() { + return scheduleLines; + } + + public void setScheduleLines(List scheduleLines) { + this.scheduleLines = scheduleLines; + } + + + public OrderDetailB2BLinesInner multipleShipments(List multipleShipments) { + this.multipleShipments = multipleShipments; + return this; + } + + public OrderDetailB2BLinesInner addMultipleShipmentsItem(OrderDetailB2BLinesInnerMultipleShipmentsInner multipleShipmentsItem) { + if (this.multipleShipments == null) { + this.multipleShipments = new ArrayList<>(); + } + this.multipleShipments.add(multipleShipmentsItem); + return this; + } + + /** + * Get multipleShipments + * @return multipleShipments + **/ + @javax.annotation.Nullable + public List getMultipleShipments() { + return multipleShipments; + } + + public void setMultipleShipments(List multipleShipments) { + this.multipleShipments = multipleShipments; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailB2BLinesInner orderDetailB2BLinesInner = (OrderDetailB2BLinesInner) o; + return Objects.equals(this.subOrderNumber, orderDetailB2BLinesInner.subOrderNumber) && + Objects.equals(this.ingramOrderLineNumber, orderDetailB2BLinesInner.ingramOrderLineNumber) && + Objects.equals(this.vendorSalesOrderLineNumber, orderDetailB2BLinesInner.vendorSalesOrderLineNumber) && + Objects.equals(this.customerLineNumber, orderDetailB2BLinesInner.customerLineNumber) && + Objects.equals(this.lineStatus, orderDetailB2BLinesInner.lineStatus) && + Objects.equals(this.ingramPartNumber, orderDetailB2BLinesInner.ingramPartNumber) && + Objects.equals(this.vendorPartNumber, orderDetailB2BLinesInner.vendorPartNumber) && + Objects.equals(this.vendorName, orderDetailB2BLinesInner.vendorName) && + Objects.equals(this.partDescription, orderDetailB2BLinesInner.partDescription) && + Objects.equals(this.unitWeight, orderDetailB2BLinesInner.unitWeight) && + Objects.equals(this.weightUom, orderDetailB2BLinesInner.weightUom) && + Objects.equals(this.unitPrice, orderDetailB2BLinesInner.unitPrice) && + Objects.equals(this.upcCode, orderDetailB2BLinesInner.upcCode) && + Objects.equals(this.extendedPrice, orderDetailB2BLinesInner.extendedPrice) && + Objects.equals(this.taxAmount, orderDetailB2BLinesInner.taxAmount) && + Objects.equals(this.currencyCode, orderDetailB2BLinesInner.currencyCode) && + Objects.equals(this.quantityOrdered, orderDetailB2BLinesInner.quantityOrdered) && + Objects.equals(this.quantityConfirmed, orderDetailB2BLinesInner.quantityConfirmed) && + Objects.equals(this.quantityBackOrdered, orderDetailB2BLinesInner.quantityBackOrdered) && + Objects.equals(this.specialBidNumber, orderDetailB2BLinesInner.specialBidNumber) && + Objects.equals(this.requestedDeliverydate, orderDetailB2BLinesInner.requestedDeliverydate) && + Objects.equals(this.promisedDeliveryDate, orderDetailB2BLinesInner.promisedDeliveryDate) && + Objects.equals(this.lineNotes, orderDetailB2BLinesInner.lineNotes) && + Objects.equals(this.shipmentDetails, orderDetailB2BLinesInner.shipmentDetails) && + Objects.equals(this.serviceContractInfo, orderDetailB2BLinesInner.serviceContractInfo) && + Objects.equals(this.additionalAttributes, orderDetailB2BLinesInner.additionalAttributes) && + Objects.equals(this.links, orderDetailB2BLinesInner.links) && + Objects.equals(this.estimatedDates, orderDetailB2BLinesInner.estimatedDates) && + Objects.equals(this.scheduleLines, orderDetailB2BLinesInner.scheduleLines) && + Objects.equals(this.multipleShipments, orderDetailB2BLinesInner.multipleShipments); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(subOrderNumber, ingramOrderLineNumber, vendorSalesOrderLineNumber, customerLineNumber, lineStatus, ingramPartNumber, vendorPartNumber, vendorName, partDescription, unitWeight, weightUom, unitPrice, upcCode, extendedPrice, taxAmount, currencyCode, quantityOrdered, quantityConfirmed, quantityBackOrdered, specialBidNumber, requestedDeliverydate, promisedDeliveryDate, lineNotes, shipmentDetails, serviceContractInfo, additionalAttributes, links, estimatedDates, scheduleLines, multipleShipments); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailB2BLinesInner {\n"); + sb.append(" subOrderNumber: ").append(toIndentedString(subOrderNumber)).append("\n"); + sb.append(" ingramOrderLineNumber: ").append(toIndentedString(ingramOrderLineNumber)).append("\n"); + sb.append(" vendorSalesOrderLineNumber: ").append(toIndentedString(vendorSalesOrderLineNumber)).append("\n"); + sb.append(" customerLineNumber: ").append(toIndentedString(customerLineNumber)).append("\n"); + sb.append(" lineStatus: ").append(toIndentedString(lineStatus)).append("\n"); + sb.append(" ingramPartNumber: ").append(toIndentedString(ingramPartNumber)).append("\n"); + sb.append(" vendorPartNumber: ").append(toIndentedString(vendorPartNumber)).append("\n"); + sb.append(" vendorName: ").append(toIndentedString(vendorName)).append("\n"); + sb.append(" partDescription: ").append(toIndentedString(partDescription)).append("\n"); + sb.append(" unitWeight: ").append(toIndentedString(unitWeight)).append("\n"); + sb.append(" weightUom: ").append(toIndentedString(weightUom)).append("\n"); + sb.append(" unitPrice: ").append(toIndentedString(unitPrice)).append("\n"); + sb.append(" upcCode: ").append(toIndentedString(upcCode)).append("\n"); + sb.append(" extendedPrice: ").append(toIndentedString(extendedPrice)).append("\n"); + sb.append(" taxAmount: ").append(toIndentedString(taxAmount)).append("\n"); + sb.append(" currencyCode: ").append(toIndentedString(currencyCode)).append("\n"); + sb.append(" quantityOrdered: ").append(toIndentedString(quantityOrdered)).append("\n"); + sb.append(" quantityConfirmed: ").append(toIndentedString(quantityConfirmed)).append("\n"); + sb.append(" quantityBackOrdered: ").append(toIndentedString(quantityBackOrdered)).append("\n"); + sb.append(" specialBidNumber: ").append(toIndentedString(specialBidNumber)).append("\n"); + sb.append(" requestedDeliverydate: ").append(toIndentedString(requestedDeliverydate)).append("\n"); + sb.append(" promisedDeliveryDate: ").append(toIndentedString(promisedDeliveryDate)).append("\n"); + sb.append(" lineNotes: ").append(toIndentedString(lineNotes)).append("\n"); + sb.append(" shipmentDetails: ").append(toIndentedString(shipmentDetails)).append("\n"); + sb.append(" serviceContractInfo: ").append(toIndentedString(serviceContractInfo)).append("\n"); + sb.append(" additionalAttributes: ").append(toIndentedString(additionalAttributes)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" estimatedDates: ").append(toIndentedString(estimatedDates)).append("\n"); + sb.append(" scheduleLines: ").append(toIndentedString(scheduleLines)).append("\n"); + sb.append(" multipleShipments: ").append(toIndentedString(multipleShipments)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("subOrderNumber"); + openapiFields.add("ingramOrderLineNumber"); + openapiFields.add("vendorSalesOrderLineNumber"); + openapiFields.add("customerLineNumber"); + openapiFields.add("lineStatus"); + openapiFields.add("ingramPartNumber"); + openapiFields.add("vendorPartNumber"); + openapiFields.add("vendorName"); + openapiFields.add("partDescription"); + openapiFields.add("unitWeight"); + openapiFields.add("weightUom"); + openapiFields.add("unitPrice"); + openapiFields.add("upcCode"); + openapiFields.add("extendedPrice"); + openapiFields.add("taxAmount"); + openapiFields.add("currencyCode"); + openapiFields.add("quantityOrdered"); + openapiFields.add("quantityConfirmed"); + openapiFields.add("quantityBackOrdered"); + openapiFields.add("specialBidNumber"); + openapiFields.add("requestedDeliverydate"); + openapiFields.add("promisedDeliveryDate"); + openapiFields.add("lineNotes"); + openapiFields.add("shipmentDetails"); + openapiFields.add("serviceContractInfo"); + openapiFields.add("additionalAttributes"); + openapiFields.add("links"); + openapiFields.add("estimatedDates"); + openapiFields.add("scheduleLines"); + openapiFields.add("multipleShipments"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailB2BLinesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailB2BLinesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailB2BLinesInner is not found in the empty JSON string", OrderDetailB2BLinesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailB2BLinesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailB2BLinesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("subOrderNumber") != null && !jsonObj.get("subOrderNumber").isJsonNull()) && !jsonObj.get("subOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subOrderNumber").toString())); + } + if ((jsonObj.get("ingramOrderLineNumber") != null && !jsonObj.get("ingramOrderLineNumber").isJsonNull()) && !jsonObj.get("ingramOrderLineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramOrderLineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramOrderLineNumber").toString())); + } + if ((jsonObj.get("vendorSalesOrderLineNumber") != null && !jsonObj.get("vendorSalesOrderLineNumber").isJsonNull()) && !jsonObj.get("vendorSalesOrderLineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorSalesOrderLineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorSalesOrderLineNumber").toString())); + } + if ((jsonObj.get("customerLineNumber") != null && !jsonObj.get("customerLineNumber").isJsonNull()) && !jsonObj.get("customerLineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerLineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerLineNumber").toString())); + } + if ((jsonObj.get("lineStatus") != null && !jsonObj.get("lineStatus").isJsonNull()) && !jsonObj.get("lineStatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lineStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lineStatus").toString())); + } + if ((jsonObj.get("ingramPartNumber") != null && !jsonObj.get("ingramPartNumber").isJsonNull()) && !jsonObj.get("ingramPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPartNumber").toString())); + } + if ((jsonObj.get("vendorPartNumber") != null && !jsonObj.get("vendorPartNumber").isJsonNull()) && !jsonObj.get("vendorPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorPartNumber").toString())); + } + if ((jsonObj.get("vendorName") != null && !jsonObj.get("vendorName").isJsonNull()) && !jsonObj.get("vendorName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorName").toString())); + } + if ((jsonObj.get("partDescription") != null && !jsonObj.get("partDescription").isJsonNull()) && !jsonObj.get("partDescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `partDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("partDescription").toString())); + } + if ((jsonObj.get("weightUom") != null && !jsonObj.get("weightUom").isJsonNull()) && !jsonObj.get("weightUom").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `weightUom` to be a primitive type in the JSON string but got `%s`", jsonObj.get("weightUom").toString())); + } + if ((jsonObj.get("upcCode") != null && !jsonObj.get("upcCode").isJsonNull()) && !jsonObj.get("upcCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `upcCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("upcCode").toString())); + } + if ((jsonObj.get("currencyCode") != null && !jsonObj.get("currencyCode").isJsonNull()) && !jsonObj.get("currencyCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `currencyCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currencyCode").toString())); + } + if ((jsonObj.get("specialBidNumber") != null && !jsonObj.get("specialBidNumber").isJsonNull()) && !jsonObj.get("specialBidNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `specialBidNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("specialBidNumber").toString())); + } + if ((jsonObj.get("requestedDeliverydate") != null && !jsonObj.get("requestedDeliverydate").isJsonNull()) && !jsonObj.get("requestedDeliverydate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `requestedDeliverydate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestedDeliverydate").toString())); + } + if ((jsonObj.get("promisedDeliveryDate") != null && !jsonObj.get("promisedDeliveryDate").isJsonNull()) && !jsonObj.get("promisedDeliveryDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `promisedDeliveryDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("promisedDeliveryDate").toString())); + } + if ((jsonObj.get("lineNotes") != null && !jsonObj.get("lineNotes").isJsonNull()) && !jsonObj.get("lineNotes").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lineNotes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lineNotes").toString())); + } + if (jsonObj.get("shipmentDetails") != null && !jsonObj.get("shipmentDetails").isJsonNull()) { + JsonArray jsonArrayshipmentDetails = jsonObj.getAsJsonArray("shipmentDetails"); + if (jsonArrayshipmentDetails != null) { + // ensure the json data is an array + if (!jsonObj.get("shipmentDetails").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `shipmentDetails` to be an array in the JSON string but got `%s`", jsonObj.get("shipmentDetails").toString())); + } + + // validate the optional field `shipmentDetails` (array) + for (int i = 0; i < jsonArrayshipmentDetails.size(); i++) { + OrderDetailB2BLinesInnerShipmentDetailsInner.validateJsonElement(jsonArrayshipmentDetails.get(i)); + }; + } + } + // validate the optional field `serviceContractInfo` + if (jsonObj.get("serviceContractInfo") != null && !jsonObj.get("serviceContractInfo").isJsonNull()) { + OrderDetailB2BLinesInnerServiceContractInfo.validateJsonElement(jsonObj.get("serviceContractInfo")); + } + if (jsonObj.get("additionalAttributes") != null && !jsonObj.get("additionalAttributes").isJsonNull()) { + JsonArray jsonArrayadditionalAttributes = jsonObj.getAsJsonArray("additionalAttributes"); + if (jsonArrayadditionalAttributes != null) { + // ensure the json data is an array + if (!jsonObj.get("additionalAttributes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `additionalAttributes` to be an array in the JSON string but got `%s`", jsonObj.get("additionalAttributes").toString())); + } + + // validate the optional field `additionalAttributes` (array) + for (int i = 0; i < jsonArrayadditionalAttributes.size(); i++) { + OrderDetailB2BLinesInnerAdditionalAttributesInner.validateJsonElement(jsonArrayadditionalAttributes.get(i)); + }; + } + } + if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull()) { + JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); + if (jsonArraylinks != null) { + // ensure the json data is an array + if (!jsonObj.get("links").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + } + + // validate the optional field `links` (array) + for (int i = 0; i < jsonArraylinks.size(); i++) { + OrderDetailB2BLinesInnerLinksInner.validateJsonElement(jsonArraylinks.get(i)); + }; + } + } + if (jsonObj.get("estimatedDates") != null && !jsonObj.get("estimatedDates").isJsonNull()) { + JsonArray jsonArrayestimatedDates = jsonObj.getAsJsonArray("estimatedDates"); + if (jsonArrayestimatedDates != null) { + // ensure the json data is an array + if (!jsonObj.get("estimatedDates").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `estimatedDates` to be an array in the JSON string but got `%s`", jsonObj.get("estimatedDates").toString())); + } + + // validate the optional field `estimatedDates` (array) + for (int i = 0; i < jsonArrayestimatedDates.size(); i++) { + OrderDetailB2BLinesInnerEstimatedDatesInner.validateJsonElement(jsonArrayestimatedDates.get(i)); + }; + } + } + if (jsonObj.get("scheduleLines") != null && !jsonObj.get("scheduleLines").isJsonNull()) { + JsonArray jsonArrayscheduleLines = jsonObj.getAsJsonArray("scheduleLines"); + if (jsonArrayscheduleLines != null) { + // ensure the json data is an array + if (!jsonObj.get("scheduleLines").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `scheduleLines` to be an array in the JSON string but got `%s`", jsonObj.get("scheduleLines").toString())); + } + + // validate the optional field `scheduleLines` (array) + for (int i = 0; i < jsonArrayscheduleLines.size(); i++) { + OrderDetailB2BLinesInnerScheduleLinesInner.validateJsonElement(jsonArrayscheduleLines.get(i)); + }; + } + } + if (jsonObj.get("multipleShipments") != null && !jsonObj.get("multipleShipments").isJsonNull()) { + JsonArray jsonArraymultipleShipments = jsonObj.getAsJsonArray("multipleShipments"); + if (jsonArraymultipleShipments != null) { + // ensure the json data is an array + if (!jsonObj.get("multipleShipments").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `multipleShipments` to be an array in the JSON string but got `%s`", jsonObj.get("multipleShipments").toString())); + } + + // validate the optional field `multipleShipments` (array) + for (int i = 0; i < jsonArraymultipleShipments.size(); i++) { + OrderDetailB2BLinesInnerMultipleShipmentsInner.validateJsonElement(jsonArraymultipleShipments.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailB2BLinesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailB2BLinesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailB2BLinesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailB2BLinesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailB2BLinesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailB2BLinesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailB2BLinesInner + * @throws IOException if the JSON string is invalid with respect to OrderDetailB2BLinesInner + */ + public static OrderDetailB2BLinesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailB2BLinesInner.class); + } + + /** + * Convert an instance of OrderDetailB2BLinesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerAdditionalAttributesInner.java b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerAdditionalAttributesInner.java new file mode 100644 index 00000000..2cfa45d2 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerAdditionalAttributesInner.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailB2BLinesInnerAdditionalAttributesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailB2BLinesInnerAdditionalAttributesInner { + public static final String SERIALIZED_NAME_ATTRIBUTE_NAME = "attributeName"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_NAME) + private String attributeName; + + public static final String SERIALIZED_NAME_ATTRIBUTE_VALUE = "attributeValue"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_VALUE) + private String attributeValue; + + public OrderDetailB2BLinesInnerAdditionalAttributesInner() { + } + + public OrderDetailB2BLinesInnerAdditionalAttributesInner attributeName(String attributeName) { + this.attributeName = attributeName; + return this; + } + + /** + * Line level custom field names. + * @return attributeName + **/ + @javax.annotation.Nullable + public String getAttributeName() { + return attributeName; + } + + public void setAttributeName(String attributeName) { + this.attributeName = attributeName; + } + + + public OrderDetailB2BLinesInnerAdditionalAttributesInner attributeValue(String attributeValue) { + this.attributeValue = attributeValue; + return this; + } + + /** + * Value of the custom fields. + * @return attributeValue + **/ + @javax.annotation.Nullable + public String getAttributeValue() { + return attributeValue; + } + + public void setAttributeValue(String attributeValue) { + this.attributeValue = attributeValue; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailB2BLinesInnerAdditionalAttributesInner orderDetailB2BLinesInnerAdditionalAttributesInner = (OrderDetailB2BLinesInnerAdditionalAttributesInner) o; + return Objects.equals(this.attributeName, orderDetailB2BLinesInnerAdditionalAttributesInner.attributeName) && + Objects.equals(this.attributeValue, orderDetailB2BLinesInnerAdditionalAttributesInner.attributeValue); + } + + @Override + public int hashCode() { + return Objects.hash(attributeName, attributeValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailB2BLinesInnerAdditionalAttributesInner {\n"); + sb.append(" attributeName: ").append(toIndentedString(attributeName)).append("\n"); + sb.append(" attributeValue: ").append(toIndentedString(attributeValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributeName"); + openapiFields.add("attributeValue"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailB2BLinesInnerAdditionalAttributesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailB2BLinesInnerAdditionalAttributesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailB2BLinesInnerAdditionalAttributesInner is not found in the empty JSON string", OrderDetailB2BLinesInnerAdditionalAttributesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailB2BLinesInnerAdditionalAttributesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailB2BLinesInnerAdditionalAttributesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("attributeName") != null && !jsonObj.get("attributeName").isJsonNull()) && !jsonObj.get("attributeName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeName").toString())); + } + if ((jsonObj.get("attributeValue") != null && !jsonObj.get("attributeValue").isJsonNull()) && !jsonObj.get("attributeValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeValue").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailB2BLinesInnerAdditionalAttributesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailB2BLinesInnerAdditionalAttributesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailB2BLinesInnerAdditionalAttributesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailB2BLinesInnerAdditionalAttributesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailB2BLinesInnerAdditionalAttributesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailB2BLinesInnerAdditionalAttributesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailB2BLinesInnerAdditionalAttributesInner + * @throws IOException if the JSON string is invalid with respect to OrderDetailB2BLinesInnerAdditionalAttributesInner + */ + public static OrderDetailB2BLinesInnerAdditionalAttributesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailB2BLinesInnerAdditionalAttributesInner.class); + } + + /** + * Convert an instance of OrderDetailB2BLinesInnerAdditionalAttributesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInner.java b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInner.java new file mode 100644 index 00000000..07c6c01e --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInner.java @@ -0,0 +1,239 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery; +import xiresellers.client.model.OrderDetailB2BLinesInnerEstimatedDatesInnerShip; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailB2BLinesInnerEstimatedDatesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailB2BLinesInnerEstimatedDatesInner { + public static final String SERIALIZED_NAME_SHIP = "ship"; + @SerializedName(SERIALIZED_NAME_SHIP) + private OrderDetailB2BLinesInnerEstimatedDatesInnerShip ship; + + public static final String SERIALIZED_NAME_DELIVERY = "delivery"; + @SerializedName(SERIALIZED_NAME_DELIVERY) + private OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery delivery; + + public OrderDetailB2BLinesInnerEstimatedDatesInner() { + } + + public OrderDetailB2BLinesInnerEstimatedDatesInner ship(OrderDetailB2BLinesInnerEstimatedDatesInnerShip ship) { + this.ship = ship; + return this; + } + + /** + * Get ship + * @return ship + **/ + @javax.annotation.Nullable + public OrderDetailB2BLinesInnerEstimatedDatesInnerShip getShip() { + return ship; + } + + public void setShip(OrderDetailB2BLinesInnerEstimatedDatesInnerShip ship) { + this.ship = ship; + } + + + public OrderDetailB2BLinesInnerEstimatedDatesInner delivery(OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery delivery) { + this.delivery = delivery; + return this; + } + + /** + * Get delivery + * @return delivery + **/ + @javax.annotation.Nullable + public OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery getDelivery() { + return delivery; + } + + public void setDelivery(OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery delivery) { + this.delivery = delivery; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailB2BLinesInnerEstimatedDatesInner orderDetailB2BLinesInnerEstimatedDatesInner = (OrderDetailB2BLinesInnerEstimatedDatesInner) o; + return Objects.equals(this.ship, orderDetailB2BLinesInnerEstimatedDatesInner.ship) && + Objects.equals(this.delivery, orderDetailB2BLinesInnerEstimatedDatesInner.delivery); + } + + @Override + public int hashCode() { + return Objects.hash(ship, delivery); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailB2BLinesInnerEstimatedDatesInner {\n"); + sb.append(" ship: ").append(toIndentedString(ship)).append("\n"); + sb.append(" delivery: ").append(toIndentedString(delivery)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("ship"); + openapiFields.add("delivery"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailB2BLinesInnerEstimatedDatesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailB2BLinesInnerEstimatedDatesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailB2BLinesInnerEstimatedDatesInner is not found in the empty JSON string", OrderDetailB2BLinesInnerEstimatedDatesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailB2BLinesInnerEstimatedDatesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailB2BLinesInnerEstimatedDatesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `ship` + if (jsonObj.get("ship") != null && !jsonObj.get("ship").isJsonNull()) { + OrderDetailB2BLinesInnerEstimatedDatesInnerShip.validateJsonElement(jsonObj.get("ship")); + } + // validate the optional field `delivery` + if (jsonObj.get("delivery") != null && !jsonObj.get("delivery").isJsonNull()) { + OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery.validateJsonElement(jsonObj.get("delivery")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailB2BLinesInnerEstimatedDatesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailB2BLinesInnerEstimatedDatesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailB2BLinesInnerEstimatedDatesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailB2BLinesInnerEstimatedDatesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailB2BLinesInnerEstimatedDatesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailB2BLinesInnerEstimatedDatesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailB2BLinesInnerEstimatedDatesInner + * @throws IOException if the JSON string is invalid with respect to OrderDetailB2BLinesInnerEstimatedDatesInner + */ + public static OrderDetailB2BLinesInnerEstimatedDatesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailB2BLinesInnerEstimatedDatesInner.class); + } + + /** + * Convert an instance of OrderDetailB2BLinesInnerEstimatedDatesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery.java b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery.java new file mode 100644 index 00000000..00d50185 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery.java @@ -0,0 +1,324 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery { + public static final String SERIALIZED_NAME_DELIVERY_DATE_TYPE = "deliveryDateType"; + @SerializedName(SERIALIZED_NAME_DELIVERY_DATE_TYPE) + private String deliveryDateType; + + public static final String SERIALIZED_NAME_DELIVERY_DATE_RANGE = "deliveryDateRange"; + @SerializedName(SERIALIZED_NAME_DELIVERY_DATE_RANGE) + private OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange deliveryDateRange; + + public static final String SERIALIZED_NAME_DELIVERY_SOURCE = "deliverySource"; + @SerializedName(SERIALIZED_NAME_DELIVERY_SOURCE) + private String deliverySource; + + public static final String SERIALIZED_NAME_DELIVERY_DESCRIPTION = "deliveryDescription"; + @SerializedName(SERIALIZED_NAME_DELIVERY_DESCRIPTION) + private String deliveryDescription; + + public static final String SERIALIZED_NAME_DELIVERED_DATE = "deliveredDate"; + @SerializedName(SERIALIZED_NAME_DELIVERED_DATE) + private String deliveredDate; + + public OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery() { + } + + public OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery deliveryDateType(String deliveryDateType) { + this.deliveryDateType = deliveryDateType; + return this; + } + + /** + * Date type. Example Single or multiple dates. + * @return deliveryDateType + **/ + @javax.annotation.Nullable + public String getDeliveryDateType() { + return deliveryDateType; + } + + public void setDeliveryDateType(String deliveryDateType) { + this.deliveryDateType = deliveryDateType; + } + + + public OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery deliveryDateRange(OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange deliveryDateRange) { + this.deliveryDateRange = deliveryDateRange; + return this; + } + + /** + * Get deliveryDateRange + * @return deliveryDateRange + **/ + @javax.annotation.Nullable + public OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange getDeliveryDateRange() { + return deliveryDateRange; + } + + public void setDeliveryDateRange(OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange deliveryDateRange) { + this.deliveryDateRange = deliveryDateRange; + } + + + public OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery deliverySource(String deliverySource) { + this.deliverySource = deliverySource; + return this; + } + + /** + * Source of the delivery. + * @return deliverySource + **/ + @javax.annotation.Nullable + public String getDeliverySource() { + return deliverySource; + } + + public void setDeliverySource(String deliverySource) { + this.deliverySource = deliverySource; + } + + + public OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery deliveryDescription(String deliveryDescription) { + this.deliveryDescription = deliveryDescription; + return this; + } + + /** + * Delivery description. + * @return deliveryDescription + **/ + @javax.annotation.Nullable + public String getDeliveryDescription() { + return deliveryDescription; + } + + public void setDeliveryDescription(String deliveryDescription) { + this.deliveryDescription = deliveryDescription; + } + + + public OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery deliveredDate(String deliveredDate) { + this.deliveredDate = deliveredDate; + return this; + } + + /** + * Delivery date. + * @return deliveredDate + **/ + @javax.annotation.Nullable + public String getDeliveredDate() { + return deliveredDate; + } + + public void setDeliveredDate(String deliveredDate) { + this.deliveredDate = deliveredDate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery orderDetailB2BLinesInnerEstimatedDatesInnerDelivery = (OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery) o; + return Objects.equals(this.deliveryDateType, orderDetailB2BLinesInnerEstimatedDatesInnerDelivery.deliveryDateType) && + Objects.equals(this.deliveryDateRange, orderDetailB2BLinesInnerEstimatedDatesInnerDelivery.deliveryDateRange) && + Objects.equals(this.deliverySource, orderDetailB2BLinesInnerEstimatedDatesInnerDelivery.deliverySource) && + Objects.equals(this.deliveryDescription, orderDetailB2BLinesInnerEstimatedDatesInnerDelivery.deliveryDescription) && + Objects.equals(this.deliveredDate, orderDetailB2BLinesInnerEstimatedDatesInnerDelivery.deliveredDate); + } + + @Override + public int hashCode() { + return Objects.hash(deliveryDateType, deliveryDateRange, deliverySource, deliveryDescription, deliveredDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery {\n"); + sb.append(" deliveryDateType: ").append(toIndentedString(deliveryDateType)).append("\n"); + sb.append(" deliveryDateRange: ").append(toIndentedString(deliveryDateRange)).append("\n"); + sb.append(" deliverySource: ").append(toIndentedString(deliverySource)).append("\n"); + sb.append(" deliveryDescription: ").append(toIndentedString(deliveryDescription)).append("\n"); + sb.append(" deliveredDate: ").append(toIndentedString(deliveredDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("deliveryDateType"); + openapiFields.add("deliveryDateRange"); + openapiFields.add("deliverySource"); + openapiFields.add("deliveryDescription"); + openapiFields.add("deliveredDate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery is not found in the empty JSON string", OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("deliveryDateType") != null && !jsonObj.get("deliveryDateType").isJsonNull()) && !jsonObj.get("deliveryDateType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `deliveryDateType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deliveryDateType").toString())); + } + // validate the optional field `deliveryDateRange` + if (jsonObj.get("deliveryDateRange") != null && !jsonObj.get("deliveryDateRange").isJsonNull()) { + OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange.validateJsonElement(jsonObj.get("deliveryDateRange")); + } + if ((jsonObj.get("deliverySource") != null && !jsonObj.get("deliverySource").isJsonNull()) && !jsonObj.get("deliverySource").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `deliverySource` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deliverySource").toString())); + } + if ((jsonObj.get("deliveryDescription") != null && !jsonObj.get("deliveryDescription").isJsonNull()) && !jsonObj.get("deliveryDescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `deliveryDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deliveryDescription").toString())); + } + if ((jsonObj.get("deliveredDate") != null && !jsonObj.get("deliveredDate").isJsonNull()) && !jsonObj.get("deliveredDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `deliveredDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deliveredDate").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery + * @throws IOException if the JSON string is invalid with respect to OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery + */ + public static OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery.class); + } + + /** + * Convert an instance of OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange.java b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange.java new file mode 100644 index 00000000..88638d09 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Delivery date range. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange { + public static final String SERIALIZED_NAME_START_DATE = "startDate"; + @SerializedName(SERIALIZED_NAME_START_DATE) + private String startDate; + + public static final String SERIALIZED_NAME_END_DATE = "endDate"; + @SerializedName(SERIALIZED_NAME_END_DATE) + private String endDate; + + public OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange() { + } + + public OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange startDate(String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Start Date. + * @return startDate + **/ + @javax.annotation.Nullable + public String getStartDate() { + return startDate; + } + + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + + public OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange endDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * End Date. + * @return endDate + **/ + @javax.annotation.Nullable + public String getEndDate() { + return endDate; + } + + public void setEndDate(String endDate) { + this.endDate = endDate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange orderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange = (OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange) o; + return Objects.equals(this.startDate, orderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange.startDate) && + Objects.equals(this.endDate, orderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange.endDate); + } + + @Override + public int hashCode() { + return Objects.hash(startDate, endDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange {\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("startDate"); + openapiFields.add("endDate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange is not found in the empty JSON string", OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("startDate") != null && !jsonObj.get("startDate").isJsonNull()) && !jsonObj.get("startDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `startDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("startDate").toString())); + } + if ((jsonObj.get("endDate") != null && !jsonObj.get("endDate").isJsonNull()) && !jsonObj.get("endDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endDate").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange + * @throws IOException if the JSON string is invalid with respect to OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange + */ + public static OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange.class); + } + + /** + * Convert an instance of OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerShip.java b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerShip.java new file mode 100644 index 00000000..f81acdf2 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerShip.java @@ -0,0 +1,324 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailB2BLinesInnerEstimatedDatesInnerShip + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailB2BLinesInnerEstimatedDatesInnerShip { + public static final String SERIALIZED_NAME_SHIP_DATE_TYPE = "shipDateType"; + @SerializedName(SERIALIZED_NAME_SHIP_DATE_TYPE) + private String shipDateType; + + public static final String SERIALIZED_NAME_SHIP_DATE_RANGE = "shipDateRange"; + @SerializedName(SERIALIZED_NAME_SHIP_DATE_RANGE) + private OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange shipDateRange; + + public static final String SERIALIZED_NAME_SHIP_SOURCE = "shipSource"; + @SerializedName(SERIALIZED_NAME_SHIP_SOURCE) + private String shipSource; + + public static final String SERIALIZED_NAME_SHIP_DESCRIPTION = "shipDescription"; + @SerializedName(SERIALIZED_NAME_SHIP_DESCRIPTION) + private String shipDescription; + + public static final String SERIALIZED_NAME_SHIP_DATE = "shipDate"; + @SerializedName(SERIALIZED_NAME_SHIP_DATE) + private String shipDate; + + public OrderDetailB2BLinesInnerEstimatedDatesInnerShip() { + } + + public OrderDetailB2BLinesInnerEstimatedDatesInnerShip shipDateType(String shipDateType) { + this.shipDateType = shipDateType; + return this; + } + + /** + * Date type. Example Single or multiple dates. + * @return shipDateType + **/ + @javax.annotation.Nullable + public String getShipDateType() { + return shipDateType; + } + + public void setShipDateType(String shipDateType) { + this.shipDateType = shipDateType; + } + + + public OrderDetailB2BLinesInnerEstimatedDatesInnerShip shipDateRange(OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange shipDateRange) { + this.shipDateRange = shipDateRange; + return this; + } + + /** + * Get shipDateRange + * @return shipDateRange + **/ + @javax.annotation.Nullable + public OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange getShipDateRange() { + return shipDateRange; + } + + public void setShipDateRange(OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange shipDateRange) { + this.shipDateRange = shipDateRange; + } + + + public OrderDetailB2BLinesInnerEstimatedDatesInnerShip shipSource(String shipSource) { + this.shipSource = shipSource; + return this; + } + + /** + * Source of the shipment. + * @return shipSource + **/ + @javax.annotation.Nullable + public String getShipSource() { + return shipSource; + } + + public void setShipSource(String shipSource) { + this.shipSource = shipSource; + } + + + public OrderDetailB2BLinesInnerEstimatedDatesInnerShip shipDescription(String shipDescription) { + this.shipDescription = shipDescription; + return this; + } + + /** + * Shipment description. + * @return shipDescription + **/ + @javax.annotation.Nullable + public String getShipDescription() { + return shipDescription; + } + + public void setShipDescription(String shipDescription) { + this.shipDescription = shipDescription; + } + + + public OrderDetailB2BLinesInnerEstimatedDatesInnerShip shipDate(String shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Ship date. + * @return shipDate + **/ + @javax.annotation.Nullable + public String getShipDate() { + return shipDate; + } + + public void setShipDate(String shipDate) { + this.shipDate = shipDate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailB2BLinesInnerEstimatedDatesInnerShip orderDetailB2BLinesInnerEstimatedDatesInnerShip = (OrderDetailB2BLinesInnerEstimatedDatesInnerShip) o; + return Objects.equals(this.shipDateType, orderDetailB2BLinesInnerEstimatedDatesInnerShip.shipDateType) && + Objects.equals(this.shipDateRange, orderDetailB2BLinesInnerEstimatedDatesInnerShip.shipDateRange) && + Objects.equals(this.shipSource, orderDetailB2BLinesInnerEstimatedDatesInnerShip.shipSource) && + Objects.equals(this.shipDescription, orderDetailB2BLinesInnerEstimatedDatesInnerShip.shipDescription) && + Objects.equals(this.shipDate, orderDetailB2BLinesInnerEstimatedDatesInnerShip.shipDate); + } + + @Override + public int hashCode() { + return Objects.hash(shipDateType, shipDateRange, shipSource, shipDescription, shipDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailB2BLinesInnerEstimatedDatesInnerShip {\n"); + sb.append(" shipDateType: ").append(toIndentedString(shipDateType)).append("\n"); + sb.append(" shipDateRange: ").append(toIndentedString(shipDateRange)).append("\n"); + sb.append(" shipSource: ").append(toIndentedString(shipSource)).append("\n"); + sb.append(" shipDescription: ").append(toIndentedString(shipDescription)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("shipDateType"); + openapiFields.add("shipDateRange"); + openapiFields.add("shipSource"); + openapiFields.add("shipDescription"); + openapiFields.add("shipDate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailB2BLinesInnerEstimatedDatesInnerShip + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailB2BLinesInnerEstimatedDatesInnerShip.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailB2BLinesInnerEstimatedDatesInnerShip is not found in the empty JSON string", OrderDetailB2BLinesInnerEstimatedDatesInnerShip.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailB2BLinesInnerEstimatedDatesInnerShip.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailB2BLinesInnerEstimatedDatesInnerShip` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("shipDateType") != null && !jsonObj.get("shipDateType").isJsonNull()) && !jsonObj.get("shipDateType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shipDateType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shipDateType").toString())); + } + // validate the optional field `shipDateRange` + if (jsonObj.get("shipDateRange") != null && !jsonObj.get("shipDateRange").isJsonNull()) { + OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange.validateJsonElement(jsonObj.get("shipDateRange")); + } + if ((jsonObj.get("shipSource") != null && !jsonObj.get("shipSource").isJsonNull()) && !jsonObj.get("shipSource").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shipSource` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shipSource").toString())); + } + if ((jsonObj.get("shipDescription") != null && !jsonObj.get("shipDescription").isJsonNull()) && !jsonObj.get("shipDescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shipDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shipDescription").toString())); + } + if ((jsonObj.get("shipDate") != null && !jsonObj.get("shipDate").isJsonNull()) && !jsonObj.get("shipDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shipDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shipDate").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailB2BLinesInnerEstimatedDatesInnerShip.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailB2BLinesInnerEstimatedDatesInnerShip' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailB2BLinesInnerEstimatedDatesInnerShip.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailB2BLinesInnerEstimatedDatesInnerShip value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailB2BLinesInnerEstimatedDatesInnerShip read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailB2BLinesInnerEstimatedDatesInnerShip given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailB2BLinesInnerEstimatedDatesInnerShip + * @throws IOException if the JSON string is invalid with respect to OrderDetailB2BLinesInnerEstimatedDatesInnerShip + */ + public static OrderDetailB2BLinesInnerEstimatedDatesInnerShip fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailB2BLinesInnerEstimatedDatesInnerShip.class); + } + + /** + * Convert an instance of OrderDetailB2BLinesInnerEstimatedDatesInnerShip to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange.java b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange.java new file mode 100644 index 00000000..239462c2 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange { + public static final String SERIALIZED_NAME_START_DATE = "startDate"; + @SerializedName(SERIALIZED_NAME_START_DATE) + private String startDate; + + public static final String SERIALIZED_NAME_END_DATE = "endDate"; + @SerializedName(SERIALIZED_NAME_END_DATE) + private String endDate; + + public OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange() { + } + + public OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange startDate(String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Start Date. + * @return startDate + **/ + @javax.annotation.Nullable + public String getStartDate() { + return startDate; + } + + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + + public OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange endDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * End Date. + * @return endDate + **/ + @javax.annotation.Nullable + public String getEndDate() { + return endDate; + } + + public void setEndDate(String endDate) { + this.endDate = endDate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange orderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange = (OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange) o; + return Objects.equals(this.startDate, orderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange.startDate) && + Objects.equals(this.endDate, orderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange.endDate); + } + + @Override + public int hashCode() { + return Objects.hash(startDate, endDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange {\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("startDate"); + openapiFields.add("endDate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange is not found in the empty JSON string", OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("startDate") != null && !jsonObj.get("startDate").isJsonNull()) && !jsonObj.get("startDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `startDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("startDate").toString())); + } + if ((jsonObj.get("endDate") != null && !jsonObj.get("endDate").isJsonNull()) && !jsonObj.get("endDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endDate").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange + * @throws IOException if the JSON string is invalid with respect to OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange + */ + public static OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange.class); + } + + /** + * Convert an instance of OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerLinksInner.java b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerLinksInner.java new file mode 100644 index 00000000..771608be --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerLinksInner.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Link to Order Details for the line item. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailB2BLinesInnerLinksInner { + public static final String SERIALIZED_NAME_TOPIC = "topic"; + @SerializedName(SERIALIZED_NAME_TOPIC) + private String topic; + + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + private String href; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public OrderDetailB2BLinesInnerLinksInner() { + } + + public OrderDetailB2BLinesInnerLinksInner topic(String topic) { + this.topic = topic; + return this; + } + + /** + * Provides the details of the line item. + * @return topic + **/ + @javax.annotation.Nullable + public String getTopic() { + return topic; + } + + public void setTopic(String topic) { + this.topic = topic; + } + + + public OrderDetailB2BLinesInnerLinksInner href(String href) { + this.href = href; + return this; + } + + /** + * The API endpoint for accessing the relevant data. + * @return href + **/ + @javax.annotation.Nullable + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + + public OrderDetailB2BLinesInnerLinksInner type(String type) { + this.type = type; + return this; + } + + /** + * The type of call that can be made to the href link(GET,POST etc). + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailB2BLinesInnerLinksInner orderDetailB2BLinesInnerLinksInner = (OrderDetailB2BLinesInnerLinksInner) o; + return Objects.equals(this.topic, orderDetailB2BLinesInnerLinksInner.topic) && + Objects.equals(this.href, orderDetailB2BLinesInnerLinksInner.href) && + Objects.equals(this.type, orderDetailB2BLinesInnerLinksInner.type); + } + + @Override + public int hashCode() { + return Objects.hash(topic, href, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailB2BLinesInnerLinksInner {\n"); + sb.append(" topic: ").append(toIndentedString(topic)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("topic"); + openapiFields.add("href"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailB2BLinesInnerLinksInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailB2BLinesInnerLinksInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailB2BLinesInnerLinksInner is not found in the empty JSON string", OrderDetailB2BLinesInnerLinksInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailB2BLinesInnerLinksInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailB2BLinesInnerLinksInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("topic") != null && !jsonObj.get("topic").isJsonNull()) && !jsonObj.get("topic").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `topic` to be a primitive type in the JSON string but got `%s`", jsonObj.get("topic").toString())); + } + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailB2BLinesInnerLinksInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailB2BLinesInnerLinksInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailB2BLinesInnerLinksInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailB2BLinesInnerLinksInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailB2BLinesInnerLinksInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailB2BLinesInnerLinksInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailB2BLinesInnerLinksInner + * @throws IOException if the JSON string is invalid with respect to OrderDetailB2BLinesInnerLinksInner + */ + public static OrderDetailB2BLinesInnerLinksInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailB2BLinesInnerLinksInner.class); + } + + /** + * Convert an instance of OrderDetailB2BLinesInnerLinksInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerMultipleShipmentsInner.java b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerMultipleShipmentsInner.java new file mode 100644 index 00000000..dd039914 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerMultipleShipmentsInner.java @@ -0,0 +1,440 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailB2BLinesInnerMultipleShipmentsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailB2BLinesInnerMultipleShipmentsInner { + public static final String SERIALIZED_NAME_LINE_NUMBER = "lineNumber"; + @SerializedName(SERIALIZED_NAME_LINE_NUMBER) + private String lineNumber; + + public static final String SERIALIZED_NAME_REQUESTED_QUANTITY = "requestedQuantity"; + @SerializedName(SERIALIZED_NAME_REQUESTED_QUANTITY) + private String requestedQuantity; + + public static final String SERIALIZED_NAME_CONFIRMED_QUANTITY = "confirmedQuantity"; + @SerializedName(SERIALIZED_NAME_CONFIRMED_QUANTITY) + private String confirmedQuantity; + + public static final String SERIALIZED_NAME_DATA_TYPE = "dataType"; + @SerializedName(SERIALIZED_NAME_DATA_TYPE) + private String dataType; + + public static final String SERIALIZED_NAME_DATE_RANGE = "dateRange"; + @SerializedName(SERIALIZED_NAME_DATE_RANGE) + private OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange dateRange; + + public static final String SERIALIZED_NAME_SOURCE = "source"; + @SerializedName(SERIALIZED_NAME_SOURCE) + private String source; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_DATE = "date"; + @SerializedName(SERIALIZED_NAME_DATE) + private String date; + + public static final String SERIALIZED_NAME_DELIVERY_DATE = "deliveryDate"; + @SerializedName(SERIALIZED_NAME_DELIVERY_DATE) + private String deliveryDate; + + public OrderDetailB2BLinesInnerMultipleShipmentsInner() { + } + + public OrderDetailB2BLinesInnerMultipleShipmentsInner lineNumber(String lineNumber) { + this.lineNumber = lineNumber; + return this; + } + + /** + * Line number. + * @return lineNumber + **/ + @javax.annotation.Nullable + public String getLineNumber() { + return lineNumber; + } + + public void setLineNumber(String lineNumber) { + this.lineNumber = lineNumber; + } + + + public OrderDetailB2BLinesInnerMultipleShipmentsInner requestedQuantity(String requestedQuantity) { + this.requestedQuantity = requestedQuantity; + return this; + } + + /** + * Requested quantity. + * @return requestedQuantity + **/ + @javax.annotation.Nullable + public String getRequestedQuantity() { + return requestedQuantity; + } + + public void setRequestedQuantity(String requestedQuantity) { + this.requestedQuantity = requestedQuantity; + } + + + public OrderDetailB2BLinesInnerMultipleShipmentsInner confirmedQuantity(String confirmedQuantity) { + this.confirmedQuantity = confirmedQuantity; + return this; + } + + /** + * Confirmed quantity. + * @return confirmedQuantity + **/ + @javax.annotation.Nullable + public String getConfirmedQuantity() { + return confirmedQuantity; + } + + public void setConfirmedQuantity(String confirmedQuantity) { + this.confirmedQuantity = confirmedQuantity; + } + + + public OrderDetailB2BLinesInnerMultipleShipmentsInner dataType(String dataType) { + this.dataType = dataType; + return this; + } + + /** + * Date type. Example Single or multiple dates. + * @return dataType + **/ + @javax.annotation.Nullable + public String getDataType() { + return dataType; + } + + public void setDataType(String dataType) { + this.dataType = dataType; + } + + + public OrderDetailB2BLinesInnerMultipleShipmentsInner dateRange(OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange dateRange) { + this.dateRange = dateRange; + return this; + } + + /** + * Get dateRange + * @return dateRange + **/ + @javax.annotation.Nullable + public OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange getDateRange() { + return dateRange; + } + + public void setDateRange(OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange dateRange) { + this.dateRange = dateRange; + } + + + public OrderDetailB2BLinesInnerMultipleShipmentsInner source(String source) { + this.source = source; + return this; + } + + /** + * Source. + * @return source + **/ + @javax.annotation.Nullable + public String getSource() { + return source; + } + + public void setSource(String source) { + this.source = source; + } + + + public OrderDetailB2BLinesInnerMultipleShipmentsInner description(String description) { + this.description = description; + return this; + } + + /** + * Description. + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + + public OrderDetailB2BLinesInnerMultipleShipmentsInner date(String date) { + this.date = date; + return this; + } + + /** + * Date. + * @return date + **/ + @javax.annotation.Nullable + public String getDate() { + return date; + } + + public void setDate(String date) { + this.date = date; + } + + + public OrderDetailB2BLinesInnerMultipleShipmentsInner deliveryDate(String deliveryDate) { + this.deliveryDate = deliveryDate; + return this; + } + + /** + * Delivery date. + * @return deliveryDate + **/ + @javax.annotation.Nullable + public String getDeliveryDate() { + return deliveryDate; + } + + public void setDeliveryDate(String deliveryDate) { + this.deliveryDate = deliveryDate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailB2BLinesInnerMultipleShipmentsInner orderDetailB2BLinesInnerMultipleShipmentsInner = (OrderDetailB2BLinesInnerMultipleShipmentsInner) o; + return Objects.equals(this.lineNumber, orderDetailB2BLinesInnerMultipleShipmentsInner.lineNumber) && + Objects.equals(this.requestedQuantity, orderDetailB2BLinesInnerMultipleShipmentsInner.requestedQuantity) && + Objects.equals(this.confirmedQuantity, orderDetailB2BLinesInnerMultipleShipmentsInner.confirmedQuantity) && + Objects.equals(this.dataType, orderDetailB2BLinesInnerMultipleShipmentsInner.dataType) && + Objects.equals(this.dateRange, orderDetailB2BLinesInnerMultipleShipmentsInner.dateRange) && + Objects.equals(this.source, orderDetailB2BLinesInnerMultipleShipmentsInner.source) && + Objects.equals(this.description, orderDetailB2BLinesInnerMultipleShipmentsInner.description) && + Objects.equals(this.date, orderDetailB2BLinesInnerMultipleShipmentsInner.date) && + Objects.equals(this.deliveryDate, orderDetailB2BLinesInnerMultipleShipmentsInner.deliveryDate); + } + + @Override + public int hashCode() { + return Objects.hash(lineNumber, requestedQuantity, confirmedQuantity, dataType, dateRange, source, description, date, deliveryDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailB2BLinesInnerMultipleShipmentsInner {\n"); + sb.append(" lineNumber: ").append(toIndentedString(lineNumber)).append("\n"); + sb.append(" requestedQuantity: ").append(toIndentedString(requestedQuantity)).append("\n"); + sb.append(" confirmedQuantity: ").append(toIndentedString(confirmedQuantity)).append("\n"); + sb.append(" dataType: ").append(toIndentedString(dataType)).append("\n"); + sb.append(" dateRange: ").append(toIndentedString(dateRange)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" deliveryDate: ").append(toIndentedString(deliveryDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("lineNumber"); + openapiFields.add("requestedQuantity"); + openapiFields.add("confirmedQuantity"); + openapiFields.add("dataType"); + openapiFields.add("dateRange"); + openapiFields.add("source"); + openapiFields.add("description"); + openapiFields.add("date"); + openapiFields.add("deliveryDate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailB2BLinesInnerMultipleShipmentsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailB2BLinesInnerMultipleShipmentsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailB2BLinesInnerMultipleShipmentsInner is not found in the empty JSON string", OrderDetailB2BLinesInnerMultipleShipmentsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailB2BLinesInnerMultipleShipmentsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailB2BLinesInnerMultipleShipmentsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("lineNumber") != null && !jsonObj.get("lineNumber").isJsonNull()) && !jsonObj.get("lineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lineNumber").toString())); + } + if ((jsonObj.get("requestedQuantity") != null && !jsonObj.get("requestedQuantity").isJsonNull()) && !jsonObj.get("requestedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `requestedQuantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestedQuantity").toString())); + } + if ((jsonObj.get("confirmedQuantity") != null && !jsonObj.get("confirmedQuantity").isJsonNull()) && !jsonObj.get("confirmedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `confirmedQuantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("confirmedQuantity").toString())); + } + if ((jsonObj.get("dataType") != null && !jsonObj.get("dataType").isJsonNull()) && !jsonObj.get("dataType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `dataType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataType").toString())); + } + // validate the optional field `dateRange` + if (jsonObj.get("dateRange") != null && !jsonObj.get("dateRange").isJsonNull()) { + OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange.validateJsonElement(jsonObj.get("dateRange")); + } + if ((jsonObj.get("source") != null && !jsonObj.get("source").isJsonNull()) && !jsonObj.get("source").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `source` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("date") != null && !jsonObj.get("date").isJsonNull()) && !jsonObj.get("date").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `date` to be a primitive type in the JSON string but got `%s`", jsonObj.get("date").toString())); + } + if ((jsonObj.get("deliveryDate") != null && !jsonObj.get("deliveryDate").isJsonNull()) && !jsonObj.get("deliveryDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `deliveryDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deliveryDate").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailB2BLinesInnerMultipleShipmentsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailB2BLinesInnerMultipleShipmentsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailB2BLinesInnerMultipleShipmentsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailB2BLinesInnerMultipleShipmentsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailB2BLinesInnerMultipleShipmentsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailB2BLinesInnerMultipleShipmentsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailB2BLinesInnerMultipleShipmentsInner + * @throws IOException if the JSON string is invalid with respect to OrderDetailB2BLinesInnerMultipleShipmentsInner + */ + public static OrderDetailB2BLinesInnerMultipleShipmentsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailB2BLinesInnerMultipleShipmentsInner.class); + } + + /** + * Convert an instance of OrderDetailB2BLinesInnerMultipleShipmentsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerScheduleLinesInner.java b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerScheduleLinesInner.java new file mode 100644 index 00000000..eda998e2 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerScheduleLinesInner.java @@ -0,0 +1,322 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailB2BLinesInnerScheduleLinesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailB2BLinesInnerScheduleLinesInner { + public static final String SERIALIZED_NAME_LINE_NUMBER = "lineNumber"; + @SerializedName(SERIALIZED_NAME_LINE_NUMBER) + private String lineNumber; + + public static final String SERIALIZED_NAME_SCHEDULE_LINE_DATE = "scheduleLineDate"; + @SerializedName(SERIALIZED_NAME_SCHEDULE_LINE_DATE) + private String scheduleLineDate; + + public static final String SERIALIZED_NAME_REQUESTED_QUANTITY = "requestedQuantity"; + @SerializedName(SERIALIZED_NAME_REQUESTED_QUANTITY) + private String requestedQuantity; + + public static final String SERIALIZED_NAME_CONFIRMED_QUANTITY = "confirmedQuantity"; + @SerializedName(SERIALIZED_NAME_CONFIRMED_QUANTITY) + private String confirmedQuantity; + + public static final String SERIALIZED_NAME_GOODS_ISSUE_DATE = "goodsIssueDate"; + @SerializedName(SERIALIZED_NAME_GOODS_ISSUE_DATE) + private String goodsIssueDate; + + public OrderDetailB2BLinesInnerScheduleLinesInner() { + } + + public OrderDetailB2BLinesInnerScheduleLinesInner lineNumber(String lineNumber) { + this.lineNumber = lineNumber; + return this; + } + + /** + * Line number. + * @return lineNumber + **/ + @javax.annotation.Nullable + public String getLineNumber() { + return lineNumber; + } + + public void setLineNumber(String lineNumber) { + this.lineNumber = lineNumber; + } + + + public OrderDetailB2BLinesInnerScheduleLinesInner scheduleLineDate(String scheduleLineDate) { + this.scheduleLineDate = scheduleLineDate; + return this; + } + + /** + * schedule Line Date. + * @return scheduleLineDate + **/ + @javax.annotation.Nullable + public String getScheduleLineDate() { + return scheduleLineDate; + } + + public void setScheduleLineDate(String scheduleLineDate) { + this.scheduleLineDate = scheduleLineDate; + } + + + public OrderDetailB2BLinesInnerScheduleLinesInner requestedQuantity(String requestedQuantity) { + this.requestedQuantity = requestedQuantity; + return this; + } + + /** + * Requested quantity. + * @return requestedQuantity + **/ + @javax.annotation.Nullable + public String getRequestedQuantity() { + return requestedQuantity; + } + + public void setRequestedQuantity(String requestedQuantity) { + this.requestedQuantity = requestedQuantity; + } + + + public OrderDetailB2BLinesInnerScheduleLinesInner confirmedQuantity(String confirmedQuantity) { + this.confirmedQuantity = confirmedQuantity; + return this; + } + + /** + * Confirmed quantity. + * @return confirmedQuantity + **/ + @javax.annotation.Nullable + public String getConfirmedQuantity() { + return confirmedQuantity; + } + + public void setConfirmedQuantity(String confirmedQuantity) { + this.confirmedQuantity = confirmedQuantity; + } + + + public OrderDetailB2BLinesInnerScheduleLinesInner goodsIssueDate(String goodsIssueDate) { + this.goodsIssueDate = goodsIssueDate; + return this; + } + + /** + * Date when good issued. + * @return goodsIssueDate + **/ + @javax.annotation.Nullable + public String getGoodsIssueDate() { + return goodsIssueDate; + } + + public void setGoodsIssueDate(String goodsIssueDate) { + this.goodsIssueDate = goodsIssueDate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailB2BLinesInnerScheduleLinesInner orderDetailB2BLinesInnerScheduleLinesInner = (OrderDetailB2BLinesInnerScheduleLinesInner) o; + return Objects.equals(this.lineNumber, orderDetailB2BLinesInnerScheduleLinesInner.lineNumber) && + Objects.equals(this.scheduleLineDate, orderDetailB2BLinesInnerScheduleLinesInner.scheduleLineDate) && + Objects.equals(this.requestedQuantity, orderDetailB2BLinesInnerScheduleLinesInner.requestedQuantity) && + Objects.equals(this.confirmedQuantity, orderDetailB2BLinesInnerScheduleLinesInner.confirmedQuantity) && + Objects.equals(this.goodsIssueDate, orderDetailB2BLinesInnerScheduleLinesInner.goodsIssueDate); + } + + @Override + public int hashCode() { + return Objects.hash(lineNumber, scheduleLineDate, requestedQuantity, confirmedQuantity, goodsIssueDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailB2BLinesInnerScheduleLinesInner {\n"); + sb.append(" lineNumber: ").append(toIndentedString(lineNumber)).append("\n"); + sb.append(" scheduleLineDate: ").append(toIndentedString(scheduleLineDate)).append("\n"); + sb.append(" requestedQuantity: ").append(toIndentedString(requestedQuantity)).append("\n"); + sb.append(" confirmedQuantity: ").append(toIndentedString(confirmedQuantity)).append("\n"); + sb.append(" goodsIssueDate: ").append(toIndentedString(goodsIssueDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("lineNumber"); + openapiFields.add("scheduleLineDate"); + openapiFields.add("requestedQuantity"); + openapiFields.add("confirmedQuantity"); + openapiFields.add("goodsIssueDate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailB2BLinesInnerScheduleLinesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailB2BLinesInnerScheduleLinesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailB2BLinesInnerScheduleLinesInner is not found in the empty JSON string", OrderDetailB2BLinesInnerScheduleLinesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailB2BLinesInnerScheduleLinesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailB2BLinesInnerScheduleLinesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("lineNumber") != null && !jsonObj.get("lineNumber").isJsonNull()) && !jsonObj.get("lineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lineNumber").toString())); + } + if ((jsonObj.get("scheduleLineDate") != null && !jsonObj.get("scheduleLineDate").isJsonNull()) && !jsonObj.get("scheduleLineDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `scheduleLineDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scheduleLineDate").toString())); + } + if ((jsonObj.get("requestedQuantity") != null && !jsonObj.get("requestedQuantity").isJsonNull()) && !jsonObj.get("requestedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `requestedQuantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestedQuantity").toString())); + } + if ((jsonObj.get("confirmedQuantity") != null && !jsonObj.get("confirmedQuantity").isJsonNull()) && !jsonObj.get("confirmedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `confirmedQuantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("confirmedQuantity").toString())); + } + if ((jsonObj.get("goodsIssueDate") != null && !jsonObj.get("goodsIssueDate").isJsonNull()) && !jsonObj.get("goodsIssueDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `goodsIssueDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("goodsIssueDate").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailB2BLinesInnerScheduleLinesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailB2BLinesInnerScheduleLinesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailB2BLinesInnerScheduleLinesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailB2BLinesInnerScheduleLinesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailB2BLinesInnerScheduleLinesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailB2BLinesInnerScheduleLinesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailB2BLinesInnerScheduleLinesInner + * @throws IOException if the JSON string is invalid with respect to OrderDetailB2BLinesInnerScheduleLinesInner + */ + public static OrderDetailB2BLinesInnerScheduleLinesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailB2BLinesInnerScheduleLinesInner.class); + } + + /** + * Convert an instance of OrderDetailB2BLinesInnerScheduleLinesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfo.java b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfo.java new file mode 100644 index 00000000..e655ed58 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfo.java @@ -0,0 +1,270 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderDetailB2BLinesInnerServiceContractInfoContractInfo; +import xiresellers.client.model.OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo; +import xiresellers.client.model.OrderDetailB2BLinesInnerServiceContractInfoSubscriptions; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailB2BLinesInnerServiceContractInfo + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailB2BLinesInnerServiceContractInfo { + public static final String SERIALIZED_NAME_CONTRACT_INFO = "contractInfo"; + @SerializedName(SERIALIZED_NAME_CONTRACT_INFO) + private OrderDetailB2BLinesInnerServiceContractInfoContractInfo contractInfo; + + public static final String SERIALIZED_NAME_SUBSCRIPTIONS = "subscriptions"; + @SerializedName(SERIALIZED_NAME_SUBSCRIPTIONS) + private OrderDetailB2BLinesInnerServiceContractInfoSubscriptions subscriptions; + + public static final String SERIALIZED_NAME_LICENSE_INFO = "licenseInfo"; + @SerializedName(SERIALIZED_NAME_LICENSE_INFO) + private OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo licenseInfo; + + public OrderDetailB2BLinesInnerServiceContractInfo() { + } + + public OrderDetailB2BLinesInnerServiceContractInfo contractInfo(OrderDetailB2BLinesInnerServiceContractInfoContractInfo contractInfo) { + this.contractInfo = contractInfo; + return this; + } + + /** + * Get contractInfo + * @return contractInfo + **/ + @javax.annotation.Nullable + public OrderDetailB2BLinesInnerServiceContractInfoContractInfo getContractInfo() { + return contractInfo; + } + + public void setContractInfo(OrderDetailB2BLinesInnerServiceContractInfoContractInfo contractInfo) { + this.contractInfo = contractInfo; + } + + + public OrderDetailB2BLinesInnerServiceContractInfo subscriptions(OrderDetailB2BLinesInnerServiceContractInfoSubscriptions subscriptions) { + this.subscriptions = subscriptions; + return this; + } + + /** + * Get subscriptions + * @return subscriptions + **/ + @javax.annotation.Nullable + public OrderDetailB2BLinesInnerServiceContractInfoSubscriptions getSubscriptions() { + return subscriptions; + } + + public void setSubscriptions(OrderDetailB2BLinesInnerServiceContractInfoSubscriptions subscriptions) { + this.subscriptions = subscriptions; + } + + + public OrderDetailB2BLinesInnerServiceContractInfo licenseInfo(OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo licenseInfo) { + this.licenseInfo = licenseInfo; + return this; + } + + /** + * Get licenseInfo + * @return licenseInfo + **/ + @javax.annotation.Nullable + public OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo getLicenseInfo() { + return licenseInfo; + } + + public void setLicenseInfo(OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo licenseInfo) { + this.licenseInfo = licenseInfo; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailB2BLinesInnerServiceContractInfo orderDetailB2BLinesInnerServiceContractInfo = (OrderDetailB2BLinesInnerServiceContractInfo) o; + return Objects.equals(this.contractInfo, orderDetailB2BLinesInnerServiceContractInfo.contractInfo) && + Objects.equals(this.subscriptions, orderDetailB2BLinesInnerServiceContractInfo.subscriptions) && + Objects.equals(this.licenseInfo, orderDetailB2BLinesInnerServiceContractInfo.licenseInfo); + } + + @Override + public int hashCode() { + return Objects.hash(contractInfo, subscriptions, licenseInfo); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailB2BLinesInnerServiceContractInfo {\n"); + sb.append(" contractInfo: ").append(toIndentedString(contractInfo)).append("\n"); + sb.append(" subscriptions: ").append(toIndentedString(subscriptions)).append("\n"); + sb.append(" licenseInfo: ").append(toIndentedString(licenseInfo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("contractInfo"); + openapiFields.add("subscriptions"); + openapiFields.add("licenseInfo"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailB2BLinesInnerServiceContractInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailB2BLinesInnerServiceContractInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailB2BLinesInnerServiceContractInfo is not found in the empty JSON string", OrderDetailB2BLinesInnerServiceContractInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailB2BLinesInnerServiceContractInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailB2BLinesInnerServiceContractInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `contractInfo` + if (jsonObj.get("contractInfo") != null && !jsonObj.get("contractInfo").isJsonNull()) { + OrderDetailB2BLinesInnerServiceContractInfoContractInfo.validateJsonElement(jsonObj.get("contractInfo")); + } + // validate the optional field `subscriptions` + if (jsonObj.get("subscriptions") != null && !jsonObj.get("subscriptions").isJsonNull()) { + OrderDetailB2BLinesInnerServiceContractInfoSubscriptions.validateJsonElement(jsonObj.get("subscriptions")); + } + // validate the optional field `licenseInfo` + if (jsonObj.get("licenseInfo") != null && !jsonObj.get("licenseInfo").isJsonNull()) { + OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo.validateJsonElement(jsonObj.get("licenseInfo")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailB2BLinesInnerServiceContractInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailB2BLinesInnerServiceContractInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailB2BLinesInnerServiceContractInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailB2BLinesInnerServiceContractInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailB2BLinesInnerServiceContractInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailB2BLinesInnerServiceContractInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailB2BLinesInnerServiceContractInfo + * @throws IOException if the JSON string is invalid with respect to OrderDetailB2BLinesInnerServiceContractInfo + */ + public static OrderDetailB2BLinesInnerServiceContractInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailB2BLinesInnerServiceContractInfo.class); + } + + /** + * Convert an instance of OrderDetailB2BLinesInnerServiceContractInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoContractInfo.java b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoContractInfo.java new file mode 100644 index 00000000..8797ea13 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoContractInfo.java @@ -0,0 +1,351 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailB2BLinesInnerServiceContractInfoContractInfo + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailB2BLinesInnerServiceContractInfoContractInfo { + public static final String SERIALIZED_NAME_CONTRACT_DESCRIPTION = "contractDescription"; + @SerializedName(SERIALIZED_NAME_CONTRACT_DESCRIPTION) + private String contractDescription; + + public static final String SERIALIZED_NAME_CONTRACT_NUMBER = "contractNumber"; + @SerializedName(SERIALIZED_NAME_CONTRACT_NUMBER) + private String contractNumber; + + public static final String SERIALIZED_NAME_CONTRACT_STATUS = "contractStatus"; + @SerializedName(SERIALIZED_NAME_CONTRACT_STATUS) + private String contractStatus; + + public static final String SERIALIZED_NAME_CONTRACT_START_DATE = "contractStartDate"; + @SerializedName(SERIALIZED_NAME_CONTRACT_START_DATE) + private String contractStartDate; + + public static final String SERIALIZED_NAME_CONTRACT_END_DATE = "contractEndDate"; + @SerializedName(SERIALIZED_NAME_CONTRACT_END_DATE) + private String contractEndDate; + + public static final String SERIALIZED_NAME_CONTRACT_DURATION = "contractDuration"; + @SerializedName(SERIALIZED_NAME_CONTRACT_DURATION) + private String contractDuration; + + public OrderDetailB2BLinesInnerServiceContractInfoContractInfo() { + } + + public OrderDetailB2BLinesInnerServiceContractInfoContractInfo contractDescription(String contractDescription) { + this.contractDescription = contractDescription; + return this; + } + + /** + * The description of the contract. + * @return contractDescription + **/ + @javax.annotation.Nullable + public String getContractDescription() { + return contractDescription; + } + + public void setContractDescription(String contractDescription) { + this.contractDescription = contractDescription; + } + + + public OrderDetailB2BLinesInnerServiceContractInfoContractInfo contractNumber(String contractNumber) { + this.contractNumber = contractNumber; + return this; + } + + /** + * Contract number. + * @return contractNumber + **/ + @javax.annotation.Nullable + public String getContractNumber() { + return contractNumber; + } + + public void setContractNumber(String contractNumber) { + this.contractNumber = contractNumber; + } + + + public OrderDetailB2BLinesInnerServiceContractInfoContractInfo contractStatus(String contractStatus) { + this.contractStatus = contractStatus; + return this; + } + + /** + * The status of the contract. + * @return contractStatus + **/ + @javax.annotation.Nullable + public String getContractStatus() { + return contractStatus; + } + + public void setContractStatus(String contractStatus) { + this.contractStatus = contractStatus; + } + + + public OrderDetailB2BLinesInnerServiceContractInfoContractInfo contractStartDate(String contractStartDate) { + this.contractStartDate = contractStartDate; + return this; + } + + /** + * Start date of the contract. + * @return contractStartDate + **/ + @javax.annotation.Nullable + public String getContractStartDate() { + return contractStartDate; + } + + public void setContractStartDate(String contractStartDate) { + this.contractStartDate = contractStartDate; + } + + + public OrderDetailB2BLinesInnerServiceContractInfoContractInfo contractEndDate(String contractEndDate) { + this.contractEndDate = contractEndDate; + return this; + } + + /** + * End date of the contract. + * @return contractEndDate + **/ + @javax.annotation.Nullable + public String getContractEndDate() { + return contractEndDate; + } + + public void setContractEndDate(String contractEndDate) { + this.contractEndDate = contractEndDate; + } + + + public OrderDetailB2BLinesInnerServiceContractInfoContractInfo contractDuration(String contractDuration) { + this.contractDuration = contractDuration; + return this; + } + + /** + * The duration of the contract. + * @return contractDuration + **/ + @javax.annotation.Nullable + public String getContractDuration() { + return contractDuration; + } + + public void setContractDuration(String contractDuration) { + this.contractDuration = contractDuration; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailB2BLinesInnerServiceContractInfoContractInfo orderDetailB2BLinesInnerServiceContractInfoContractInfo = (OrderDetailB2BLinesInnerServiceContractInfoContractInfo) o; + return Objects.equals(this.contractDescription, orderDetailB2BLinesInnerServiceContractInfoContractInfo.contractDescription) && + Objects.equals(this.contractNumber, orderDetailB2BLinesInnerServiceContractInfoContractInfo.contractNumber) && + Objects.equals(this.contractStatus, orderDetailB2BLinesInnerServiceContractInfoContractInfo.contractStatus) && + Objects.equals(this.contractStartDate, orderDetailB2BLinesInnerServiceContractInfoContractInfo.contractStartDate) && + Objects.equals(this.contractEndDate, orderDetailB2BLinesInnerServiceContractInfoContractInfo.contractEndDate) && + Objects.equals(this.contractDuration, orderDetailB2BLinesInnerServiceContractInfoContractInfo.contractDuration); + } + + @Override + public int hashCode() { + return Objects.hash(contractDescription, contractNumber, contractStatus, contractStartDate, contractEndDate, contractDuration); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailB2BLinesInnerServiceContractInfoContractInfo {\n"); + sb.append(" contractDescription: ").append(toIndentedString(contractDescription)).append("\n"); + sb.append(" contractNumber: ").append(toIndentedString(contractNumber)).append("\n"); + sb.append(" contractStatus: ").append(toIndentedString(contractStatus)).append("\n"); + sb.append(" contractStartDate: ").append(toIndentedString(contractStartDate)).append("\n"); + sb.append(" contractEndDate: ").append(toIndentedString(contractEndDate)).append("\n"); + sb.append(" contractDuration: ").append(toIndentedString(contractDuration)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("contractDescription"); + openapiFields.add("contractNumber"); + openapiFields.add("contractStatus"); + openapiFields.add("contractStartDate"); + openapiFields.add("contractEndDate"); + openapiFields.add("contractDuration"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailB2BLinesInnerServiceContractInfoContractInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailB2BLinesInnerServiceContractInfoContractInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailB2BLinesInnerServiceContractInfoContractInfo is not found in the empty JSON string", OrderDetailB2BLinesInnerServiceContractInfoContractInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailB2BLinesInnerServiceContractInfoContractInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailB2BLinesInnerServiceContractInfoContractInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("contractDescription") != null && !jsonObj.get("contractDescription").isJsonNull()) && !jsonObj.get("contractDescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contractDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contractDescription").toString())); + } + if ((jsonObj.get("contractNumber") != null && !jsonObj.get("contractNumber").isJsonNull()) && !jsonObj.get("contractNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contractNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contractNumber").toString())); + } + if ((jsonObj.get("contractStatus") != null && !jsonObj.get("contractStatus").isJsonNull()) && !jsonObj.get("contractStatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contractStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contractStatus").toString())); + } + if ((jsonObj.get("contractStartDate") != null && !jsonObj.get("contractStartDate").isJsonNull()) && !jsonObj.get("contractStartDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contractStartDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contractStartDate").toString())); + } + if ((jsonObj.get("contractEndDate") != null && !jsonObj.get("contractEndDate").isJsonNull()) && !jsonObj.get("contractEndDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contractEndDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contractEndDate").toString())); + } + if ((jsonObj.get("contractDuration") != null && !jsonObj.get("contractDuration").isJsonNull()) && !jsonObj.get("contractDuration").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contractDuration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contractDuration").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailB2BLinesInnerServiceContractInfoContractInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailB2BLinesInnerServiceContractInfoContractInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailB2BLinesInnerServiceContractInfoContractInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailB2BLinesInnerServiceContractInfoContractInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailB2BLinesInnerServiceContractInfoContractInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailB2BLinesInnerServiceContractInfoContractInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailB2BLinesInnerServiceContractInfoContractInfo + * @throws IOException if the JSON string is invalid with respect to OrderDetailB2BLinesInnerServiceContractInfoContractInfo + */ + public static OrderDetailB2BLinesInnerServiceContractInfoContractInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailB2BLinesInnerServiceContractInfoContractInfo.class); + } + + /** + * Convert an instance of OrderDetailB2BLinesInnerServiceContractInfoContractInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo.java b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo.java new file mode 100644 index 00000000..719354fa --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo.java @@ -0,0 +1,345 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo { + public static final String SERIALIZED_NAME_LICENSE_NUMBER = "licenseNumber"; + @SerializedName(SERIALIZED_NAME_LICENSE_NUMBER) + private List licenseNumber; + + public static final String SERIALIZED_NAME_LICENSE_START_DATE = "licenseStartDate"; + @SerializedName(SERIALIZED_NAME_LICENSE_START_DATE) + private String licenseStartDate; + + public static final String SERIALIZED_NAME_LICENSE_END_DATE = "licenseEndDate"; + @SerializedName(SERIALIZED_NAME_LICENSE_END_DATE) + private String licenseEndDate; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + @SerializedName(SERIALIZED_NAME_QUANTITY) + private String quantity; + + public OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo() { + } + + public OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo licenseNumber(List licenseNumber) { + this.licenseNumber = licenseNumber; + return this; + } + + public OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo addLicenseNumberItem(String licenseNumberItem) { + if (this.licenseNumber == null) { + this.licenseNumber = new ArrayList<>(); + } + this.licenseNumber.add(licenseNumberItem); + return this; + } + + /** + * License numbers. + * @return licenseNumber + **/ + @javax.annotation.Nullable + public List getLicenseNumber() { + return licenseNumber; + } + + public void setLicenseNumber(List licenseNumber) { + this.licenseNumber = licenseNumber; + } + + + public OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo licenseStartDate(String licenseStartDate) { + this.licenseStartDate = licenseStartDate; + return this; + } + + /** + * Start Date of the license. + * @return licenseStartDate + **/ + @javax.annotation.Nullable + public String getLicenseStartDate() { + return licenseStartDate; + } + + public void setLicenseStartDate(String licenseStartDate) { + this.licenseStartDate = licenseStartDate; + } + + + public OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo licenseEndDate(String licenseEndDate) { + this.licenseEndDate = licenseEndDate; + return this; + } + + /** + * End Date of the license. + * @return licenseEndDate + **/ + @javax.annotation.Nullable + public String getLicenseEndDate() { + return licenseEndDate; + } + + public void setLicenseEndDate(String licenseEndDate) { + this.licenseEndDate = licenseEndDate; + } + + + public OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo description(String description) { + this.description = description; + return this; + } + + /** + * Description of the license. + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + + public OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo quantity(String quantity) { + this.quantity = quantity; + return this; + } + + /** + * Quantity of the license. + * @return quantity + **/ + @javax.annotation.Nullable + public String getQuantity() { + return quantity; + } + + public void setQuantity(String quantity) { + this.quantity = quantity; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo orderDetailB2BLinesInnerServiceContractInfoLicenseInfo = (OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo) o; + return Objects.equals(this.licenseNumber, orderDetailB2BLinesInnerServiceContractInfoLicenseInfo.licenseNumber) && + Objects.equals(this.licenseStartDate, orderDetailB2BLinesInnerServiceContractInfoLicenseInfo.licenseStartDate) && + Objects.equals(this.licenseEndDate, orderDetailB2BLinesInnerServiceContractInfoLicenseInfo.licenseEndDate) && + Objects.equals(this.description, orderDetailB2BLinesInnerServiceContractInfoLicenseInfo.description) && + Objects.equals(this.quantity, orderDetailB2BLinesInnerServiceContractInfoLicenseInfo.quantity); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(licenseNumber, licenseStartDate, licenseEndDate, description, quantity); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo {\n"); + sb.append(" licenseNumber: ").append(toIndentedString(licenseNumber)).append("\n"); + sb.append(" licenseStartDate: ").append(toIndentedString(licenseStartDate)).append("\n"); + sb.append(" licenseEndDate: ").append(toIndentedString(licenseEndDate)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("licenseNumber"); + openapiFields.add("licenseStartDate"); + openapiFields.add("licenseEndDate"); + openapiFields.add("description"); + openapiFields.add("quantity"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo is not found in the empty JSON string", OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("licenseNumber") != null && !jsonObj.get("licenseNumber").isJsonNull() && !jsonObj.get("licenseNumber").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `licenseNumber` to be an array in the JSON string but got `%s`", jsonObj.get("licenseNumber").toString())); + } + if ((jsonObj.get("licenseStartDate") != null && !jsonObj.get("licenseStartDate").isJsonNull()) && !jsonObj.get("licenseStartDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `licenseStartDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("licenseStartDate").toString())); + } + if ((jsonObj.get("licenseEndDate") != null && !jsonObj.get("licenseEndDate").isJsonNull()) && !jsonObj.get("licenseEndDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `licenseEndDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("licenseEndDate").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("quantity") != null && !jsonObj.get("quantity").isJsonNull()) && !jsonObj.get("quantity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quantity").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo + * @throws IOException if the JSON string is invalid with respect to OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo + */ + public static OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo.class); + } + + /** + * Convert an instance of OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoSubscriptions.java b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoSubscriptions.java new file mode 100644 index 00000000..ed70c974 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoSubscriptions.java @@ -0,0 +1,351 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailB2BLinesInnerServiceContractInfoSubscriptions + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailB2BLinesInnerServiceContractInfoSubscriptions { + public static final String SERIALIZED_NAME_SUBSCRIPTION_ID = "subscriptionId"; + @SerializedName(SERIALIZED_NAME_SUBSCRIPTION_ID) + private String subscriptionId; + + public static final String SERIALIZED_NAME_SUBSCRIPTION_TERM = "subscriptionTerm"; + @SerializedName(SERIALIZED_NAME_SUBSCRIPTION_TERM) + private String subscriptionTerm; + + public static final String SERIALIZED_NAME_RENEWAL_TERM = "renewalTerm"; + @SerializedName(SERIALIZED_NAME_RENEWAL_TERM) + private String renewalTerm; + + public static final String SERIALIZED_NAME_BILLING_MODEL = "billingModel"; + @SerializedName(SERIALIZED_NAME_BILLING_MODEL) + private String billingModel; + + public static final String SERIALIZED_NAME_SUBCRIPTION_START_DATE = "subcriptionStartDate"; + @SerializedName(SERIALIZED_NAME_SUBCRIPTION_START_DATE) + private String subcriptionStartDate; + + public static final String SERIALIZED_NAME_SUBCRIPTION_END_DATE = "subcriptionEndDate"; + @SerializedName(SERIALIZED_NAME_SUBCRIPTION_END_DATE) + private String subcriptionEndDate; + + public OrderDetailB2BLinesInnerServiceContractInfoSubscriptions() { + } + + public OrderDetailB2BLinesInnerServiceContractInfoSubscriptions subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * The ID of the subscription. + * @return subscriptionId + **/ + @javax.annotation.Nullable + public String getSubscriptionId() { + return subscriptionId; + } + + public void setSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + } + + + public OrderDetailB2BLinesInnerServiceContractInfoSubscriptions subscriptionTerm(String subscriptionTerm) { + this.subscriptionTerm = subscriptionTerm; + return this; + } + + /** + * The term of the subscription. + * @return subscriptionTerm + **/ + @javax.annotation.Nullable + public String getSubscriptionTerm() { + return subscriptionTerm; + } + + public void setSubscriptionTerm(String subscriptionTerm) { + this.subscriptionTerm = subscriptionTerm; + } + + + public OrderDetailB2BLinesInnerServiceContractInfoSubscriptions renewalTerm(String renewalTerm) { + this.renewalTerm = renewalTerm; + return this; + } + + /** + * The renewal term of the subscription. + * @return renewalTerm + **/ + @javax.annotation.Nullable + public String getRenewalTerm() { + return renewalTerm; + } + + public void setRenewalTerm(String renewalTerm) { + this.renewalTerm = renewalTerm; + } + + + public OrderDetailB2BLinesInnerServiceContractInfoSubscriptions billingModel(String billingModel) { + this.billingModel = billingModel; + return this; + } + + /** + * The billing model of the billing. + * @return billingModel + **/ + @javax.annotation.Nullable + public String getBillingModel() { + return billingModel; + } + + public void setBillingModel(String billingModel) { + this.billingModel = billingModel; + } + + + public OrderDetailB2BLinesInnerServiceContractInfoSubscriptions subcriptionStartDate(String subcriptionStartDate) { + this.subcriptionStartDate = subcriptionStartDate; + return this; + } + + /** + * Start date of the subcription. + * @return subcriptionStartDate + **/ + @javax.annotation.Nullable + public String getSubcriptionStartDate() { + return subcriptionStartDate; + } + + public void setSubcriptionStartDate(String subcriptionStartDate) { + this.subcriptionStartDate = subcriptionStartDate; + } + + + public OrderDetailB2BLinesInnerServiceContractInfoSubscriptions subcriptionEndDate(String subcriptionEndDate) { + this.subcriptionEndDate = subcriptionEndDate; + return this; + } + + /** + * End date of the subcription. + * @return subcriptionEndDate + **/ + @javax.annotation.Nullable + public String getSubcriptionEndDate() { + return subcriptionEndDate; + } + + public void setSubcriptionEndDate(String subcriptionEndDate) { + this.subcriptionEndDate = subcriptionEndDate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailB2BLinesInnerServiceContractInfoSubscriptions orderDetailB2BLinesInnerServiceContractInfoSubscriptions = (OrderDetailB2BLinesInnerServiceContractInfoSubscriptions) o; + return Objects.equals(this.subscriptionId, orderDetailB2BLinesInnerServiceContractInfoSubscriptions.subscriptionId) && + Objects.equals(this.subscriptionTerm, orderDetailB2BLinesInnerServiceContractInfoSubscriptions.subscriptionTerm) && + Objects.equals(this.renewalTerm, orderDetailB2BLinesInnerServiceContractInfoSubscriptions.renewalTerm) && + Objects.equals(this.billingModel, orderDetailB2BLinesInnerServiceContractInfoSubscriptions.billingModel) && + Objects.equals(this.subcriptionStartDate, orderDetailB2BLinesInnerServiceContractInfoSubscriptions.subcriptionStartDate) && + Objects.equals(this.subcriptionEndDate, orderDetailB2BLinesInnerServiceContractInfoSubscriptions.subcriptionEndDate); + } + + @Override + public int hashCode() { + return Objects.hash(subscriptionId, subscriptionTerm, renewalTerm, billingModel, subcriptionStartDate, subcriptionEndDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailB2BLinesInnerServiceContractInfoSubscriptions {\n"); + sb.append(" subscriptionId: ").append(toIndentedString(subscriptionId)).append("\n"); + sb.append(" subscriptionTerm: ").append(toIndentedString(subscriptionTerm)).append("\n"); + sb.append(" renewalTerm: ").append(toIndentedString(renewalTerm)).append("\n"); + sb.append(" billingModel: ").append(toIndentedString(billingModel)).append("\n"); + sb.append(" subcriptionStartDate: ").append(toIndentedString(subcriptionStartDate)).append("\n"); + sb.append(" subcriptionEndDate: ").append(toIndentedString(subcriptionEndDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("subscriptionId"); + openapiFields.add("subscriptionTerm"); + openapiFields.add("renewalTerm"); + openapiFields.add("billingModel"); + openapiFields.add("subcriptionStartDate"); + openapiFields.add("subcriptionEndDate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailB2BLinesInnerServiceContractInfoSubscriptions + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailB2BLinesInnerServiceContractInfoSubscriptions.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailB2BLinesInnerServiceContractInfoSubscriptions is not found in the empty JSON string", OrderDetailB2BLinesInnerServiceContractInfoSubscriptions.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailB2BLinesInnerServiceContractInfoSubscriptions.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailB2BLinesInnerServiceContractInfoSubscriptions` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("subscriptionId") != null && !jsonObj.get("subscriptionId").isJsonNull()) && !jsonObj.get("subscriptionId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subscriptionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subscriptionId").toString())); + } + if ((jsonObj.get("subscriptionTerm") != null && !jsonObj.get("subscriptionTerm").isJsonNull()) && !jsonObj.get("subscriptionTerm").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subscriptionTerm` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subscriptionTerm").toString())); + } + if ((jsonObj.get("renewalTerm") != null && !jsonObj.get("renewalTerm").isJsonNull()) && !jsonObj.get("renewalTerm").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `renewalTerm` to be a primitive type in the JSON string but got `%s`", jsonObj.get("renewalTerm").toString())); + } + if ((jsonObj.get("billingModel") != null && !jsonObj.get("billingModel").isJsonNull()) && !jsonObj.get("billingModel").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `billingModel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("billingModel").toString())); + } + if ((jsonObj.get("subcriptionStartDate") != null && !jsonObj.get("subcriptionStartDate").isJsonNull()) && !jsonObj.get("subcriptionStartDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subcriptionStartDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subcriptionStartDate").toString())); + } + if ((jsonObj.get("subcriptionEndDate") != null && !jsonObj.get("subcriptionEndDate").isJsonNull()) && !jsonObj.get("subcriptionEndDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subcriptionEndDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subcriptionEndDate").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailB2BLinesInnerServiceContractInfoSubscriptions.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailB2BLinesInnerServiceContractInfoSubscriptions' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailB2BLinesInnerServiceContractInfoSubscriptions.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailB2BLinesInnerServiceContractInfoSubscriptions value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailB2BLinesInnerServiceContractInfoSubscriptions read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailB2BLinesInnerServiceContractInfoSubscriptions given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailB2BLinesInnerServiceContractInfoSubscriptions + * @throws IOException if the JSON string is invalid with respect to OrderDetailB2BLinesInnerServiceContractInfoSubscriptions + */ + public static OrderDetailB2BLinesInnerServiceContractInfoSubscriptions fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailB2BLinesInnerServiceContractInfoSubscriptions.class); + } + + /** + * Convert an instance of OrderDetailB2BLinesInnerServiceContractInfoSubscriptions to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInner.java b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInner.java new file mode 100644 index 00000000..a68cb674 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInner.java @@ -0,0 +1,440 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import xiresellers.client.model.OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailB2BLinesInnerShipmentDetailsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailB2BLinesInnerShipmentDetailsInner { + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + @SerializedName(SERIALIZED_NAME_QUANTITY) + private Integer quantity; + + public static final String SERIALIZED_NAME_DELIVERY_NUMBER = "deliveryNumber"; + @SerializedName(SERIALIZED_NAME_DELIVERY_NUMBER) + private String deliveryNumber; + + public static final String SERIALIZED_NAME_ESTIMATED_SHIP_DATE = "estimatedShipDate"; + @SerializedName(SERIALIZED_NAME_ESTIMATED_SHIP_DATE) + private String estimatedShipDate; + + public static final String SERIALIZED_NAME_SHIP_FROM_WAREHOUSE_ID = "shipFromWarehouseId"; + @SerializedName(SERIALIZED_NAME_SHIP_FROM_WAREHOUSE_ID) + private String shipFromWarehouseId; + + public static final String SERIALIZED_NAME_SHIP_FROM_LOCATION = "shipFromLocation"; + @SerializedName(SERIALIZED_NAME_SHIP_FROM_LOCATION) + private String shipFromLocation; + + public static final String SERIALIZED_NAME_INVOICE_NUMBER = "invoiceNumber"; + @SerializedName(SERIALIZED_NAME_INVOICE_NUMBER) + private String invoiceNumber; + + public static final String SERIALIZED_NAME_INVOICE_DATE = "invoiceDate"; + @SerializedName(SERIALIZED_NAME_INVOICE_DATE) + private String invoiceDate; + + public static final String SERIALIZED_NAME_CARRIER_DETAILS = "carrierDetails"; + @SerializedName(SERIALIZED_NAME_CARRIER_DETAILS) + private List carrierDetails; + + public OrderDetailB2BLinesInnerShipmentDetailsInner() { + } + + public OrderDetailB2BLinesInnerShipmentDetailsInner quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * The quantity shipped of the line item. + * @return quantity + **/ + @javax.annotation.Nullable + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + + public OrderDetailB2BLinesInnerShipmentDetailsInner deliveryNumber(String deliveryNumber) { + this.deliveryNumber = deliveryNumber; + return this; + } + + /** + * The actual date of delivery of the line item. + * @return deliveryNumber + **/ + @javax.annotation.Nullable + public String getDeliveryNumber() { + return deliveryNumber; + } + + public void setDeliveryNumber(String deliveryNumber) { + this.deliveryNumber = deliveryNumber; + } + + + public OrderDetailB2BLinesInnerShipmentDetailsInner estimatedShipDate(String estimatedShipDate) { + this.estimatedShipDate = estimatedShipDate; + return this; + } + + /** + * The date the line item is expected to be shipped. + * @return estimatedShipDate + **/ + @javax.annotation.Nullable + public String getEstimatedShipDate() { + return estimatedShipDate; + } + + public void setEstimatedShipDate(String estimatedShipDate) { + this.estimatedShipDate = estimatedShipDate; + } + + + public OrderDetailB2BLinesInnerShipmentDetailsInner shipFromWarehouseId(String shipFromWarehouseId) { + this.shipFromWarehouseId = shipFromWarehouseId; + return this; + } + + /** + * The ID of the warehouse the product will ship from. + * @return shipFromWarehouseId + **/ + @javax.annotation.Nullable + public String getShipFromWarehouseId() { + return shipFromWarehouseId; + } + + public void setShipFromWarehouseId(String shipFromWarehouseId) { + this.shipFromWarehouseId = shipFromWarehouseId; + } + + + public OrderDetailB2BLinesInnerShipmentDetailsInner shipFromLocation(String shipFromLocation) { + this.shipFromLocation = shipFromLocation; + return this; + } + + /** + * The city and state the line item ships from. + * @return shipFromLocation + **/ + @javax.annotation.Nullable + public String getShipFromLocation() { + return shipFromLocation; + } + + public void setShipFromLocation(String shipFromLocation) { + this.shipFromLocation = shipFromLocation; + } + + + public OrderDetailB2BLinesInnerShipmentDetailsInner invoiceNumber(String invoiceNumber) { + this.invoiceNumber = invoiceNumber; + return this; + } + + /** + * The Ingram Micro invoice number for the line item. + * @return invoiceNumber + **/ + @javax.annotation.Nullable + public String getInvoiceNumber() { + return invoiceNumber; + } + + public void setInvoiceNumber(String invoiceNumber) { + this.invoiceNumber = invoiceNumber; + } + + + public OrderDetailB2BLinesInnerShipmentDetailsInner invoiceDate(String invoiceDate) { + this.invoiceDate = invoiceDate; + return this; + } + + /** + * The date the IngramMicro invoice was created for the line item. + * @return invoiceDate + **/ + @javax.annotation.Nullable + public String getInvoiceDate() { + return invoiceDate; + } + + public void setInvoiceDate(String invoiceDate) { + this.invoiceDate = invoiceDate; + } + + + public OrderDetailB2BLinesInnerShipmentDetailsInner carrierDetails(List carrierDetails) { + this.carrierDetails = carrierDetails; + return this; + } + + public OrderDetailB2BLinesInnerShipmentDetailsInner addCarrierDetailsItem(OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner carrierDetailsItem) { + if (this.carrierDetails == null) { + this.carrierDetails = new ArrayList<>(); + } + this.carrierDetails.add(carrierDetailsItem); + return this; + } + + /** + * The shipment carrier details for the line item. + * @return carrierDetails + **/ + @javax.annotation.Nullable + public List getCarrierDetails() { + return carrierDetails; + } + + public void setCarrierDetails(List carrierDetails) { + this.carrierDetails = carrierDetails; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailB2BLinesInnerShipmentDetailsInner orderDetailB2BLinesInnerShipmentDetailsInner = (OrderDetailB2BLinesInnerShipmentDetailsInner) o; + return Objects.equals(this.quantity, orderDetailB2BLinesInnerShipmentDetailsInner.quantity) && + Objects.equals(this.deliveryNumber, orderDetailB2BLinesInnerShipmentDetailsInner.deliveryNumber) && + Objects.equals(this.estimatedShipDate, orderDetailB2BLinesInnerShipmentDetailsInner.estimatedShipDate) && + Objects.equals(this.shipFromWarehouseId, orderDetailB2BLinesInnerShipmentDetailsInner.shipFromWarehouseId) && + Objects.equals(this.shipFromLocation, orderDetailB2BLinesInnerShipmentDetailsInner.shipFromLocation) && + Objects.equals(this.invoiceNumber, orderDetailB2BLinesInnerShipmentDetailsInner.invoiceNumber) && + Objects.equals(this.invoiceDate, orderDetailB2BLinesInnerShipmentDetailsInner.invoiceDate) && + Objects.equals(this.carrierDetails, orderDetailB2BLinesInnerShipmentDetailsInner.carrierDetails); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(quantity, deliveryNumber, estimatedShipDate, shipFromWarehouseId, shipFromLocation, invoiceNumber, invoiceDate, carrierDetails); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailB2BLinesInnerShipmentDetailsInner {\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" deliveryNumber: ").append(toIndentedString(deliveryNumber)).append("\n"); + sb.append(" estimatedShipDate: ").append(toIndentedString(estimatedShipDate)).append("\n"); + sb.append(" shipFromWarehouseId: ").append(toIndentedString(shipFromWarehouseId)).append("\n"); + sb.append(" shipFromLocation: ").append(toIndentedString(shipFromLocation)).append("\n"); + sb.append(" invoiceNumber: ").append(toIndentedString(invoiceNumber)).append("\n"); + sb.append(" invoiceDate: ").append(toIndentedString(invoiceDate)).append("\n"); + sb.append(" carrierDetails: ").append(toIndentedString(carrierDetails)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("quantity"); + openapiFields.add("deliveryNumber"); + openapiFields.add("estimatedShipDate"); + openapiFields.add("shipFromWarehouseId"); + openapiFields.add("shipFromLocation"); + openapiFields.add("invoiceNumber"); + openapiFields.add("invoiceDate"); + openapiFields.add("carrierDetails"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailB2BLinesInnerShipmentDetailsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailB2BLinesInnerShipmentDetailsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailB2BLinesInnerShipmentDetailsInner is not found in the empty JSON string", OrderDetailB2BLinesInnerShipmentDetailsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailB2BLinesInnerShipmentDetailsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailB2BLinesInnerShipmentDetailsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("deliveryNumber") != null && !jsonObj.get("deliveryNumber").isJsonNull()) && !jsonObj.get("deliveryNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `deliveryNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deliveryNumber").toString())); + } + if ((jsonObj.get("estimatedShipDate") != null && !jsonObj.get("estimatedShipDate").isJsonNull()) && !jsonObj.get("estimatedShipDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `estimatedShipDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("estimatedShipDate").toString())); + } + if ((jsonObj.get("shipFromWarehouseId") != null && !jsonObj.get("shipFromWarehouseId").isJsonNull()) && !jsonObj.get("shipFromWarehouseId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shipFromWarehouseId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shipFromWarehouseId").toString())); + } + if ((jsonObj.get("shipFromLocation") != null && !jsonObj.get("shipFromLocation").isJsonNull()) && !jsonObj.get("shipFromLocation").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shipFromLocation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shipFromLocation").toString())); + } + if ((jsonObj.get("invoiceNumber") != null && !jsonObj.get("invoiceNumber").isJsonNull()) && !jsonObj.get("invoiceNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `invoiceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoiceNumber").toString())); + } + if ((jsonObj.get("invoiceDate") != null && !jsonObj.get("invoiceDate").isJsonNull()) && !jsonObj.get("invoiceDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `invoiceDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoiceDate").toString())); + } + if (jsonObj.get("carrierDetails") != null && !jsonObj.get("carrierDetails").isJsonNull()) { + JsonArray jsonArraycarrierDetails = jsonObj.getAsJsonArray("carrierDetails"); + if (jsonArraycarrierDetails != null) { + // ensure the json data is an array + if (!jsonObj.get("carrierDetails").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `carrierDetails` to be an array in the JSON string but got `%s`", jsonObj.get("carrierDetails").toString())); + } + + // validate the optional field `carrierDetails` (array) + for (int i = 0; i < jsonArraycarrierDetails.size(); i++) { + OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.validateJsonElement(jsonArraycarrierDetails.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailB2BLinesInnerShipmentDetailsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailB2BLinesInnerShipmentDetailsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailB2BLinesInnerShipmentDetailsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailB2BLinesInnerShipmentDetailsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailB2BLinesInnerShipmentDetailsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailB2BLinesInnerShipmentDetailsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailB2BLinesInnerShipmentDetailsInner + * @throws IOException if the JSON string is invalid with respect to OrderDetailB2BLinesInnerShipmentDetailsInner + */ + public static OrderDetailB2BLinesInnerShipmentDetailsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailB2BLinesInnerShipmentDetailsInner.class); + } + + /** + * Convert an instance of OrderDetailB2BLinesInnerShipmentDetailsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.java b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.java new file mode 100644 index 00000000..5700fe68 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.java @@ -0,0 +1,440 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import xiresellers.client.model.OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner { + public static final String SERIALIZED_NAME_CARRIER_CODE = "carrierCode"; + @SerializedName(SERIALIZED_NAME_CARRIER_CODE) + private String carrierCode; + + public static final String SERIALIZED_NAME_CARRIER_NAME = "carrierName"; + @SerializedName(SERIALIZED_NAME_CARRIER_NAME) + private String carrierName; + + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + @SerializedName(SERIALIZED_NAME_QUANTITY) + private Integer quantity; + + public static final String SERIALIZED_NAME_SHIPPED_DATE = "shippedDate"; + @SerializedName(SERIALIZED_NAME_SHIPPED_DATE) + private String shippedDate; + + public static final String SERIALIZED_NAME_ESTIMATED_DELIVERY_DATE = "estimatedDeliveryDate"; + @SerializedName(SERIALIZED_NAME_ESTIMATED_DELIVERY_DATE) + private String estimatedDeliveryDate; + + public static final String SERIALIZED_NAME_DELIVERED_DATE = "deliveredDate"; + @SerializedName(SERIALIZED_NAME_DELIVERED_DATE) + private String deliveredDate; + + public static final String SERIALIZED_NAME_CARRIER_PICKUP_DATE = "carrierPickupDate"; + @SerializedName(SERIALIZED_NAME_CARRIER_PICKUP_DATE) + private String carrierPickupDate; + + public static final String SERIALIZED_NAME_TRACKING_DETAILS = "trackingDetails"; + @SerializedName(SERIALIZED_NAME_TRACKING_DETAILS) + private List trackingDetails; + + public OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner() { + } + + public OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner carrierCode(String carrierCode) { + this.carrierCode = carrierCode; + return this; + } + + /** + * The carrier code for the shipment containing the line item. + * @return carrierCode + **/ + @javax.annotation.Nullable + public String getCarrierCode() { + return carrierCode; + } + + public void setCarrierCode(String carrierCode) { + this.carrierCode = carrierCode; + } + + + public OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner carrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** + * The name of the carrier of the shipment containing the line item. + * @return carrierName + **/ + @javax.annotation.Nullable + public String getCarrierName() { + return carrierName; + } + + public void setCarrierName(String carrierName) { + this.carrierName = carrierName; + } + + + public OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * The quantity shipped of the line item. + * @return quantity + **/ + @javax.annotation.Nullable + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + + public OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner shippedDate(String shippedDate) { + this.shippedDate = shippedDate; + return this; + } + + /** + * The actual date when line item shipped. + * @return shippedDate + **/ + @javax.annotation.Nullable + public String getShippedDate() { + return shippedDate; + } + + public void setShippedDate(String shippedDate) { + this.shippedDate = shippedDate; + } + + + public OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner estimatedDeliveryDate(String estimatedDeliveryDate) { + this.estimatedDeliveryDate = estimatedDeliveryDate; + return this; + } + + /** + * The date the line item is expected to be delivered. + * @return estimatedDeliveryDate + **/ + @javax.annotation.Nullable + public String getEstimatedDeliveryDate() { + return estimatedDeliveryDate; + } + + public void setEstimatedDeliveryDate(String estimatedDeliveryDate) { + this.estimatedDeliveryDate = estimatedDeliveryDate; + } + + + public OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner deliveredDate(String deliveredDate) { + this.deliveredDate = deliveredDate; + return this; + } + + /** + * The actual date of delivery of the line item. + * @return deliveredDate + **/ + @javax.annotation.Nullable + public String getDeliveredDate() { + return deliveredDate; + } + + public void setDeliveredDate(String deliveredDate) { + this.deliveredDate = deliveredDate; + } + + + public OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner carrierPickupDate(String carrierPickupDate) { + this.carrierPickupDate = carrierPickupDate; + return this; + } + + /** + * The actual date when carrier picked up line item. + * @return carrierPickupDate + **/ + @javax.annotation.Nullable + public String getCarrierPickupDate() { + return carrierPickupDate; + } + + public void setCarrierPickupDate(String carrierPickupDate) { + this.carrierPickupDate = carrierPickupDate; + } + + + public OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner trackingDetails(List trackingDetails) { + this.trackingDetails = trackingDetails; + return this; + } + + public OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner addTrackingDetailsItem(OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner trackingDetailsItem) { + if (this.trackingDetails == null) { + this.trackingDetails = new ArrayList<>(); + } + this.trackingDetails.add(trackingDetailsItem); + return this; + } + + /** + * The tracking details for the shipment containing the line item. + * @return trackingDetails + **/ + @javax.annotation.Nullable + public List getTrackingDetails() { + return trackingDetails; + } + + public void setTrackingDetails(List trackingDetails) { + this.trackingDetails = trackingDetails; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner orderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner = (OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner) o; + return Objects.equals(this.carrierCode, orderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.carrierCode) && + Objects.equals(this.carrierName, orderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.carrierName) && + Objects.equals(this.quantity, orderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.quantity) && + Objects.equals(this.shippedDate, orderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.shippedDate) && + Objects.equals(this.estimatedDeliveryDate, orderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.estimatedDeliveryDate) && + Objects.equals(this.deliveredDate, orderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.deliveredDate) && + Objects.equals(this.carrierPickupDate, orderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.carrierPickupDate) && + Objects.equals(this.trackingDetails, orderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.trackingDetails); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(carrierCode, carrierName, quantity, shippedDate, estimatedDeliveryDate, deliveredDate, carrierPickupDate, trackingDetails); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner {\n"); + sb.append(" carrierCode: ").append(toIndentedString(carrierCode)).append("\n"); + sb.append(" carrierName: ").append(toIndentedString(carrierName)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shippedDate: ").append(toIndentedString(shippedDate)).append("\n"); + sb.append(" estimatedDeliveryDate: ").append(toIndentedString(estimatedDeliveryDate)).append("\n"); + sb.append(" deliveredDate: ").append(toIndentedString(deliveredDate)).append("\n"); + sb.append(" carrierPickupDate: ").append(toIndentedString(carrierPickupDate)).append("\n"); + sb.append(" trackingDetails: ").append(toIndentedString(trackingDetails)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("carrierCode"); + openapiFields.add("carrierName"); + openapiFields.add("quantity"); + openapiFields.add("shippedDate"); + openapiFields.add("estimatedDeliveryDate"); + openapiFields.add("deliveredDate"); + openapiFields.add("carrierPickupDate"); + openapiFields.add("trackingDetails"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner is not found in the empty JSON string", OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("carrierCode") != null && !jsonObj.get("carrierCode").isJsonNull()) && !jsonObj.get("carrierCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `carrierCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierCode").toString())); + } + if ((jsonObj.get("carrierName") != null && !jsonObj.get("carrierName").isJsonNull()) && !jsonObj.get("carrierName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `carrierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierName").toString())); + } + if ((jsonObj.get("shippedDate") != null && !jsonObj.get("shippedDate").isJsonNull()) && !jsonObj.get("shippedDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shippedDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shippedDate").toString())); + } + if ((jsonObj.get("estimatedDeliveryDate") != null && !jsonObj.get("estimatedDeliveryDate").isJsonNull()) && !jsonObj.get("estimatedDeliveryDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `estimatedDeliveryDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("estimatedDeliveryDate").toString())); + } + if ((jsonObj.get("deliveredDate") != null && !jsonObj.get("deliveredDate").isJsonNull()) && !jsonObj.get("deliveredDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `deliveredDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deliveredDate").toString())); + } + if ((jsonObj.get("carrierPickupDate") != null && !jsonObj.get("carrierPickupDate").isJsonNull()) && !jsonObj.get("carrierPickupDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `carrierPickupDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierPickupDate").toString())); + } + if (jsonObj.get("trackingDetails") != null && !jsonObj.get("trackingDetails").isJsonNull()) { + JsonArray jsonArraytrackingDetails = jsonObj.getAsJsonArray("trackingDetails"); + if (jsonArraytrackingDetails != null) { + // ensure the json data is an array + if (!jsonObj.get("trackingDetails").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `trackingDetails` to be an array in the JSON string but got `%s`", jsonObj.get("trackingDetails").toString())); + } + + // validate the optional field `trackingDetails` (array) + for (int i = 0; i < jsonArraytrackingDetails.size(); i++) { + OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner.validateJsonElement(jsonArraytrackingDetails.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner + * @throws IOException if the JSON string is invalid with respect to OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner + */ + public static OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner.class); + } + + /** + * Convert an instance of OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner.java b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner.java new file mode 100644 index 00000000..820dfcf0 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner.java @@ -0,0 +1,385 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import xiresellers.client.model.OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner { + public static final String SERIALIZED_NAME_TRACKING_NUMBER = "trackingNumber"; + @SerializedName(SERIALIZED_NAME_TRACKING_NUMBER) + private String trackingNumber; + + public static final String SERIALIZED_NAME_TRACKING_URL = "trackingUrl"; + @SerializedName(SERIALIZED_NAME_TRACKING_URL) + private String trackingUrl; + + public static final String SERIALIZED_NAME_PACKAGE_WEIGHT = "packageWeight"; + @SerializedName(SERIALIZED_NAME_PACKAGE_WEIGHT) + private String packageWeight; + + public static final String SERIALIZED_NAME_CARTON_NUMBER = "cartonNumber"; + @SerializedName(SERIALIZED_NAME_CARTON_NUMBER) + private String cartonNumber; + + public static final String SERIALIZED_NAME_QUANTITY_IN_BOX = "quantityInBox"; + @SerializedName(SERIALIZED_NAME_QUANTITY_IN_BOX) + private String quantityInBox; + + public static final String SERIALIZED_NAME_SERIAL_NUMBERS = "serialNumbers"; + @SerializedName(SERIALIZED_NAME_SERIAL_NUMBERS) + private List serialNumbers; + + public OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner() { + } + + public OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner trackingNumber(String trackingNumber) { + this.trackingNumber = trackingNumber; + return this; + } + + /** + * The tracking number for the shipment containing the line item. + * @return trackingNumber + **/ + @javax.annotation.Nullable + public String getTrackingNumber() { + return trackingNumber; + } + + public void setTrackingNumber(String trackingNumber) { + this.trackingNumber = trackingNumber; + } + + + public OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner trackingUrl(String trackingUrl) { + this.trackingUrl = trackingUrl; + return this; + } + + /** + * The tracking URL for the shipment containing the line item. + * @return trackingUrl + **/ + @javax.annotation.Nullable + public String getTrackingUrl() { + return trackingUrl; + } + + public void setTrackingUrl(String trackingUrl) { + this.trackingUrl = trackingUrl; + } + + + public OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner packageWeight(String packageWeight) { + this.packageWeight = packageWeight; + return this; + } + + /** + * The weight of the package for the line item. + * @return packageWeight + **/ + @javax.annotation.Nullable + public String getPackageWeight() { + return packageWeight; + } + + public void setPackageWeight(String packageWeight) { + this.packageWeight = packageWeight; + } + + + public OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner cartonNumber(String cartonNumber) { + this.cartonNumber = cartonNumber; + return this; + } + + /** + * The shipment carton number that contains the line item. + * @return cartonNumber + **/ + @javax.annotation.Nullable + public String getCartonNumber() { + return cartonNumber; + } + + public void setCartonNumber(String cartonNumber) { + this.cartonNumber = cartonNumber; + } + + + public OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner quantityInBox(String quantityInBox) { + this.quantityInBox = quantityInBox; + return this; + } + + /** + * The quantity of line items in the box. + * @return quantityInBox + **/ + @javax.annotation.Nullable + public String getQuantityInBox() { + return quantityInBox; + } + + public void setQuantityInBox(String quantityInBox) { + this.quantityInBox = quantityInBox; + } + + + public OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner serialNumbers(List serialNumbers) { + this.serialNumbers = serialNumbers; + return this; + } + + public OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner addSerialNumbersItem(OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner serialNumbersItem) { + if (this.serialNumbers == null) { + this.serialNumbers = new ArrayList<>(); + } + this.serialNumbers.add(serialNumbersItem); + return this; + } + + /** + * A list of serial numbers of the line items contained in the shipment. + * @return serialNumbers + **/ + @javax.annotation.Nullable + public List getSerialNumbers() { + return serialNumbers; + } + + public void setSerialNumbers(List serialNumbers) { + this.serialNumbers = serialNumbers; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner orderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner = (OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner) o; + return Objects.equals(this.trackingNumber, orderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner.trackingNumber) && + Objects.equals(this.trackingUrl, orderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner.trackingUrl) && + Objects.equals(this.packageWeight, orderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner.packageWeight) && + Objects.equals(this.cartonNumber, orderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner.cartonNumber) && + Objects.equals(this.quantityInBox, orderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner.quantityInBox) && + Objects.equals(this.serialNumbers, orderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner.serialNumbers); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(trackingNumber, trackingUrl, packageWeight, cartonNumber, quantityInBox, serialNumbers); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner {\n"); + sb.append(" trackingNumber: ").append(toIndentedString(trackingNumber)).append("\n"); + sb.append(" trackingUrl: ").append(toIndentedString(trackingUrl)).append("\n"); + sb.append(" packageWeight: ").append(toIndentedString(packageWeight)).append("\n"); + sb.append(" cartonNumber: ").append(toIndentedString(cartonNumber)).append("\n"); + sb.append(" quantityInBox: ").append(toIndentedString(quantityInBox)).append("\n"); + sb.append(" serialNumbers: ").append(toIndentedString(serialNumbers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("trackingNumber"); + openapiFields.add("trackingUrl"); + openapiFields.add("packageWeight"); + openapiFields.add("cartonNumber"); + openapiFields.add("quantityInBox"); + openapiFields.add("serialNumbers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner is not found in the empty JSON string", OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("trackingNumber") != null && !jsonObj.get("trackingNumber").isJsonNull()) && !jsonObj.get("trackingNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `trackingNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("trackingNumber").toString())); + } + if ((jsonObj.get("trackingUrl") != null && !jsonObj.get("trackingUrl").isJsonNull()) && !jsonObj.get("trackingUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `trackingUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("trackingUrl").toString())); + } + if ((jsonObj.get("packageWeight") != null && !jsonObj.get("packageWeight").isJsonNull()) && !jsonObj.get("packageWeight").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `packageWeight` to be a primitive type in the JSON string but got `%s`", jsonObj.get("packageWeight").toString())); + } + if ((jsonObj.get("cartonNumber") != null && !jsonObj.get("cartonNumber").isJsonNull()) && !jsonObj.get("cartonNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cartonNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cartonNumber").toString())); + } + if ((jsonObj.get("quantityInBox") != null && !jsonObj.get("quantityInBox").isJsonNull()) && !jsonObj.get("quantityInBox").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quantityInBox` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quantityInBox").toString())); + } + if (jsonObj.get("serialNumbers") != null && !jsonObj.get("serialNumbers").isJsonNull()) { + JsonArray jsonArrayserialNumbers = jsonObj.getAsJsonArray("serialNumbers"); + if (jsonArrayserialNumbers != null) { + // ensure the json data is an array + if (!jsonObj.get("serialNumbers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `serialNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("serialNumbers").toString())); + } + + // validate the optional field `serialNumbers` (array) + for (int i = 0; i < jsonArrayserialNumbers.size(); i++) { + OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner.validateJsonElement(jsonArrayserialNumbers.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner + * @throws IOException if the JSON string is invalid with respect to OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner + */ + public static OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner.class); + } + + /** + * Convert an instance of OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner.java b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner.java new file mode 100644 index 00000000..6d77cd32 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner.java @@ -0,0 +1,206 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner { + public static final String SERIALIZED_NAME_SERIAL_NUMBER = "serialNumber"; + @SerializedName(SERIALIZED_NAME_SERIAL_NUMBER) + private String serialNumber; + + public OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner() { + } + + public OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner serialNumber(String serialNumber) { + this.serialNumber = serialNumber; + return this; + } + + /** + * The serial number for the line item. + * @return serialNumber + **/ + @javax.annotation.Nullable + public String getSerialNumber() { + return serialNumber; + } + + public void setSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner orderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner = (OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner) o; + return Objects.equals(this.serialNumber, orderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner.serialNumber); + } + + @Override + public int hashCode() { + return Objects.hash(serialNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner {\n"); + sb.append(" serialNumber: ").append(toIndentedString(serialNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("serialNumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner is not found in the empty JSON string", OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("serialNumber") != null && !jsonObj.get("serialNumber").isJsonNull()) && !jsonObj.get("serialNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `serialNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("serialNumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner + * @throws IOException if the JSON string is invalid with respect to OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner + */ + public static OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner.class); + } + + /** + * Convert an instance of OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailB2BMiscellaneousChargesInner.java b/src/main/java/xiresellers/client/model/OrderDetailB2BMiscellaneousChargesInner.java new file mode 100644 index 00000000..b267d3a2 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailB2BMiscellaneousChargesInner.java @@ -0,0 +1,293 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailB2BMiscellaneousChargesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailB2BMiscellaneousChargesInner { + public static final String SERIALIZED_NAME_SUB_ORDER_NUMBER = "subOrderNumber"; + @SerializedName(SERIALIZED_NAME_SUB_ORDER_NUMBER) + private String subOrderNumber; + + public static final String SERIALIZED_NAME_CHARGE_LINE_REFERENCE = "chargeLineReference"; + @SerializedName(SERIALIZED_NAME_CHARGE_LINE_REFERENCE) + private String chargeLineReference; + + public static final String SERIALIZED_NAME_CHARGE_DESCRIPTION = "chargeDescription"; + @SerializedName(SERIALIZED_NAME_CHARGE_DESCRIPTION) + private String chargeDescription; + + public static final String SERIALIZED_NAME_CHARGE_AMOUNT = "chargeAmount"; + @SerializedName(SERIALIZED_NAME_CHARGE_AMOUNT) + private String chargeAmount; + + public OrderDetailB2BMiscellaneousChargesInner() { + } + + public OrderDetailB2BMiscellaneousChargesInner subOrderNumber(String subOrderNumber) { + this.subOrderNumber = subOrderNumber; + return this; + } + + /** + * The sub order number. The two-digit prefix is the warehouse code of the warehouse nearest the reseller. The middle number is the order number. The two-digit suffix is the sub order number. + * @return subOrderNumber + **/ + @javax.annotation.Nullable + public String getSubOrderNumber() { + return subOrderNumber; + } + + public void setSubOrderNumber(String subOrderNumber) { + this.subOrderNumber = subOrderNumber; + } + + + public OrderDetailB2BMiscellaneousChargesInner chargeLineReference(String chargeLineReference) { + this.chargeLineReference = chargeLineReference; + return this; + } + + /** + * Impulse line number for the miscellaneous charge. + * @return chargeLineReference + **/ + @javax.annotation.Nullable + public String getChargeLineReference() { + return chargeLineReference; + } + + public void setChargeLineReference(String chargeLineReference) { + this.chargeLineReference = chargeLineReference; + } + + + public OrderDetailB2BMiscellaneousChargesInner chargeDescription(String chargeDescription) { + this.chargeDescription = chargeDescription; + return this; + } + + /** + * Description of the miscellaneous charges. + * @return chargeDescription + **/ + @javax.annotation.Nullable + public String getChargeDescription() { + return chargeDescription; + } + + public void setChargeDescription(String chargeDescription) { + this.chargeDescription = chargeDescription; + } + + + public OrderDetailB2BMiscellaneousChargesInner chargeAmount(String chargeAmount) { + this.chargeAmount = chargeAmount; + return this; + } + + /** + * The amount of miscellaneous charges. + * @return chargeAmount + **/ + @javax.annotation.Nullable + public String getChargeAmount() { + return chargeAmount; + } + + public void setChargeAmount(String chargeAmount) { + this.chargeAmount = chargeAmount; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailB2BMiscellaneousChargesInner orderDetailB2BMiscellaneousChargesInner = (OrderDetailB2BMiscellaneousChargesInner) o; + return Objects.equals(this.subOrderNumber, orderDetailB2BMiscellaneousChargesInner.subOrderNumber) && + Objects.equals(this.chargeLineReference, orderDetailB2BMiscellaneousChargesInner.chargeLineReference) && + Objects.equals(this.chargeDescription, orderDetailB2BMiscellaneousChargesInner.chargeDescription) && + Objects.equals(this.chargeAmount, orderDetailB2BMiscellaneousChargesInner.chargeAmount); + } + + @Override + public int hashCode() { + return Objects.hash(subOrderNumber, chargeLineReference, chargeDescription, chargeAmount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailB2BMiscellaneousChargesInner {\n"); + sb.append(" subOrderNumber: ").append(toIndentedString(subOrderNumber)).append("\n"); + sb.append(" chargeLineReference: ").append(toIndentedString(chargeLineReference)).append("\n"); + sb.append(" chargeDescription: ").append(toIndentedString(chargeDescription)).append("\n"); + sb.append(" chargeAmount: ").append(toIndentedString(chargeAmount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("subOrderNumber"); + openapiFields.add("chargeLineReference"); + openapiFields.add("chargeDescription"); + openapiFields.add("chargeAmount"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailB2BMiscellaneousChargesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailB2BMiscellaneousChargesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailB2BMiscellaneousChargesInner is not found in the empty JSON string", OrderDetailB2BMiscellaneousChargesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailB2BMiscellaneousChargesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailB2BMiscellaneousChargesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("subOrderNumber") != null && !jsonObj.get("subOrderNumber").isJsonNull()) && !jsonObj.get("subOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subOrderNumber").toString())); + } + if ((jsonObj.get("chargeLineReference") != null && !jsonObj.get("chargeLineReference").isJsonNull()) && !jsonObj.get("chargeLineReference").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `chargeLineReference` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chargeLineReference").toString())); + } + if ((jsonObj.get("chargeDescription") != null && !jsonObj.get("chargeDescription").isJsonNull()) && !jsonObj.get("chargeDescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `chargeDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chargeDescription").toString())); + } + if ((jsonObj.get("chargeAmount") != null && !jsonObj.get("chargeAmount").isJsonNull()) && !jsonObj.get("chargeAmount").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `chargeAmount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chargeAmount").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailB2BMiscellaneousChargesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailB2BMiscellaneousChargesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailB2BMiscellaneousChargesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailB2BMiscellaneousChargesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailB2BMiscellaneousChargesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailB2BMiscellaneousChargesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailB2BMiscellaneousChargesInner + * @throws IOException if the JSON string is invalid with respect to OrderDetailB2BMiscellaneousChargesInner + */ + public static OrderDetailB2BMiscellaneousChargesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailB2BMiscellaneousChargesInner.class); + } + + /** + * Convert an instance of OrderDetailB2BMiscellaneousChargesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailB2BShipToInfo.java b/src/main/java/xiresellers/client/model/OrderDetailB2BShipToInfo.java new file mode 100644 index 00000000..1563bec9 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailB2BShipToInfo.java @@ -0,0 +1,496 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * The shipping information provided by the reseller for order delivery. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailB2BShipToInfo { + public static final String SERIALIZED_NAME_CONTACT = "contact"; + @SerializedName(SERIALIZED_NAME_CONTACT) + private String contact; + + public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; + @SerializedName(SERIALIZED_NAME_COMPANY_NAME) + private String companyName; + + public static final String SERIALIZED_NAME_ADDRESS_LINE1 = "addressLine1"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE1) + private String addressLine1; + + public static final String SERIALIZED_NAME_ADDRESS_LINE2 = "addressLine2"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE2) + private String addressLine2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE3 = "addressLine3"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE3) + private String addressLine3; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; + @SerializedName(SERIALIZED_NAME_POSTAL_CODE) + private String postalCode; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) + private String phoneNumber; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public OrderDetailB2BShipToInfo() { + } + + public OrderDetailB2BShipToInfo contact(String contact) { + this.contact = contact; + return this; + } + + /** + * The company contact provided by the reseller. + * @return contact + **/ + @javax.annotation.Nullable + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + + public OrderDetailB2BShipToInfo companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * The name of the company the order will be shipped to. + * @return companyName + **/ + @javax.annotation.Nullable + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public OrderDetailB2BShipToInfo addressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + return this; + } + + /** + * The address line 1 the order will be shipped to. + * @return addressLine1 + **/ + @javax.annotation.Nullable + public String getAddressLine1() { + return addressLine1; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + + public OrderDetailB2BShipToInfo addressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + return this; + } + + /** + * The address line 2 the order will be shipped to. + * @return addressLine2 + **/ + @javax.annotation.Nullable + public String getAddressLine2() { + return addressLine2; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + + public OrderDetailB2BShipToInfo addressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + return this; + } + + /** + * The address line 3 the order will be shipped to. + * @return addressLine3 + **/ + @javax.annotation.Nullable + public String getAddressLine3() { + return addressLine3; + } + + public void setAddressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + } + + + public OrderDetailB2BShipToInfo city(String city) { + this.city = city; + return this; + } + + /** + * The city the order will be shipped to. + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public OrderDetailB2BShipToInfo state(String state) { + this.state = state; + return this; + } + + /** + * The state the order will be shipped to. + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public OrderDetailB2BShipToInfo postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * The zip or postal code the order will be shipped to. + * @return postalCode + **/ + @javax.annotation.Nullable + public String getPostalCode() { + return postalCode; + } + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public OrderDetailB2BShipToInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * The two-character ISO country code the order will be shipped to. + * @return countryCode + **/ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public OrderDetailB2BShipToInfo phoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * The company contact phone number. + * @return phoneNumber + **/ + @javax.annotation.Nullable + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public OrderDetailB2BShipToInfo email(String email) { + this.email = email; + return this; + } + + /** + * The company contact email address. + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailB2BShipToInfo orderDetailB2BShipToInfo = (OrderDetailB2BShipToInfo) o; + return Objects.equals(this.contact, orderDetailB2BShipToInfo.contact) && + Objects.equals(this.companyName, orderDetailB2BShipToInfo.companyName) && + Objects.equals(this.addressLine1, orderDetailB2BShipToInfo.addressLine1) && + Objects.equals(this.addressLine2, orderDetailB2BShipToInfo.addressLine2) && + Objects.equals(this.addressLine3, orderDetailB2BShipToInfo.addressLine3) && + Objects.equals(this.city, orderDetailB2BShipToInfo.city) && + Objects.equals(this.state, orderDetailB2BShipToInfo.state) && + Objects.equals(this.postalCode, orderDetailB2BShipToInfo.postalCode) && + Objects.equals(this.countryCode, orderDetailB2BShipToInfo.countryCode) && + Objects.equals(this.phoneNumber, orderDetailB2BShipToInfo.phoneNumber) && + Objects.equals(this.email, orderDetailB2BShipToInfo.email); + } + + @Override + public int hashCode() { + return Objects.hash(contact, companyName, addressLine1, addressLine2, addressLine3, city, state, postalCode, countryCode, phoneNumber, email); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailB2BShipToInfo {\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); + sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); + sb.append(" addressLine3: ").append(toIndentedString(addressLine3)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("contact"); + openapiFields.add("companyName"); + openapiFields.add("addressLine1"); + openapiFields.add("addressLine2"); + openapiFields.add("addressLine3"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalCode"); + openapiFields.add("countryCode"); + openapiFields.add("phoneNumber"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailB2BShipToInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailB2BShipToInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailB2BShipToInfo is not found in the empty JSON string", OrderDetailB2BShipToInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailB2BShipToInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailB2BShipToInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("contact") != null && !jsonObj.get("contact").isJsonNull()) && !jsonObj.get("contact").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contact` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact").toString())); + } + if ((jsonObj.get("companyName") != null && !jsonObj.get("companyName").isJsonNull()) && !jsonObj.get("companyName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); + } + if ((jsonObj.get("addressLine1") != null && !jsonObj.get("addressLine1").isJsonNull()) && !jsonObj.get("addressLine1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine1").toString())); + } + if ((jsonObj.get("addressLine2") != null && !jsonObj.get("addressLine2").isJsonNull()) && !jsonObj.get("addressLine2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine2").toString())); + } + if ((jsonObj.get("addressLine3") != null && !jsonObj.get("addressLine3").isJsonNull()) && !jsonObj.get("addressLine3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine3").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailB2BShipToInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailB2BShipToInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailB2BShipToInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailB2BShipToInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailB2BShipToInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailB2BShipToInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailB2BShipToInfo + * @throws IOException if the JSON string is invalid with respect to OrderDetailB2BShipToInfo + */ + public static OrderDetailB2BShipToInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailB2BShipToInfo.class); + } + + /** + * Convert an instance of OrderDetailB2BShipToInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailRequest.java b/src/main/java/xiresellers/client/model/OrderDetailRequest.java new file mode 100644 index 00000000..8d4051de --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailRequest.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderDetailRequestServicerequest; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Request schema for order details endpoint + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailRequest { + public static final String SERIALIZED_NAME_SERVICEREQUEST = "servicerequest"; + @SerializedName(SERIALIZED_NAME_SERVICEREQUEST) + private OrderDetailRequestServicerequest servicerequest; + + public OrderDetailRequest() { + } + + public OrderDetailRequest servicerequest(OrderDetailRequestServicerequest servicerequest) { + this.servicerequest = servicerequest; + return this; + } + + /** + * Get servicerequest + * @return servicerequest + **/ + @javax.annotation.Nullable + public OrderDetailRequestServicerequest getServicerequest() { + return servicerequest; + } + + public void setServicerequest(OrderDetailRequestServicerequest servicerequest) { + this.servicerequest = servicerequest; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailRequest orderDetailRequest = (OrderDetailRequest) o; + return Objects.equals(this.servicerequest, orderDetailRequest.servicerequest); + } + + @Override + public int hashCode() { + return Objects.hash(servicerequest); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailRequest {\n"); + sb.append(" servicerequest: ").append(toIndentedString(servicerequest)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("servicerequest"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailRequest is not found in the empty JSON string", OrderDetailRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `servicerequest` + if (jsonObj.get("servicerequest") != null && !jsonObj.get("servicerequest").isJsonNull()) { + OrderDetailRequestServicerequest.validateJsonElement(jsonObj.get("servicerequest")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailRequest + * @throws IOException if the JSON string is invalid with respect to OrderDetailRequest + */ + public static OrderDetailRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailRequest.class); + } + + /** + * Convert an instance of OrderDetailRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailRequestServicerequest.java b/src/main/java/xiresellers/client/model/OrderDetailRequestServicerequest.java new file mode 100644 index 00000000..dbdeb04f --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailRequestServicerequest.java @@ -0,0 +1,245 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.InvoiceDetailRequestServicerequestRequestpreamble; +import xiresellers.client.model.OrderDetailRequestServicerequestOrderdetailrequest; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailRequestServicerequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailRequestServicerequest { + public static final String SERIALIZED_NAME_REQUESTPREAMBLE = "requestpreamble"; + @SerializedName(SERIALIZED_NAME_REQUESTPREAMBLE) + private InvoiceDetailRequestServicerequestRequestpreamble requestpreamble; + + public static final String SERIALIZED_NAME_ORDERDETAILREQUEST = "orderdetailrequest"; + @SerializedName(SERIALIZED_NAME_ORDERDETAILREQUEST) + private OrderDetailRequestServicerequestOrderdetailrequest orderdetailrequest; + + public OrderDetailRequestServicerequest() { + } + + public OrderDetailRequestServicerequest requestpreamble(InvoiceDetailRequestServicerequestRequestpreamble requestpreamble) { + this.requestpreamble = requestpreamble; + return this; + } + + /** + * Get requestpreamble + * @return requestpreamble + **/ + @javax.annotation.Nonnull + public InvoiceDetailRequestServicerequestRequestpreamble getRequestpreamble() { + return requestpreamble; + } + + public void setRequestpreamble(InvoiceDetailRequestServicerequestRequestpreamble requestpreamble) { + this.requestpreamble = requestpreamble; + } + + + public OrderDetailRequestServicerequest orderdetailrequest(OrderDetailRequestServicerequestOrderdetailrequest orderdetailrequest) { + this.orderdetailrequest = orderdetailrequest; + return this; + } + + /** + * Get orderdetailrequest + * @return orderdetailrequest + **/ + @javax.annotation.Nullable + public OrderDetailRequestServicerequestOrderdetailrequest getOrderdetailrequest() { + return orderdetailrequest; + } + + public void setOrderdetailrequest(OrderDetailRequestServicerequestOrderdetailrequest orderdetailrequest) { + this.orderdetailrequest = orderdetailrequest; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailRequestServicerequest orderDetailRequestServicerequest = (OrderDetailRequestServicerequest) o; + return Objects.equals(this.requestpreamble, orderDetailRequestServicerequest.requestpreamble) && + Objects.equals(this.orderdetailrequest, orderDetailRequestServicerequest.orderdetailrequest); + } + + @Override + public int hashCode() { + return Objects.hash(requestpreamble, orderdetailrequest); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailRequestServicerequest {\n"); + sb.append(" requestpreamble: ").append(toIndentedString(requestpreamble)).append("\n"); + sb.append(" orderdetailrequest: ").append(toIndentedString(orderdetailrequest)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("requestpreamble"); + openapiFields.add("orderdetailrequest"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("requestpreamble"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailRequestServicerequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailRequestServicerequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailRequestServicerequest is not found in the empty JSON string", OrderDetailRequestServicerequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailRequestServicerequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailRequestServicerequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrderDetailRequestServicerequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `requestpreamble` + InvoiceDetailRequestServicerequestRequestpreamble.validateJsonElement(jsonObj.get("requestpreamble")); + // validate the optional field `orderdetailrequest` + if (jsonObj.get("orderdetailrequest") != null && !jsonObj.get("orderdetailrequest").isJsonNull()) { + OrderDetailRequestServicerequestOrderdetailrequest.validateJsonElement(jsonObj.get("orderdetailrequest")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailRequestServicerequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailRequestServicerequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailRequestServicerequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailRequestServicerequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailRequestServicerequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailRequestServicerequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailRequestServicerequest + * @throws IOException if the JSON string is invalid with respect to OrderDetailRequestServicerequest + */ + public static OrderDetailRequestServicerequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailRequestServicerequest.class); + } + + /** + * Convert an instance of OrderDetailRequestServicerequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailRequestServicerequestOrderdetailrequest.java b/src/main/java/xiresellers/client/model/OrderDetailRequestServicerequestOrderdetailrequest.java new file mode 100644 index 00000000..0f65f131 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailRequestServicerequestOrderdetailrequest.java @@ -0,0 +1,301 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailRequestServicerequestOrderdetailrequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailRequestServicerequestOrderdetailrequest { + public static final String SERIALIZED_NAME_ORDERNUMBER = "ordernumber"; + @SerializedName(SERIALIZED_NAME_ORDERNUMBER) + private String ordernumber; + + public static final String SERIALIZED_NAME_CUSTOMERPONUMBER = "customerponumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMERPONUMBER) + private String customerponumber; + + public static final String SERIALIZED_NAME_ORDERDATE = "orderdate"; + @SerializedName(SERIALIZED_NAME_ORDERDATE) + private String orderdate; + + public static final String SERIALIZED_NAME_SYSTEMID = "systemid"; + @SerializedName(SERIALIZED_NAME_SYSTEMID) + private String systemid; + + public OrderDetailRequestServicerequestOrderdetailrequest() { + } + + public OrderDetailRequestServicerequestOrderdetailrequest ordernumber(String ordernumber) { + this.ordernumber = ordernumber; + return this; + } + + /** + * Ingram Micro Order Number + * @return ordernumber + **/ + @javax.annotation.Nonnull + public String getOrdernumber() { + return ordernumber; + } + + public void setOrdernumber(String ordernumber) { + this.ordernumber = ordernumber; + } + + + public OrderDetailRequestServicerequestOrderdetailrequest customerponumber(String customerponumber) { + this.customerponumber = customerponumber; + return this; + } + + /** + * Get customerponumber + * @return customerponumber + **/ + @javax.annotation.Nullable + public String getCustomerponumber() { + return customerponumber; + } + + public void setCustomerponumber(String customerponumber) { + this.customerponumber = customerponumber; + } + + + public OrderDetailRequestServicerequestOrderdetailrequest orderdate(String orderdate) { + this.orderdate = orderdate; + return this; + } + + /** + * Get orderdate + * @return orderdate + **/ + @javax.annotation.Nullable + public String getOrderdate() { + return orderdate; + } + + public void setOrderdate(String orderdate) { + this.orderdate = orderdate; + } + + + public OrderDetailRequestServicerequestOrderdetailrequest systemid(String systemid) { + this.systemid = systemid; + return this; + } + + /** + * Get systemid + * @return systemid + **/ + @javax.annotation.Nullable + public String getSystemid() { + return systemid; + } + + public void setSystemid(String systemid) { + this.systemid = systemid; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailRequestServicerequestOrderdetailrequest orderDetailRequestServicerequestOrderdetailrequest = (OrderDetailRequestServicerequestOrderdetailrequest) o; + return Objects.equals(this.ordernumber, orderDetailRequestServicerequestOrderdetailrequest.ordernumber) && + Objects.equals(this.customerponumber, orderDetailRequestServicerequestOrderdetailrequest.customerponumber) && + Objects.equals(this.orderdate, orderDetailRequestServicerequestOrderdetailrequest.orderdate) && + Objects.equals(this.systemid, orderDetailRequestServicerequestOrderdetailrequest.systemid); + } + + @Override + public int hashCode() { + return Objects.hash(ordernumber, customerponumber, orderdate, systemid); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailRequestServicerequestOrderdetailrequest {\n"); + sb.append(" ordernumber: ").append(toIndentedString(ordernumber)).append("\n"); + sb.append(" customerponumber: ").append(toIndentedString(customerponumber)).append("\n"); + sb.append(" orderdate: ").append(toIndentedString(orderdate)).append("\n"); + sb.append(" systemid: ").append(toIndentedString(systemid)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("ordernumber"); + openapiFields.add("customerponumber"); + openapiFields.add("orderdate"); + openapiFields.add("systemid"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("ordernumber"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailRequestServicerequestOrderdetailrequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailRequestServicerequestOrderdetailrequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailRequestServicerequestOrderdetailrequest is not found in the empty JSON string", OrderDetailRequestServicerequestOrderdetailrequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailRequestServicerequestOrderdetailrequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailRequestServicerequestOrderdetailrequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrderDetailRequestServicerequestOrderdetailrequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("ordernumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ordernumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ordernumber").toString())); + } + if ((jsonObj.get("customerponumber") != null && !jsonObj.get("customerponumber").isJsonNull()) && !jsonObj.get("customerponumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerponumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerponumber").toString())); + } + if ((jsonObj.get("orderdate") != null && !jsonObj.get("orderdate").isJsonNull()) && !jsonObj.get("orderdate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `orderdate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orderdate").toString())); + } + if ((jsonObj.get("systemid") != null && !jsonObj.get("systemid").isJsonNull()) && !jsonObj.get("systemid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `systemid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("systemid").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailRequestServicerequestOrderdetailrequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailRequestServicerequestOrderdetailrequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailRequestServicerequestOrderdetailrequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailRequestServicerequestOrderdetailrequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailRequestServicerequestOrderdetailrequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailRequestServicerequestOrderdetailrequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailRequestServicerequestOrderdetailrequest + * @throws IOException if the JSON string is invalid with respect to OrderDetailRequestServicerequestOrderdetailrequest + */ + public static OrderDetailRequestServicerequestOrderdetailrequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailRequestServicerequestOrderdetailrequest.class); + } + + /** + * Convert an instance of OrderDetailRequestServicerequestOrderdetailrequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailResponse.java b/src/main/java/xiresellers/client/model/OrderDetailResponse.java new file mode 100644 index 00000000..9ff47f17 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailResponse.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderDetailResponseServiceresponse; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Response schema for order details endpoint + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailResponse { + public static final String SERIALIZED_NAME_SERVICERESPONSE = "serviceresponse"; + @SerializedName(SERIALIZED_NAME_SERVICERESPONSE) + private OrderDetailResponseServiceresponse serviceresponse; + + public OrderDetailResponse() { + } + + public OrderDetailResponse serviceresponse(OrderDetailResponseServiceresponse serviceresponse) { + this.serviceresponse = serviceresponse; + return this; + } + + /** + * Get serviceresponse + * @return serviceresponse + **/ + @javax.annotation.Nullable + public OrderDetailResponseServiceresponse getServiceresponse() { + return serviceresponse; + } + + public void setServiceresponse(OrderDetailResponseServiceresponse serviceresponse) { + this.serviceresponse = serviceresponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailResponse orderDetailResponse = (OrderDetailResponse) o; + return Objects.equals(this.serviceresponse, orderDetailResponse.serviceresponse); + } + + @Override + public int hashCode() { + return Objects.hash(serviceresponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailResponse {\n"); + sb.append(" serviceresponse: ").append(toIndentedString(serviceresponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("serviceresponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailResponse is not found in the empty JSON string", OrderDetailResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `serviceresponse` + if (jsonObj.get("serviceresponse") != null && !jsonObj.get("serviceresponse").isJsonNull()) { + OrderDetailResponseServiceresponse.validateJsonElement(jsonObj.get("serviceresponse")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailResponse + * @throws IOException if the JSON string is invalid with respect to OrderDetailResponse + */ + public static OrderDetailResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailResponse.class); + } + + /** + * Convert an instance of OrderDetailResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailResponseBillToInfo.java b/src/main/java/xiresellers/client/model/OrderDetailResponseBillToInfo.java new file mode 100644 index 00000000..86d23868 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailResponseBillToInfo.java @@ -0,0 +1,554 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * The billing information provided by the reseller. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailResponseBillToInfo { + public static final String SERIALIZED_NAME_CONTACT = "contact"; + @SerializedName(SERIALIZED_NAME_CONTACT) + private String contact; + + public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; + @SerializedName(SERIALIZED_NAME_COMPANY_NAME) + private String companyName; + + public static final String SERIALIZED_NAME_NAME1 = "name1"; + @SerializedName(SERIALIZED_NAME_NAME1) + private String name1; + + public static final String SERIALIZED_NAME_NAME2 = "name2"; + @SerializedName(SERIALIZED_NAME_NAME2) + private String name2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE1 = "addressLine1"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE1) + private String addressLine1; + + public static final String SERIALIZED_NAME_ADDRESS_LINE2 = "addressLine2"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE2) + private String addressLine2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE3 = "addressLine3"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE3) + private String addressLine3; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; + @SerializedName(SERIALIZED_NAME_POSTAL_CODE) + private String postalCode; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) + private String phoneNumber; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public OrderDetailResponseBillToInfo() { + } + + public OrderDetailResponseBillToInfo contact(String contact) { + this.contact = contact; + return this; + } + + /** + * The company contact provided by the reseller. + * @return contact + **/ + @javax.annotation.Nullable + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + + public OrderDetailResponseBillToInfo companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * The name of the company the order will be billed to. + * @return companyName + **/ + @javax.annotation.Nullable + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public OrderDetailResponseBillToInfo name1(String name1) { + this.name1 = name1; + return this; + } + + /** + * First name. + * @return name1 + **/ + @javax.annotation.Nullable + public String getName1() { + return name1; + } + + public void setName1(String name1) { + this.name1 = name1; + } + + + public OrderDetailResponseBillToInfo name2(String name2) { + this.name2 = name2; + return this; + } + + /** + * Last name. + * @return name2 + **/ + @javax.annotation.Nullable + public String getName2() { + return name2; + } + + public void setName2(String name2) { + this.name2 = name2; + } + + + public OrderDetailResponseBillToInfo addressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + return this; + } + + /** + * The street address and building or house number the order will be billed to. + * @return addressLine1 + **/ + @javax.annotation.Nullable + public String getAddressLine1() { + return addressLine1; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + + public OrderDetailResponseBillToInfo addressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + return this; + } + + /** + * The apartment number the order will be billed to. + * @return addressLine2 + **/ + @javax.annotation.Nullable + public String getAddressLine2() { + return addressLine2; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + + public OrderDetailResponseBillToInfo addressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + return this; + } + + /** + * Address line 3. + * @return addressLine3 + **/ + @javax.annotation.Nullable + public String getAddressLine3() { + return addressLine3; + } + + public void setAddressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + } + + + public OrderDetailResponseBillToInfo city(String city) { + this.city = city; + return this; + } + + /** + * The city the order will be billed to. + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public OrderDetailResponseBillToInfo state(String state) { + this.state = state; + return this; + } + + /** + * The state the order will be billed to. + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public OrderDetailResponseBillToInfo postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * The zip or postal code the order will be billed to. + * @return postalCode + **/ + @javax.annotation.Nullable + public String getPostalCode() { + return postalCode; + } + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public OrderDetailResponseBillToInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * The two-character ISO country code the order will be billed to. + * @return countryCode + **/ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public OrderDetailResponseBillToInfo phoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * The company contact phone number. + * @return phoneNumber + **/ + @javax.annotation.Nullable + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public OrderDetailResponseBillToInfo email(String email) { + this.email = email; + return this; + } + + /** + * The company contact email address. + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailResponseBillToInfo orderDetailResponseBillToInfo = (OrderDetailResponseBillToInfo) o; + return Objects.equals(this.contact, orderDetailResponseBillToInfo.contact) && + Objects.equals(this.companyName, orderDetailResponseBillToInfo.companyName) && + Objects.equals(this.name1, orderDetailResponseBillToInfo.name1) && + Objects.equals(this.name2, orderDetailResponseBillToInfo.name2) && + Objects.equals(this.addressLine1, orderDetailResponseBillToInfo.addressLine1) && + Objects.equals(this.addressLine2, orderDetailResponseBillToInfo.addressLine2) && + Objects.equals(this.addressLine3, orderDetailResponseBillToInfo.addressLine3) && + Objects.equals(this.city, orderDetailResponseBillToInfo.city) && + Objects.equals(this.state, orderDetailResponseBillToInfo.state) && + Objects.equals(this.postalCode, orderDetailResponseBillToInfo.postalCode) && + Objects.equals(this.countryCode, orderDetailResponseBillToInfo.countryCode) && + Objects.equals(this.phoneNumber, orderDetailResponseBillToInfo.phoneNumber) && + Objects.equals(this.email, orderDetailResponseBillToInfo.email); + } + + @Override + public int hashCode() { + return Objects.hash(contact, companyName, name1, name2, addressLine1, addressLine2, addressLine3, city, state, postalCode, countryCode, phoneNumber, email); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailResponseBillToInfo {\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" name1: ").append(toIndentedString(name1)).append("\n"); + sb.append(" name2: ").append(toIndentedString(name2)).append("\n"); + sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); + sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); + sb.append(" addressLine3: ").append(toIndentedString(addressLine3)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("contact"); + openapiFields.add("companyName"); + openapiFields.add("name1"); + openapiFields.add("name2"); + openapiFields.add("addressLine1"); + openapiFields.add("addressLine2"); + openapiFields.add("addressLine3"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalCode"); + openapiFields.add("countryCode"); + openapiFields.add("phoneNumber"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailResponseBillToInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailResponseBillToInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailResponseBillToInfo is not found in the empty JSON string", OrderDetailResponseBillToInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailResponseBillToInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailResponseBillToInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("contact") != null && !jsonObj.get("contact").isJsonNull()) && !jsonObj.get("contact").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contact` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact").toString())); + } + if ((jsonObj.get("companyName") != null && !jsonObj.get("companyName").isJsonNull()) && !jsonObj.get("companyName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); + } + if ((jsonObj.get("name1") != null && !jsonObj.get("name1").isJsonNull()) && !jsonObj.get("name1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name1").toString())); + } + if ((jsonObj.get("name2") != null && !jsonObj.get("name2").isJsonNull()) && !jsonObj.get("name2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name2").toString())); + } + if ((jsonObj.get("addressLine1") != null && !jsonObj.get("addressLine1").isJsonNull()) && !jsonObj.get("addressLine1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine1").toString())); + } + if ((jsonObj.get("addressLine2") != null && !jsonObj.get("addressLine2").isJsonNull()) && !jsonObj.get("addressLine2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine2").toString())); + } + if ((jsonObj.get("addressLine3") != null && !jsonObj.get("addressLine3").isJsonNull()) && !jsonObj.get("addressLine3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine3").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailResponseBillToInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailResponseBillToInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailResponseBillToInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailResponseBillToInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailResponseBillToInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailResponseBillToInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailResponseBillToInfo + * @throws IOException if the JSON string is invalid with respect to OrderDetailResponseBillToInfo + */ + public static OrderDetailResponseBillToInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailResponseBillToInfo.class); + } + + /** + * Convert an instance of OrderDetailResponseBillToInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailResponseEndUserInfo.java b/src/main/java/xiresellers/client/model/OrderDetailResponseEndUserInfo.java new file mode 100644 index 00000000..dcdc35b7 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailResponseEndUserInfo.java @@ -0,0 +1,554 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * The contact information for the end user/customer provided by the reseller. Used to determine pricing and discounts. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailResponseEndUserInfo { + public static final String SERIALIZED_NAME_CONTACT = "contact"; + @SerializedName(SERIALIZED_NAME_CONTACT) + private String contact; + + public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; + @SerializedName(SERIALIZED_NAME_COMPANY_NAME) + private String companyName; + + public static final String SERIALIZED_NAME_NAME1 = "name1"; + @SerializedName(SERIALIZED_NAME_NAME1) + private String name1; + + public static final String SERIALIZED_NAME_NAME2 = "name2"; + @SerializedName(SERIALIZED_NAME_NAME2) + private String name2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE1 = "addressLine1"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE1) + private String addressLine1; + + public static final String SERIALIZED_NAME_ADDRESS_LINE2 = "addressLine2"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE2) + private String addressLine2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE3 = "addressLine3"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE3) + private String addressLine3; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; + @SerializedName(SERIALIZED_NAME_POSTAL_CODE) + private String postalCode; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) + private String phoneNumber; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public OrderDetailResponseEndUserInfo() { + } + + public OrderDetailResponseEndUserInfo contact(String contact) { + this.contact = contact; + return this; + } + + /** + * The contact name for the end user/customer. + * @return contact + **/ + @javax.annotation.Nullable + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + + public OrderDetailResponseEndUserInfo companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * The company name for the end user/customer. + * @return companyName + **/ + @javax.annotation.Nullable + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public OrderDetailResponseEndUserInfo name1(String name1) { + this.name1 = name1; + return this; + } + + /** + * First name. + * @return name1 + **/ + @javax.annotation.Nullable + public String getName1() { + return name1; + } + + public void setName1(String name1) { + this.name1 = name1; + } + + + public OrderDetailResponseEndUserInfo name2(String name2) { + this.name2 = name2; + return this; + } + + /** + * Last name. + * @return name2 + **/ + @javax.annotation.Nullable + public String getName2() { + return name2; + } + + public void setName2(String name2) { + this.name2 = name2; + } + + + public OrderDetailResponseEndUserInfo addressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + return this; + } + + /** + * The street adress and building or house number for the end user/customer. + * @return addressLine1 + **/ + @javax.annotation.Nullable + public String getAddressLine1() { + return addressLine1; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + + public OrderDetailResponseEndUserInfo addressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + return this; + } + + /** + * The apartment number for the end user/customer. + * @return addressLine2 + **/ + @javax.annotation.Nullable + public String getAddressLine2() { + return addressLine2; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + + public OrderDetailResponseEndUserInfo addressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + return this; + } + + /** + * Line 3 of the address for the end user/customer. + * @return addressLine3 + **/ + @javax.annotation.Nullable + public String getAddressLine3() { + return addressLine3; + } + + public void setAddressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + } + + + public OrderDetailResponseEndUserInfo city(String city) { + this.city = city; + return this; + } + + /** + * The end user/customer's city. + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public OrderDetailResponseEndUserInfo state(String state) { + this.state = state; + return this; + } + + /** + * The end user/customer's state. + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public OrderDetailResponseEndUserInfo postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * The end user/customer's zip or postal code. + * @return postalCode + **/ + @javax.annotation.Nullable + public String getPostalCode() { + return postalCode; + } + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public OrderDetailResponseEndUserInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * The end user/customer's two character ISO country code. + * @return countryCode + **/ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public OrderDetailResponseEndUserInfo phoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * The end user/customer's phone number. + * @return phoneNumber + **/ + @javax.annotation.Nullable + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public OrderDetailResponseEndUserInfo email(String email) { + this.email = email; + return this; + } + + /** + * The end user/customer's email. + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailResponseEndUserInfo orderDetailResponseEndUserInfo = (OrderDetailResponseEndUserInfo) o; + return Objects.equals(this.contact, orderDetailResponseEndUserInfo.contact) && + Objects.equals(this.companyName, orderDetailResponseEndUserInfo.companyName) && + Objects.equals(this.name1, orderDetailResponseEndUserInfo.name1) && + Objects.equals(this.name2, orderDetailResponseEndUserInfo.name2) && + Objects.equals(this.addressLine1, orderDetailResponseEndUserInfo.addressLine1) && + Objects.equals(this.addressLine2, orderDetailResponseEndUserInfo.addressLine2) && + Objects.equals(this.addressLine3, orderDetailResponseEndUserInfo.addressLine3) && + Objects.equals(this.city, orderDetailResponseEndUserInfo.city) && + Objects.equals(this.state, orderDetailResponseEndUserInfo.state) && + Objects.equals(this.postalCode, orderDetailResponseEndUserInfo.postalCode) && + Objects.equals(this.countryCode, orderDetailResponseEndUserInfo.countryCode) && + Objects.equals(this.phoneNumber, orderDetailResponseEndUserInfo.phoneNumber) && + Objects.equals(this.email, orderDetailResponseEndUserInfo.email); + } + + @Override + public int hashCode() { + return Objects.hash(contact, companyName, name1, name2, addressLine1, addressLine2, addressLine3, city, state, postalCode, countryCode, phoneNumber, email); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailResponseEndUserInfo {\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" name1: ").append(toIndentedString(name1)).append("\n"); + sb.append(" name2: ").append(toIndentedString(name2)).append("\n"); + sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); + sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); + sb.append(" addressLine3: ").append(toIndentedString(addressLine3)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("contact"); + openapiFields.add("companyName"); + openapiFields.add("name1"); + openapiFields.add("name2"); + openapiFields.add("addressLine1"); + openapiFields.add("addressLine2"); + openapiFields.add("addressLine3"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalCode"); + openapiFields.add("countryCode"); + openapiFields.add("phoneNumber"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailResponseEndUserInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailResponseEndUserInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailResponseEndUserInfo is not found in the empty JSON string", OrderDetailResponseEndUserInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailResponseEndUserInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailResponseEndUserInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("contact") != null && !jsonObj.get("contact").isJsonNull()) && !jsonObj.get("contact").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contact` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact").toString())); + } + if ((jsonObj.get("companyName") != null && !jsonObj.get("companyName").isJsonNull()) && !jsonObj.get("companyName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); + } + if ((jsonObj.get("name1") != null && !jsonObj.get("name1").isJsonNull()) && !jsonObj.get("name1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name1").toString())); + } + if ((jsonObj.get("name2") != null && !jsonObj.get("name2").isJsonNull()) && !jsonObj.get("name2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name2").toString())); + } + if ((jsonObj.get("addressLine1") != null && !jsonObj.get("addressLine1").isJsonNull()) && !jsonObj.get("addressLine1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine1").toString())); + } + if ((jsonObj.get("addressLine2") != null && !jsonObj.get("addressLine2").isJsonNull()) && !jsonObj.get("addressLine2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine2").toString())); + } + if ((jsonObj.get("addressLine3") != null && !jsonObj.get("addressLine3").isJsonNull()) && !jsonObj.get("addressLine3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine3").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailResponseEndUserInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailResponseEndUserInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailResponseEndUserInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailResponseEndUserInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailResponseEndUserInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailResponseEndUserInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailResponseEndUserInfo + * @throws IOException if the JSON string is invalid with respect to OrderDetailResponseEndUserInfo + */ + public static OrderDetailResponseEndUserInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailResponseEndUserInfo.class); + } + + /** + * Convert an instance of OrderDetailResponseEndUserInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailResponseLinesInner.java b/src/main/java/xiresellers/client/model/OrderDetailResponseLinesInner.java new file mode 100644 index 00000000..168b37df --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailResponseLinesInner.java @@ -0,0 +1,968 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderDetailResponseLinesInnerAdditionalAttributesInner; +import xiresellers.client.model.OrderDetailResponseLinesInnerLinksInner; +import xiresellers.client.model.OrderDetailResponseLinesInnerShipmentDetailsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailResponseLinesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailResponseLinesInner { + public static final String SERIALIZED_NAME_SUB_ORDER_NUMBER = "subOrderNumber"; + @SerializedName(SERIALIZED_NAME_SUB_ORDER_NUMBER) + private String subOrderNumber; + + public static final String SERIALIZED_NAME_INGRAM_ORDER_LINE_NUMBER = "ingramOrderLineNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_ORDER_LINE_NUMBER) + private String ingramOrderLineNumber; + + public static final String SERIALIZED_NAME_VENDOR_SALES_ORDER_LINE_NUMBER = "vendorSalesOrderLineNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_SALES_ORDER_LINE_NUMBER) + private String vendorSalesOrderLineNumber; + + public static final String SERIALIZED_NAME_CUSTOMER_LINENUMBER = "customerLinenumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_LINENUMBER) + private String customerLinenumber; + + public static final String SERIALIZED_NAME_LINE_STATUS = "lineStatus"; + @SerializedName(SERIALIZED_NAME_LINE_STATUS) + private String lineStatus; + + public static final String SERIALIZED_NAME_INGRAM_PART_NUMBER = "ingramPartNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PART_NUMBER) + private String ingramPartNumber; + + public static final String SERIALIZED_NAME_VENDOR_PART_NUMBER = "vendorPartNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_PART_NUMBER) + private String vendorPartNumber; + + public static final String SERIALIZED_NAME_VENDOR_NAME = "vendorName"; + @SerializedName(SERIALIZED_NAME_VENDOR_NAME) + private String vendorName; + + public static final String SERIALIZED_NAME_PART_DESCRIPTION = "partDescription"; + @SerializedName(SERIALIZED_NAME_PART_DESCRIPTION) + private String partDescription; + + public static final String SERIALIZED_NAME_UNIT_WEIGHT = "unitWeight"; + @SerializedName(SERIALIZED_NAME_UNIT_WEIGHT) + private BigDecimal unitWeight; + + public static final String SERIALIZED_NAME_WEIGHT_UOM = "weightUom"; + @SerializedName(SERIALIZED_NAME_WEIGHT_UOM) + private String weightUom; + + public static final String SERIALIZED_NAME_UNIT_PRICE = "unitPrice"; + @SerializedName(SERIALIZED_NAME_UNIT_PRICE) + private Integer unitPrice; + + public static final String SERIALIZED_NAME_UPC_CODE = "upcCode"; + @SerializedName(SERIALIZED_NAME_UPC_CODE) + private String upcCode; + + public static final String SERIALIZED_NAME_EXTENDED_PRICE = "extendedPrice"; + @SerializedName(SERIALIZED_NAME_EXTENDED_PRICE) + private BigDecimal extendedPrice; + + public static final String SERIALIZED_NAME_TAX_AMOUNT = "taxAmount"; + @SerializedName(SERIALIZED_NAME_TAX_AMOUNT) + private BigDecimal taxAmount; + + public static final String SERIALIZED_NAME_CURRENCY_CODE = "currencyCode"; + @SerializedName(SERIALIZED_NAME_CURRENCY_CODE) + private String currencyCode; + + public static final String SERIALIZED_NAME_QUANTITY_ORDERED = "quantityOrdered"; + @SerializedName(SERIALIZED_NAME_QUANTITY_ORDERED) + private Integer quantityOrdered; + + public static final String SERIALIZED_NAME_QUANTITY_CONFIRMED = "quantityConfirmed"; + @SerializedName(SERIALIZED_NAME_QUANTITY_CONFIRMED) + private Integer quantityConfirmed; + + public static final String SERIALIZED_NAME_QUANTITY_BACK_ORDERED = "quantityBackOrdered"; + @SerializedName(SERIALIZED_NAME_QUANTITY_BACK_ORDERED) + private Integer quantityBackOrdered; + + public static final String SERIALIZED_NAME_SPECIAL_BID_NUMBER = "specialBidNumber"; + @SerializedName(SERIALIZED_NAME_SPECIAL_BID_NUMBER) + private String specialBidNumber; + + public static final String SERIALIZED_NAME_REQUESTED_DELIVERY_DATE = "requestedDeliveryDate"; + @SerializedName(SERIALIZED_NAME_REQUESTED_DELIVERY_DATE) + private LocalDate requestedDeliveryDate; + + public static final String SERIALIZED_NAME_PROMISED_DELIVERY_DATE = "promisedDeliveryDate"; + @SerializedName(SERIALIZED_NAME_PROMISED_DELIVERY_DATE) + private LocalDate promisedDeliveryDate; + + public static final String SERIALIZED_NAME_LINE_NOTES = "lineNotes"; + @SerializedName(SERIALIZED_NAME_LINE_NOTES) + private String lineNotes; + + public static final String SERIALIZED_NAME_SHIPMENT_DETAILS = "shipmentDetails"; + @SerializedName(SERIALIZED_NAME_SHIPMENT_DETAILS) + private List shipmentDetails; + + public static final String SERIALIZED_NAME_ADDITIONAL_ATTRIBUTES = "additionalAttributes"; + @SerializedName(SERIALIZED_NAME_ADDITIONAL_ATTRIBUTES) + private List additionalAttributes; + + public static final String SERIALIZED_NAME_LINKS = "links"; + @SerializedName(SERIALIZED_NAME_LINKS) + private List links; + + public OrderDetailResponseLinesInner() { + } + + public OrderDetailResponseLinesInner subOrderNumber(String subOrderNumber) { + this.subOrderNumber = subOrderNumber; + return this; + } + + /** + * The sub order number. The two-digit prefix is the warehouse code of the warehouse nearest the reseller. The middle number is the order number. The two-digit suffix is the sub order number. + * @return subOrderNumber + **/ + @javax.annotation.Nullable + public String getSubOrderNumber() { + return subOrderNumber; + } + + public void setSubOrderNumber(String subOrderNumber) { + this.subOrderNumber = subOrderNumber; + } + + + public OrderDetailResponseLinesInner ingramOrderLineNumber(String ingramOrderLineNumber) { + this.ingramOrderLineNumber = ingramOrderLineNumber; + return this; + } + + /** + * Unique Ingram Micro line number. Starts with 001. + * @return ingramOrderLineNumber + **/ + @javax.annotation.Nullable + public String getIngramOrderLineNumber() { + return ingramOrderLineNumber; + } + + public void setIngramOrderLineNumber(String ingramOrderLineNumber) { + this.ingramOrderLineNumber = ingramOrderLineNumber; + } + + + public OrderDetailResponseLinesInner vendorSalesOrderLineNumber(String vendorSalesOrderLineNumber) { + this.vendorSalesOrderLineNumber = vendorSalesOrderLineNumber; + return this; + } + + /** + * The vendor's sales order line number. + * @return vendorSalesOrderLineNumber + **/ + @javax.annotation.Nullable + public String getVendorSalesOrderLineNumber() { + return vendorSalesOrderLineNumber; + } + + public void setVendorSalesOrderLineNumber(String vendorSalesOrderLineNumber) { + this.vendorSalesOrderLineNumber = vendorSalesOrderLineNumber; + } + + + public OrderDetailResponseLinesInner customerLinenumber(String customerLinenumber) { + this.customerLinenumber = customerLinenumber; + return this; + } + + /** + * The reseller's line item number for reference in their system. + * @return customerLinenumber + **/ + @javax.annotation.Nullable + public String getCustomerLinenumber() { + return customerLinenumber; + } + + public void setCustomerLinenumber(String customerLinenumber) { + this.customerLinenumber = customerLinenumber; + } + + + public OrderDetailResponseLinesInner lineStatus(String lineStatus) { + this.lineStatus = lineStatus; + return this; + } + + /** + * The status for the line item in the order. One of- Backordered, In Progress, Shipped, Delivered, Canceled, On Hold + * @return lineStatus + **/ + @javax.annotation.Nullable + public String getLineStatus() { + return lineStatus; + } + + public void setLineStatus(String lineStatus) { + this.lineStatus = lineStatus; + } + + + public OrderDetailResponseLinesInner ingramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + return this; + } + + /** + * Unique IngramMicro part number. + * @return ingramPartNumber + **/ + @javax.annotation.Nullable + public String getIngramPartNumber() { + return ingramPartNumber; + } + + public void setIngramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + } + + + public OrderDetailResponseLinesInner vendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + return this; + } + + /** + * The vendor's part number for the line item. + * @return vendorPartNumber + **/ + @javax.annotation.Nullable + public String getVendorPartNumber() { + return vendorPartNumber; + } + + public void setVendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + } + + + public OrderDetailResponseLinesInner vendorName(String vendorName) { + this.vendorName = vendorName; + return this; + } + + /** + * The vendor's name for the part in their system. + * @return vendorName + **/ + @javax.annotation.Nullable + public String getVendorName() { + return vendorName; + } + + public void setVendorName(String vendorName) { + this.vendorName = vendorName; + } + + + public OrderDetailResponseLinesInner partDescription(String partDescription) { + this.partDescription = partDescription; + return this; + } + + /** + * The vendor's description of the part in their system. + * @return partDescription + **/ + @javax.annotation.Nullable + public String getPartDescription() { + return partDescription; + } + + public void setPartDescription(String partDescription) { + this.partDescription = partDescription; + } + + + public OrderDetailResponseLinesInner unitWeight(BigDecimal unitWeight) { + this.unitWeight = unitWeight; + return this; + } + + /** + * The unit weight of the line item. + * @return unitWeight + **/ + @javax.annotation.Nullable + public BigDecimal getUnitWeight() { + return unitWeight; + } + + public void setUnitWeight(BigDecimal unitWeight) { + this.unitWeight = unitWeight; + } + + + public OrderDetailResponseLinesInner weightUom(String weightUom) { + this.weightUom = weightUom; + return this; + } + + /** + * The unit of measure for the line item. + * @return weightUom + **/ + @javax.annotation.Nullable + public String getWeightUom() { + return weightUom; + } + + public void setWeightUom(String weightUom) { + this.weightUom = weightUom; + } + + + public OrderDetailResponseLinesInner unitPrice(Integer unitPrice) { + this.unitPrice = unitPrice; + return this; + } + + /** + * The unit price of the line item. + * @return unitPrice + **/ + @javax.annotation.Nullable + public Integer getUnitPrice() { + return unitPrice; + } + + public void setUnitPrice(Integer unitPrice) { + this.unitPrice = unitPrice; + } + + + public OrderDetailResponseLinesInner upcCode(String upcCode) { + this.upcCode = upcCode; + return this; + } + + /** + * The UPC code of a product. + * @return upcCode + **/ + @javax.annotation.Nullable + public String getUpcCode() { + return upcCode; + } + + public void setUpcCode(String upcCode) { + this.upcCode = upcCode; + } + + + public OrderDetailResponseLinesInner extendedPrice(BigDecimal extendedPrice) { + this.extendedPrice = extendedPrice; + return this; + } + + /** + * Unit price X quantity for the line item. + * @return extendedPrice + **/ + @javax.annotation.Nullable + public BigDecimal getExtendedPrice() { + return extendedPrice; + } + + public void setExtendedPrice(BigDecimal extendedPrice) { + this.extendedPrice = extendedPrice; + } + + + public OrderDetailResponseLinesInner taxAmount(BigDecimal taxAmount) { + this.taxAmount = taxAmount; + return this; + } + + /** + * The tax amount for the line item. + * @return taxAmount + **/ + @javax.annotation.Nullable + public BigDecimal getTaxAmount() { + return taxAmount; + } + + public void setTaxAmount(BigDecimal taxAmount) { + this.taxAmount = taxAmount; + } + + + public OrderDetailResponseLinesInner currencyCode(String currencyCode) { + this.currencyCode = currencyCode; + return this; + } + + /** + * The country-specific three character ISO 4217 currency code for the line item. + * @return currencyCode + **/ + @javax.annotation.Nullable + public String getCurrencyCode() { + return currencyCode; + } + + public void setCurrencyCode(String currencyCode) { + this.currencyCode = currencyCode; + } + + + public OrderDetailResponseLinesInner quantityOrdered(Integer quantityOrdered) { + this.quantityOrdered = quantityOrdered; + return this; + } + + /** + * The quantity ordered of the line item. + * @return quantityOrdered + **/ + @javax.annotation.Nullable + public Integer getQuantityOrdered() { + return quantityOrdered; + } + + public void setQuantityOrdered(Integer quantityOrdered) { + this.quantityOrdered = quantityOrdered; + } + + + public OrderDetailResponseLinesInner quantityConfirmed(Integer quantityConfirmed) { + this.quantityConfirmed = quantityConfirmed; + return this; + } + + /** + * The quantity confirmed for the line item. + * @return quantityConfirmed + **/ + @javax.annotation.Nullable + public Integer getQuantityConfirmed() { + return quantityConfirmed; + } + + public void setQuantityConfirmed(Integer quantityConfirmed) { + this.quantityConfirmed = quantityConfirmed; + } + + + public OrderDetailResponseLinesInner quantityBackOrdered(Integer quantityBackOrdered) { + this.quantityBackOrdered = quantityBackOrdered; + return this; + } + + /** + * The quantity backordered for the line item. + * @return quantityBackOrdered + **/ + @javax.annotation.Nullable + public Integer getQuantityBackOrdered() { + return quantityBackOrdered; + } + + public void setQuantityBackOrdered(Integer quantityBackOrdered) { + this.quantityBackOrdered = quantityBackOrdered; + } + + + public OrderDetailResponseLinesInner specialBidNumber(String specialBidNumber) { + this.specialBidNumber = specialBidNumber; + return this; + } + + /** + * The line-level bid number provided to the reseller by the vendor for special pricing and discounts. Used to track the bid number in the case of split orders or where different line items have different bid numbers. Line-level bid numbers take precedence over header-level bid numbers. + * @return specialBidNumber + **/ + @javax.annotation.Nullable + public String getSpecialBidNumber() { + return specialBidNumber; + } + + public void setSpecialBidNumber(String specialBidNumber) { + this.specialBidNumber = specialBidNumber; + } + + + public OrderDetailResponseLinesInner requestedDeliveryDate(LocalDate requestedDeliveryDate) { + this.requestedDeliveryDate = requestedDeliveryDate; + return this; + } + + /** + * Reseller-requested delivery date. Delivery date is not guaranteed. + * @return requestedDeliveryDate + **/ + @javax.annotation.Nullable + public LocalDate getRequestedDeliveryDate() { + return requestedDeliveryDate; + } + + public void setRequestedDeliveryDate(LocalDate requestedDeliveryDate) { + this.requestedDeliveryDate = requestedDeliveryDate; + } + + + public OrderDetailResponseLinesInner promisedDeliveryDate(LocalDate promisedDeliveryDate) { + this.promisedDeliveryDate = promisedDeliveryDate; + return this; + } + + /** + * The delivery date promised by IngramMicro. + * @return promisedDeliveryDate + **/ + @javax.annotation.Nullable + public LocalDate getPromisedDeliveryDate() { + return promisedDeliveryDate; + } + + public void setPromisedDeliveryDate(LocalDate promisedDeliveryDate) { + this.promisedDeliveryDate = promisedDeliveryDate; + } + + + public OrderDetailResponseLinesInner lineNotes(String lineNotes) { + this.lineNotes = lineNotes; + return this; + } + + /** + * Line-level notes for the order. + * @return lineNotes + **/ + @javax.annotation.Nullable + public String getLineNotes() { + return lineNotes; + } + + public void setLineNotes(String lineNotes) { + this.lineNotes = lineNotes; + } + + + public OrderDetailResponseLinesInner shipmentDetails(List shipmentDetails) { + this.shipmentDetails = shipmentDetails; + return this; + } + + public OrderDetailResponseLinesInner addShipmentDetailsItem(OrderDetailResponseLinesInnerShipmentDetailsInner shipmentDetailsItem) { + if (this.shipmentDetails == null) { + this.shipmentDetails = new ArrayList<>(); + } + this.shipmentDetails.add(shipmentDetailsItem); + return this; + } + + /** + * Get shipmentDetails + * @return shipmentDetails + **/ + @javax.annotation.Nullable + public List getShipmentDetails() { + return shipmentDetails; + } + + public void setShipmentDetails(List shipmentDetails) { + this.shipmentDetails = shipmentDetails; + } + + + public OrderDetailResponseLinesInner additionalAttributes(List additionalAttributes) { + this.additionalAttributes = additionalAttributes; + return this; + } + + public OrderDetailResponseLinesInner addAdditionalAttributesItem(OrderDetailResponseLinesInnerAdditionalAttributesInner additionalAttributesItem) { + if (this.additionalAttributes == null) { + this.additionalAttributes = new ArrayList<>(); + } + this.additionalAttributes.add(additionalAttributesItem); + return this; + } + + /** + * Get additionalAttributes + * @return additionalAttributes + **/ + @javax.annotation.Nullable + public List getAdditionalAttributes() { + return additionalAttributes; + } + + public void setAdditionalAttributes(List additionalAttributes) { + this.additionalAttributes = additionalAttributes; + } + + + public OrderDetailResponseLinesInner links(List links) { + this.links = links; + return this; + } + + public OrderDetailResponseLinesInner addLinksItem(OrderDetailResponseLinesInnerLinksInner linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * Get links + * @return links + **/ + @javax.annotation.Nullable + public List getLinks() { + return links; + } + + public void setLinks(List links) { + this.links = links; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailResponseLinesInner orderDetailResponseLinesInner = (OrderDetailResponseLinesInner) o; + return Objects.equals(this.subOrderNumber, orderDetailResponseLinesInner.subOrderNumber) && + Objects.equals(this.ingramOrderLineNumber, orderDetailResponseLinesInner.ingramOrderLineNumber) && + Objects.equals(this.vendorSalesOrderLineNumber, orderDetailResponseLinesInner.vendorSalesOrderLineNumber) && + Objects.equals(this.customerLinenumber, orderDetailResponseLinesInner.customerLinenumber) && + Objects.equals(this.lineStatus, orderDetailResponseLinesInner.lineStatus) && + Objects.equals(this.ingramPartNumber, orderDetailResponseLinesInner.ingramPartNumber) && + Objects.equals(this.vendorPartNumber, orderDetailResponseLinesInner.vendorPartNumber) && + Objects.equals(this.vendorName, orderDetailResponseLinesInner.vendorName) && + Objects.equals(this.partDescription, orderDetailResponseLinesInner.partDescription) && + Objects.equals(this.unitWeight, orderDetailResponseLinesInner.unitWeight) && + Objects.equals(this.weightUom, orderDetailResponseLinesInner.weightUom) && + Objects.equals(this.unitPrice, orderDetailResponseLinesInner.unitPrice) && + Objects.equals(this.upcCode, orderDetailResponseLinesInner.upcCode) && + Objects.equals(this.extendedPrice, orderDetailResponseLinesInner.extendedPrice) && + Objects.equals(this.taxAmount, orderDetailResponseLinesInner.taxAmount) && + Objects.equals(this.currencyCode, orderDetailResponseLinesInner.currencyCode) && + Objects.equals(this.quantityOrdered, orderDetailResponseLinesInner.quantityOrdered) && + Objects.equals(this.quantityConfirmed, orderDetailResponseLinesInner.quantityConfirmed) && + Objects.equals(this.quantityBackOrdered, orderDetailResponseLinesInner.quantityBackOrdered) && + Objects.equals(this.specialBidNumber, orderDetailResponseLinesInner.specialBidNumber) && + Objects.equals(this.requestedDeliveryDate, orderDetailResponseLinesInner.requestedDeliveryDate) && + Objects.equals(this.promisedDeliveryDate, orderDetailResponseLinesInner.promisedDeliveryDate) && + Objects.equals(this.lineNotes, orderDetailResponseLinesInner.lineNotes) && + Objects.equals(this.shipmentDetails, orderDetailResponseLinesInner.shipmentDetails) && + Objects.equals(this.additionalAttributes, orderDetailResponseLinesInner.additionalAttributes) && + Objects.equals(this.links, orderDetailResponseLinesInner.links); + } + + @Override + public int hashCode() { + return Objects.hash(subOrderNumber, ingramOrderLineNumber, vendorSalesOrderLineNumber, customerLinenumber, lineStatus, ingramPartNumber, vendorPartNumber, vendorName, partDescription, unitWeight, weightUom, unitPrice, upcCode, extendedPrice, taxAmount, currencyCode, quantityOrdered, quantityConfirmed, quantityBackOrdered, specialBidNumber, requestedDeliveryDate, promisedDeliveryDate, lineNotes, shipmentDetails, additionalAttributes, links); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailResponseLinesInner {\n"); + sb.append(" subOrderNumber: ").append(toIndentedString(subOrderNumber)).append("\n"); + sb.append(" ingramOrderLineNumber: ").append(toIndentedString(ingramOrderLineNumber)).append("\n"); + sb.append(" vendorSalesOrderLineNumber: ").append(toIndentedString(vendorSalesOrderLineNumber)).append("\n"); + sb.append(" customerLinenumber: ").append(toIndentedString(customerLinenumber)).append("\n"); + sb.append(" lineStatus: ").append(toIndentedString(lineStatus)).append("\n"); + sb.append(" ingramPartNumber: ").append(toIndentedString(ingramPartNumber)).append("\n"); + sb.append(" vendorPartNumber: ").append(toIndentedString(vendorPartNumber)).append("\n"); + sb.append(" vendorName: ").append(toIndentedString(vendorName)).append("\n"); + sb.append(" partDescription: ").append(toIndentedString(partDescription)).append("\n"); + sb.append(" unitWeight: ").append(toIndentedString(unitWeight)).append("\n"); + sb.append(" weightUom: ").append(toIndentedString(weightUom)).append("\n"); + sb.append(" unitPrice: ").append(toIndentedString(unitPrice)).append("\n"); + sb.append(" upcCode: ").append(toIndentedString(upcCode)).append("\n"); + sb.append(" extendedPrice: ").append(toIndentedString(extendedPrice)).append("\n"); + sb.append(" taxAmount: ").append(toIndentedString(taxAmount)).append("\n"); + sb.append(" currencyCode: ").append(toIndentedString(currencyCode)).append("\n"); + sb.append(" quantityOrdered: ").append(toIndentedString(quantityOrdered)).append("\n"); + sb.append(" quantityConfirmed: ").append(toIndentedString(quantityConfirmed)).append("\n"); + sb.append(" quantityBackOrdered: ").append(toIndentedString(quantityBackOrdered)).append("\n"); + sb.append(" specialBidNumber: ").append(toIndentedString(specialBidNumber)).append("\n"); + sb.append(" requestedDeliveryDate: ").append(toIndentedString(requestedDeliveryDate)).append("\n"); + sb.append(" promisedDeliveryDate: ").append(toIndentedString(promisedDeliveryDate)).append("\n"); + sb.append(" lineNotes: ").append(toIndentedString(lineNotes)).append("\n"); + sb.append(" shipmentDetails: ").append(toIndentedString(shipmentDetails)).append("\n"); + sb.append(" additionalAttributes: ").append(toIndentedString(additionalAttributes)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("subOrderNumber"); + openapiFields.add("ingramOrderLineNumber"); + openapiFields.add("vendorSalesOrderLineNumber"); + openapiFields.add("customerLinenumber"); + openapiFields.add("lineStatus"); + openapiFields.add("ingramPartNumber"); + openapiFields.add("vendorPartNumber"); + openapiFields.add("vendorName"); + openapiFields.add("partDescription"); + openapiFields.add("unitWeight"); + openapiFields.add("weightUom"); + openapiFields.add("unitPrice"); + openapiFields.add("upcCode"); + openapiFields.add("extendedPrice"); + openapiFields.add("taxAmount"); + openapiFields.add("currencyCode"); + openapiFields.add("quantityOrdered"); + openapiFields.add("quantityConfirmed"); + openapiFields.add("quantityBackOrdered"); + openapiFields.add("specialBidNumber"); + openapiFields.add("requestedDeliveryDate"); + openapiFields.add("promisedDeliveryDate"); + openapiFields.add("lineNotes"); + openapiFields.add("shipmentDetails"); + openapiFields.add("additionalAttributes"); + openapiFields.add("links"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailResponseLinesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailResponseLinesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailResponseLinesInner is not found in the empty JSON string", OrderDetailResponseLinesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailResponseLinesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailResponseLinesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("subOrderNumber") != null && !jsonObj.get("subOrderNumber").isJsonNull()) && !jsonObj.get("subOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subOrderNumber").toString())); + } + if ((jsonObj.get("ingramOrderLineNumber") != null && !jsonObj.get("ingramOrderLineNumber").isJsonNull()) && !jsonObj.get("ingramOrderLineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramOrderLineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramOrderLineNumber").toString())); + } + if ((jsonObj.get("vendorSalesOrderLineNumber") != null && !jsonObj.get("vendorSalesOrderLineNumber").isJsonNull()) && !jsonObj.get("vendorSalesOrderLineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorSalesOrderLineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorSalesOrderLineNumber").toString())); + } + if ((jsonObj.get("customerLinenumber") != null && !jsonObj.get("customerLinenumber").isJsonNull()) && !jsonObj.get("customerLinenumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerLinenumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerLinenumber").toString())); + } + if ((jsonObj.get("lineStatus") != null && !jsonObj.get("lineStatus").isJsonNull()) && !jsonObj.get("lineStatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lineStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lineStatus").toString())); + } + if ((jsonObj.get("ingramPartNumber") != null && !jsonObj.get("ingramPartNumber").isJsonNull()) && !jsonObj.get("ingramPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPartNumber").toString())); + } + if ((jsonObj.get("vendorPartNumber") != null && !jsonObj.get("vendorPartNumber").isJsonNull()) && !jsonObj.get("vendorPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorPartNumber").toString())); + } + if ((jsonObj.get("vendorName") != null && !jsonObj.get("vendorName").isJsonNull()) && !jsonObj.get("vendorName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorName").toString())); + } + if ((jsonObj.get("partDescription") != null && !jsonObj.get("partDescription").isJsonNull()) && !jsonObj.get("partDescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `partDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("partDescription").toString())); + } + if ((jsonObj.get("weightUom") != null && !jsonObj.get("weightUom").isJsonNull()) && !jsonObj.get("weightUom").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `weightUom` to be a primitive type in the JSON string but got `%s`", jsonObj.get("weightUom").toString())); + } + if ((jsonObj.get("upcCode") != null && !jsonObj.get("upcCode").isJsonNull()) && !jsonObj.get("upcCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `upcCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("upcCode").toString())); + } + if ((jsonObj.get("currencyCode") != null && !jsonObj.get("currencyCode").isJsonNull()) && !jsonObj.get("currencyCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `currencyCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currencyCode").toString())); + } + if ((jsonObj.get("specialBidNumber") != null && !jsonObj.get("specialBidNumber").isJsonNull()) && !jsonObj.get("specialBidNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `specialBidNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("specialBidNumber").toString())); + } + if ((jsonObj.get("lineNotes") != null && !jsonObj.get("lineNotes").isJsonNull()) && !jsonObj.get("lineNotes").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lineNotes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lineNotes").toString())); + } + if (jsonObj.get("shipmentDetails") != null && !jsonObj.get("shipmentDetails").isJsonNull()) { + JsonArray jsonArrayshipmentDetails = jsonObj.getAsJsonArray("shipmentDetails"); + if (jsonArrayshipmentDetails != null) { + // ensure the json data is an array + if (!jsonObj.get("shipmentDetails").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `shipmentDetails` to be an array in the JSON string but got `%s`", jsonObj.get("shipmentDetails").toString())); + } + + // validate the optional field `shipmentDetails` (array) + for (int i = 0; i < jsonArrayshipmentDetails.size(); i++) { + OrderDetailResponseLinesInnerShipmentDetailsInner.validateJsonElement(jsonArrayshipmentDetails.get(i)); + }; + } + } + if (jsonObj.get("additionalAttributes") != null && !jsonObj.get("additionalAttributes").isJsonNull()) { + JsonArray jsonArrayadditionalAttributes = jsonObj.getAsJsonArray("additionalAttributes"); + if (jsonArrayadditionalAttributes != null) { + // ensure the json data is an array + if (!jsonObj.get("additionalAttributes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `additionalAttributes` to be an array in the JSON string but got `%s`", jsonObj.get("additionalAttributes").toString())); + } + + // validate the optional field `additionalAttributes` (array) + for (int i = 0; i < jsonArrayadditionalAttributes.size(); i++) { + OrderDetailResponseLinesInnerAdditionalAttributesInner.validateJsonElement(jsonArrayadditionalAttributes.get(i)); + }; + } + } + if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull()) { + JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); + if (jsonArraylinks != null) { + // ensure the json data is an array + if (!jsonObj.get("links").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + } + + // validate the optional field `links` (array) + for (int i = 0; i < jsonArraylinks.size(); i++) { + OrderDetailResponseLinesInnerLinksInner.validateJsonElement(jsonArraylinks.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailResponseLinesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailResponseLinesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailResponseLinesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailResponseLinesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailResponseLinesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailResponseLinesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailResponseLinesInner + * @throws IOException if the JSON string is invalid with respect to OrderDetailResponseLinesInner + */ + public static OrderDetailResponseLinesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailResponseLinesInner.class); + } + + /** + * Convert an instance of OrderDetailResponseLinesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailResponseLinesInnerAdditionalAttributesInner.java b/src/main/java/xiresellers/client/model/OrderDetailResponseLinesInnerAdditionalAttributesInner.java new file mode 100644 index 00000000..8a4cbcad --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailResponseLinesInnerAdditionalAttributesInner.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailResponseLinesInnerAdditionalAttributesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailResponseLinesInnerAdditionalAttributesInner { + public static final String SERIALIZED_NAME_ATTRIBUTE_NAME = "attributeName"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_NAME) + private String attributeName; + + public static final String SERIALIZED_NAME_ATTRIBUTE_VALUE = "attributeValue"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_VALUE) + private String attributeValue; + + public OrderDetailResponseLinesInnerAdditionalAttributesInner() { + } + + public OrderDetailResponseLinesInnerAdditionalAttributesInner attributeName(String attributeName) { + this.attributeName = attributeName; + return this; + } + + /** + * Line level custom field names. + * @return attributeName + **/ + @javax.annotation.Nullable + public String getAttributeName() { + return attributeName; + } + + public void setAttributeName(String attributeName) { + this.attributeName = attributeName; + } + + + public OrderDetailResponseLinesInnerAdditionalAttributesInner attributeValue(String attributeValue) { + this.attributeValue = attributeValue; + return this; + } + + /** + * Value of the custom fields. + * @return attributeValue + **/ + @javax.annotation.Nullable + public String getAttributeValue() { + return attributeValue; + } + + public void setAttributeValue(String attributeValue) { + this.attributeValue = attributeValue; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailResponseLinesInnerAdditionalAttributesInner orderDetailResponseLinesInnerAdditionalAttributesInner = (OrderDetailResponseLinesInnerAdditionalAttributesInner) o; + return Objects.equals(this.attributeName, orderDetailResponseLinesInnerAdditionalAttributesInner.attributeName) && + Objects.equals(this.attributeValue, orderDetailResponseLinesInnerAdditionalAttributesInner.attributeValue); + } + + @Override + public int hashCode() { + return Objects.hash(attributeName, attributeValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailResponseLinesInnerAdditionalAttributesInner {\n"); + sb.append(" attributeName: ").append(toIndentedString(attributeName)).append("\n"); + sb.append(" attributeValue: ").append(toIndentedString(attributeValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributeName"); + openapiFields.add("attributeValue"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailResponseLinesInnerAdditionalAttributesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailResponseLinesInnerAdditionalAttributesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailResponseLinesInnerAdditionalAttributesInner is not found in the empty JSON string", OrderDetailResponseLinesInnerAdditionalAttributesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailResponseLinesInnerAdditionalAttributesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailResponseLinesInnerAdditionalAttributesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("attributeName") != null && !jsonObj.get("attributeName").isJsonNull()) && !jsonObj.get("attributeName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeName").toString())); + } + if ((jsonObj.get("attributeValue") != null && !jsonObj.get("attributeValue").isJsonNull()) && !jsonObj.get("attributeValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeValue").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailResponseLinesInnerAdditionalAttributesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailResponseLinesInnerAdditionalAttributesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailResponseLinesInnerAdditionalAttributesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailResponseLinesInnerAdditionalAttributesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailResponseLinesInnerAdditionalAttributesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailResponseLinesInnerAdditionalAttributesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailResponseLinesInnerAdditionalAttributesInner + * @throws IOException if the JSON string is invalid with respect to OrderDetailResponseLinesInnerAdditionalAttributesInner + */ + public static OrderDetailResponseLinesInnerAdditionalAttributesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailResponseLinesInnerAdditionalAttributesInner.class); + } + + /** + * Convert an instance of OrderDetailResponseLinesInnerAdditionalAttributesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailResponseLinesInnerLinksInner.java b/src/main/java/xiresellers/client/model/OrderDetailResponseLinesInnerLinksInner.java new file mode 100644 index 00000000..113bcb5f --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailResponseLinesInnerLinksInner.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Link to Order Details for the line item. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailResponseLinesInnerLinksInner { + public static final String SERIALIZED_NAME_TOPIC = "topic"; + @SerializedName(SERIALIZED_NAME_TOPIC) + private String topic; + + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + private String href; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public OrderDetailResponseLinesInnerLinksInner() { + } + + public OrderDetailResponseLinesInnerLinksInner topic(String topic) { + this.topic = topic; + return this; + } + + /** + * Provides the details of the line item. + * @return topic + **/ + @javax.annotation.Nullable + public String getTopic() { + return topic; + } + + public void setTopic(String topic) { + this.topic = topic; + } + + + public OrderDetailResponseLinesInnerLinksInner href(String href) { + this.href = href; + return this; + } + + /** + * The API endpoint for accessing the relevant data. + * @return href + **/ + @javax.annotation.Nullable + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + + public OrderDetailResponseLinesInnerLinksInner type(String type) { + this.type = type; + return this; + } + + /** + * The type of call that can be made to the href link(GET,POST etc). + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailResponseLinesInnerLinksInner orderDetailResponseLinesInnerLinksInner = (OrderDetailResponseLinesInnerLinksInner) o; + return Objects.equals(this.topic, orderDetailResponseLinesInnerLinksInner.topic) && + Objects.equals(this.href, orderDetailResponseLinesInnerLinksInner.href) && + Objects.equals(this.type, orderDetailResponseLinesInnerLinksInner.type); + } + + @Override + public int hashCode() { + return Objects.hash(topic, href, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailResponseLinesInnerLinksInner {\n"); + sb.append(" topic: ").append(toIndentedString(topic)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("topic"); + openapiFields.add("href"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailResponseLinesInnerLinksInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailResponseLinesInnerLinksInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailResponseLinesInnerLinksInner is not found in the empty JSON string", OrderDetailResponseLinesInnerLinksInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailResponseLinesInnerLinksInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailResponseLinesInnerLinksInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("topic") != null && !jsonObj.get("topic").isJsonNull()) && !jsonObj.get("topic").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `topic` to be a primitive type in the JSON string but got `%s`", jsonObj.get("topic").toString())); + } + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailResponseLinesInnerLinksInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailResponseLinesInnerLinksInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailResponseLinesInnerLinksInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailResponseLinesInnerLinksInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailResponseLinesInnerLinksInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailResponseLinesInnerLinksInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailResponseLinesInnerLinksInner + * @throws IOException if the JSON string is invalid with respect to OrderDetailResponseLinesInnerLinksInner + */ + public static OrderDetailResponseLinesInnerLinksInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailResponseLinesInnerLinksInner.class); + } + + /** + * Convert an instance of OrderDetailResponseLinesInnerLinksInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInner.java b/src/main/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInner.java new file mode 100644 index 00000000..eff873e9 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInner.java @@ -0,0 +1,452 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.Arrays; +import xiresellers.client.model.OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Shipping details for the line item. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailResponseLinesInnerShipmentDetailsInner { + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + @SerializedName(SERIALIZED_NAME_QUANTITY) + private Integer quantity; + + public static final String SERIALIZED_NAME_ESTIMATED_SHIP_DATE = "estimatedShipDate"; + @SerializedName(SERIALIZED_NAME_ESTIMATED_SHIP_DATE) + private LocalDate estimatedShipDate; + + public static final String SERIALIZED_NAME_SHIPPED_DATE = "shippedDate"; + @SerializedName(SERIALIZED_NAME_SHIPPED_DATE) + private LocalDate shippedDate; + + public static final String SERIALIZED_NAME_ESTIMATED_DELIVERY_DATE = "estimatedDeliveryDate"; + @SerializedName(SERIALIZED_NAME_ESTIMATED_DELIVERY_DATE) + private LocalDate estimatedDeliveryDate; + + public static final String SERIALIZED_NAME_DELIVERED_DATE = "deliveredDate"; + @SerializedName(SERIALIZED_NAME_DELIVERED_DATE) + private LocalDate deliveredDate; + + public static final String SERIALIZED_NAME_SHIP_FROM_WAREHOUSE_ID = "shipFromWarehouseId"; + @SerializedName(SERIALIZED_NAME_SHIP_FROM_WAREHOUSE_ID) + private String shipFromWarehouseId; + + public static final String SERIALIZED_NAME_SHIP_FROM_LOCATION = "shipFromLocation"; + @SerializedName(SERIALIZED_NAME_SHIP_FROM_LOCATION) + private String shipFromLocation; + + public static final String SERIALIZED_NAME_INVOICE_NUMBER = "invoiceNumber"; + @SerializedName(SERIALIZED_NAME_INVOICE_NUMBER) + private String invoiceNumber; + + public static final String SERIALIZED_NAME_INVOICE_DATE = "invoiceDate"; + @SerializedName(SERIALIZED_NAME_INVOICE_DATE) + private LocalDate invoiceDate; + + public static final String SERIALIZED_NAME_CARRIER_DETAILS = "carrierDetails"; + @SerializedName(SERIALIZED_NAME_CARRIER_DETAILS) + private OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails carrierDetails; + + public OrderDetailResponseLinesInnerShipmentDetailsInner() { + } + + public OrderDetailResponseLinesInnerShipmentDetailsInner quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * The quantity shipped of the line item. + * @return quantity + **/ + @javax.annotation.Nullable + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + + public OrderDetailResponseLinesInnerShipmentDetailsInner estimatedShipDate(LocalDate estimatedShipDate) { + this.estimatedShipDate = estimatedShipDate; + return this; + } + + /** + * The estimated ship date for the line item. + * @return estimatedShipDate + **/ + @javax.annotation.Nullable + public LocalDate getEstimatedShipDate() { + return estimatedShipDate; + } + + public void setEstimatedShipDate(LocalDate estimatedShipDate) { + this.estimatedShipDate = estimatedShipDate; + } + + + public OrderDetailResponseLinesInnerShipmentDetailsInner shippedDate(LocalDate shippedDate) { + this.shippedDate = shippedDate; + return this; + } + + /** + * The date the line item was shipped. + * @return shippedDate + **/ + @javax.annotation.Nullable + public LocalDate getShippedDate() { + return shippedDate; + } + + public void setShippedDate(LocalDate shippedDate) { + this.shippedDate = shippedDate; + } + + + public OrderDetailResponseLinesInnerShipmentDetailsInner estimatedDeliveryDate(LocalDate estimatedDeliveryDate) { + this.estimatedDeliveryDate = estimatedDeliveryDate; + return this; + } + + /** + * The date the line item is expected to be delivered. + * @return estimatedDeliveryDate + **/ + @javax.annotation.Nullable + public LocalDate getEstimatedDeliveryDate() { + return estimatedDeliveryDate; + } + + public void setEstimatedDeliveryDate(LocalDate estimatedDeliveryDate) { + this.estimatedDeliveryDate = estimatedDeliveryDate; + } + + + public OrderDetailResponseLinesInnerShipmentDetailsInner deliveredDate(LocalDate deliveredDate) { + this.deliveredDate = deliveredDate; + return this; + } + + /** + * The actual date of delivery of the line item. + * @return deliveredDate + **/ + @javax.annotation.Nullable + public LocalDate getDeliveredDate() { + return deliveredDate; + } + + public void setDeliveredDate(LocalDate deliveredDate) { + this.deliveredDate = deliveredDate; + } + + + public OrderDetailResponseLinesInnerShipmentDetailsInner shipFromWarehouseId(String shipFromWarehouseId) { + this.shipFromWarehouseId = shipFromWarehouseId; + return this; + } + + /** + * The ID of the warehouse the product will ship from. + * @return shipFromWarehouseId + **/ + @javax.annotation.Nullable + public String getShipFromWarehouseId() { + return shipFromWarehouseId; + } + + public void setShipFromWarehouseId(String shipFromWarehouseId) { + this.shipFromWarehouseId = shipFromWarehouseId; + } + + + public OrderDetailResponseLinesInnerShipmentDetailsInner shipFromLocation(String shipFromLocation) { + this.shipFromLocation = shipFromLocation; + return this; + } + + /** + * The city and state the line item ships from. + * @return shipFromLocation + **/ + @javax.annotation.Nullable + public String getShipFromLocation() { + return shipFromLocation; + } + + public void setShipFromLocation(String shipFromLocation) { + this.shipFromLocation = shipFromLocation; + } + + + public OrderDetailResponseLinesInnerShipmentDetailsInner invoiceNumber(String invoiceNumber) { + this.invoiceNumber = invoiceNumber; + return this; + } + + /** + * The Ingram Micro invoice number for the line item. + * @return invoiceNumber + **/ + @javax.annotation.Nullable + public String getInvoiceNumber() { + return invoiceNumber; + } + + public void setInvoiceNumber(String invoiceNumber) { + this.invoiceNumber = invoiceNumber; + } + + + public OrderDetailResponseLinesInnerShipmentDetailsInner invoiceDate(LocalDate invoiceDate) { + this.invoiceDate = invoiceDate; + return this; + } + + /** + * The date the IngramMicro invoice was created for the line item. + * @return invoiceDate + **/ + @javax.annotation.Nullable + public LocalDate getInvoiceDate() { + return invoiceDate; + } + + public void setInvoiceDate(LocalDate invoiceDate) { + this.invoiceDate = invoiceDate; + } + + + public OrderDetailResponseLinesInnerShipmentDetailsInner carrierDetails(OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails carrierDetails) { + this.carrierDetails = carrierDetails; + return this; + } + + /** + * Get carrierDetails + * @return carrierDetails + **/ + @javax.annotation.Nullable + public OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails getCarrierDetails() { + return carrierDetails; + } + + public void setCarrierDetails(OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails carrierDetails) { + this.carrierDetails = carrierDetails; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailResponseLinesInnerShipmentDetailsInner orderDetailResponseLinesInnerShipmentDetailsInner = (OrderDetailResponseLinesInnerShipmentDetailsInner) o; + return Objects.equals(this.quantity, orderDetailResponseLinesInnerShipmentDetailsInner.quantity) && + Objects.equals(this.estimatedShipDate, orderDetailResponseLinesInnerShipmentDetailsInner.estimatedShipDate) && + Objects.equals(this.shippedDate, orderDetailResponseLinesInnerShipmentDetailsInner.shippedDate) && + Objects.equals(this.estimatedDeliveryDate, orderDetailResponseLinesInnerShipmentDetailsInner.estimatedDeliveryDate) && + Objects.equals(this.deliveredDate, orderDetailResponseLinesInnerShipmentDetailsInner.deliveredDate) && + Objects.equals(this.shipFromWarehouseId, orderDetailResponseLinesInnerShipmentDetailsInner.shipFromWarehouseId) && + Objects.equals(this.shipFromLocation, orderDetailResponseLinesInnerShipmentDetailsInner.shipFromLocation) && + Objects.equals(this.invoiceNumber, orderDetailResponseLinesInnerShipmentDetailsInner.invoiceNumber) && + Objects.equals(this.invoiceDate, orderDetailResponseLinesInnerShipmentDetailsInner.invoiceDate) && + Objects.equals(this.carrierDetails, orderDetailResponseLinesInnerShipmentDetailsInner.carrierDetails); + } + + @Override + public int hashCode() { + return Objects.hash(quantity, estimatedShipDate, shippedDate, estimatedDeliveryDate, deliveredDate, shipFromWarehouseId, shipFromLocation, invoiceNumber, invoiceDate, carrierDetails); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailResponseLinesInnerShipmentDetailsInner {\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" estimatedShipDate: ").append(toIndentedString(estimatedShipDate)).append("\n"); + sb.append(" shippedDate: ").append(toIndentedString(shippedDate)).append("\n"); + sb.append(" estimatedDeliveryDate: ").append(toIndentedString(estimatedDeliveryDate)).append("\n"); + sb.append(" deliveredDate: ").append(toIndentedString(deliveredDate)).append("\n"); + sb.append(" shipFromWarehouseId: ").append(toIndentedString(shipFromWarehouseId)).append("\n"); + sb.append(" shipFromLocation: ").append(toIndentedString(shipFromLocation)).append("\n"); + sb.append(" invoiceNumber: ").append(toIndentedString(invoiceNumber)).append("\n"); + sb.append(" invoiceDate: ").append(toIndentedString(invoiceDate)).append("\n"); + sb.append(" carrierDetails: ").append(toIndentedString(carrierDetails)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("quantity"); + openapiFields.add("estimatedShipDate"); + openapiFields.add("shippedDate"); + openapiFields.add("estimatedDeliveryDate"); + openapiFields.add("deliveredDate"); + openapiFields.add("shipFromWarehouseId"); + openapiFields.add("shipFromLocation"); + openapiFields.add("invoiceNumber"); + openapiFields.add("invoiceDate"); + openapiFields.add("carrierDetails"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailResponseLinesInnerShipmentDetailsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailResponseLinesInnerShipmentDetailsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailResponseLinesInnerShipmentDetailsInner is not found in the empty JSON string", OrderDetailResponseLinesInnerShipmentDetailsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailResponseLinesInnerShipmentDetailsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailResponseLinesInnerShipmentDetailsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("shipFromWarehouseId") != null && !jsonObj.get("shipFromWarehouseId").isJsonNull()) && !jsonObj.get("shipFromWarehouseId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shipFromWarehouseId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shipFromWarehouseId").toString())); + } + if ((jsonObj.get("shipFromLocation") != null && !jsonObj.get("shipFromLocation").isJsonNull()) && !jsonObj.get("shipFromLocation").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shipFromLocation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shipFromLocation").toString())); + } + if ((jsonObj.get("invoiceNumber") != null && !jsonObj.get("invoiceNumber").isJsonNull()) && !jsonObj.get("invoiceNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `invoiceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoiceNumber").toString())); + } + // validate the optional field `carrierDetails` + if (jsonObj.get("carrierDetails") != null && !jsonObj.get("carrierDetails").isJsonNull()) { + OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails.validateJsonElement(jsonObj.get("carrierDetails")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailResponseLinesInnerShipmentDetailsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailResponseLinesInnerShipmentDetailsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailResponseLinesInnerShipmentDetailsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailResponseLinesInnerShipmentDetailsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailResponseLinesInnerShipmentDetailsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailResponseLinesInnerShipmentDetailsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailResponseLinesInnerShipmentDetailsInner + * @throws IOException if the JSON string is invalid with respect to OrderDetailResponseLinesInnerShipmentDetailsInner + */ + public static OrderDetailResponseLinesInnerShipmentDetailsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailResponseLinesInnerShipmentDetailsInner.class); + } + + /** + * Convert an instance of OrderDetailResponseLinesInnerShipmentDetailsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails.java b/src/main/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails.java new file mode 100644 index 00000000..a1ed3653 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails.java @@ -0,0 +1,286 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * The shipment carrier details for the line item. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails { + public static final String SERIALIZED_NAME_CARRIER_CODE = "carrierCode"; + @SerializedName(SERIALIZED_NAME_CARRIER_CODE) + private String carrierCode; + + public static final String SERIALIZED_NAME_CARRIER_NAME = "carrierName"; + @SerializedName(SERIALIZED_NAME_CARRIER_NAME) + private String carrierName; + + public static final String SERIALIZED_NAME_TRACKING_DETAILS = "trackingDetails"; + @SerializedName(SERIALIZED_NAME_TRACKING_DETAILS) + private List trackingDetails; + + public OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails() { + } + + public OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails carrierCode(String carrierCode) { + this.carrierCode = carrierCode; + return this; + } + + /** + * The carrier code for the shipment containing the line item. + * @return carrierCode + **/ + @javax.annotation.Nullable + public String getCarrierCode() { + return carrierCode; + } + + public void setCarrierCode(String carrierCode) { + this.carrierCode = carrierCode; + } + + + public OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails carrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** + * The name of the carrier of the shipment containing the line item. + * @return carrierName + **/ + @javax.annotation.Nullable + public String getCarrierName() { + return carrierName; + } + + public void setCarrierName(String carrierName) { + this.carrierName = carrierName; + } + + + public OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails trackingDetails(List trackingDetails) { + this.trackingDetails = trackingDetails; + return this; + } + + public OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails addTrackingDetailsItem(OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner trackingDetailsItem) { + if (this.trackingDetails == null) { + this.trackingDetails = new ArrayList<>(); + } + this.trackingDetails.add(trackingDetailsItem); + return this; + } + + /** + * Get trackingDetails + * @return trackingDetails + **/ + @javax.annotation.Nullable + public List getTrackingDetails() { + return trackingDetails; + } + + public void setTrackingDetails(List trackingDetails) { + this.trackingDetails = trackingDetails; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails orderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails = (OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails) o; + return Objects.equals(this.carrierCode, orderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails.carrierCode) && + Objects.equals(this.carrierName, orderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails.carrierName) && + Objects.equals(this.trackingDetails, orderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails.trackingDetails); + } + + @Override + public int hashCode() { + return Objects.hash(carrierCode, carrierName, trackingDetails); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails {\n"); + sb.append(" carrierCode: ").append(toIndentedString(carrierCode)).append("\n"); + sb.append(" carrierName: ").append(toIndentedString(carrierName)).append("\n"); + sb.append(" trackingDetails: ").append(toIndentedString(trackingDetails)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("carrierCode"); + openapiFields.add("carrierName"); + openapiFields.add("trackingDetails"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails is not found in the empty JSON string", OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("carrierCode") != null && !jsonObj.get("carrierCode").isJsonNull()) && !jsonObj.get("carrierCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `carrierCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierCode").toString())); + } + if ((jsonObj.get("carrierName") != null && !jsonObj.get("carrierName").isJsonNull()) && !jsonObj.get("carrierName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `carrierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierName").toString())); + } + if (jsonObj.get("trackingDetails") != null && !jsonObj.get("trackingDetails").isJsonNull()) { + JsonArray jsonArraytrackingDetails = jsonObj.getAsJsonArray("trackingDetails"); + if (jsonArraytrackingDetails != null) { + // ensure the json data is an array + if (!jsonObj.get("trackingDetails").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `trackingDetails` to be an array in the JSON string but got `%s`", jsonObj.get("trackingDetails").toString())); + } + + // validate the optional field `trackingDetails` (array) + for (int i = 0; i < jsonArraytrackingDetails.size(); i++) { + OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner.validateJsonElement(jsonArraytrackingDetails.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails + * @throws IOException if the JSON string is invalid with respect to OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails + */ + public static OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails.class); + } + + /** + * Convert an instance of OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner.java b/src/main/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner.java new file mode 100644 index 00000000..5dffca78 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner.java @@ -0,0 +1,373 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * The tracking details for the shipment containing the line item. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner { + public static final String SERIALIZED_NAME_TRACKING_NUMBER = "trackingNumber"; + @SerializedName(SERIALIZED_NAME_TRACKING_NUMBER) + private String trackingNumber; + + public static final String SERIALIZED_NAME_TRACKING_URL = "trackingUrl"; + @SerializedName(SERIALIZED_NAME_TRACKING_URL) + private String trackingUrl; + + public static final String SERIALIZED_NAME_PACKAGE_WEIGHT = "packageWeight"; + @SerializedName(SERIALIZED_NAME_PACKAGE_WEIGHT) + private String packageWeight; + + public static final String SERIALIZED_NAME_CARTON_NUMBER = "cartonNumber"; + @SerializedName(SERIALIZED_NAME_CARTON_NUMBER) + private String cartonNumber; + + public static final String SERIALIZED_NAME_QUANTITY_IN_BOX = "quantityInBox"; + @SerializedName(SERIALIZED_NAME_QUANTITY_IN_BOX) + private String quantityInBox; + + public static final String SERIALIZED_NAME_SERIAL_NUMBERS = "SerialNumbers"; + @SerializedName(SERIALIZED_NAME_SERIAL_NUMBERS) + private List serialNumbers; + + public OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner() { + } + + public OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner trackingNumber(String trackingNumber) { + this.trackingNumber = trackingNumber; + return this; + } + + /** + * The tracking number for the shipment containing the line item. + * @return trackingNumber + **/ + @javax.annotation.Nullable + public String getTrackingNumber() { + return trackingNumber; + } + + public void setTrackingNumber(String trackingNumber) { + this.trackingNumber = trackingNumber; + } + + + public OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner trackingUrl(String trackingUrl) { + this.trackingUrl = trackingUrl; + return this; + } + + /** + * The tracking URL for the shipment containing the line item. + * @return trackingUrl + **/ + @javax.annotation.Nullable + public String getTrackingUrl() { + return trackingUrl; + } + + public void setTrackingUrl(String trackingUrl) { + this.trackingUrl = trackingUrl; + } + + + public OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner packageWeight(String packageWeight) { + this.packageWeight = packageWeight; + return this; + } + + /** + * The weight of the package for the line item. + * @return packageWeight + **/ + @javax.annotation.Nullable + public String getPackageWeight() { + return packageWeight; + } + + public void setPackageWeight(String packageWeight) { + this.packageWeight = packageWeight; + } + + + public OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner cartonNumber(String cartonNumber) { + this.cartonNumber = cartonNumber; + return this; + } + + /** + * The shipment carton number that contains the line item. + * @return cartonNumber + **/ + @javax.annotation.Nullable + public String getCartonNumber() { + return cartonNumber; + } + + public void setCartonNumber(String cartonNumber) { + this.cartonNumber = cartonNumber; + } + + + public OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner quantityInBox(String quantityInBox) { + this.quantityInBox = quantityInBox; + return this; + } + + /** + * The quantity of line items in the box. + * @return quantityInBox + **/ + @javax.annotation.Nullable + public String getQuantityInBox() { + return quantityInBox; + } + + public void setQuantityInBox(String quantityInBox) { + this.quantityInBox = quantityInBox; + } + + + public OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner serialNumbers(List serialNumbers) { + this.serialNumbers = serialNumbers; + return this; + } + + public OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner addSerialNumbersItem(OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner serialNumbersItem) { + if (this.serialNumbers == null) { + this.serialNumbers = new ArrayList<>(); + } + this.serialNumbers.add(serialNumbersItem); + return this; + } + + /** + * Get serialNumbers + * @return serialNumbers + **/ + @javax.annotation.Nullable + public List getSerialNumbers() { + return serialNumbers; + } + + public void setSerialNumbers(List serialNumbers) { + this.serialNumbers = serialNumbers; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner orderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner = (OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner) o; + return Objects.equals(this.trackingNumber, orderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner.trackingNumber) && + Objects.equals(this.trackingUrl, orderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner.trackingUrl) && + Objects.equals(this.packageWeight, orderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner.packageWeight) && + Objects.equals(this.cartonNumber, orderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner.cartonNumber) && + Objects.equals(this.quantityInBox, orderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner.quantityInBox) && + Objects.equals(this.serialNumbers, orderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner.serialNumbers); + } + + @Override + public int hashCode() { + return Objects.hash(trackingNumber, trackingUrl, packageWeight, cartonNumber, quantityInBox, serialNumbers); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner {\n"); + sb.append(" trackingNumber: ").append(toIndentedString(trackingNumber)).append("\n"); + sb.append(" trackingUrl: ").append(toIndentedString(trackingUrl)).append("\n"); + sb.append(" packageWeight: ").append(toIndentedString(packageWeight)).append("\n"); + sb.append(" cartonNumber: ").append(toIndentedString(cartonNumber)).append("\n"); + sb.append(" quantityInBox: ").append(toIndentedString(quantityInBox)).append("\n"); + sb.append(" serialNumbers: ").append(toIndentedString(serialNumbers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("trackingNumber"); + openapiFields.add("trackingUrl"); + openapiFields.add("packageWeight"); + openapiFields.add("cartonNumber"); + openapiFields.add("quantityInBox"); + openapiFields.add("SerialNumbers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner is not found in the empty JSON string", OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("trackingNumber") != null && !jsonObj.get("trackingNumber").isJsonNull()) && !jsonObj.get("trackingNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `trackingNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("trackingNumber").toString())); + } + if ((jsonObj.get("trackingUrl") != null && !jsonObj.get("trackingUrl").isJsonNull()) && !jsonObj.get("trackingUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `trackingUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("trackingUrl").toString())); + } + if ((jsonObj.get("packageWeight") != null && !jsonObj.get("packageWeight").isJsonNull()) && !jsonObj.get("packageWeight").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `packageWeight` to be a primitive type in the JSON string but got `%s`", jsonObj.get("packageWeight").toString())); + } + if ((jsonObj.get("cartonNumber") != null && !jsonObj.get("cartonNumber").isJsonNull()) && !jsonObj.get("cartonNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cartonNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cartonNumber").toString())); + } + if ((jsonObj.get("quantityInBox") != null && !jsonObj.get("quantityInBox").isJsonNull()) && !jsonObj.get("quantityInBox").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quantityInBox` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quantityInBox").toString())); + } + if (jsonObj.get("SerialNumbers") != null && !jsonObj.get("SerialNumbers").isJsonNull()) { + JsonArray jsonArrayserialNumbers = jsonObj.getAsJsonArray("SerialNumbers"); + if (jsonArrayserialNumbers != null) { + // ensure the json data is an array + if (!jsonObj.get("SerialNumbers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `SerialNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("SerialNumbers").toString())); + } + + // validate the optional field `SerialNumbers` (array) + for (int i = 0; i < jsonArrayserialNumbers.size(); i++) { + OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner.validateJsonElement(jsonArrayserialNumbers.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner + * @throws IOException if the JSON string is invalid with respect to OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner + */ + public static OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner.class); + } + + /** + * Convert an instance of OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner.java b/src/main/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner.java new file mode 100644 index 00000000..19a2d9e6 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner.java @@ -0,0 +1,206 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * A list of serial numbers of the line items contained in the shipment. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner { + public static final String SERIALIZED_NAME_SERIAL_NUMBER = "serialNumber"; + @SerializedName(SERIALIZED_NAME_SERIAL_NUMBER) + private String serialNumber; + + public OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner() { + } + + public OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner serialNumber(String serialNumber) { + this.serialNumber = serialNumber; + return this; + } + + /** + * The serial number for the line item. + * @return serialNumber + **/ + @javax.annotation.Nullable + public String getSerialNumber() { + return serialNumber; + } + + public void setSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner orderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner = (OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner) o; + return Objects.equals(this.serialNumber, orderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner.serialNumber); + } + + @Override + public int hashCode() { + return Objects.hash(serialNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner {\n"); + sb.append(" serialNumber: ").append(toIndentedString(serialNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("serialNumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner is not found in the empty JSON string", OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("serialNumber") != null && !jsonObj.get("serialNumber").isJsonNull()) && !jsonObj.get("serialNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `serialNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("serialNumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner + * @throws IOException if the JSON string is invalid with respect to OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner + */ + public static OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner.class); + } + + /** + * Convert an instance of OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailResponseMiscellaneousChargesInner.java b/src/main/java/xiresellers/client/model/OrderDetailResponseMiscellaneousChargesInner.java new file mode 100644 index 00000000..cc0551f8 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailResponseMiscellaneousChargesInner.java @@ -0,0 +1,290 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailResponseMiscellaneousChargesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailResponseMiscellaneousChargesInner { + public static final String SERIALIZED_NAME_SUB_ORDER_NUMBER = "subOrderNumber"; + @SerializedName(SERIALIZED_NAME_SUB_ORDER_NUMBER) + private String subOrderNumber; + + public static final String SERIALIZED_NAME_CHARGE_LINE_REFERENCE = "chargeLineReference"; + @SerializedName(SERIALIZED_NAME_CHARGE_LINE_REFERENCE) + private String chargeLineReference; + + public static final String SERIALIZED_NAME_CHARGE_DESCRIPTION = "chargeDescription"; + @SerializedName(SERIALIZED_NAME_CHARGE_DESCRIPTION) + private String chargeDescription; + + public static final String SERIALIZED_NAME_CHARGE_AMOUNT = "chargeAmount"; + @SerializedName(SERIALIZED_NAME_CHARGE_AMOUNT) + private Double chargeAmount; + + public OrderDetailResponseMiscellaneousChargesInner() { + } + + public OrderDetailResponseMiscellaneousChargesInner subOrderNumber(String subOrderNumber) { + this.subOrderNumber = subOrderNumber; + return this; + } + + /** + * The sub order number. The two-digit prefix is the warehouse code of the warehouse nearest the reseller. The middle number is the order number. The two-digit suffix is the sub order number. + * @return subOrderNumber + **/ + @javax.annotation.Nullable + public String getSubOrderNumber() { + return subOrderNumber; + } + + public void setSubOrderNumber(String subOrderNumber) { + this.subOrderNumber = subOrderNumber; + } + + + public OrderDetailResponseMiscellaneousChargesInner chargeLineReference(String chargeLineReference) { + this.chargeLineReference = chargeLineReference; + return this; + } + + /** + * Impulse line number for the miscellaneous charge. + * @return chargeLineReference + **/ + @javax.annotation.Nullable + public String getChargeLineReference() { + return chargeLineReference; + } + + public void setChargeLineReference(String chargeLineReference) { + this.chargeLineReference = chargeLineReference; + } + + + public OrderDetailResponseMiscellaneousChargesInner chargeDescription(String chargeDescription) { + this.chargeDescription = chargeDescription; + return this; + } + + /** + * Description of the miscellaneous charges. + * @return chargeDescription + **/ + @javax.annotation.Nullable + public String getChargeDescription() { + return chargeDescription; + } + + public void setChargeDescription(String chargeDescription) { + this.chargeDescription = chargeDescription; + } + + + public OrderDetailResponseMiscellaneousChargesInner chargeAmount(Double chargeAmount) { + this.chargeAmount = chargeAmount; + return this; + } + + /** + * The amount of miscellaneous charges. + * @return chargeAmount + **/ + @javax.annotation.Nullable + public Double getChargeAmount() { + return chargeAmount; + } + + public void setChargeAmount(Double chargeAmount) { + this.chargeAmount = chargeAmount; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailResponseMiscellaneousChargesInner orderDetailResponseMiscellaneousChargesInner = (OrderDetailResponseMiscellaneousChargesInner) o; + return Objects.equals(this.subOrderNumber, orderDetailResponseMiscellaneousChargesInner.subOrderNumber) && + Objects.equals(this.chargeLineReference, orderDetailResponseMiscellaneousChargesInner.chargeLineReference) && + Objects.equals(this.chargeDescription, orderDetailResponseMiscellaneousChargesInner.chargeDescription) && + Objects.equals(this.chargeAmount, orderDetailResponseMiscellaneousChargesInner.chargeAmount); + } + + @Override + public int hashCode() { + return Objects.hash(subOrderNumber, chargeLineReference, chargeDescription, chargeAmount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailResponseMiscellaneousChargesInner {\n"); + sb.append(" subOrderNumber: ").append(toIndentedString(subOrderNumber)).append("\n"); + sb.append(" chargeLineReference: ").append(toIndentedString(chargeLineReference)).append("\n"); + sb.append(" chargeDescription: ").append(toIndentedString(chargeDescription)).append("\n"); + sb.append(" chargeAmount: ").append(toIndentedString(chargeAmount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("subOrderNumber"); + openapiFields.add("chargeLineReference"); + openapiFields.add("chargeDescription"); + openapiFields.add("chargeAmount"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailResponseMiscellaneousChargesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailResponseMiscellaneousChargesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailResponseMiscellaneousChargesInner is not found in the empty JSON string", OrderDetailResponseMiscellaneousChargesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailResponseMiscellaneousChargesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailResponseMiscellaneousChargesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("subOrderNumber") != null && !jsonObj.get("subOrderNumber").isJsonNull()) && !jsonObj.get("subOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subOrderNumber").toString())); + } + if ((jsonObj.get("chargeLineReference") != null && !jsonObj.get("chargeLineReference").isJsonNull()) && !jsonObj.get("chargeLineReference").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `chargeLineReference` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chargeLineReference").toString())); + } + if ((jsonObj.get("chargeDescription") != null && !jsonObj.get("chargeDescription").isJsonNull()) && !jsonObj.get("chargeDescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `chargeDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chargeDescription").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailResponseMiscellaneousChargesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailResponseMiscellaneousChargesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailResponseMiscellaneousChargesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailResponseMiscellaneousChargesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailResponseMiscellaneousChargesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailResponseMiscellaneousChargesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailResponseMiscellaneousChargesInner + * @throws IOException if the JSON string is invalid with respect to OrderDetailResponseMiscellaneousChargesInner + */ + public static OrderDetailResponseMiscellaneousChargesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailResponseMiscellaneousChargesInner.class); + } + + /** + * Convert an instance of OrderDetailResponseMiscellaneousChargesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponse.java b/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponse.java new file mode 100644 index 00000000..b2c9c1ce --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponse.java @@ -0,0 +1,239 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.InvoiceDetailResponseServiceresponseResponsepreamble; +import xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponse; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailResponseServiceresponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailResponseServiceresponse { + public static final String SERIALIZED_NAME_RESPONSEPREAMBLE = "responsepreamble"; + @SerializedName(SERIALIZED_NAME_RESPONSEPREAMBLE) + private InvoiceDetailResponseServiceresponseResponsepreamble responsepreamble; + + public static final String SERIALIZED_NAME_ORDERDETAILRESPONSE = "orderdetailresponse"; + @SerializedName(SERIALIZED_NAME_ORDERDETAILRESPONSE) + private OrderDetailResponseServiceresponseOrderdetailresponse orderdetailresponse; + + public OrderDetailResponseServiceresponse() { + } + + public OrderDetailResponseServiceresponse responsepreamble(InvoiceDetailResponseServiceresponseResponsepreamble responsepreamble) { + this.responsepreamble = responsepreamble; + return this; + } + + /** + * Get responsepreamble + * @return responsepreamble + **/ + @javax.annotation.Nullable + public InvoiceDetailResponseServiceresponseResponsepreamble getResponsepreamble() { + return responsepreamble; + } + + public void setResponsepreamble(InvoiceDetailResponseServiceresponseResponsepreamble responsepreamble) { + this.responsepreamble = responsepreamble; + } + + + public OrderDetailResponseServiceresponse orderdetailresponse(OrderDetailResponseServiceresponseOrderdetailresponse orderdetailresponse) { + this.orderdetailresponse = orderdetailresponse; + return this; + } + + /** + * Get orderdetailresponse + * @return orderdetailresponse + **/ + @javax.annotation.Nullable + public OrderDetailResponseServiceresponseOrderdetailresponse getOrderdetailresponse() { + return orderdetailresponse; + } + + public void setOrderdetailresponse(OrderDetailResponseServiceresponseOrderdetailresponse orderdetailresponse) { + this.orderdetailresponse = orderdetailresponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailResponseServiceresponse orderDetailResponseServiceresponse = (OrderDetailResponseServiceresponse) o; + return Objects.equals(this.responsepreamble, orderDetailResponseServiceresponse.responsepreamble) && + Objects.equals(this.orderdetailresponse, orderDetailResponseServiceresponse.orderdetailresponse); + } + + @Override + public int hashCode() { + return Objects.hash(responsepreamble, orderdetailresponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailResponseServiceresponse {\n"); + sb.append(" responsepreamble: ").append(toIndentedString(responsepreamble)).append("\n"); + sb.append(" orderdetailresponse: ").append(toIndentedString(orderdetailresponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("responsepreamble"); + openapiFields.add("orderdetailresponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailResponseServiceresponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailResponseServiceresponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailResponseServiceresponse is not found in the empty JSON string", OrderDetailResponseServiceresponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailResponseServiceresponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailResponseServiceresponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `responsepreamble` + if (jsonObj.get("responsepreamble") != null && !jsonObj.get("responsepreamble").isJsonNull()) { + InvoiceDetailResponseServiceresponseResponsepreamble.validateJsonElement(jsonObj.get("responsepreamble")); + } + // validate the optional field `orderdetailresponse` + if (jsonObj.get("orderdetailresponse") != null && !jsonObj.get("orderdetailresponse").isJsonNull()) { + OrderDetailResponseServiceresponseOrderdetailresponse.validateJsonElement(jsonObj.get("orderdetailresponse")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailResponseServiceresponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailResponseServiceresponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailResponseServiceresponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailResponseServiceresponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailResponseServiceresponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailResponseServiceresponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailResponseServiceresponse + * @throws IOException if the JSON string is invalid with respect to OrderDetailResponseServiceresponse + */ + public static OrderDetailResponseServiceresponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailResponseServiceresponse.class); + } + + /** + * Convert an instance of OrderDetailResponseServiceresponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponse.java b/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponse.java new file mode 100644 index 00000000..850dcf2f --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponse.java @@ -0,0 +1,840 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress; +import xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner; +import xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo; +import xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner; +import xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseLinesInner; +import xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner; +import xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailResponseServiceresponseOrderdetailresponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailResponseServiceresponseOrderdetailresponse { + public static final String SERIALIZED_NAME_ORDERNUMBER = "ordernumber"; + @SerializedName(SERIALIZED_NAME_ORDERNUMBER) + private String ordernumber; + + public static final String SERIALIZED_NAME_ORDERTYPE = "ordertype"; + @SerializedName(SERIALIZED_NAME_ORDERTYPE) + private String ordertype; + + public static final String SERIALIZED_NAME_CUSTOMERORDERNUMBER = "customerordernumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMERORDERNUMBER) + private String customerordernumber; + + public static final String SERIALIZED_NAME_ENDUSERPONUMBER = "enduserponumber"; + @SerializedName(SERIALIZED_NAME_ENDUSERPONUMBER) + private String enduserponumber; + + public static final String SERIALIZED_NAME_ORDERSTATUS = "orderstatus"; + @SerializedName(SERIALIZED_NAME_ORDERSTATUS) + private String orderstatus; + + public static final String SERIALIZED_NAME_ENTRYTIMESTAMP = "entrytimestamp"; + @SerializedName(SERIALIZED_NAME_ENTRYTIMESTAMP) + private String entrytimestamp; + + public static final String SERIALIZED_NAME_ENTRYMETHODDESCRIPTION = "entrymethoddescription"; + @SerializedName(SERIALIZED_NAME_ENTRYMETHODDESCRIPTION) + private String entrymethoddescription; + + public static final String SERIALIZED_NAME_ORDERTOTALVALUE = "ordertotalvalue"; + @SerializedName(SERIALIZED_NAME_ORDERTOTALVALUE) + private BigDecimal ordertotalvalue; + + public static final String SERIALIZED_NAME_ORDERSUBTOTAL = "ordersubtotal"; + @SerializedName(SERIALIZED_NAME_ORDERSUBTOTAL) + private BigDecimal ordersubtotal; + + public static final String SERIALIZED_NAME_FREIGHTAMOUNT = "freightamount"; + @SerializedName(SERIALIZED_NAME_FREIGHTAMOUNT) + private String freightamount; + + public static final String SERIALIZED_NAME_CURRENCYCODE = "currencycode"; + @SerializedName(SERIALIZED_NAME_CURRENCYCODE) + private String currencycode; + + public static final String SERIALIZED_NAME_TOTALWEIGHT = "totalweight"; + @SerializedName(SERIALIZED_NAME_TOTALWEIGHT) + private String totalweight; + + public static final String SERIALIZED_NAME_TOTALTAX = "totaltax"; + @SerializedName(SERIALIZED_NAME_TOTALTAX) + private String totaltax; + + public static final String SERIALIZED_NAME_BILLTOADDRESS = "billtoaddress"; + @SerializedName(SERIALIZED_NAME_BILLTOADDRESS) + private OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress billtoaddress; + + public static final String SERIALIZED_NAME_SHIPTOADDRESS = "shiptoaddress"; + @SerializedName(SERIALIZED_NAME_SHIPTOADDRESS) + private OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress shiptoaddress; + + public static final String SERIALIZED_NAME_ENDUSERINFO = "enduserinfo"; + @SerializedName(SERIALIZED_NAME_ENDUSERINFO) + private OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo enduserinfo; + + public static final String SERIALIZED_NAME_LINES = "lines"; + @SerializedName(SERIALIZED_NAME_LINES) + private List lines; + + public static final String SERIALIZED_NAME_COMMENTLINES = "commentlines"; + @SerializedName(SERIALIZED_NAME_COMMENTLINES) + private List commentlines; + + public static final String SERIALIZED_NAME_MISCFEELINE = "miscfeeline"; + @SerializedName(SERIALIZED_NAME_MISCFEELINE) + private List miscfeeline; + + public static final String SERIALIZED_NAME_EXTENDEDSPECS = "extendedspecs"; + @SerializedName(SERIALIZED_NAME_EXTENDEDSPECS) + private List extendedspecs; + + public OrderDetailResponseServiceresponseOrderdetailresponse() { + } + + public OrderDetailResponseServiceresponseOrderdetailresponse ordernumber(String ordernumber) { + this.ordernumber = ordernumber; + return this; + } + + /** + * Get ordernumber + * @return ordernumber + **/ + @javax.annotation.Nullable + public String getOrdernumber() { + return ordernumber; + } + + public void setOrdernumber(String ordernumber) { + this.ordernumber = ordernumber; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponse ordertype(String ordertype) { + this.ordertype = ordertype; + return this; + } + + /** + * Order Type B - BRANCH TRANSFER C - CASH ORDER D - DIRECT ORDER F - FUTURE ORDER P - SPECIAL ORDER Q - QUOTE ORDER S - STOCK ORDER M - MEMO ORDER + * @return ordertype + **/ + @javax.annotation.Nullable + public String getOrdertype() { + return ordertype; + } + + public void setOrdertype(String ordertype) { + this.ordertype = ordertype; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponse customerordernumber(String customerordernumber) { + this.customerordernumber = customerordernumber; + return this; + } + + /** + * Customer PO number + * @return customerordernumber + **/ + @javax.annotation.Nullable + public String getCustomerordernumber() { + return customerordernumber; + } + + public void setCustomerordernumber(String customerordernumber) { + this.customerordernumber = customerordernumber; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponse enduserponumber(String enduserponumber) { + this.enduserponumber = enduserponumber; + return this; + } + + /** + * End User PO number + * @return enduserponumber + **/ + @javax.annotation.Nullable + public String getEnduserponumber() { + return enduserponumber; + } + + public void setEnduserponumber(String enduserponumber) { + this.enduserponumber = enduserponumber; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponse orderstatus(String orderstatus) { + this.orderstatus = orderstatus; + return this; + } + + /** + * Status of order within Ingram system S - SALES HOLD H - TAG HOLD I - INVOICED P - PENDING E - BILLING ERROR F - FORCE BILLING V - VOIDED T - TRANSFERRED D - HOLD SHIPMENT R - RELEASED O - IM ONLINE HOLD U - BILL FOR HISTORY ONLY W - ORDER NOT PRINTED A - DROP SHIP HOLD B - INTERNET CUST ORIG HOLD 1 - PICKED 2 - INSPECTED 3 - PACKED 4 - SHIPPED C - CREDIT HOLD 9 - CISCO 3A6 Q - RMA HOLD G - CREDIT HOLD N - CREDIT HOLD + * @return orderstatus + **/ + @javax.annotation.Nullable + public String getOrderstatus() { + return orderstatus; + } + + public void setOrderstatus(String orderstatus) { + this.orderstatus = orderstatus; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponse entrytimestamp(String entrytimestamp) { + this.entrytimestamp = entrytimestamp; + return this; + } + + /** + * Time stamp of the order placed + * @return entrytimestamp + **/ + @javax.annotation.Nullable + public String getEntrytimestamp() { + return entrytimestamp; + } + + public void setEntrytimestamp(String entrytimestamp) { + this.entrytimestamp = entrytimestamp; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponse entrymethoddescription(String entrymethoddescription) { + this.entrymethoddescription = entrymethoddescription; + return this; + } + + /** + * Description of the entry method + * @return entrymethoddescription + **/ + @javax.annotation.Nullable + public String getEntrymethoddescription() { + return entrymethoddescription; + } + + public void setEntrymethoddescription(String entrymethoddescription) { + this.entrymethoddescription = entrymethoddescription; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponse ordertotalvalue(BigDecimal ordertotalvalue) { + this.ordertotalvalue = ordertotalvalue; + return this; + } + + /** + * Total order value + * @return ordertotalvalue + **/ + @javax.annotation.Nullable + public BigDecimal getOrdertotalvalue() { + return ordertotalvalue; + } + + public void setOrdertotalvalue(BigDecimal ordertotalvalue) { + this.ordertotalvalue = ordertotalvalue; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponse ordersubtotal(BigDecimal ordersubtotal) { + this.ordersubtotal = ordersubtotal; + return this; + } + + /** + * Subtotal order value + * @return ordersubtotal + **/ + @javax.annotation.Nullable + public BigDecimal getOrdersubtotal() { + return ordersubtotal; + } + + public void setOrdersubtotal(BigDecimal ordersubtotal) { + this.ordersubtotal = ordersubtotal; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponse freightamount(String freightamount) { + this.freightamount = freightamount; + return this; + } + + /** + * Freight charges + * @return freightamount + **/ + @javax.annotation.Nullable + public String getFreightamount() { + return freightamount; + } + + public void setFreightamount(String freightamount) { + this.freightamount = freightamount; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponse currencycode(String currencycode) { + this.currencycode = currencycode; + return this; + } + + /** + * Country specific currency code + * @return currencycode + **/ + @javax.annotation.Nullable + public String getCurrencycode() { + return currencycode; + } + + public void setCurrencycode(String currencycode) { + this.currencycode = currencycode; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponse totalweight(String totalweight) { + this.totalweight = totalweight; + return this; + } + + /** + * Total order weight. unit -- North america - Pounds , other countries will be KG + * @return totalweight + **/ + @javax.annotation.Nullable + public String getTotalweight() { + return totalweight; + } + + public void setTotalweight(String totalweight) { + this.totalweight = totalweight; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponse totaltax(String totaltax) { + this.totaltax = totaltax; + return this; + } + + /** + * total tax on the orders placed + * @return totaltax + **/ + @javax.annotation.Nullable + public String getTotaltax() { + return totaltax; + } + + public void setTotaltax(String totaltax) { + this.totaltax = totaltax; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponse billtoaddress(OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress billtoaddress) { + this.billtoaddress = billtoaddress; + return this; + } + + /** + * Get billtoaddress + * @return billtoaddress + **/ + @javax.annotation.Nullable + public OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress getBilltoaddress() { + return billtoaddress; + } + + public void setBilltoaddress(OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress billtoaddress) { + this.billtoaddress = billtoaddress; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponse shiptoaddress(OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress shiptoaddress) { + this.shiptoaddress = shiptoaddress; + return this; + } + + /** + * Get shiptoaddress + * @return shiptoaddress + **/ + @javax.annotation.Nullable + public OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress getShiptoaddress() { + return shiptoaddress; + } + + public void setShiptoaddress(OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress shiptoaddress) { + this.shiptoaddress = shiptoaddress; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponse enduserinfo(OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo enduserinfo) { + this.enduserinfo = enduserinfo; + return this; + } + + /** + * Get enduserinfo + * @return enduserinfo + **/ + @javax.annotation.Nullable + public OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo getEnduserinfo() { + return enduserinfo; + } + + public void setEnduserinfo(OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo enduserinfo) { + this.enduserinfo = enduserinfo; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponse lines(List lines) { + this.lines = lines; + return this; + } + + public OrderDetailResponseServiceresponseOrderdetailresponse addLinesItem(OrderDetailResponseServiceresponseOrderdetailresponseLinesInner linesItem) { + if (this.lines == null) { + this.lines = new ArrayList<>(); + } + this.lines.add(linesItem); + return this; + } + + /** + * Get lines + * @return lines + **/ + @javax.annotation.Nullable + public List getLines() { + return lines; + } + + public void setLines(List lines) { + this.lines = lines; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponse commentlines(List commentlines) { + this.commentlines = commentlines; + return this; + } + + public OrderDetailResponseServiceresponseOrderdetailresponse addCommentlinesItem(OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner commentlinesItem) { + if (this.commentlines == null) { + this.commentlines = new ArrayList<>(); + } + this.commentlines.add(commentlinesItem); + return this; + } + + /** + * Get commentlines + * @return commentlines + **/ + @javax.annotation.Nullable + public List getCommentlines() { + return commentlines; + } + + public void setCommentlines(List commentlines) { + this.commentlines = commentlines; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponse miscfeeline(List miscfeeline) { + this.miscfeeline = miscfeeline; + return this; + } + + public OrderDetailResponseServiceresponseOrderdetailresponse addMiscfeelineItem(OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner miscfeelineItem) { + if (this.miscfeeline == null) { + this.miscfeeline = new ArrayList<>(); + } + this.miscfeeline.add(miscfeelineItem); + return this; + } + + /** + * Get miscfeeline + * @return miscfeeline + **/ + @javax.annotation.Nullable + public List getMiscfeeline() { + return miscfeeline; + } + + public void setMiscfeeline(List miscfeeline) { + this.miscfeeline = miscfeeline; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponse extendedspecs(List extendedspecs) { + this.extendedspecs = extendedspecs; + return this; + } + + public OrderDetailResponseServiceresponseOrderdetailresponse addExtendedspecsItem(OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner extendedspecsItem) { + if (this.extendedspecs == null) { + this.extendedspecs = new ArrayList<>(); + } + this.extendedspecs.add(extendedspecsItem); + return this; + } + + /** + * Get extendedspecs + * @return extendedspecs + **/ + @javax.annotation.Nullable + public List getExtendedspecs() { + return extendedspecs; + } + + public void setExtendedspecs(List extendedspecs) { + this.extendedspecs = extendedspecs; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailResponseServiceresponseOrderdetailresponse orderDetailResponseServiceresponseOrderdetailresponse = (OrderDetailResponseServiceresponseOrderdetailresponse) o; + return Objects.equals(this.ordernumber, orderDetailResponseServiceresponseOrderdetailresponse.ordernumber) && + Objects.equals(this.ordertype, orderDetailResponseServiceresponseOrderdetailresponse.ordertype) && + Objects.equals(this.customerordernumber, orderDetailResponseServiceresponseOrderdetailresponse.customerordernumber) && + Objects.equals(this.enduserponumber, orderDetailResponseServiceresponseOrderdetailresponse.enduserponumber) && + Objects.equals(this.orderstatus, orderDetailResponseServiceresponseOrderdetailresponse.orderstatus) && + Objects.equals(this.entrytimestamp, orderDetailResponseServiceresponseOrderdetailresponse.entrytimestamp) && + Objects.equals(this.entrymethoddescription, orderDetailResponseServiceresponseOrderdetailresponse.entrymethoddescription) && + Objects.equals(this.ordertotalvalue, orderDetailResponseServiceresponseOrderdetailresponse.ordertotalvalue) && + Objects.equals(this.ordersubtotal, orderDetailResponseServiceresponseOrderdetailresponse.ordersubtotal) && + Objects.equals(this.freightamount, orderDetailResponseServiceresponseOrderdetailresponse.freightamount) && + Objects.equals(this.currencycode, orderDetailResponseServiceresponseOrderdetailresponse.currencycode) && + Objects.equals(this.totalweight, orderDetailResponseServiceresponseOrderdetailresponse.totalweight) && + Objects.equals(this.totaltax, orderDetailResponseServiceresponseOrderdetailresponse.totaltax) && + Objects.equals(this.billtoaddress, orderDetailResponseServiceresponseOrderdetailresponse.billtoaddress) && + Objects.equals(this.shiptoaddress, orderDetailResponseServiceresponseOrderdetailresponse.shiptoaddress) && + Objects.equals(this.enduserinfo, orderDetailResponseServiceresponseOrderdetailresponse.enduserinfo) && + Objects.equals(this.lines, orderDetailResponseServiceresponseOrderdetailresponse.lines) && + Objects.equals(this.commentlines, orderDetailResponseServiceresponseOrderdetailresponse.commentlines) && + Objects.equals(this.miscfeeline, orderDetailResponseServiceresponseOrderdetailresponse.miscfeeline) && + Objects.equals(this.extendedspecs, orderDetailResponseServiceresponseOrderdetailresponse.extendedspecs); + } + + @Override + public int hashCode() { + return Objects.hash(ordernumber, ordertype, customerordernumber, enduserponumber, orderstatus, entrytimestamp, entrymethoddescription, ordertotalvalue, ordersubtotal, freightamount, currencycode, totalweight, totaltax, billtoaddress, shiptoaddress, enduserinfo, lines, commentlines, miscfeeline, extendedspecs); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailResponseServiceresponseOrderdetailresponse {\n"); + sb.append(" ordernumber: ").append(toIndentedString(ordernumber)).append("\n"); + sb.append(" ordertype: ").append(toIndentedString(ordertype)).append("\n"); + sb.append(" customerordernumber: ").append(toIndentedString(customerordernumber)).append("\n"); + sb.append(" enduserponumber: ").append(toIndentedString(enduserponumber)).append("\n"); + sb.append(" orderstatus: ").append(toIndentedString(orderstatus)).append("\n"); + sb.append(" entrytimestamp: ").append(toIndentedString(entrytimestamp)).append("\n"); + sb.append(" entrymethoddescription: ").append(toIndentedString(entrymethoddescription)).append("\n"); + sb.append(" ordertotalvalue: ").append(toIndentedString(ordertotalvalue)).append("\n"); + sb.append(" ordersubtotal: ").append(toIndentedString(ordersubtotal)).append("\n"); + sb.append(" freightamount: ").append(toIndentedString(freightamount)).append("\n"); + sb.append(" currencycode: ").append(toIndentedString(currencycode)).append("\n"); + sb.append(" totalweight: ").append(toIndentedString(totalweight)).append("\n"); + sb.append(" totaltax: ").append(toIndentedString(totaltax)).append("\n"); + sb.append(" billtoaddress: ").append(toIndentedString(billtoaddress)).append("\n"); + sb.append(" shiptoaddress: ").append(toIndentedString(shiptoaddress)).append("\n"); + sb.append(" enduserinfo: ").append(toIndentedString(enduserinfo)).append("\n"); + sb.append(" lines: ").append(toIndentedString(lines)).append("\n"); + sb.append(" commentlines: ").append(toIndentedString(commentlines)).append("\n"); + sb.append(" miscfeeline: ").append(toIndentedString(miscfeeline)).append("\n"); + sb.append(" extendedspecs: ").append(toIndentedString(extendedspecs)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("ordernumber"); + openapiFields.add("ordertype"); + openapiFields.add("customerordernumber"); + openapiFields.add("enduserponumber"); + openapiFields.add("orderstatus"); + openapiFields.add("entrytimestamp"); + openapiFields.add("entrymethoddescription"); + openapiFields.add("ordertotalvalue"); + openapiFields.add("ordersubtotal"); + openapiFields.add("freightamount"); + openapiFields.add("currencycode"); + openapiFields.add("totalweight"); + openapiFields.add("totaltax"); + openapiFields.add("billtoaddress"); + openapiFields.add("shiptoaddress"); + openapiFields.add("enduserinfo"); + openapiFields.add("lines"); + openapiFields.add("commentlines"); + openapiFields.add("miscfeeline"); + openapiFields.add("extendedspecs"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailResponseServiceresponseOrderdetailresponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailResponseServiceresponseOrderdetailresponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailResponseServiceresponseOrderdetailresponse is not found in the empty JSON string", OrderDetailResponseServiceresponseOrderdetailresponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailResponseServiceresponseOrderdetailresponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailResponseServiceresponseOrderdetailresponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("ordernumber") != null && !jsonObj.get("ordernumber").isJsonNull()) && !jsonObj.get("ordernumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ordernumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ordernumber").toString())); + } + if ((jsonObj.get("ordertype") != null && !jsonObj.get("ordertype").isJsonNull()) && !jsonObj.get("ordertype").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ordertype` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ordertype").toString())); + } + if ((jsonObj.get("customerordernumber") != null && !jsonObj.get("customerordernumber").isJsonNull()) && !jsonObj.get("customerordernumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerordernumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerordernumber").toString())); + } + if ((jsonObj.get("enduserponumber") != null && !jsonObj.get("enduserponumber").isJsonNull()) && !jsonObj.get("enduserponumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `enduserponumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("enduserponumber").toString())); + } + if ((jsonObj.get("orderstatus") != null && !jsonObj.get("orderstatus").isJsonNull()) && !jsonObj.get("orderstatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `orderstatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orderstatus").toString())); + } + if ((jsonObj.get("entrytimestamp") != null && !jsonObj.get("entrytimestamp").isJsonNull()) && !jsonObj.get("entrytimestamp").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `entrytimestamp` to be a primitive type in the JSON string but got `%s`", jsonObj.get("entrytimestamp").toString())); + } + if ((jsonObj.get("entrymethoddescription") != null && !jsonObj.get("entrymethoddescription").isJsonNull()) && !jsonObj.get("entrymethoddescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `entrymethoddescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("entrymethoddescription").toString())); + } + if ((jsonObj.get("freightamount") != null && !jsonObj.get("freightamount").isJsonNull()) && !jsonObj.get("freightamount").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `freightamount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("freightamount").toString())); + } + if ((jsonObj.get("currencycode") != null && !jsonObj.get("currencycode").isJsonNull()) && !jsonObj.get("currencycode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `currencycode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currencycode").toString())); + } + if ((jsonObj.get("totalweight") != null && !jsonObj.get("totalweight").isJsonNull()) && !jsonObj.get("totalweight").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `totalweight` to be a primitive type in the JSON string but got `%s`", jsonObj.get("totalweight").toString())); + } + if ((jsonObj.get("totaltax") != null && !jsonObj.get("totaltax").isJsonNull()) && !jsonObj.get("totaltax").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `totaltax` to be a primitive type in the JSON string but got `%s`", jsonObj.get("totaltax").toString())); + } + // validate the optional field `billtoaddress` + if (jsonObj.get("billtoaddress") != null && !jsonObj.get("billtoaddress").isJsonNull()) { + OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.validateJsonElement(jsonObj.get("billtoaddress")); + } + // validate the optional field `shiptoaddress` + if (jsonObj.get("shiptoaddress") != null && !jsonObj.get("shiptoaddress").isJsonNull()) { + OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.validateJsonElement(jsonObj.get("shiptoaddress")); + } + // validate the optional field `enduserinfo` + if (jsonObj.get("enduserinfo") != null && !jsonObj.get("enduserinfo").isJsonNull()) { + OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo.validateJsonElement(jsonObj.get("enduserinfo")); + } + if (jsonObj.get("lines") != null && !jsonObj.get("lines").isJsonNull()) { + JsonArray jsonArraylines = jsonObj.getAsJsonArray("lines"); + if (jsonArraylines != null) { + // ensure the json data is an array + if (!jsonObj.get("lines").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `lines` to be an array in the JSON string but got `%s`", jsonObj.get("lines").toString())); + } + + // validate the optional field `lines` (array) + for (int i = 0; i < jsonArraylines.size(); i++) { + OrderDetailResponseServiceresponseOrderdetailresponseLinesInner.validateJsonElement(jsonArraylines.get(i)); + }; + } + } + if (jsonObj.get("commentlines") != null && !jsonObj.get("commentlines").isJsonNull()) { + JsonArray jsonArraycommentlines = jsonObj.getAsJsonArray("commentlines"); + if (jsonArraycommentlines != null) { + // ensure the json data is an array + if (!jsonObj.get("commentlines").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `commentlines` to be an array in the JSON string but got `%s`", jsonObj.get("commentlines").toString())); + } + + // validate the optional field `commentlines` (array) + for (int i = 0; i < jsonArraycommentlines.size(); i++) { + OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner.validateJsonElement(jsonArraycommentlines.get(i)); + }; + } + } + if (jsonObj.get("miscfeeline") != null && !jsonObj.get("miscfeeline").isJsonNull()) { + JsonArray jsonArraymiscfeeline = jsonObj.getAsJsonArray("miscfeeline"); + if (jsonArraymiscfeeline != null) { + // ensure the json data is an array + if (!jsonObj.get("miscfeeline").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `miscfeeline` to be an array in the JSON string but got `%s`", jsonObj.get("miscfeeline").toString())); + } + + // validate the optional field `miscfeeline` (array) + for (int i = 0; i < jsonArraymiscfeeline.size(); i++) { + OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner.validateJsonElement(jsonArraymiscfeeline.get(i)); + }; + } + } + if (jsonObj.get("extendedspecs") != null && !jsonObj.get("extendedspecs").isJsonNull()) { + JsonArray jsonArrayextendedspecs = jsonObj.getAsJsonArray("extendedspecs"); + if (jsonArrayextendedspecs != null) { + // ensure the json data is an array + if (!jsonObj.get("extendedspecs").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `extendedspecs` to be an array in the JSON string but got `%s`", jsonObj.get("extendedspecs").toString())); + } + + // validate the optional field `extendedspecs` (array) + for (int i = 0; i < jsonArrayextendedspecs.size(); i++) { + OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner.validateJsonElement(jsonArrayextendedspecs.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailResponseServiceresponseOrderdetailresponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailResponseServiceresponseOrderdetailresponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailResponseServiceresponseOrderdetailresponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailResponseServiceresponseOrderdetailresponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailResponseServiceresponseOrderdetailresponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailResponseServiceresponseOrderdetailresponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailResponseServiceresponseOrderdetailresponse + * @throws IOException if the JSON string is invalid with respect to OrderDetailResponseServiceresponseOrderdetailresponse + */ + public static OrderDetailResponseServiceresponseOrderdetailresponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailResponseServiceresponseOrderdetailresponse.class); + } + + /** + * Convert an instance of OrderDetailResponseServiceresponseOrderdetailresponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.java b/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.java new file mode 100644 index 00000000..1b556ac8 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.java @@ -0,0 +1,467 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress { + public static final String SERIALIZED_NAME_SUFFIX = "suffix"; + @SerializedName(SERIALIZED_NAME_SUFFIX) + private String suffix; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_ATTENTION = "attention"; + @SerializedName(SERIALIZED_NAME_ATTENTION) + private String attention; + + public static final String SERIALIZED_NAME_ADDRESSLINE1 = "addressline1"; + @SerializedName(SERIALIZED_NAME_ADDRESSLINE1) + private String addressline1; + + public static final String SERIALIZED_NAME_ADDRESSLINE2 = "addressline2"; + @SerializedName(SERIALIZED_NAME_ADDRESSLINE2) + private String addressline2; + + public static final String SERIALIZED_NAME_ADDRESSLINE3 = "addressline3"; + @SerializedName(SERIALIZED_NAME_ADDRESSLINE3) + private String addressline3; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTALCODE = "postalcode"; + @SerializedName(SERIALIZED_NAME_POSTALCODE) + private String postalcode; + + public static final String SERIALIZED_NAME_COUNTRYCODE = "countrycode"; + @SerializedName(SERIALIZED_NAME_COUNTRYCODE) + private String countrycode; + + public OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress() { + } + + public OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress suffix(String suffix) { + this.suffix = suffix; + return this; + } + + /** + * Get suffix + * @return suffix + **/ + @javax.annotation.Nullable + public String getSuffix() { + return suffix; + } + + public void setSuffix(String suffix) { + this.suffix = suffix; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress attention(String attention) { + this.attention = attention; + return this; + } + + /** + * Get attention + * @return attention + **/ + @javax.annotation.Nullable + public String getAttention() { + return attention; + } + + public void setAttention(String attention) { + this.attention = attention; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress addressline1(String addressline1) { + this.addressline1 = addressline1; + return this; + } + + /** + * Get addressline1 + * @return addressline1 + **/ + @javax.annotation.Nullable + public String getAddressline1() { + return addressline1; + } + + public void setAddressline1(String addressline1) { + this.addressline1 = addressline1; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress addressline2(String addressline2) { + this.addressline2 = addressline2; + return this; + } + + /** + * Get addressline2 + * @return addressline2 + **/ + @javax.annotation.Nullable + public String getAddressline2() { + return addressline2; + } + + public void setAddressline2(String addressline2) { + this.addressline2 = addressline2; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress addressline3(String addressline3) { + this.addressline3 = addressline3; + return this; + } + + /** + * Get addressline3 + * @return addressline3 + **/ + @javax.annotation.Nullable + public String getAddressline3() { + return addressline3; + } + + public void setAddressline3(String addressline3) { + this.addressline3 = addressline3; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress city(String city) { + this.city = city; + return this; + } + + /** + * Get city + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress state(String state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress postalcode(String postalcode) { + this.postalcode = postalcode; + return this; + } + + /** + * Get postalcode + * @return postalcode + **/ + @javax.annotation.Nullable + public String getPostalcode() { + return postalcode; + } + + public void setPostalcode(String postalcode) { + this.postalcode = postalcode; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress countrycode(String countrycode) { + this.countrycode = countrycode; + return this; + } + + /** + * Get countrycode + * @return countrycode + **/ + @javax.annotation.Nullable + public String getCountrycode() { + return countrycode; + } + + public void setCountrycode(String countrycode) { + this.countrycode = countrycode; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress orderDetailResponseServiceresponseOrderdetailresponseBilltoaddress = (OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress) o; + return Objects.equals(this.suffix, orderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.suffix) && + Objects.equals(this.name, orderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.name) && + Objects.equals(this.attention, orderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.attention) && + Objects.equals(this.addressline1, orderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.addressline1) && + Objects.equals(this.addressline2, orderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.addressline2) && + Objects.equals(this.addressline3, orderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.addressline3) && + Objects.equals(this.city, orderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.city) && + Objects.equals(this.state, orderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.state) && + Objects.equals(this.postalcode, orderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.postalcode) && + Objects.equals(this.countrycode, orderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.countrycode); + } + + @Override + public int hashCode() { + return Objects.hash(suffix, name, attention, addressline1, addressline2, addressline3, city, state, postalcode, countrycode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress {\n"); + sb.append(" suffix: ").append(toIndentedString(suffix)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" attention: ").append(toIndentedString(attention)).append("\n"); + sb.append(" addressline1: ").append(toIndentedString(addressline1)).append("\n"); + sb.append(" addressline2: ").append(toIndentedString(addressline2)).append("\n"); + sb.append(" addressline3: ").append(toIndentedString(addressline3)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalcode: ").append(toIndentedString(postalcode)).append("\n"); + sb.append(" countrycode: ").append(toIndentedString(countrycode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("suffix"); + openapiFields.add("name"); + openapiFields.add("attention"); + openapiFields.add("addressline1"); + openapiFields.add("addressline2"); + openapiFields.add("addressline3"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalcode"); + openapiFields.add("countrycode"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress is not found in the empty JSON string", OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("suffix") != null && !jsonObj.get("suffix").isJsonNull()) && !jsonObj.get("suffix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `suffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("suffix").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("attention") != null && !jsonObj.get("attention").isJsonNull()) && !jsonObj.get("attention").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attention` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attention").toString())); + } + if ((jsonObj.get("addressline1") != null && !jsonObj.get("addressline1").isJsonNull()) && !jsonObj.get("addressline1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressline1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressline1").toString())); + } + if ((jsonObj.get("addressline2") != null && !jsonObj.get("addressline2").isJsonNull()) && !jsonObj.get("addressline2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressline2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressline2").toString())); + } + if ((jsonObj.get("addressline3") != null && !jsonObj.get("addressline3").isJsonNull()) && !jsonObj.get("addressline3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressline3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressline3").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalcode") != null && !jsonObj.get("postalcode").isJsonNull()) && !jsonObj.get("postalcode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalcode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalcode").toString())); + } + if ((jsonObj.get("countrycode") != null && !jsonObj.get("countrycode").isJsonNull()) && !jsonObj.get("countrycode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countrycode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countrycode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress + * @throws IOException if the JSON string is invalid with respect to OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress + */ + public static OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress.class); + } + + /** + * Convert an instance of OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner.java b/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner.java new file mode 100644 index 00000000..9dc42abd --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner { + public static final String SERIALIZED_NAME_COMMENTTEXT1 = "commenttext1"; + @SerializedName(SERIALIZED_NAME_COMMENTTEXT1) + private String commenttext1; + + public static final String SERIALIZED_NAME_COMMENTTEXT2 = "commenttext2"; + @SerializedName(SERIALIZED_NAME_COMMENTTEXT2) + private String commenttext2; + + public OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner() { + } + + public OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner commenttext1(String commenttext1) { + this.commenttext1 = commenttext1; + return this; + } + + /** + * Get commenttext1 + * @return commenttext1 + **/ + @javax.annotation.Nullable + public String getCommenttext1() { + return commenttext1; + } + + public void setCommenttext1(String commenttext1) { + this.commenttext1 = commenttext1; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner commenttext2(String commenttext2) { + this.commenttext2 = commenttext2; + return this; + } + + /** + * Get commenttext2 + * @return commenttext2 + **/ + @javax.annotation.Nullable + public String getCommenttext2() { + return commenttext2; + } + + public void setCommenttext2(String commenttext2) { + this.commenttext2 = commenttext2; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner orderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner = (OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner) o; + return Objects.equals(this.commenttext1, orderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner.commenttext1) && + Objects.equals(this.commenttext2, orderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner.commenttext2); + } + + @Override + public int hashCode() { + return Objects.hash(commenttext1, commenttext2); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner {\n"); + sb.append(" commenttext1: ").append(toIndentedString(commenttext1)).append("\n"); + sb.append(" commenttext2: ").append(toIndentedString(commenttext2)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("commenttext1"); + openapiFields.add("commenttext2"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner is not found in the empty JSON string", OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("commenttext1") != null && !jsonObj.get("commenttext1").isJsonNull()) && !jsonObj.get("commenttext1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `commenttext1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commenttext1").toString())); + } + if ((jsonObj.get("commenttext2") != null && !jsonObj.get("commenttext2").isJsonNull()) && !jsonObj.get("commenttext2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `commenttext2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commenttext2").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner + * @throws IOException if the JSON string is invalid with respect to OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner + */ + public static OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner.class); + } + + /** + * Convert an instance of OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo.java b/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo.java new file mode 100644 index 00000000..4ff48cd7 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo.java @@ -0,0 +1,206 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo { + public static final String SERIALIZED_NAME_ENDUSERID = "enduserid"; + @SerializedName(SERIALIZED_NAME_ENDUSERID) + private String enduserid; + + public OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo() { + } + + public OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo enduserid(String enduserid) { + this.enduserid = enduserid; + return this; + } + + /** + * Get enduserid + * @return enduserid + **/ + @javax.annotation.Nullable + public String getEnduserid() { + return enduserid; + } + + public void setEnduserid(String enduserid) { + this.enduserid = enduserid; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo orderDetailResponseServiceresponseOrderdetailresponseEnduserinfo = (OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo) o; + return Objects.equals(this.enduserid, orderDetailResponseServiceresponseOrderdetailresponseEnduserinfo.enduserid); + } + + @Override + public int hashCode() { + return Objects.hash(enduserid); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo {\n"); + sb.append(" enduserid: ").append(toIndentedString(enduserid)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("enduserid"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo is not found in the empty JSON string", OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("enduserid") != null && !jsonObj.get("enduserid").isJsonNull()) && !jsonObj.get("enduserid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `enduserid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("enduserid").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo + * @throws IOException if the JSON string is invalid with respect to OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo + */ + public static OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo.class); + } + + /** + * Convert an instance of OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner.java b/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner.java new file mode 100644 index 00000000..de688923 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner { + public static final String SERIALIZED_NAME_ATTRIBUTENAME = "attributename"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTENAME) + private String attributename; + + public static final String SERIALIZED_NAME_ATTRIBUTEVALUE = "attributevalue"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTEVALUE) + private String attributevalue; + + public OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner() { + } + + public OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner attributename(String attributename) { + this.attributename = attributename; + return this; + } + + /** + * termscode' | 'termsdescription' | 'commenttext' are the atrribute name + * @return attributename + **/ + @javax.annotation.Nullable + public String getAttributename() { + return attributename; + } + + public void setAttributename(String attributename) { + this.attributename = attributename; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner attributevalue(String attributevalue) { + this.attributevalue = attributevalue; + return this; + } + + /** + * values of these fields are send . termscode' | 'termsdescription' | 'commenttext' are the atrribute name + * @return attributevalue + **/ + @javax.annotation.Nullable + public String getAttributevalue() { + return attributevalue; + } + + public void setAttributevalue(String attributevalue) { + this.attributevalue = attributevalue; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner orderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner = (OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner) o; + return Objects.equals(this.attributename, orderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner.attributename) && + Objects.equals(this.attributevalue, orderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner.attributevalue); + } + + @Override + public int hashCode() { + return Objects.hash(attributename, attributevalue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner {\n"); + sb.append(" attributename: ").append(toIndentedString(attributename)).append("\n"); + sb.append(" attributevalue: ").append(toIndentedString(attributevalue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributename"); + openapiFields.add("attributevalue"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner is not found in the empty JSON string", OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("attributename") != null && !jsonObj.get("attributename").isJsonNull()) && !jsonObj.get("attributename").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributename` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributename").toString())); + } + if ((jsonObj.get("attributevalue") != null && !jsonObj.get("attributevalue").isJsonNull()) && !jsonObj.get("attributevalue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributevalue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributevalue").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner + * @throws IOException if the JSON string is invalid with respect to OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner + */ + public static OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner.class); + } + + /** + * Convert an instance of OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInner.java b/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInner.java new file mode 100644 index 00000000..68b9318b --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInner.java @@ -0,0 +1,907 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner; +import xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner; +import xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailResponseServiceresponseOrderdetailresponseLinesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailResponseServiceresponseOrderdetailresponseLinesInner { + public static final String SERIALIZED_NAME_LINENUMBER = "linenumber"; + @SerializedName(SERIALIZED_NAME_LINENUMBER) + private String linenumber; + + public static final String SERIALIZED_NAME_GLOBALLINENUMBER = "globallinenumber"; + @SerializedName(SERIALIZED_NAME_GLOBALLINENUMBER) + private String globallinenumber; + + public static final String SERIALIZED_NAME_ORDERSUFFIX = "ordersuffix"; + @SerializedName(SERIALIZED_NAME_ORDERSUFFIX) + private String ordersuffix; + + public static final String SERIALIZED_NAME_ERPORDERNUMBER = "erpordernumber"; + @SerializedName(SERIALIZED_NAME_ERPORDERNUMBER) + private String erpordernumber; + + public static final String SERIALIZED_NAME_LINESTATUS = "linestatus"; + @SerializedName(SERIALIZED_NAME_LINESTATUS) + private String linestatus; + + public static final String SERIALIZED_NAME_PARTNUMBER = "partnumber"; + @SerializedName(SERIALIZED_NAME_PARTNUMBER) + private String partnumber; + + public static final String SERIALIZED_NAME_MANUFACTURERPARTNUMBER = "manufacturerpartnumber"; + @SerializedName(SERIALIZED_NAME_MANUFACTURERPARTNUMBER) + private String manufacturerpartnumber; + + public static final String SERIALIZED_NAME_VENDORNAME = "vendorname"; + @SerializedName(SERIALIZED_NAME_VENDORNAME) + private String vendorname; + + public static final String SERIALIZED_NAME_VENDORCODE = "vendorcode"; + @SerializedName(SERIALIZED_NAME_VENDORCODE) + private String vendorcode; + + public static final String SERIALIZED_NAME_PARTDESCRIPTION1 = "partdescription1"; + @SerializedName(SERIALIZED_NAME_PARTDESCRIPTION1) + private String partdescription1; + + public static final String SERIALIZED_NAME_PARTDESCRIPTION2 = "partdescription2"; + @SerializedName(SERIALIZED_NAME_PARTDESCRIPTION2) + private String partdescription2; + + public static final String SERIALIZED_NAME_UNITWEIGHT = "unitweight"; + @SerializedName(SERIALIZED_NAME_UNITWEIGHT) + private String unitweight; + + public static final String SERIALIZED_NAME_UNITPRICE = "unitprice"; + @SerializedName(SERIALIZED_NAME_UNITPRICE) + private BigDecimal unitprice; + + public static final String SERIALIZED_NAME_EXTENDEDPRICE = "extendedprice"; + @SerializedName(SERIALIZED_NAME_EXTENDEDPRICE) + private BigDecimal extendedprice; + + public static final String SERIALIZED_NAME_TAXAMOUNT = "taxamount"; + @SerializedName(SERIALIZED_NAME_TAXAMOUNT) + private BigDecimal taxamount; + + public static final String SERIALIZED_NAME_REQUESTEDQUANTITY = "requestedquantity"; + @SerializedName(SERIALIZED_NAME_REQUESTEDQUANTITY) + private String requestedquantity; + + public static final String SERIALIZED_NAME_CONFIRMEDQUANTITY = "confirmedquantity"; + @SerializedName(SERIALIZED_NAME_CONFIRMEDQUANTITY) + private String confirmedquantity; + + public static final String SERIALIZED_NAME_BACKORDERQUANTITY = "backorderquantity"; + @SerializedName(SERIALIZED_NAME_BACKORDERQUANTITY) + private String backorderquantity; + + public static final String SERIALIZED_NAME_SERIALNUMBERDETAILS = "serialnumberdetails"; + @SerializedName(SERIALIZED_NAME_SERIALNUMBERDETAILS) + private List serialnumberdetails; + + public static final String SERIALIZED_NAME_TRACKINGNUMBER = "trackingnumber"; + @SerializedName(SERIALIZED_NAME_TRACKINGNUMBER) + private List trackingnumber; + + public static final String SERIALIZED_NAME_SHIPMENTDETAILS = "shipmentdetails"; + @SerializedName(SERIALIZED_NAME_SHIPMENTDETAILS) + private List shipmentdetails; + + public static final String SERIALIZED_NAME_PRODUCTEXTENDEDSPECS = "productextendedspecs"; + @SerializedName(SERIALIZED_NAME_PRODUCTEXTENDEDSPECS) + private List productextendedspecs; + + public static final String SERIALIZED_NAME_BACKORDERETADATE = "backorderetadate"; + @SerializedName(SERIALIZED_NAME_BACKORDERETADATE) + private String backorderetadate; + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner() { + } + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner linenumber(String linenumber) { + this.linenumber = linenumber; + return this; + } + + /** + * Impulse line number + * @return linenumber + **/ + @javax.annotation.Nullable + public String getLinenumber() { + return linenumber; + } + + public void setLinenumber(String linenumber) { + this.linenumber = linenumber; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner globallinenumber(String globallinenumber) { + this.globallinenumber = globallinenumber; + return this; + } + + /** + * Line of the Globel Sku / Customer Line Number + * @return globallinenumber + **/ + @javax.annotation.Nullable + public String getGloballinenumber() { + return globallinenumber; + } + + public void setGloballinenumber(String globallinenumber) { + this.globallinenumber = globallinenumber; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner ordersuffix(String ordersuffix) { + this.ordersuffix = ordersuffix; + return this; + } + + /** + * Order Suffix + * @return ordersuffix + **/ + @javax.annotation.Nullable + public String getOrdersuffix() { + return ordersuffix; + } + + public void setOrdersuffix(String ordersuffix) { + this.ordersuffix = ordersuffix; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner erpordernumber(String erpordernumber) { + this.erpordernumber = erpordernumber; + return this; + } + + /** + * Sales order number + * @return erpordernumber + **/ + @javax.annotation.Nullable + public String getErpordernumber() { + return erpordernumber; + } + + public void setErpordernumber(String erpordernumber) { + this.erpordernumber = erpordernumber; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner linestatus(String linestatus) { + this.linestatus = linestatus; + return this; + } + + /** + * Status of the line + * @return linestatus + **/ + @javax.annotation.Nullable + public String getLinestatus() { + return linestatus; + } + + public void setLinestatus(String linestatus) { + this.linestatus = linestatus; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner partnumber(String partnumber) { + this.partnumber = partnumber; + return this; + } + + /** + * Ingram part number + * @return partnumber + **/ + @javax.annotation.Nullable + public String getPartnumber() { + return partnumber; + } + + public void setPartnumber(String partnumber) { + this.partnumber = partnumber; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner manufacturerpartnumber(String manufacturerpartnumber) { + this.manufacturerpartnumber = manufacturerpartnumber; + return this; + } + + /** + * manufacture number of the product + * @return manufacturerpartnumber + **/ + @javax.annotation.Nullable + public String getManufacturerpartnumber() { + return manufacturerpartnumber; + } + + public void setManufacturerpartnumber(String manufacturerpartnumber) { + this.manufacturerpartnumber = manufacturerpartnumber; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner vendorname(String vendorname) { + this.vendorname = vendorname; + return this; + } + + /** + * name of the vendor + * @return vendorname + **/ + @javax.annotation.Nullable + public String getVendorname() { + return vendorname; + } + + public void setVendorname(String vendorname) { + this.vendorname = vendorname; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner vendorcode(String vendorcode) { + this.vendorcode = vendorcode; + return this; + } + + /** + * Ingram Micro assigned code for the vendor + * @return vendorcode + **/ + @javax.annotation.Nullable + public String getVendorcode() { + return vendorcode; + } + + public void setVendorcode(String vendorcode) { + this.vendorcode = vendorcode; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner partdescription1(String partdescription1) { + this.partdescription1 = partdescription1; + return this; + } + + /** + * Get partdescription1 + * @return partdescription1 + **/ + @javax.annotation.Nullable + public String getPartdescription1() { + return partdescription1; + } + + public void setPartdescription1(String partdescription1) { + this.partdescription1 = partdescription1; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner partdescription2(String partdescription2) { + this.partdescription2 = partdescription2; + return this; + } + + /** + * Get partdescription2 + * @return partdescription2 + **/ + @javax.annotation.Nullable + public String getPartdescription2() { + return partdescription2; + } + + public void setPartdescription2(String partdescription2) { + this.partdescription2 = partdescription2; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner unitweight(String unitweight) { + this.unitweight = unitweight; + return this; + } + + /** + * weight of the product unit + * @return unitweight + **/ + @javax.annotation.Nullable + public String getUnitweight() { + return unitweight; + } + + public void setUnitweight(String unitweight) { + this.unitweight = unitweight; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner unitprice(BigDecimal unitprice) { + this.unitprice = unitprice; + return this; + } + + /** + * Customer price of the unit + * @return unitprice + **/ + @javax.annotation.Nullable + public BigDecimal getUnitprice() { + return unitprice; + } + + public void setUnitprice(BigDecimal unitprice) { + this.unitprice = unitprice; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner extendedprice(BigDecimal extendedprice) { + this.extendedprice = extendedprice; + return this; + } + + /** + * extended price of the order + * @return extendedprice + **/ + @javax.annotation.Nullable + public BigDecimal getExtendedprice() { + return extendedprice; + } + + public void setExtendedprice(BigDecimal extendedprice) { + this.extendedprice = extendedprice; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner taxamount(BigDecimal taxamount) { + this.taxamount = taxamount; + return this; + } + + /** + * tax amount for the order + * @return taxamount + **/ + @javax.annotation.Nullable + public BigDecimal getTaxamount() { + return taxamount; + } + + public void setTaxamount(BigDecimal taxamount) { + this.taxamount = taxamount; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner requestedquantity(String requestedquantity) { + this.requestedquantity = requestedquantity; + return this; + } + + /** + * no. of units requested + * @return requestedquantity + **/ + @javax.annotation.Nullable + public String getRequestedquantity() { + return requestedquantity; + } + + public void setRequestedquantity(String requestedquantity) { + this.requestedquantity = requestedquantity; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner confirmedquantity(String confirmedquantity) { + this.confirmedquantity = confirmedquantity; + return this; + } + + /** + * no. of units confirmed available + * @return confirmedquantity + **/ + @javax.annotation.Nullable + public String getConfirmedquantity() { + return confirmedquantity; + } + + public void setConfirmedquantity(String confirmedquantity) { + this.confirmedquantity = confirmedquantity; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner backorderquantity(String backorderquantity) { + this.backorderquantity = backorderquantity; + return this; + } + + /** + * quantity of back order + * @return backorderquantity + **/ + @javax.annotation.Nullable + public String getBackorderquantity() { + return backorderquantity; + } + + public void setBackorderquantity(String backorderquantity) { + this.backorderquantity = backorderquantity; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner serialnumberdetails(List serialnumberdetails) { + this.serialnumberdetails = serialnumberdetails; + return this; + } + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner addSerialnumberdetailsItem(OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner serialnumberdetailsItem) { + if (this.serialnumberdetails == null) { + this.serialnumberdetails = new ArrayList<>(); + } + this.serialnumberdetails.add(serialnumberdetailsItem); + return this; + } + + /** + * Get serialnumberdetails + * @return serialnumberdetails + **/ + @javax.annotation.Nullable + public List getSerialnumberdetails() { + return serialnumberdetails; + } + + public void setSerialnumberdetails(List serialnumberdetails) { + this.serialnumberdetails = serialnumberdetails; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner trackingnumber(List trackingnumber) { + this.trackingnumber = trackingnumber; + return this; + } + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner addTrackingnumberItem(String trackingnumberItem) { + if (this.trackingnumber == null) { + this.trackingnumber = new ArrayList<>(); + } + this.trackingnumber.add(trackingnumberItem); + return this; + } + + /** + * Get trackingnumber + * @return trackingnumber + **/ + @javax.annotation.Nullable + public List getTrackingnumber() { + return trackingnumber; + } + + public void setTrackingnumber(List trackingnumber) { + this.trackingnumber = trackingnumber; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner shipmentdetails(List shipmentdetails) { + this.shipmentdetails = shipmentdetails; + return this; + } + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner addShipmentdetailsItem(OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner shipmentdetailsItem) { + if (this.shipmentdetails == null) { + this.shipmentdetails = new ArrayList<>(); + } + this.shipmentdetails.add(shipmentdetailsItem); + return this; + } + + /** + * Get shipmentdetails + * @return shipmentdetails + **/ + @javax.annotation.Nullable + public List getShipmentdetails() { + return shipmentdetails; + } + + public void setShipmentdetails(List shipmentdetails) { + this.shipmentdetails = shipmentdetails; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner productextendedspecs(List productextendedspecs) { + this.productextendedspecs = productextendedspecs; + return this; + } + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner addProductextendedspecsItem(InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner productextendedspecsItem) { + if (this.productextendedspecs == null) { + this.productextendedspecs = new ArrayList<>(); + } + this.productextendedspecs.add(productextendedspecsItem); + return this; + } + + /** + * Get productextendedspecs + * @return productextendedspecs + **/ + @javax.annotation.Nullable + public List getProductextendedspecs() { + return productextendedspecs; + } + + public void setProductextendedspecs(List productextendedspecs) { + this.productextendedspecs = productextendedspecs; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner backorderetadate(String backorderetadate) { + this.backorderetadate = backorderetadate; + return this; + } + + /** + * estimated date of back order + * @return backorderetadate + **/ + @javax.annotation.Nullable + public String getBackorderetadate() { + return backorderetadate; + } + + public void setBackorderetadate(String backorderetadate) { + this.backorderetadate = backorderetadate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailResponseServiceresponseOrderdetailresponseLinesInner orderDetailResponseServiceresponseOrderdetailresponseLinesInner = (OrderDetailResponseServiceresponseOrderdetailresponseLinesInner) o; + return Objects.equals(this.linenumber, orderDetailResponseServiceresponseOrderdetailresponseLinesInner.linenumber) && + Objects.equals(this.globallinenumber, orderDetailResponseServiceresponseOrderdetailresponseLinesInner.globallinenumber) && + Objects.equals(this.ordersuffix, orderDetailResponseServiceresponseOrderdetailresponseLinesInner.ordersuffix) && + Objects.equals(this.erpordernumber, orderDetailResponseServiceresponseOrderdetailresponseLinesInner.erpordernumber) && + Objects.equals(this.linestatus, orderDetailResponseServiceresponseOrderdetailresponseLinesInner.linestatus) && + Objects.equals(this.partnumber, orderDetailResponseServiceresponseOrderdetailresponseLinesInner.partnumber) && + Objects.equals(this.manufacturerpartnumber, orderDetailResponseServiceresponseOrderdetailresponseLinesInner.manufacturerpartnumber) && + Objects.equals(this.vendorname, orderDetailResponseServiceresponseOrderdetailresponseLinesInner.vendorname) && + Objects.equals(this.vendorcode, orderDetailResponseServiceresponseOrderdetailresponseLinesInner.vendorcode) && + Objects.equals(this.partdescription1, orderDetailResponseServiceresponseOrderdetailresponseLinesInner.partdescription1) && + Objects.equals(this.partdescription2, orderDetailResponseServiceresponseOrderdetailresponseLinesInner.partdescription2) && + Objects.equals(this.unitweight, orderDetailResponseServiceresponseOrderdetailresponseLinesInner.unitweight) && + Objects.equals(this.unitprice, orderDetailResponseServiceresponseOrderdetailresponseLinesInner.unitprice) && + Objects.equals(this.extendedprice, orderDetailResponseServiceresponseOrderdetailresponseLinesInner.extendedprice) && + Objects.equals(this.taxamount, orderDetailResponseServiceresponseOrderdetailresponseLinesInner.taxamount) && + Objects.equals(this.requestedquantity, orderDetailResponseServiceresponseOrderdetailresponseLinesInner.requestedquantity) && + Objects.equals(this.confirmedquantity, orderDetailResponseServiceresponseOrderdetailresponseLinesInner.confirmedquantity) && + Objects.equals(this.backorderquantity, orderDetailResponseServiceresponseOrderdetailresponseLinesInner.backorderquantity) && + Objects.equals(this.serialnumberdetails, orderDetailResponseServiceresponseOrderdetailresponseLinesInner.serialnumberdetails) && + Objects.equals(this.trackingnumber, orderDetailResponseServiceresponseOrderdetailresponseLinesInner.trackingnumber) && + Objects.equals(this.shipmentdetails, orderDetailResponseServiceresponseOrderdetailresponseLinesInner.shipmentdetails) && + Objects.equals(this.productextendedspecs, orderDetailResponseServiceresponseOrderdetailresponseLinesInner.productextendedspecs) && + Objects.equals(this.backorderetadate, orderDetailResponseServiceresponseOrderdetailresponseLinesInner.backorderetadate); + } + + @Override + public int hashCode() { + return Objects.hash(linenumber, globallinenumber, ordersuffix, erpordernumber, linestatus, partnumber, manufacturerpartnumber, vendorname, vendorcode, partdescription1, partdescription2, unitweight, unitprice, extendedprice, taxamount, requestedquantity, confirmedquantity, backorderquantity, serialnumberdetails, trackingnumber, shipmentdetails, productextendedspecs, backorderetadate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailResponseServiceresponseOrderdetailresponseLinesInner {\n"); + sb.append(" linenumber: ").append(toIndentedString(linenumber)).append("\n"); + sb.append(" globallinenumber: ").append(toIndentedString(globallinenumber)).append("\n"); + sb.append(" ordersuffix: ").append(toIndentedString(ordersuffix)).append("\n"); + sb.append(" erpordernumber: ").append(toIndentedString(erpordernumber)).append("\n"); + sb.append(" linestatus: ").append(toIndentedString(linestatus)).append("\n"); + sb.append(" partnumber: ").append(toIndentedString(partnumber)).append("\n"); + sb.append(" manufacturerpartnumber: ").append(toIndentedString(manufacturerpartnumber)).append("\n"); + sb.append(" vendorname: ").append(toIndentedString(vendorname)).append("\n"); + sb.append(" vendorcode: ").append(toIndentedString(vendorcode)).append("\n"); + sb.append(" partdescription1: ").append(toIndentedString(partdescription1)).append("\n"); + sb.append(" partdescription2: ").append(toIndentedString(partdescription2)).append("\n"); + sb.append(" unitweight: ").append(toIndentedString(unitweight)).append("\n"); + sb.append(" unitprice: ").append(toIndentedString(unitprice)).append("\n"); + sb.append(" extendedprice: ").append(toIndentedString(extendedprice)).append("\n"); + sb.append(" taxamount: ").append(toIndentedString(taxamount)).append("\n"); + sb.append(" requestedquantity: ").append(toIndentedString(requestedquantity)).append("\n"); + sb.append(" confirmedquantity: ").append(toIndentedString(confirmedquantity)).append("\n"); + sb.append(" backorderquantity: ").append(toIndentedString(backorderquantity)).append("\n"); + sb.append(" serialnumberdetails: ").append(toIndentedString(serialnumberdetails)).append("\n"); + sb.append(" trackingnumber: ").append(toIndentedString(trackingnumber)).append("\n"); + sb.append(" shipmentdetails: ").append(toIndentedString(shipmentdetails)).append("\n"); + sb.append(" productextendedspecs: ").append(toIndentedString(productextendedspecs)).append("\n"); + sb.append(" backorderetadate: ").append(toIndentedString(backorderetadate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("linenumber"); + openapiFields.add("globallinenumber"); + openapiFields.add("ordersuffix"); + openapiFields.add("erpordernumber"); + openapiFields.add("linestatus"); + openapiFields.add("partnumber"); + openapiFields.add("manufacturerpartnumber"); + openapiFields.add("vendorname"); + openapiFields.add("vendorcode"); + openapiFields.add("partdescription1"); + openapiFields.add("partdescription2"); + openapiFields.add("unitweight"); + openapiFields.add("unitprice"); + openapiFields.add("extendedprice"); + openapiFields.add("taxamount"); + openapiFields.add("requestedquantity"); + openapiFields.add("confirmedquantity"); + openapiFields.add("backorderquantity"); + openapiFields.add("serialnumberdetails"); + openapiFields.add("trackingnumber"); + openapiFields.add("shipmentdetails"); + openapiFields.add("productextendedspecs"); + openapiFields.add("backorderetadate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailResponseServiceresponseOrderdetailresponseLinesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseLinesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailResponseServiceresponseOrderdetailresponseLinesInner is not found in the empty JSON string", OrderDetailResponseServiceresponseOrderdetailresponseLinesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseLinesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailResponseServiceresponseOrderdetailresponseLinesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("linenumber") != null && !jsonObj.get("linenumber").isJsonNull()) && !jsonObj.get("linenumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `linenumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("linenumber").toString())); + } + if ((jsonObj.get("globallinenumber") != null && !jsonObj.get("globallinenumber").isJsonNull()) && !jsonObj.get("globallinenumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `globallinenumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("globallinenumber").toString())); + } + if ((jsonObj.get("ordersuffix") != null && !jsonObj.get("ordersuffix").isJsonNull()) && !jsonObj.get("ordersuffix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ordersuffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ordersuffix").toString())); + } + if ((jsonObj.get("erpordernumber") != null && !jsonObj.get("erpordernumber").isJsonNull()) && !jsonObj.get("erpordernumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `erpordernumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("erpordernumber").toString())); + } + if ((jsonObj.get("linestatus") != null && !jsonObj.get("linestatus").isJsonNull()) && !jsonObj.get("linestatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `linestatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("linestatus").toString())); + } + if ((jsonObj.get("partnumber") != null && !jsonObj.get("partnumber").isJsonNull()) && !jsonObj.get("partnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `partnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("partnumber").toString())); + } + if ((jsonObj.get("manufacturerpartnumber") != null && !jsonObj.get("manufacturerpartnumber").isJsonNull()) && !jsonObj.get("manufacturerpartnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `manufacturerpartnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("manufacturerpartnumber").toString())); + } + if ((jsonObj.get("vendorname") != null && !jsonObj.get("vendorname").isJsonNull()) && !jsonObj.get("vendorname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorname").toString())); + } + if ((jsonObj.get("vendorcode") != null && !jsonObj.get("vendorcode").isJsonNull()) && !jsonObj.get("vendorcode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorcode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorcode").toString())); + } + if ((jsonObj.get("partdescription1") != null && !jsonObj.get("partdescription1").isJsonNull()) && !jsonObj.get("partdescription1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `partdescription1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("partdescription1").toString())); + } + if ((jsonObj.get("partdescription2") != null && !jsonObj.get("partdescription2").isJsonNull()) && !jsonObj.get("partdescription2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `partdescription2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("partdescription2").toString())); + } + if ((jsonObj.get("unitweight") != null && !jsonObj.get("unitweight").isJsonNull()) && !jsonObj.get("unitweight").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `unitweight` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unitweight").toString())); + } + if ((jsonObj.get("requestedquantity") != null && !jsonObj.get("requestedquantity").isJsonNull()) && !jsonObj.get("requestedquantity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `requestedquantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestedquantity").toString())); + } + if ((jsonObj.get("confirmedquantity") != null && !jsonObj.get("confirmedquantity").isJsonNull()) && !jsonObj.get("confirmedquantity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `confirmedquantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("confirmedquantity").toString())); + } + if ((jsonObj.get("backorderquantity") != null && !jsonObj.get("backorderquantity").isJsonNull()) && !jsonObj.get("backorderquantity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `backorderquantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("backorderquantity").toString())); + } + if (jsonObj.get("serialnumberdetails") != null && !jsonObj.get("serialnumberdetails").isJsonNull()) { + JsonArray jsonArrayserialnumberdetails = jsonObj.getAsJsonArray("serialnumberdetails"); + if (jsonArrayserialnumberdetails != null) { + // ensure the json data is an array + if (!jsonObj.get("serialnumberdetails").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `serialnumberdetails` to be an array in the JSON string but got `%s`", jsonObj.get("serialnumberdetails").toString())); + } + + // validate the optional field `serialnumberdetails` (array) + for (int i = 0; i < jsonArrayserialnumberdetails.size(); i++) { + OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner.validateJsonElement(jsonArrayserialnumberdetails.get(i)); + }; + } + } + // ensure the optional json data is an array if present + if (jsonObj.get("trackingnumber") != null && !jsonObj.get("trackingnumber").isJsonNull() && !jsonObj.get("trackingnumber").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `trackingnumber` to be an array in the JSON string but got `%s`", jsonObj.get("trackingnumber").toString())); + } + if (jsonObj.get("shipmentdetails") != null && !jsonObj.get("shipmentdetails").isJsonNull()) { + JsonArray jsonArrayshipmentdetails = jsonObj.getAsJsonArray("shipmentdetails"); + if (jsonArrayshipmentdetails != null) { + // ensure the json data is an array + if (!jsonObj.get("shipmentdetails").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `shipmentdetails` to be an array in the JSON string but got `%s`", jsonObj.get("shipmentdetails").toString())); + } + + // validate the optional field `shipmentdetails` (array) + for (int i = 0; i < jsonArrayshipmentdetails.size(); i++) { + OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.validateJsonElement(jsonArrayshipmentdetails.get(i)); + }; + } + } + if (jsonObj.get("productextendedspecs") != null && !jsonObj.get("productextendedspecs").isJsonNull()) { + JsonArray jsonArrayproductextendedspecs = jsonObj.getAsJsonArray("productextendedspecs"); + if (jsonArrayproductextendedspecs != null) { + // ensure the json data is an array + if (!jsonObj.get("productextendedspecs").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `productextendedspecs` to be an array in the JSON string but got `%s`", jsonObj.get("productextendedspecs").toString())); + } + + // validate the optional field `productextendedspecs` (array) + for (int i = 0; i < jsonArrayproductextendedspecs.size(); i++) { + InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner.validateJsonElement(jsonArrayproductextendedspecs.get(i)); + }; + } + } + if ((jsonObj.get("backorderetadate") != null && !jsonObj.get("backorderetadate").isJsonNull()) && !jsonObj.get("backorderetadate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `backorderetadate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("backorderetadate").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseLinesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailResponseServiceresponseOrderdetailresponseLinesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailResponseServiceresponseOrderdetailresponseLinesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailResponseServiceresponseOrderdetailresponseLinesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailResponseServiceresponseOrderdetailresponseLinesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailResponseServiceresponseOrderdetailresponseLinesInner + * @throws IOException if the JSON string is invalid with respect to OrderDetailResponseServiceresponseOrderdetailresponseLinesInner + */ + public static OrderDetailResponseServiceresponseOrderdetailresponseLinesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailResponseServiceresponseOrderdetailresponseLinesInner.class); + } + + /** + * Convert an instance of OrderDetailResponseServiceresponseOrderdetailresponseLinesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner.java b/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner.java new file mode 100644 index 00000000..36802a31 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner.java @@ -0,0 +1,206 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner { + public static final String SERIALIZED_NAME_SERIALNUMBER = "serialnumber"; + @SerializedName(SERIALIZED_NAME_SERIALNUMBER) + private String serialnumber; + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner() { + } + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner serialnumber(String serialnumber) { + this.serialnumber = serialnumber; + return this; + } + + /** + * serial number of the ordered SKU + * @return serialnumber + **/ + @javax.annotation.Nullable + public String getSerialnumber() { + return serialnumber; + } + + public void setSerialnumber(String serialnumber) { + this.serialnumber = serialnumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner orderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner = (OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner) o; + return Objects.equals(this.serialnumber, orderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner.serialnumber); + } + + @Override + public int hashCode() { + return Objects.hash(serialnumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner {\n"); + sb.append(" serialnumber: ").append(toIndentedString(serialnumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("serialnumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner is not found in the empty JSON string", OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("serialnumber") != null && !jsonObj.get("serialnumber").isJsonNull()) && !jsonObj.get("serialnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `serialnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("serialnumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner + * @throws IOException if the JSON string is invalid with respect to OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner + */ + public static OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner.class); + } + + /** + * Convert an instance of OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.java b/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.java new file mode 100644 index 00000000..094b0ef5 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.java @@ -0,0 +1,641 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner { + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + @SerializedName(SERIALIZED_NAME_QUANTITY) + private BigDecimal quantity; + + public static final String SERIALIZED_NAME_SHIPMENTDATE = "shipmentdate"; + @SerializedName(SERIALIZED_NAME_SHIPMENTDATE) + private String shipmentdate; + + public static final String SERIALIZED_NAME_SHIPFROMWAREHOUSEID = "shipfromwarehouseid"; + @SerializedName(SERIALIZED_NAME_SHIPFROMWAREHOUSEID) + private String shipfromwarehouseid; + + public static final String SERIALIZED_NAME_WAREHOUSENAME = "warehousename"; + @SerializedName(SERIALIZED_NAME_WAREHOUSENAME) + private String warehousename; + + public static final String SERIALIZED_NAME_INVOICENUMBER = "invoicenumber"; + @SerializedName(SERIALIZED_NAME_INVOICENUMBER) + private String invoicenumber; + + public static final String SERIALIZED_NAME_INVOICEDATE = "invoicedate"; + @SerializedName(SERIALIZED_NAME_INVOICEDATE) + private String invoicedate; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_STATUSDESCRIPTION = "statusdescription"; + @SerializedName(SERIALIZED_NAME_STATUSDESCRIPTION) + private String statusdescription; + + public static final String SERIALIZED_NAME_SHIPPEDDATE = "shippeddate"; + @SerializedName(SERIALIZED_NAME_SHIPPEDDATE) + private String shippeddate; + + public static final String SERIALIZED_NAME_HOLDREASONCODEDESCRIPTION = "holdreasoncodedescription"; + @SerializedName(SERIALIZED_NAME_HOLDREASONCODEDESCRIPTION) + private String holdreasoncodedescription; + + public static final String SERIALIZED_NAME_PONUMBER = "ponumber"; + @SerializedName(SERIALIZED_NAME_PONUMBER) + private String ponumber; + + public static final String SERIALIZED_NAME_CARRIERTYPE = "carriertype"; + @SerializedName(SERIALIZED_NAME_CARRIERTYPE) + private String carriertype; + + public static final String SERIALIZED_NAME_CARRIERCODE = "carriercode"; + @SerializedName(SERIALIZED_NAME_CARRIERCODE) + private String carriercode; + + public static final String SERIALIZED_NAME_CARRIERNAME = "carriername"; + @SerializedName(SERIALIZED_NAME_CARRIERNAME) + private String carriername; + + public static final String SERIALIZED_NAME_PRONUMBER = "pronumber"; + @SerializedName(SERIALIZED_NAME_PRONUMBER) + private String pronumber; + + public static final String SERIALIZED_NAME_PACKAGEDETAILS = "packagedetails"; + @SerializedName(SERIALIZED_NAME_PACKAGEDETAILS) + private OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails packagedetails; + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner() { + } + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner quantity(BigDecimal quantity) { + this.quantity = quantity; + return this; + } + + /** + * quantity shipped + * @return quantity + **/ + @javax.annotation.Nullable + public BigDecimal getQuantity() { + return quantity; + } + + public void setQuantity(BigDecimal quantity) { + this.quantity = quantity; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner shipmentdate(String shipmentdate) { + this.shipmentdate = shipmentdate; + return this; + } + + /** + * date of shipment + * @return shipmentdate + **/ + @javax.annotation.Nullable + public String getShipmentdate() { + return shipmentdate; + } + + public void setShipmentdate(String shipmentdate) { + this.shipmentdate = shipmentdate; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner shipfromwarehouseid(String shipfromwarehouseid) { + this.shipfromwarehouseid = shipfromwarehouseid; + return this; + } + + /** + * Warehouse product was shipped from + * @return shipfromwarehouseid + **/ + @javax.annotation.Nullable + public String getShipfromwarehouseid() { + return shipfromwarehouseid; + } + + public void setShipfromwarehouseid(String shipfromwarehouseid) { + this.shipfromwarehouseid = shipfromwarehouseid; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner warehousename(String warehousename) { + this.warehousename = warehousename; + return this; + } + + /** + * name of the warehouse + * @return warehousename + **/ + @javax.annotation.Nullable + public String getWarehousename() { + return warehousename; + } + + public void setWarehousename(String warehousename) { + this.warehousename = warehousename; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner invoicenumber(String invoicenumber) { + this.invoicenumber = invoicenumber; + return this; + } + + /** + * Invoice Number + * @return invoicenumber + **/ + @javax.annotation.Nullable + public String getInvoicenumber() { + return invoicenumber; + } + + public void setInvoicenumber(String invoicenumber) { + this.invoicenumber = invoicenumber; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner invoicedate(String invoicedate) { + this.invoicedate = invoicedate; + return this; + } + + /** + * date on the invoice generated + * @return invoicedate + **/ + @javax.annotation.Nullable + public String getInvoicedate() { + return invoicedate; + } + + public void setInvoicedate(String invoicedate) { + this.invoicedate = invoicedate; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner status(String status) { + this.status = status; + return this; + } + + /** + * code for current Status of the order + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner statusdescription(String statusdescription) { + this.statusdescription = statusdescription; + return this; + } + + /** + * Description of status + * @return statusdescription + **/ + @javax.annotation.Nullable + public String getStatusdescription() { + return statusdescription; + } + + public void setStatusdescription(String statusdescription) { + this.statusdescription = statusdescription; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner shippeddate(String shippeddate) { + this.shippeddate = shippeddate; + return this; + } + + /** + * date of shipment + * @return shippeddate + **/ + @javax.annotation.Nullable + public String getShippeddate() { + return shippeddate; + } + + public void setShippeddate(String shippeddate) { + this.shippeddate = shippeddate; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner holdreasoncodedescription(String holdreasoncodedescription) { + this.holdreasoncodedescription = holdreasoncodedescription; + return this; + } + + /** + * Description of the code if the order is on hold + * @return holdreasoncodedescription + **/ + @javax.annotation.Nullable + public String getHoldreasoncodedescription() { + return holdreasoncodedescription; + } + + public void setHoldreasoncodedescription(String holdreasoncodedescription) { + this.holdreasoncodedescription = holdreasoncodedescription; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner ponumber(String ponumber) { + this.ponumber = ponumber; + return this; + } + + /** + * Ingram PO Number to vendors for direct ship orders + * @return ponumber + **/ + @javax.annotation.Nullable + public String getPonumber() { + return ponumber; + } + + public void setPonumber(String ponumber) { + this.ponumber = ponumber; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner carriertype(String carriertype) { + this.carriertype = carriertype; + return this; + } + + /** + * Helps to determine shipment type. for e.g. LTL is used for heavy shipment. SML is used for light shipment + * @return carriertype + **/ + @javax.annotation.Nullable + public String getCarriertype() { + return carriertype; + } + + public void setCarriertype(String carriertype) { + this.carriertype = carriertype; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner carriercode(String carriercode) { + this.carriercode = carriercode; + return this; + } + + /** + * + * @return carriercode + **/ + @javax.annotation.Nullable + public String getCarriercode() { + return carriercode; + } + + public void setCarriercode(String carriercode) { + this.carriercode = carriercode; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner carriername(String carriername) { + this.carriername = carriername; + return this; + } + + /** + * Name of the carrier. If carriername is LTL then the tracking info is in the \"pronumber\" data field + * @return carriername + **/ + @javax.annotation.Nullable + public String getCarriername() { + return carriername; + } + + public void setCarriername(String carriername) { + this.carriername = carriername; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner pronumber(String pronumber) { + this.pronumber = pronumber; + return this; + } + + /** + * + * @return pronumber + **/ + @javax.annotation.Nullable + public String getPronumber() { + return pronumber; + } + + public void setPronumber(String pronumber) { + this.pronumber = pronumber; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner packagedetails(OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails packagedetails) { + this.packagedetails = packagedetails; + return this; + } + + /** + * Get packagedetails + * @return packagedetails + **/ + @javax.annotation.Nullable + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails getPackagedetails() { + return packagedetails; + } + + public void setPackagedetails(OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails packagedetails) { + this.packagedetails = packagedetails; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner orderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner = (OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner) o; + return Objects.equals(this.quantity, orderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.quantity) && + Objects.equals(this.shipmentdate, orderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.shipmentdate) && + Objects.equals(this.shipfromwarehouseid, orderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.shipfromwarehouseid) && + Objects.equals(this.warehousename, orderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.warehousename) && + Objects.equals(this.invoicenumber, orderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.invoicenumber) && + Objects.equals(this.invoicedate, orderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.invoicedate) && + Objects.equals(this.status, orderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.status) && + Objects.equals(this.statusdescription, orderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.statusdescription) && + Objects.equals(this.shippeddate, orderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.shippeddate) && + Objects.equals(this.holdreasoncodedescription, orderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.holdreasoncodedescription) && + Objects.equals(this.ponumber, orderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.ponumber) && + Objects.equals(this.carriertype, orderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.carriertype) && + Objects.equals(this.carriercode, orderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.carriercode) && + Objects.equals(this.carriername, orderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.carriername) && + Objects.equals(this.pronumber, orderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.pronumber) && + Objects.equals(this.packagedetails, orderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.packagedetails); + } + + @Override + public int hashCode() { + return Objects.hash(quantity, shipmentdate, shipfromwarehouseid, warehousename, invoicenumber, invoicedate, status, statusdescription, shippeddate, holdreasoncodedescription, ponumber, carriertype, carriercode, carriername, pronumber, packagedetails); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner {\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipmentdate: ").append(toIndentedString(shipmentdate)).append("\n"); + sb.append(" shipfromwarehouseid: ").append(toIndentedString(shipfromwarehouseid)).append("\n"); + sb.append(" warehousename: ").append(toIndentedString(warehousename)).append("\n"); + sb.append(" invoicenumber: ").append(toIndentedString(invoicenumber)).append("\n"); + sb.append(" invoicedate: ").append(toIndentedString(invoicedate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" statusdescription: ").append(toIndentedString(statusdescription)).append("\n"); + sb.append(" shippeddate: ").append(toIndentedString(shippeddate)).append("\n"); + sb.append(" holdreasoncodedescription: ").append(toIndentedString(holdreasoncodedescription)).append("\n"); + sb.append(" ponumber: ").append(toIndentedString(ponumber)).append("\n"); + sb.append(" carriertype: ").append(toIndentedString(carriertype)).append("\n"); + sb.append(" carriercode: ").append(toIndentedString(carriercode)).append("\n"); + sb.append(" carriername: ").append(toIndentedString(carriername)).append("\n"); + sb.append(" pronumber: ").append(toIndentedString(pronumber)).append("\n"); + sb.append(" packagedetails: ").append(toIndentedString(packagedetails)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("quantity"); + openapiFields.add("shipmentdate"); + openapiFields.add("shipfromwarehouseid"); + openapiFields.add("warehousename"); + openapiFields.add("invoicenumber"); + openapiFields.add("invoicedate"); + openapiFields.add("status"); + openapiFields.add("statusdescription"); + openapiFields.add("shippeddate"); + openapiFields.add("holdreasoncodedescription"); + openapiFields.add("ponumber"); + openapiFields.add("carriertype"); + openapiFields.add("carriercode"); + openapiFields.add("carriername"); + openapiFields.add("pronumber"); + openapiFields.add("packagedetails"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner is not found in the empty JSON string", OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("shipmentdate") != null && !jsonObj.get("shipmentdate").isJsonNull()) && !jsonObj.get("shipmentdate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shipmentdate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shipmentdate").toString())); + } + if ((jsonObj.get("shipfromwarehouseid") != null && !jsonObj.get("shipfromwarehouseid").isJsonNull()) && !jsonObj.get("shipfromwarehouseid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shipfromwarehouseid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shipfromwarehouseid").toString())); + } + if ((jsonObj.get("warehousename") != null && !jsonObj.get("warehousename").isJsonNull()) && !jsonObj.get("warehousename").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `warehousename` to be a primitive type in the JSON string but got `%s`", jsonObj.get("warehousename").toString())); + } + if ((jsonObj.get("invoicenumber") != null && !jsonObj.get("invoicenumber").isJsonNull()) && !jsonObj.get("invoicenumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `invoicenumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoicenumber").toString())); + } + if ((jsonObj.get("invoicedate") != null && !jsonObj.get("invoicedate").isJsonNull()) && !jsonObj.get("invoicedate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `invoicedate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoicedate").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if ((jsonObj.get("statusdescription") != null && !jsonObj.get("statusdescription").isJsonNull()) && !jsonObj.get("statusdescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `statusdescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("statusdescription").toString())); + } + if ((jsonObj.get("shippeddate") != null && !jsonObj.get("shippeddate").isJsonNull()) && !jsonObj.get("shippeddate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shippeddate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shippeddate").toString())); + } + if ((jsonObj.get("holdreasoncodedescription") != null && !jsonObj.get("holdreasoncodedescription").isJsonNull()) && !jsonObj.get("holdreasoncodedescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `holdreasoncodedescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("holdreasoncodedescription").toString())); + } + if ((jsonObj.get("ponumber") != null && !jsonObj.get("ponumber").isJsonNull()) && !jsonObj.get("ponumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ponumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ponumber").toString())); + } + if ((jsonObj.get("carriertype") != null && !jsonObj.get("carriertype").isJsonNull()) && !jsonObj.get("carriertype").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `carriertype` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carriertype").toString())); + } + if ((jsonObj.get("carriercode") != null && !jsonObj.get("carriercode").isJsonNull()) && !jsonObj.get("carriercode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `carriercode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carriercode").toString())); + } + if ((jsonObj.get("carriername") != null && !jsonObj.get("carriername").isJsonNull()) && !jsonObj.get("carriername").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `carriername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carriername").toString())); + } + if ((jsonObj.get("pronumber") != null && !jsonObj.get("pronumber").isJsonNull()) && !jsonObj.get("pronumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `pronumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pronumber").toString())); + } + // validate the optional field `packagedetails` + if (jsonObj.get("packagedetails") != null && !jsonObj.get("packagedetails").isJsonNull()) { + OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails.validateJsonElement(jsonObj.get("packagedetails")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner + * @throws IOException if the JSON string is invalid with respect to OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner + */ + public static OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner.class); + } + + /** + * Convert an instance of OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails.java b/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails.java new file mode 100644 index 00000000..cd2305c2 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails.java @@ -0,0 +1,293 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails { + public static final String SERIALIZED_NAME_TRACKINGNUMBER = "trackingnumber"; + @SerializedName(SERIALIZED_NAME_TRACKINGNUMBER) + private String trackingnumber; + + public static final String SERIALIZED_NAME_PACKAGEWEIGHT = "packageweight"; + @SerializedName(SERIALIZED_NAME_PACKAGEWEIGHT) + private String packageweight; + + public static final String SERIALIZED_NAME_CARTONNUMBER = "cartonnumber"; + @SerializedName(SERIALIZED_NAME_CARTONNUMBER) + private String cartonnumber; + + public static final String SERIALIZED_NAME_QUANTITYINBOX = "quantityinbox"; + @SerializedName(SERIALIZED_NAME_QUANTITYINBOX) + private String quantityinbox; + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails() { + } + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails trackingnumber(String trackingnumber) { + this.trackingnumber = trackingnumber; + return this; + } + + /** + * Get trackingnumber + * @return trackingnumber + **/ + @javax.annotation.Nullable + public String getTrackingnumber() { + return trackingnumber; + } + + public void setTrackingnumber(String trackingnumber) { + this.trackingnumber = trackingnumber; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails packageweight(String packageweight) { + this.packageweight = packageweight; + return this; + } + + /** + * Get packageweight + * @return packageweight + **/ + @javax.annotation.Nullable + public String getPackageweight() { + return packageweight; + } + + public void setPackageweight(String packageweight) { + this.packageweight = packageweight; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails cartonnumber(String cartonnumber) { + this.cartonnumber = cartonnumber; + return this; + } + + /** + * Get cartonnumber + * @return cartonnumber + **/ + @javax.annotation.Nullable + public String getCartonnumber() { + return cartonnumber; + } + + public void setCartonnumber(String cartonnumber) { + this.cartonnumber = cartonnumber; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails quantityinbox(String quantityinbox) { + this.quantityinbox = quantityinbox; + return this; + } + + /** + * Get quantityinbox + * @return quantityinbox + **/ + @javax.annotation.Nullable + public String getQuantityinbox() { + return quantityinbox; + } + + public void setQuantityinbox(String quantityinbox) { + this.quantityinbox = quantityinbox; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails orderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails = (OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails) o; + return Objects.equals(this.trackingnumber, orderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails.trackingnumber) && + Objects.equals(this.packageweight, orderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails.packageweight) && + Objects.equals(this.cartonnumber, orderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails.cartonnumber) && + Objects.equals(this.quantityinbox, orderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails.quantityinbox); + } + + @Override + public int hashCode() { + return Objects.hash(trackingnumber, packageweight, cartonnumber, quantityinbox); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails {\n"); + sb.append(" trackingnumber: ").append(toIndentedString(trackingnumber)).append("\n"); + sb.append(" packageweight: ").append(toIndentedString(packageweight)).append("\n"); + sb.append(" cartonnumber: ").append(toIndentedString(cartonnumber)).append("\n"); + sb.append(" quantityinbox: ").append(toIndentedString(quantityinbox)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("trackingnumber"); + openapiFields.add("packageweight"); + openapiFields.add("cartonnumber"); + openapiFields.add("quantityinbox"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails is not found in the empty JSON string", OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("trackingnumber") != null && !jsonObj.get("trackingnumber").isJsonNull()) && !jsonObj.get("trackingnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `trackingnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("trackingnumber").toString())); + } + if ((jsonObj.get("packageweight") != null && !jsonObj.get("packageweight").isJsonNull()) && !jsonObj.get("packageweight").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `packageweight` to be a primitive type in the JSON string but got `%s`", jsonObj.get("packageweight").toString())); + } + if ((jsonObj.get("cartonnumber") != null && !jsonObj.get("cartonnumber").isJsonNull()) && !jsonObj.get("cartonnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cartonnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cartonnumber").toString())); + } + if ((jsonObj.get("quantityinbox") != null && !jsonObj.get("quantityinbox").isJsonNull()) && !jsonObj.get("quantityinbox").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quantityinbox` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quantityinbox").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails + * @throws IOException if the JSON string is invalid with respect to OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails + */ + public static OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails.class); + } + + /** + * Convert an instance of OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner.java b/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner.java new file mode 100644 index 00000000..ebeed3cb --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner { + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_CHARGEAMOUNT = "chargeamount"; + @SerializedName(SERIALIZED_NAME_CHARGEAMOUNT) + private String chargeamount; + + public OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner() { + } + + public OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner description(String description) { + this.description = description; + return this; + } + + /** + * Handling charges/Miscellaneous Fee description + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner chargeamount(String chargeamount) { + this.chargeamount = chargeamount; + return this; + } + + /** + * Handling charges/ Miscelaneous fee amount + * @return chargeamount + **/ + @javax.annotation.Nullable + public String getChargeamount() { + return chargeamount; + } + + public void setChargeamount(String chargeamount) { + this.chargeamount = chargeamount; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner orderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner = (OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner) o; + return Objects.equals(this.description, orderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner.description) && + Objects.equals(this.chargeamount, orderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner.chargeamount); + } + + @Override + public int hashCode() { + return Objects.hash(description, chargeamount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" chargeamount: ").append(toIndentedString(chargeamount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("description"); + openapiFields.add("chargeamount"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner is not found in the empty JSON string", OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("chargeamount") != null && !jsonObj.get("chargeamount").isJsonNull()) && !jsonObj.get("chargeamount").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `chargeamount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chargeamount").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner + * @throws IOException if the JSON string is invalid with respect to OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner + */ + public static OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner.class); + } + + /** + * Convert an instance of OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.java b/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.java new file mode 100644 index 00000000..05ed5879 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.java @@ -0,0 +1,467 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress { + public static final String SERIALIZED_NAME_SUFFIX = "suffix"; + @SerializedName(SERIALIZED_NAME_SUFFIX) + private String suffix; + + public static final String SERIALIZED_NAME_ATTENTION = "attention"; + @SerializedName(SERIALIZED_NAME_ATTENTION) + private String attention; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_ADDRESSLINE1 = "addressline1"; + @SerializedName(SERIALIZED_NAME_ADDRESSLINE1) + private String addressline1; + + public static final String SERIALIZED_NAME_ADDRESSLINE2 = "addressline2"; + @SerializedName(SERIALIZED_NAME_ADDRESSLINE2) + private String addressline2; + + public static final String SERIALIZED_NAME_ADDRESSLINE3 = "addressline3"; + @SerializedName(SERIALIZED_NAME_ADDRESSLINE3) + private String addressline3; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTALCODE = "postalcode"; + @SerializedName(SERIALIZED_NAME_POSTALCODE) + private String postalcode; + + public static final String SERIALIZED_NAME_COUNTRYCODE = "countrycode"; + @SerializedName(SERIALIZED_NAME_COUNTRYCODE) + private String countrycode; + + public OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress() { + } + + public OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress suffix(String suffix) { + this.suffix = suffix; + return this; + } + + /** + * Get suffix + * @return suffix + **/ + @javax.annotation.Nullable + public String getSuffix() { + return suffix; + } + + public void setSuffix(String suffix) { + this.suffix = suffix; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress attention(String attention) { + this.attention = attention; + return this; + } + + /** + * Get attention + * @return attention + **/ + @javax.annotation.Nullable + public String getAttention() { + return attention; + } + + public void setAttention(String attention) { + this.attention = attention; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress addressline1(String addressline1) { + this.addressline1 = addressline1; + return this; + } + + /** + * Get addressline1 + * @return addressline1 + **/ + @javax.annotation.Nullable + public String getAddressline1() { + return addressline1; + } + + public void setAddressline1(String addressline1) { + this.addressline1 = addressline1; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress addressline2(String addressline2) { + this.addressline2 = addressline2; + return this; + } + + /** + * Get addressline2 + * @return addressline2 + **/ + @javax.annotation.Nullable + public String getAddressline2() { + return addressline2; + } + + public void setAddressline2(String addressline2) { + this.addressline2 = addressline2; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress addressline3(String addressline3) { + this.addressline3 = addressline3; + return this; + } + + /** + * Get addressline3 + * @return addressline3 + **/ + @javax.annotation.Nullable + public String getAddressline3() { + return addressline3; + } + + public void setAddressline3(String addressline3) { + this.addressline3 = addressline3; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress city(String city) { + this.city = city; + return this; + } + + /** + * Get city + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress state(String state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress postalcode(String postalcode) { + this.postalcode = postalcode; + return this; + } + + /** + * Get postalcode + * @return postalcode + **/ + @javax.annotation.Nullable + public String getPostalcode() { + return postalcode; + } + + public void setPostalcode(String postalcode) { + this.postalcode = postalcode; + } + + + public OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress countrycode(String countrycode) { + this.countrycode = countrycode; + return this; + } + + /** + * Get countrycode + * @return countrycode + **/ + @javax.annotation.Nullable + public String getCountrycode() { + return countrycode; + } + + public void setCountrycode(String countrycode) { + this.countrycode = countrycode; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress orderDetailResponseServiceresponseOrderdetailresponseShiptoaddress = (OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress) o; + return Objects.equals(this.suffix, orderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.suffix) && + Objects.equals(this.attention, orderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.attention) && + Objects.equals(this.name, orderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.name) && + Objects.equals(this.addressline1, orderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.addressline1) && + Objects.equals(this.addressline2, orderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.addressline2) && + Objects.equals(this.addressline3, orderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.addressline3) && + Objects.equals(this.city, orderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.city) && + Objects.equals(this.state, orderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.state) && + Objects.equals(this.postalcode, orderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.postalcode) && + Objects.equals(this.countrycode, orderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.countrycode); + } + + @Override + public int hashCode() { + return Objects.hash(suffix, attention, name, addressline1, addressline2, addressline3, city, state, postalcode, countrycode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress {\n"); + sb.append(" suffix: ").append(toIndentedString(suffix)).append("\n"); + sb.append(" attention: ").append(toIndentedString(attention)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" addressline1: ").append(toIndentedString(addressline1)).append("\n"); + sb.append(" addressline2: ").append(toIndentedString(addressline2)).append("\n"); + sb.append(" addressline3: ").append(toIndentedString(addressline3)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalcode: ").append(toIndentedString(postalcode)).append("\n"); + sb.append(" countrycode: ").append(toIndentedString(countrycode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("suffix"); + openapiFields.add("attention"); + openapiFields.add("name"); + openapiFields.add("addressline1"); + openapiFields.add("addressline2"); + openapiFields.add("addressline3"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalcode"); + openapiFields.add("countrycode"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress is not found in the empty JSON string", OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("suffix") != null && !jsonObj.get("suffix").isJsonNull()) && !jsonObj.get("suffix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `suffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("suffix").toString())); + } + if ((jsonObj.get("attention") != null && !jsonObj.get("attention").isJsonNull()) && !jsonObj.get("attention").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attention` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attention").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("addressline1") != null && !jsonObj.get("addressline1").isJsonNull()) && !jsonObj.get("addressline1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressline1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressline1").toString())); + } + if ((jsonObj.get("addressline2") != null && !jsonObj.get("addressline2").isJsonNull()) && !jsonObj.get("addressline2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressline2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressline2").toString())); + } + if ((jsonObj.get("addressline3") != null && !jsonObj.get("addressline3").isJsonNull()) && !jsonObj.get("addressline3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressline3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressline3").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalcode") != null && !jsonObj.get("postalcode").isJsonNull()) && !jsonObj.get("postalcode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalcode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalcode").toString())); + } + if ((jsonObj.get("countrycode") != null && !jsonObj.get("countrycode").isJsonNull()) && !jsonObj.get("countrycode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countrycode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countrycode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress + * @throws IOException if the JSON string is invalid with respect to OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress + */ + public static OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress.class); + } + + /** + * Convert an instance of OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderDetailResponseShipToInfo.java b/src/main/java/xiresellers/client/model/OrderDetailResponseShipToInfo.java new file mode 100644 index 00000000..f4d17c72 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderDetailResponseShipToInfo.java @@ -0,0 +1,554 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * The shipping information provided by the reseller for order delivery. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderDetailResponseShipToInfo { + public static final String SERIALIZED_NAME_CONTACT = "contact"; + @SerializedName(SERIALIZED_NAME_CONTACT) + private String contact; + + public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; + @SerializedName(SERIALIZED_NAME_COMPANY_NAME) + private String companyName; + + public static final String SERIALIZED_NAME_NAME1 = "name1"; + @SerializedName(SERIALIZED_NAME_NAME1) + private String name1; + + public static final String SERIALIZED_NAME_NAME2 = "name2"; + @SerializedName(SERIALIZED_NAME_NAME2) + private String name2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE1 = "addressLine1"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE1) + private String addressLine1; + + public static final String SERIALIZED_NAME_ADDRESS_LINE2 = "addressLine2"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE2) + private String addressLine2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE3 = "addressLine3"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE3) + private String addressLine3; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; + @SerializedName(SERIALIZED_NAME_POSTAL_CODE) + private String postalCode; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) + private String phoneNumber; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public OrderDetailResponseShipToInfo() { + } + + public OrderDetailResponseShipToInfo contact(String contact) { + this.contact = contact; + return this; + } + + /** + * The company contact provided by the reseller. + * @return contact + **/ + @javax.annotation.Nullable + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + + public OrderDetailResponseShipToInfo companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * The name of the company the order will be shipped to. + * @return companyName + **/ + @javax.annotation.Nullable + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public OrderDetailResponseShipToInfo name1(String name1) { + this.name1 = name1; + return this; + } + + /** + * First name. + * @return name1 + **/ + @javax.annotation.Nullable + public String getName1() { + return name1; + } + + public void setName1(String name1) { + this.name1 = name1; + } + + + public OrderDetailResponseShipToInfo name2(String name2) { + this.name2 = name2; + return this; + } + + /** + * Last name. + * @return name2 + **/ + @javax.annotation.Nullable + public String getName2() { + return name2; + } + + public void setName2(String name2) { + this.name2 = name2; + } + + + public OrderDetailResponseShipToInfo addressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + return this; + } + + /** + * The street address the order will be shipped to. + * @return addressLine1 + **/ + @javax.annotation.Nullable + public String getAddressLine1() { + return addressLine1; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + + public OrderDetailResponseShipToInfo addressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + return this; + } + + /** + * The building or apartment number the order will be shipped to. + * @return addressLine2 + **/ + @javax.annotation.Nullable + public String getAddressLine2() { + return addressLine2; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + + public OrderDetailResponseShipToInfo addressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + return this; + } + + /** + * Line 3 of the address the order will be shipped to. + * @return addressLine3 + **/ + @javax.annotation.Nullable + public String getAddressLine3() { + return addressLine3; + } + + public void setAddressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + } + + + public OrderDetailResponseShipToInfo city(String city) { + this.city = city; + return this; + } + + /** + * The city the order will be shipped to. + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public OrderDetailResponseShipToInfo state(String state) { + this.state = state; + return this; + } + + /** + * The state the order will be shipped to. + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public OrderDetailResponseShipToInfo postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * The zip or postal code the order will be shipped to. + * @return postalCode + **/ + @javax.annotation.Nullable + public String getPostalCode() { + return postalCode; + } + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public OrderDetailResponseShipToInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * The two-character ISO country code the order will be shipped to. + * @return countryCode + **/ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public OrderDetailResponseShipToInfo phoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * The company contact phone number. + * @return phoneNumber + **/ + @javax.annotation.Nullable + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public OrderDetailResponseShipToInfo email(String email) { + this.email = email; + return this; + } + + /** + * The company contact email address. + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetailResponseShipToInfo orderDetailResponseShipToInfo = (OrderDetailResponseShipToInfo) o; + return Objects.equals(this.contact, orderDetailResponseShipToInfo.contact) && + Objects.equals(this.companyName, orderDetailResponseShipToInfo.companyName) && + Objects.equals(this.name1, orderDetailResponseShipToInfo.name1) && + Objects.equals(this.name2, orderDetailResponseShipToInfo.name2) && + Objects.equals(this.addressLine1, orderDetailResponseShipToInfo.addressLine1) && + Objects.equals(this.addressLine2, orderDetailResponseShipToInfo.addressLine2) && + Objects.equals(this.addressLine3, orderDetailResponseShipToInfo.addressLine3) && + Objects.equals(this.city, orderDetailResponseShipToInfo.city) && + Objects.equals(this.state, orderDetailResponseShipToInfo.state) && + Objects.equals(this.postalCode, orderDetailResponseShipToInfo.postalCode) && + Objects.equals(this.countryCode, orderDetailResponseShipToInfo.countryCode) && + Objects.equals(this.phoneNumber, orderDetailResponseShipToInfo.phoneNumber) && + Objects.equals(this.email, orderDetailResponseShipToInfo.email); + } + + @Override + public int hashCode() { + return Objects.hash(contact, companyName, name1, name2, addressLine1, addressLine2, addressLine3, city, state, postalCode, countryCode, phoneNumber, email); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetailResponseShipToInfo {\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" name1: ").append(toIndentedString(name1)).append("\n"); + sb.append(" name2: ").append(toIndentedString(name2)).append("\n"); + sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); + sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); + sb.append(" addressLine3: ").append(toIndentedString(addressLine3)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("contact"); + openapiFields.add("companyName"); + openapiFields.add("name1"); + openapiFields.add("name2"); + openapiFields.add("addressLine1"); + openapiFields.add("addressLine2"); + openapiFields.add("addressLine3"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalCode"); + openapiFields.add("countryCode"); + openapiFields.add("phoneNumber"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderDetailResponseShipToInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderDetailResponseShipToInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderDetailResponseShipToInfo is not found in the empty JSON string", OrderDetailResponseShipToInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderDetailResponseShipToInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderDetailResponseShipToInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("contact") != null && !jsonObj.get("contact").isJsonNull()) && !jsonObj.get("contact").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contact` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact").toString())); + } + if ((jsonObj.get("companyName") != null && !jsonObj.get("companyName").isJsonNull()) && !jsonObj.get("companyName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); + } + if ((jsonObj.get("name1") != null && !jsonObj.get("name1").isJsonNull()) && !jsonObj.get("name1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name1").toString())); + } + if ((jsonObj.get("name2") != null && !jsonObj.get("name2").isJsonNull()) && !jsonObj.get("name2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name2").toString())); + } + if ((jsonObj.get("addressLine1") != null && !jsonObj.get("addressLine1").isJsonNull()) && !jsonObj.get("addressLine1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine1").toString())); + } + if ((jsonObj.get("addressLine2") != null && !jsonObj.get("addressLine2").isJsonNull()) && !jsonObj.get("addressLine2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine2").toString())); + } + if ((jsonObj.get("addressLine3") != null && !jsonObj.get("addressLine3").isJsonNull()) && !jsonObj.get("addressLine3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine3").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderDetailResponseShipToInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderDetailResponseShipToInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderDetailResponseShipToInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderDetailResponseShipToInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderDetailResponseShipToInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderDetailResponseShipToInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderDetailResponseShipToInfo + * @throws IOException if the JSON string is invalid with respect to OrderDetailResponseShipToInfo + */ + public static OrderDetailResponseShipToInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderDetailResponseShipToInfo.class); + } + + /** + * Convert an instance of OrderDetailResponseShipToInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderModifyRequest.java b/src/main/java/xiresellers/client/model/OrderModifyRequest.java new file mode 100644 index 00000000..3d306ccc --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderModifyRequest.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderModifyRequestServicerequest; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Request schema for order modify endpoint + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderModifyRequest { + public static final String SERIALIZED_NAME_SERVICEREQUEST = "servicerequest"; + @SerializedName(SERIALIZED_NAME_SERVICEREQUEST) + private OrderModifyRequestServicerequest servicerequest; + + public OrderModifyRequest() { + } + + public OrderModifyRequest servicerequest(OrderModifyRequestServicerequest servicerequest) { + this.servicerequest = servicerequest; + return this; + } + + /** + * Get servicerequest + * @return servicerequest + **/ + @javax.annotation.Nullable + public OrderModifyRequestServicerequest getServicerequest() { + return servicerequest; + } + + public void setServicerequest(OrderModifyRequestServicerequest servicerequest) { + this.servicerequest = servicerequest; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderModifyRequest orderModifyRequest = (OrderModifyRequest) o; + return Objects.equals(this.servicerequest, orderModifyRequest.servicerequest); + } + + @Override + public int hashCode() { + return Objects.hash(servicerequest); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderModifyRequest {\n"); + sb.append(" servicerequest: ").append(toIndentedString(servicerequest)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("servicerequest"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderModifyRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderModifyRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderModifyRequest is not found in the empty JSON string", OrderModifyRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderModifyRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderModifyRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `servicerequest` + if (jsonObj.get("servicerequest") != null && !jsonObj.get("servicerequest").isJsonNull()) { + OrderModifyRequestServicerequest.validateJsonElement(jsonObj.get("servicerequest")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderModifyRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderModifyRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderModifyRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderModifyRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderModifyRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderModifyRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderModifyRequest + * @throws IOException if the JSON string is invalid with respect to OrderModifyRequest + */ + public static OrderModifyRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderModifyRequest.class); + } + + /** + * Convert an instance of OrderModifyRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderModifyRequestAdditionalAttributesInner.java b/src/main/java/xiresellers/client/model/OrderModifyRequestAdditionalAttributesInner.java new file mode 100644 index 00000000..f22682b5 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderModifyRequestAdditionalAttributesInner.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderModifyRequestAdditionalAttributesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderModifyRequestAdditionalAttributesInner { + public static final String SERIALIZED_NAME_ATTRIBUTE_NAME = "attributeName"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_NAME) + private String attributeName; + + public static final String SERIALIZED_NAME_ATTRIBUTE_VALUE = "attributeValue"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_VALUE) + private String attributeValue; + + public OrderModifyRequestAdditionalAttributesInner() { + } + + public OrderModifyRequestAdditionalAttributesInner attributeName(String attributeName) { + this.attributeName = attributeName; + return this; + } + + /** + * Example values are 'entryMethod', 'enableCommentsAsLines', 'regionCode' + * @return attributeName + **/ + @javax.annotation.Nullable + public String getAttributeName() { + return attributeName; + } + + public void setAttributeName(String attributeName) { + this.attributeName = attributeName; + } + + + public OrderModifyRequestAdditionalAttributesInner attributeValue(String attributeValue) { + this.attributeValue = attributeValue; + return this; + } + + /** + * Attribute Value + * @return attributeValue + **/ + @javax.annotation.Nullable + public String getAttributeValue() { + return attributeValue; + } + + public void setAttributeValue(String attributeValue) { + this.attributeValue = attributeValue; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderModifyRequestAdditionalAttributesInner orderModifyRequestAdditionalAttributesInner = (OrderModifyRequestAdditionalAttributesInner) o; + return Objects.equals(this.attributeName, orderModifyRequestAdditionalAttributesInner.attributeName) && + Objects.equals(this.attributeValue, orderModifyRequestAdditionalAttributesInner.attributeValue); + } + + @Override + public int hashCode() { + return Objects.hash(attributeName, attributeValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderModifyRequestAdditionalAttributesInner {\n"); + sb.append(" attributeName: ").append(toIndentedString(attributeName)).append("\n"); + sb.append(" attributeValue: ").append(toIndentedString(attributeValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributeName"); + openapiFields.add("attributeValue"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderModifyRequestAdditionalAttributesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderModifyRequestAdditionalAttributesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderModifyRequestAdditionalAttributesInner is not found in the empty JSON string", OrderModifyRequestAdditionalAttributesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderModifyRequestAdditionalAttributesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderModifyRequestAdditionalAttributesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("attributeName") != null && !jsonObj.get("attributeName").isJsonNull()) && !jsonObj.get("attributeName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeName").toString())); + } + if ((jsonObj.get("attributeValue") != null && !jsonObj.get("attributeValue").isJsonNull()) && !jsonObj.get("attributeValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeValue").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderModifyRequestAdditionalAttributesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderModifyRequestAdditionalAttributesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderModifyRequestAdditionalAttributesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderModifyRequestAdditionalAttributesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderModifyRequestAdditionalAttributesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderModifyRequestAdditionalAttributesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderModifyRequestAdditionalAttributesInner + * @throws IOException if the JSON string is invalid with respect to OrderModifyRequestAdditionalAttributesInner + */ + public static OrderModifyRequestAdditionalAttributesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderModifyRequestAdditionalAttributesInner.class); + } + + /** + * Convert an instance of OrderModifyRequestAdditionalAttributesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderModifyRequestLinesInner.java b/src/main/java/xiresellers/client/model/OrderModifyRequestLinesInner.java new file mode 100644 index 00000000..638609ad --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderModifyRequestLinesInner.java @@ -0,0 +1,406 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderModifyRequestLinesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderModifyRequestLinesInner { + public static final String SERIALIZED_NAME_INGRAM_PART_NUMBER = "ingramPartNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PART_NUMBER) + private String ingramPartNumber; + + public static final String SERIALIZED_NAME_INGRAM_LINE_NUMBER = "ingramLineNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_LINE_NUMBER) + private String ingramLineNumber; + + public static final String SERIALIZED_NAME_CUSTOMER_LINE_NUMBER = "customerLineNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_LINE_NUMBER) + private String customerLineNumber; + + /** + * The line number that was added, updated, or deleted. + */ + @JsonAdapter(AddUpdateDeleteLineEnum.Adapter.class) + public enum AddUpdateDeleteLineEnum { + UPDATE("UPDATE"), + + DELETE("DELETE"), + + ADD("ADD"); + + private String value; + + AddUpdateDeleteLineEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AddUpdateDeleteLineEnum fromValue(String value) { + for (AddUpdateDeleteLineEnum b : AddUpdateDeleteLineEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AddUpdateDeleteLineEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AddUpdateDeleteLineEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AddUpdateDeleteLineEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AddUpdateDeleteLineEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ADD_UPDATE_DELETE_LINE = "addUpdateDeleteLine"; + @SerializedName(SERIALIZED_NAME_ADD_UPDATE_DELETE_LINE) + private AddUpdateDeleteLineEnum addUpdateDeleteLine; + + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + @SerializedName(SERIALIZED_NAME_QUANTITY) + private Integer quantity; + + public static final String SERIALIZED_NAME_NOTES = "notes"; + @SerializedName(SERIALIZED_NAME_NOTES) + private String notes; + + public OrderModifyRequestLinesInner() { + } + + public OrderModifyRequestLinesInner ingramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + return this; + } + + /** + * The unique IngramMicro part number. + * @return ingramPartNumber + **/ + @javax.annotation.Nullable + public String getIngramPartNumber() { + return ingramPartNumber; + } + + public void setIngramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + } + + + public OrderModifyRequestLinesInner ingramLineNumber(String ingramLineNumber) { + this.ingramLineNumber = ingramLineNumber; + return this; + } + + /** + * The IngramMicro line number. + * @return ingramLineNumber + **/ + @javax.annotation.Nullable + public String getIngramLineNumber() { + return ingramLineNumber; + } + + public void setIngramLineNumber(String ingramLineNumber) { + this.ingramLineNumber = ingramLineNumber; + } + + + public OrderModifyRequestLinesInner customerLineNumber(String customerLineNumber) { + this.customerLineNumber = customerLineNumber; + return this; + } + + /** + * The reseller's line number for reference in their system. + * @return customerLineNumber + **/ + @javax.annotation.Nullable + public String getCustomerLineNumber() { + return customerLineNumber; + } + + public void setCustomerLineNumber(String customerLineNumber) { + this.customerLineNumber = customerLineNumber; + } + + + public OrderModifyRequestLinesInner addUpdateDeleteLine(AddUpdateDeleteLineEnum addUpdateDeleteLine) { + this.addUpdateDeleteLine = addUpdateDeleteLine; + return this; + } + + /** + * The line number that was added, updated, or deleted. + * @return addUpdateDeleteLine + **/ + @javax.annotation.Nullable + public AddUpdateDeleteLineEnum getAddUpdateDeleteLine() { + return addUpdateDeleteLine; + } + + public void setAddUpdateDeleteLine(AddUpdateDeleteLineEnum addUpdateDeleteLine) { + this.addUpdateDeleteLine = addUpdateDeleteLine; + } + + + public OrderModifyRequestLinesInner quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * The quantity of the line item. + * @return quantity + **/ + @javax.annotation.Nullable + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + + public OrderModifyRequestLinesInner notes(String notes) { + this.notes = notes; + return this; + } + + /** + * The line-level notes. + * @return notes + **/ + @javax.annotation.Nullable + public String getNotes() { + return notes; + } + + public void setNotes(String notes) { + this.notes = notes; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderModifyRequestLinesInner orderModifyRequestLinesInner = (OrderModifyRequestLinesInner) o; + return Objects.equals(this.ingramPartNumber, orderModifyRequestLinesInner.ingramPartNumber) && + Objects.equals(this.ingramLineNumber, orderModifyRequestLinesInner.ingramLineNumber) && + Objects.equals(this.customerLineNumber, orderModifyRequestLinesInner.customerLineNumber) && + Objects.equals(this.addUpdateDeleteLine, orderModifyRequestLinesInner.addUpdateDeleteLine) && + Objects.equals(this.quantity, orderModifyRequestLinesInner.quantity) && + Objects.equals(this.notes, orderModifyRequestLinesInner.notes); + } + + @Override + public int hashCode() { + return Objects.hash(ingramPartNumber, ingramLineNumber, customerLineNumber, addUpdateDeleteLine, quantity, notes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderModifyRequestLinesInner {\n"); + sb.append(" ingramPartNumber: ").append(toIndentedString(ingramPartNumber)).append("\n"); + sb.append(" ingramLineNumber: ").append(toIndentedString(ingramLineNumber)).append("\n"); + sb.append(" customerLineNumber: ").append(toIndentedString(customerLineNumber)).append("\n"); + sb.append(" addUpdateDeleteLine: ").append(toIndentedString(addUpdateDeleteLine)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("ingramPartNumber"); + openapiFields.add("ingramLineNumber"); + openapiFields.add("customerLineNumber"); + openapiFields.add("addUpdateDeleteLine"); + openapiFields.add("quantity"); + openapiFields.add("notes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderModifyRequestLinesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderModifyRequestLinesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderModifyRequestLinesInner is not found in the empty JSON string", OrderModifyRequestLinesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderModifyRequestLinesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderModifyRequestLinesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("ingramPartNumber") != null && !jsonObj.get("ingramPartNumber").isJsonNull()) && !jsonObj.get("ingramPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPartNumber").toString())); + } + if ((jsonObj.get("ingramLineNumber") != null && !jsonObj.get("ingramLineNumber").isJsonNull()) && !jsonObj.get("ingramLineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramLineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramLineNumber").toString())); + } + if ((jsonObj.get("customerLineNumber") != null && !jsonObj.get("customerLineNumber").isJsonNull()) && !jsonObj.get("customerLineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerLineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerLineNumber").toString())); + } + if ((jsonObj.get("addUpdateDeleteLine") != null && !jsonObj.get("addUpdateDeleteLine").isJsonNull()) && !jsonObj.get("addUpdateDeleteLine").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addUpdateDeleteLine` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addUpdateDeleteLine").toString())); + } + // validate the optional field `addUpdateDeleteLine` + if (jsonObj.get("addUpdateDeleteLine") != null && !jsonObj.get("addUpdateDeleteLine").isJsonNull()) { + AddUpdateDeleteLineEnum.validateJsonElement(jsonObj.get("addUpdateDeleteLine")); + } + if ((jsonObj.get("notes") != null && !jsonObj.get("notes").isJsonNull()) && !jsonObj.get("notes").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `notes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("notes").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderModifyRequestLinesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderModifyRequestLinesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderModifyRequestLinesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderModifyRequestLinesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderModifyRequestLinesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderModifyRequestLinesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderModifyRequestLinesInner + * @throws IOException if the JSON string is invalid with respect to OrderModifyRequestLinesInner + */ + public static OrderModifyRequestLinesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderModifyRequestLinesInner.class); + } + + /** + * Convert an instance of OrderModifyRequestLinesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderModifyRequestServicerequest.java b/src/main/java/xiresellers/client/model/OrderModifyRequestServicerequest.java new file mode 100644 index 00000000..8c2c2178 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderModifyRequestServicerequest.java @@ -0,0 +1,239 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderModifyRequestServicerequestOrdermodifyrequest; +import xiresellers.client.model.OrderModifyRequestServicerequestRequestpreamble; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderModifyRequestServicerequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderModifyRequestServicerequest { + public static final String SERIALIZED_NAME_REQUESTPREAMBLE = "requestpreamble"; + @SerializedName(SERIALIZED_NAME_REQUESTPREAMBLE) + private OrderModifyRequestServicerequestRequestpreamble requestpreamble; + + public static final String SERIALIZED_NAME_ORDERMODIFYREQUEST = "ordermodifyrequest"; + @SerializedName(SERIALIZED_NAME_ORDERMODIFYREQUEST) + private OrderModifyRequestServicerequestOrdermodifyrequest ordermodifyrequest; + + public OrderModifyRequestServicerequest() { + } + + public OrderModifyRequestServicerequest requestpreamble(OrderModifyRequestServicerequestRequestpreamble requestpreamble) { + this.requestpreamble = requestpreamble; + return this; + } + + /** + * Get requestpreamble + * @return requestpreamble + **/ + @javax.annotation.Nullable + public OrderModifyRequestServicerequestRequestpreamble getRequestpreamble() { + return requestpreamble; + } + + public void setRequestpreamble(OrderModifyRequestServicerequestRequestpreamble requestpreamble) { + this.requestpreamble = requestpreamble; + } + + + public OrderModifyRequestServicerequest ordermodifyrequest(OrderModifyRequestServicerequestOrdermodifyrequest ordermodifyrequest) { + this.ordermodifyrequest = ordermodifyrequest; + return this; + } + + /** + * Get ordermodifyrequest + * @return ordermodifyrequest + **/ + @javax.annotation.Nullable + public OrderModifyRequestServicerequestOrdermodifyrequest getOrdermodifyrequest() { + return ordermodifyrequest; + } + + public void setOrdermodifyrequest(OrderModifyRequestServicerequestOrdermodifyrequest ordermodifyrequest) { + this.ordermodifyrequest = ordermodifyrequest; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderModifyRequestServicerequest orderModifyRequestServicerequest = (OrderModifyRequestServicerequest) o; + return Objects.equals(this.requestpreamble, orderModifyRequestServicerequest.requestpreamble) && + Objects.equals(this.ordermodifyrequest, orderModifyRequestServicerequest.ordermodifyrequest); + } + + @Override + public int hashCode() { + return Objects.hash(requestpreamble, ordermodifyrequest); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderModifyRequestServicerequest {\n"); + sb.append(" requestpreamble: ").append(toIndentedString(requestpreamble)).append("\n"); + sb.append(" ordermodifyrequest: ").append(toIndentedString(ordermodifyrequest)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("requestpreamble"); + openapiFields.add("ordermodifyrequest"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderModifyRequestServicerequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderModifyRequestServicerequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderModifyRequestServicerequest is not found in the empty JSON string", OrderModifyRequestServicerequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderModifyRequestServicerequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderModifyRequestServicerequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `requestpreamble` + if (jsonObj.get("requestpreamble") != null && !jsonObj.get("requestpreamble").isJsonNull()) { + OrderModifyRequestServicerequestRequestpreamble.validateJsonElement(jsonObj.get("requestpreamble")); + } + // validate the optional field `ordermodifyrequest` + if (jsonObj.get("ordermodifyrequest") != null && !jsonObj.get("ordermodifyrequest").isJsonNull()) { + OrderModifyRequestServicerequestOrdermodifyrequest.validateJsonElement(jsonObj.get("ordermodifyrequest")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderModifyRequestServicerequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderModifyRequestServicerequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderModifyRequestServicerequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderModifyRequestServicerequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderModifyRequestServicerequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderModifyRequestServicerequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderModifyRequestServicerequest + * @throws IOException if the JSON string is invalid with respect to OrderModifyRequestServicerequest + */ + public static OrderModifyRequestServicerequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderModifyRequestServicerequest.class); + } + + /** + * Convert an instance of OrderModifyRequestServicerequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequest.java b/src/main/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequest.java new file mode 100644 index 00000000..ed517b38 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequest.java @@ -0,0 +1,435 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata; +import xiresellers.client.model.OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner; +import xiresellers.client.model.OrderModifyRequestServicerequestOrdermodifyrequestShipto; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderModifyRequestServicerequestOrdermodifyrequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderModifyRequestServicerequestOrdermodifyrequest { + public static final String SERIALIZED_NAME_INGRAMORDERBRANCH = "ingramorderbranch"; + @SerializedName(SERIALIZED_NAME_INGRAMORDERBRANCH) + private String ingramorderbranch; + + public static final String SERIALIZED_NAME_INGRAMORDERNUMBER = "ingramordernumber"; + @SerializedName(SERIALIZED_NAME_INGRAMORDERNUMBER) + private String ingramordernumber; + + public static final String SERIALIZED_NAME_INGRAMORDERDIST = "ingramorderdist"; + @SerializedName(SERIALIZED_NAME_INGRAMORDERDIST) + private String ingramorderdist; + + public static final String SERIALIZED_NAME_INGRAMORDERSHIP = "ingramordership"; + @SerializedName(SERIALIZED_NAME_INGRAMORDERSHIP) + private String ingramordership; + + public static final String SERIALIZED_NAME_CUSTOMERPONUMBER = "customerponumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMERPONUMBER) + private String customerponumber; + + public static final String SERIALIZED_NAME_SHIPTO = "shipto"; + @SerializedName(SERIALIZED_NAME_SHIPTO) + private OrderModifyRequestServicerequestOrdermodifyrequestShipto shipto; + + public static final String SERIALIZED_NAME_HEADERDATA = "headerdata"; + @SerializedName(SERIALIZED_NAME_HEADERDATA) + private OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata headerdata; + + public static final String SERIALIZED_NAME_LINEDATA = "linedata"; + @SerializedName(SERIALIZED_NAME_LINEDATA) + private List linedata; + + public OrderModifyRequestServicerequestOrdermodifyrequest() { + } + + public OrderModifyRequestServicerequestOrdermodifyrequest ingramorderbranch(String ingramorderbranch) { + this.ingramorderbranch = ingramorderbranch; + return this; + } + + /** + * Get ingramorderbranch + * @return ingramorderbranch + **/ + @javax.annotation.Nullable + public String getIngramorderbranch() { + return ingramorderbranch; + } + + public void setIngramorderbranch(String ingramorderbranch) { + this.ingramorderbranch = ingramorderbranch; + } + + + public OrderModifyRequestServicerequestOrdermodifyrequest ingramordernumber(String ingramordernumber) { + this.ingramordernumber = ingramordernumber; + return this; + } + + /** + * Get ingramordernumber + * @return ingramordernumber + **/ + @javax.annotation.Nullable + public String getIngramordernumber() { + return ingramordernumber; + } + + public void setIngramordernumber(String ingramordernumber) { + this.ingramordernumber = ingramordernumber; + } + + + public OrderModifyRequestServicerequestOrdermodifyrequest ingramorderdist(String ingramorderdist) { + this.ingramorderdist = ingramorderdist; + return this; + } + + /** + * Get ingramorderdist + * @return ingramorderdist + **/ + @javax.annotation.Nullable + public String getIngramorderdist() { + return ingramorderdist; + } + + public void setIngramorderdist(String ingramorderdist) { + this.ingramorderdist = ingramorderdist; + } + + + public OrderModifyRequestServicerequestOrdermodifyrequest ingramordership(String ingramordership) { + this.ingramordership = ingramordership; + return this; + } + + /** + * Get ingramordership + * @return ingramordership + **/ + @javax.annotation.Nullable + public String getIngramordership() { + return ingramordership; + } + + public void setIngramordership(String ingramordership) { + this.ingramordership = ingramordership; + } + + + public OrderModifyRequestServicerequestOrdermodifyrequest customerponumber(String customerponumber) { + this.customerponumber = customerponumber; + return this; + } + + /** + * Get customerponumber + * @return customerponumber + **/ + @javax.annotation.Nullable + public String getCustomerponumber() { + return customerponumber; + } + + public void setCustomerponumber(String customerponumber) { + this.customerponumber = customerponumber; + } + + + public OrderModifyRequestServicerequestOrdermodifyrequest shipto(OrderModifyRequestServicerequestOrdermodifyrequestShipto shipto) { + this.shipto = shipto; + return this; + } + + /** + * Get shipto + * @return shipto + **/ + @javax.annotation.Nullable + public OrderModifyRequestServicerequestOrdermodifyrequestShipto getShipto() { + return shipto; + } + + public void setShipto(OrderModifyRequestServicerequestOrdermodifyrequestShipto shipto) { + this.shipto = shipto; + } + + + public OrderModifyRequestServicerequestOrdermodifyrequest headerdata(OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata headerdata) { + this.headerdata = headerdata; + return this; + } + + /** + * Get headerdata + * @return headerdata + **/ + @javax.annotation.Nullable + public OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata getHeaderdata() { + return headerdata; + } + + public void setHeaderdata(OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata headerdata) { + this.headerdata = headerdata; + } + + + public OrderModifyRequestServicerequestOrdermodifyrequest linedata(List linedata) { + this.linedata = linedata; + return this; + } + + public OrderModifyRequestServicerequestOrdermodifyrequest addLinedataItem(OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner linedataItem) { + if (this.linedata == null) { + this.linedata = new ArrayList<>(); + } + this.linedata.add(linedataItem); + return this; + } + + /** + * Get linedata + * @return linedata + **/ + @javax.annotation.Nullable + public List getLinedata() { + return linedata; + } + + public void setLinedata(List linedata) { + this.linedata = linedata; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderModifyRequestServicerequestOrdermodifyrequest orderModifyRequestServicerequestOrdermodifyrequest = (OrderModifyRequestServicerequestOrdermodifyrequest) o; + return Objects.equals(this.ingramorderbranch, orderModifyRequestServicerequestOrdermodifyrequest.ingramorderbranch) && + Objects.equals(this.ingramordernumber, orderModifyRequestServicerequestOrdermodifyrequest.ingramordernumber) && + Objects.equals(this.ingramorderdist, orderModifyRequestServicerequestOrdermodifyrequest.ingramorderdist) && + Objects.equals(this.ingramordership, orderModifyRequestServicerequestOrdermodifyrequest.ingramordership) && + Objects.equals(this.customerponumber, orderModifyRequestServicerequestOrdermodifyrequest.customerponumber) && + Objects.equals(this.shipto, orderModifyRequestServicerequestOrdermodifyrequest.shipto) && + Objects.equals(this.headerdata, orderModifyRequestServicerequestOrdermodifyrequest.headerdata) && + Objects.equals(this.linedata, orderModifyRequestServicerequestOrdermodifyrequest.linedata); + } + + @Override + public int hashCode() { + return Objects.hash(ingramorderbranch, ingramordernumber, ingramorderdist, ingramordership, customerponumber, shipto, headerdata, linedata); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderModifyRequestServicerequestOrdermodifyrequest {\n"); + sb.append(" ingramorderbranch: ").append(toIndentedString(ingramorderbranch)).append("\n"); + sb.append(" ingramordernumber: ").append(toIndentedString(ingramordernumber)).append("\n"); + sb.append(" ingramorderdist: ").append(toIndentedString(ingramorderdist)).append("\n"); + sb.append(" ingramordership: ").append(toIndentedString(ingramordership)).append("\n"); + sb.append(" customerponumber: ").append(toIndentedString(customerponumber)).append("\n"); + sb.append(" shipto: ").append(toIndentedString(shipto)).append("\n"); + sb.append(" headerdata: ").append(toIndentedString(headerdata)).append("\n"); + sb.append(" linedata: ").append(toIndentedString(linedata)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("ingramorderbranch"); + openapiFields.add("ingramordernumber"); + openapiFields.add("ingramorderdist"); + openapiFields.add("ingramordership"); + openapiFields.add("customerponumber"); + openapiFields.add("shipto"); + openapiFields.add("headerdata"); + openapiFields.add("linedata"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderModifyRequestServicerequestOrdermodifyrequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderModifyRequestServicerequestOrdermodifyrequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderModifyRequestServicerequestOrdermodifyrequest is not found in the empty JSON string", OrderModifyRequestServicerequestOrdermodifyrequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderModifyRequestServicerequestOrdermodifyrequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderModifyRequestServicerequestOrdermodifyrequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("ingramorderbranch") != null && !jsonObj.get("ingramorderbranch").isJsonNull()) && !jsonObj.get("ingramorderbranch").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramorderbranch` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramorderbranch").toString())); + } + if ((jsonObj.get("ingramordernumber") != null && !jsonObj.get("ingramordernumber").isJsonNull()) && !jsonObj.get("ingramordernumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramordernumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramordernumber").toString())); + } + if ((jsonObj.get("ingramorderdist") != null && !jsonObj.get("ingramorderdist").isJsonNull()) && !jsonObj.get("ingramorderdist").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramorderdist` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramorderdist").toString())); + } + if ((jsonObj.get("ingramordership") != null && !jsonObj.get("ingramordership").isJsonNull()) && !jsonObj.get("ingramordership").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramordership` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramordership").toString())); + } + if ((jsonObj.get("customerponumber") != null && !jsonObj.get("customerponumber").isJsonNull()) && !jsonObj.get("customerponumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerponumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerponumber").toString())); + } + // validate the optional field `shipto` + if (jsonObj.get("shipto") != null && !jsonObj.get("shipto").isJsonNull()) { + OrderModifyRequestServicerequestOrdermodifyrequestShipto.validateJsonElement(jsonObj.get("shipto")); + } + // validate the optional field `headerdata` + if (jsonObj.get("headerdata") != null && !jsonObj.get("headerdata").isJsonNull()) { + OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata.validateJsonElement(jsonObj.get("headerdata")); + } + if (jsonObj.get("linedata") != null && !jsonObj.get("linedata").isJsonNull()) { + JsonArray jsonArraylinedata = jsonObj.getAsJsonArray("linedata"); + if (jsonArraylinedata != null) { + // ensure the json data is an array + if (!jsonObj.get("linedata").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `linedata` to be an array in the JSON string but got `%s`", jsonObj.get("linedata").toString())); + } + + // validate the optional field `linedata` (array) + for (int i = 0; i < jsonArraylinedata.size(); i++) { + OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner.validateJsonElement(jsonArraylinedata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderModifyRequestServicerequestOrdermodifyrequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderModifyRequestServicerequestOrdermodifyrequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderModifyRequestServicerequestOrdermodifyrequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderModifyRequestServicerequestOrdermodifyrequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderModifyRequestServicerequestOrdermodifyrequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderModifyRequestServicerequestOrdermodifyrequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderModifyRequestServicerequestOrdermodifyrequest + * @throws IOException if the JSON string is invalid with respect to OrderModifyRequestServicerequestOrdermodifyrequest + */ + public static OrderModifyRequestServicerequestOrdermodifyrequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderModifyRequestServicerequestOrdermodifyrequest.class); + } + + /** + * Convert an instance of OrderModifyRequestServicerequestOrdermodifyrequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata.java b/src/main/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata.java new file mode 100644 index 00000000..ab81d068 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata { + public static final String SERIALIZED_NAME_ACTIONCODE = "actioncode"; + @SerializedName(SERIALIZED_NAME_ACTIONCODE) + private String actioncode; + + public static final String SERIALIZED_NAME_SHIPVIACODE = "shipviacode"; + @SerializedName(SERIALIZED_NAME_SHIPVIACODE) + private String shipviacode; + + public OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata() { + } + + public OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata actioncode(String actioncode) { + this.actioncode = actioncode; + return this; + } + + /** + * Get actioncode + * @return actioncode + **/ + @javax.annotation.Nullable + public String getActioncode() { + return actioncode; + } + + public void setActioncode(String actioncode) { + this.actioncode = actioncode; + } + + + public OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata shipviacode(String shipviacode) { + this.shipviacode = shipviacode; + return this; + } + + /** + * Get shipviacode + * @return shipviacode + **/ + @javax.annotation.Nullable + public String getShipviacode() { + return shipviacode; + } + + public void setShipviacode(String shipviacode) { + this.shipviacode = shipviacode; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata orderModifyRequestServicerequestOrdermodifyrequestHeaderdata = (OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata) o; + return Objects.equals(this.actioncode, orderModifyRequestServicerequestOrdermodifyrequestHeaderdata.actioncode) && + Objects.equals(this.shipviacode, orderModifyRequestServicerequestOrdermodifyrequestHeaderdata.shipviacode); + } + + @Override + public int hashCode() { + return Objects.hash(actioncode, shipviacode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata {\n"); + sb.append(" actioncode: ").append(toIndentedString(actioncode)).append("\n"); + sb.append(" shipviacode: ").append(toIndentedString(shipviacode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("actioncode"); + openapiFields.add("shipviacode"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata is not found in the empty JSON string", OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("actioncode") != null && !jsonObj.get("actioncode").isJsonNull()) && !jsonObj.get("actioncode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `actioncode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("actioncode").toString())); + } + if ((jsonObj.get("shipviacode") != null && !jsonObj.get("shipviacode").isJsonNull()) && !jsonObj.get("shipviacode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shipviacode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shipviacode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata + * @throws IOException if the JSON string is invalid with respect to OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata + */ + public static OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata.class); + } + + /** + * Convert an instance of OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner.java b/src/main/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner.java new file mode 100644 index 00000000..d6208ce0 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner.java @@ -0,0 +1,377 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner { + public static final String SERIALIZED_NAME_ADDLINEORUPDATELINE = "addlineorupdateline"; + @SerializedName(SERIALIZED_NAME_ADDLINEORUPDATELINE) + private String addlineorupdateline; + + public static final String SERIALIZED_NAME_LINENUMBER = "linenumber"; + @SerializedName(SERIALIZED_NAME_LINENUMBER) + private String linenumber; + + public static final String SERIALIZED_NAME_CUSTOMERLINENUMBER = "customerlinenumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMERLINENUMBER) + private String customerlinenumber; + + public static final String SERIALIZED_NAME_INGRAMPARTNUMBER = "ingrampartnumber"; + @SerializedName(SERIALIZED_NAME_INGRAMPARTNUMBER) + private String ingrampartnumber; + + public static final String SERIALIZED_NAME_QUANTITYORDERED = "quantityordered"; + @SerializedName(SERIALIZED_NAME_QUANTITYORDERED) + private Integer quantityordered; + + public static final String SERIALIZED_NAME_CUSTOMERPARTNUMBER = "customerpartnumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMERPARTNUMBER) + private String customerpartnumber; + + public static final String SERIALIZED_NAME_LINETYPE = "linetype"; + @SerializedName(SERIALIZED_NAME_LINETYPE) + private String linetype; + + public OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner() { + } + + public OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner addlineorupdateline(String addlineorupdateline) { + this.addlineorupdateline = addlineorupdateline; + return this; + } + + /** + * Get addlineorupdateline + * @return addlineorupdateline + **/ + @javax.annotation.Nullable + public String getAddlineorupdateline() { + return addlineorupdateline; + } + + public void setAddlineorupdateline(String addlineorupdateline) { + this.addlineorupdateline = addlineorupdateline; + } + + + public OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner linenumber(String linenumber) { + this.linenumber = linenumber; + return this; + } + + /** + * Get linenumber + * @return linenumber + **/ + @javax.annotation.Nullable + public String getLinenumber() { + return linenumber; + } + + public void setLinenumber(String linenumber) { + this.linenumber = linenumber; + } + + + public OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner customerlinenumber(String customerlinenumber) { + this.customerlinenumber = customerlinenumber; + return this; + } + + /** + * Get customerlinenumber + * @return customerlinenumber + **/ + @javax.annotation.Nullable + public String getCustomerlinenumber() { + return customerlinenumber; + } + + public void setCustomerlinenumber(String customerlinenumber) { + this.customerlinenumber = customerlinenumber; + } + + + public OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner ingrampartnumber(String ingrampartnumber) { + this.ingrampartnumber = ingrampartnumber; + return this; + } + + /** + * Get ingrampartnumber + * @return ingrampartnumber + **/ + @javax.annotation.Nullable + public String getIngrampartnumber() { + return ingrampartnumber; + } + + public void setIngrampartnumber(String ingrampartnumber) { + this.ingrampartnumber = ingrampartnumber; + } + + + public OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner quantityordered(Integer quantityordered) { + this.quantityordered = quantityordered; + return this; + } + + /** + * Get quantityordered + * @return quantityordered + **/ + @javax.annotation.Nullable + public Integer getQuantityordered() { + return quantityordered; + } + + public void setQuantityordered(Integer quantityordered) { + this.quantityordered = quantityordered; + } + + + public OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner customerpartnumber(String customerpartnumber) { + this.customerpartnumber = customerpartnumber; + return this; + } + + /** + * Get customerpartnumber + * @return customerpartnumber + **/ + @javax.annotation.Nullable + public String getCustomerpartnumber() { + return customerpartnumber; + } + + public void setCustomerpartnumber(String customerpartnumber) { + this.customerpartnumber = customerpartnumber; + } + + + public OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner linetype(String linetype) { + this.linetype = linetype; + return this; + } + + /** + * Get linetype + * @return linetype + **/ + @javax.annotation.Nullable + public String getLinetype() { + return linetype; + } + + public void setLinetype(String linetype) { + this.linetype = linetype; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner orderModifyRequestServicerequestOrdermodifyrequestLinedataInner = (OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner) o; + return Objects.equals(this.addlineorupdateline, orderModifyRequestServicerequestOrdermodifyrequestLinedataInner.addlineorupdateline) && + Objects.equals(this.linenumber, orderModifyRequestServicerequestOrdermodifyrequestLinedataInner.linenumber) && + Objects.equals(this.customerlinenumber, orderModifyRequestServicerequestOrdermodifyrequestLinedataInner.customerlinenumber) && + Objects.equals(this.ingrampartnumber, orderModifyRequestServicerequestOrdermodifyrequestLinedataInner.ingrampartnumber) && + Objects.equals(this.quantityordered, orderModifyRequestServicerequestOrdermodifyrequestLinedataInner.quantityordered) && + Objects.equals(this.customerpartnumber, orderModifyRequestServicerequestOrdermodifyrequestLinedataInner.customerpartnumber) && + Objects.equals(this.linetype, orderModifyRequestServicerequestOrdermodifyrequestLinedataInner.linetype); + } + + @Override + public int hashCode() { + return Objects.hash(addlineorupdateline, linenumber, customerlinenumber, ingrampartnumber, quantityordered, customerpartnumber, linetype); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner {\n"); + sb.append(" addlineorupdateline: ").append(toIndentedString(addlineorupdateline)).append("\n"); + sb.append(" linenumber: ").append(toIndentedString(linenumber)).append("\n"); + sb.append(" customerlinenumber: ").append(toIndentedString(customerlinenumber)).append("\n"); + sb.append(" ingrampartnumber: ").append(toIndentedString(ingrampartnumber)).append("\n"); + sb.append(" quantityordered: ").append(toIndentedString(quantityordered)).append("\n"); + sb.append(" customerpartnumber: ").append(toIndentedString(customerpartnumber)).append("\n"); + sb.append(" linetype: ").append(toIndentedString(linetype)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("addlineorupdateline"); + openapiFields.add("linenumber"); + openapiFields.add("customerlinenumber"); + openapiFields.add("ingrampartnumber"); + openapiFields.add("quantityordered"); + openapiFields.add("customerpartnumber"); + openapiFields.add("linetype"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner is not found in the empty JSON string", OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("addlineorupdateline") != null && !jsonObj.get("addlineorupdateline").isJsonNull()) && !jsonObj.get("addlineorupdateline").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addlineorupdateline` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addlineorupdateline").toString())); + } + if ((jsonObj.get("linenumber") != null && !jsonObj.get("linenumber").isJsonNull()) && !jsonObj.get("linenumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `linenumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("linenumber").toString())); + } + if ((jsonObj.get("customerlinenumber") != null && !jsonObj.get("customerlinenumber").isJsonNull()) && !jsonObj.get("customerlinenumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerlinenumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerlinenumber").toString())); + } + if ((jsonObj.get("ingrampartnumber") != null && !jsonObj.get("ingrampartnumber").isJsonNull()) && !jsonObj.get("ingrampartnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingrampartnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingrampartnumber").toString())); + } + if ((jsonObj.get("customerpartnumber") != null && !jsonObj.get("customerpartnumber").isJsonNull()) && !jsonObj.get("customerpartnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerpartnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerpartnumber").toString())); + } + if ((jsonObj.get("linetype") != null && !jsonObj.get("linetype").isJsonNull()) && !jsonObj.get("linetype").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `linetype` to be a primitive type in the JSON string but got `%s`", jsonObj.get("linetype").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner + * @throws IOException if the JSON string is invalid with respect to OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner + */ + public static OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner.class); + } + + /** + * Convert an instance of OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestShipto.java b/src/main/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestShipto.java new file mode 100644 index 00000000..62a57c55 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestShipto.java @@ -0,0 +1,380 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderModifyRequestServicerequestOrdermodifyrequestShipto + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderModifyRequestServicerequestOrdermodifyrequestShipto { + public static final String SERIALIZED_NAME_ID = "Id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_ADDRESSLINE = "addressline"; + @SerializedName(SERIALIZED_NAME_ADDRESSLINE) + private String addressline; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTALCODE = "postalcode"; + @SerializedName(SERIALIZED_NAME_POSTALCODE) + private String postalcode; + + public static final String SERIALIZED_NAME_COUNTRYCODE = "countrycode"; + @SerializedName(SERIALIZED_NAME_COUNTRYCODE) + private String countrycode; + + public OrderModifyRequestServicerequestOrdermodifyrequestShipto() { + } + + public OrderModifyRequestServicerequestOrdermodifyrequestShipto id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public OrderModifyRequestServicerequestOrdermodifyrequestShipto name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public OrderModifyRequestServicerequestOrdermodifyrequestShipto addressline(String addressline) { + this.addressline = addressline; + return this; + } + + /** + * Get addressline + * @return addressline + **/ + @javax.annotation.Nullable + public String getAddressline() { + return addressline; + } + + public void setAddressline(String addressline) { + this.addressline = addressline; + } + + + public OrderModifyRequestServicerequestOrdermodifyrequestShipto city(String city) { + this.city = city; + return this; + } + + /** + * Get city + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public OrderModifyRequestServicerequestOrdermodifyrequestShipto state(String state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public OrderModifyRequestServicerequestOrdermodifyrequestShipto postalcode(String postalcode) { + this.postalcode = postalcode; + return this; + } + + /** + * Get postalcode + * @return postalcode + **/ + @javax.annotation.Nullable + public String getPostalcode() { + return postalcode; + } + + public void setPostalcode(String postalcode) { + this.postalcode = postalcode; + } + + + public OrderModifyRequestServicerequestOrdermodifyrequestShipto countrycode(String countrycode) { + this.countrycode = countrycode; + return this; + } + + /** + * Get countrycode + * @return countrycode + **/ + @javax.annotation.Nullable + public String getCountrycode() { + return countrycode; + } + + public void setCountrycode(String countrycode) { + this.countrycode = countrycode; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderModifyRequestServicerequestOrdermodifyrequestShipto orderModifyRequestServicerequestOrdermodifyrequestShipto = (OrderModifyRequestServicerequestOrdermodifyrequestShipto) o; + return Objects.equals(this.id, orderModifyRequestServicerequestOrdermodifyrequestShipto.id) && + Objects.equals(this.name, orderModifyRequestServicerequestOrdermodifyrequestShipto.name) && + Objects.equals(this.addressline, orderModifyRequestServicerequestOrdermodifyrequestShipto.addressline) && + Objects.equals(this.city, orderModifyRequestServicerequestOrdermodifyrequestShipto.city) && + Objects.equals(this.state, orderModifyRequestServicerequestOrdermodifyrequestShipto.state) && + Objects.equals(this.postalcode, orderModifyRequestServicerequestOrdermodifyrequestShipto.postalcode) && + Objects.equals(this.countrycode, orderModifyRequestServicerequestOrdermodifyrequestShipto.countrycode); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, addressline, city, state, postalcode, countrycode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderModifyRequestServicerequestOrdermodifyrequestShipto {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" addressline: ").append(toIndentedString(addressline)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalcode: ").append(toIndentedString(postalcode)).append("\n"); + sb.append(" countrycode: ").append(toIndentedString(countrycode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("Id"); + openapiFields.add("name"); + openapiFields.add("addressline"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalcode"); + openapiFields.add("countrycode"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderModifyRequestServicerequestOrdermodifyrequestShipto + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderModifyRequestServicerequestOrdermodifyrequestShipto.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderModifyRequestServicerequestOrdermodifyrequestShipto is not found in the empty JSON string", OrderModifyRequestServicerequestOrdermodifyrequestShipto.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderModifyRequestServicerequestOrdermodifyrequestShipto.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderModifyRequestServicerequestOrdermodifyrequestShipto` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("Id") != null && !jsonObj.get("Id").isJsonNull()) && !jsonObj.get("Id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `Id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Id").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("addressline") != null && !jsonObj.get("addressline").isJsonNull()) && !jsonObj.get("addressline").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressline` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressline").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalcode") != null && !jsonObj.get("postalcode").isJsonNull()) && !jsonObj.get("postalcode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalcode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalcode").toString())); + } + if ((jsonObj.get("countrycode") != null && !jsonObj.get("countrycode").isJsonNull()) && !jsonObj.get("countrycode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countrycode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countrycode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderModifyRequestServicerequestOrdermodifyrequestShipto.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderModifyRequestServicerequestOrdermodifyrequestShipto' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderModifyRequestServicerequestOrdermodifyrequestShipto.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderModifyRequestServicerequestOrdermodifyrequestShipto value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderModifyRequestServicerequestOrdermodifyrequestShipto read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderModifyRequestServicerequestOrdermodifyrequestShipto given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderModifyRequestServicerequestOrdermodifyrequestShipto + * @throws IOException if the JSON string is invalid with respect to OrderModifyRequestServicerequestOrdermodifyrequestShipto + */ + public static OrderModifyRequestServicerequestOrdermodifyrequestShipto fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderModifyRequestServicerequestOrdermodifyrequestShipto.class); + } + + /** + * Convert an instance of OrderModifyRequestServicerequestOrdermodifyrequestShipto to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderModifyRequestServicerequestRequestpreamble.java b/src/main/java/xiresellers/client/model/OrderModifyRequestServicerequestRequestpreamble.java new file mode 100644 index 00000000..f1769c33 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderModifyRequestServicerequestRequestpreamble.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderModifyRequestServicerequestRequestpreamble + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderModifyRequestServicerequestRequestpreamble { + public static final String SERIALIZED_NAME_ISOCOUNTRYCODE = "isocountrycode"; + @SerializedName(SERIALIZED_NAME_ISOCOUNTRYCODE) + private String isocountrycode; + + public static final String SERIALIZED_NAME_CUSTOMERNUMBER = "customernumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMERNUMBER) + private String customernumber; + + public OrderModifyRequestServicerequestRequestpreamble() { + } + + public OrderModifyRequestServicerequestRequestpreamble isocountrycode(String isocountrycode) { + this.isocountrycode = isocountrycode; + return this; + } + + /** + * Get isocountrycode + * @return isocountrycode + **/ + @javax.annotation.Nullable + public String getIsocountrycode() { + return isocountrycode; + } + + public void setIsocountrycode(String isocountrycode) { + this.isocountrycode = isocountrycode; + } + + + public OrderModifyRequestServicerequestRequestpreamble customernumber(String customernumber) { + this.customernumber = customernumber; + return this; + } + + /** + * Get customernumber + * @return customernumber + **/ + @javax.annotation.Nullable + public String getCustomernumber() { + return customernumber; + } + + public void setCustomernumber(String customernumber) { + this.customernumber = customernumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderModifyRequestServicerequestRequestpreamble orderModifyRequestServicerequestRequestpreamble = (OrderModifyRequestServicerequestRequestpreamble) o; + return Objects.equals(this.isocountrycode, orderModifyRequestServicerequestRequestpreamble.isocountrycode) && + Objects.equals(this.customernumber, orderModifyRequestServicerequestRequestpreamble.customernumber); + } + + @Override + public int hashCode() { + return Objects.hash(isocountrycode, customernumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderModifyRequestServicerequestRequestpreamble {\n"); + sb.append(" isocountrycode: ").append(toIndentedString(isocountrycode)).append("\n"); + sb.append(" customernumber: ").append(toIndentedString(customernumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("isocountrycode"); + openapiFields.add("customernumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderModifyRequestServicerequestRequestpreamble + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderModifyRequestServicerequestRequestpreamble.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderModifyRequestServicerequestRequestpreamble is not found in the empty JSON string", OrderModifyRequestServicerequestRequestpreamble.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderModifyRequestServicerequestRequestpreamble.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderModifyRequestServicerequestRequestpreamble` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("isocountrycode") != null && !jsonObj.get("isocountrycode").isJsonNull()) && !jsonObj.get("isocountrycode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `isocountrycode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isocountrycode").toString())); + } + if ((jsonObj.get("customernumber") != null && !jsonObj.get("customernumber").isJsonNull()) && !jsonObj.get("customernumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customernumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customernumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderModifyRequestServicerequestRequestpreamble.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderModifyRequestServicerequestRequestpreamble' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderModifyRequestServicerequestRequestpreamble.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderModifyRequestServicerequestRequestpreamble value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderModifyRequestServicerequestRequestpreamble read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderModifyRequestServicerequestRequestpreamble given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderModifyRequestServicerequestRequestpreamble + * @throws IOException if the JSON string is invalid with respect to OrderModifyRequestServicerequestRequestpreamble + */ + public static OrderModifyRequestServicerequestRequestpreamble fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderModifyRequestServicerequestRequestpreamble.class); + } + + /** + * Convert an instance of OrderModifyRequestServicerequestRequestpreamble to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderModifyRequestShipToInfo.java b/src/main/java/xiresellers/client/model/OrderModifyRequestShipToInfo.java new file mode 100644 index 00000000..ae33a597 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderModifyRequestShipToInfo.java @@ -0,0 +1,583 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * The shipping information provided by the reseller. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderModifyRequestShipToInfo { + public static final String SERIALIZED_NAME_ADDRESS_ID = "addressId"; + @SerializedName(SERIALIZED_NAME_ADDRESS_ID) + private String addressId; + + public static final String SERIALIZED_NAME_CONTACT = "contact"; + @SerializedName(SERIALIZED_NAME_CONTACT) + private String contact; + + public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; + @SerializedName(SERIALIZED_NAME_COMPANY_NAME) + private String companyName; + + public static final String SERIALIZED_NAME_NAME1 = "name1"; + @SerializedName(SERIALIZED_NAME_NAME1) + private String name1; + + public static final String SERIALIZED_NAME_NAME2 = "name2"; + @SerializedName(SERIALIZED_NAME_NAME2) + private String name2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE1 = "addressLine1"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE1) + private String addressLine1; + + public static final String SERIALIZED_NAME_ADDRESS_LINE2 = "addressLine2"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE2) + private String addressLine2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE3 = "addressLine3"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE3) + private String addressLine3; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; + @SerializedName(SERIALIZED_NAME_POSTAL_CODE) + private String postalCode; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) + private String phoneNumber; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public OrderModifyRequestShipToInfo() { + } + + public OrderModifyRequestShipToInfo addressId(String addressId) { + this.addressId = addressId; + return this; + } + + /** + * Suffix used to identify billing address. Created during onboarding. Resellers are provided with one or more address IDs depending on how many bill to addresses they need for various flooring companies they are using for credit. + * @return addressId + **/ + @javax.annotation.Nullable + public String getAddressId() { + return addressId; + } + + public void setAddressId(String addressId) { + this.addressId = addressId; + } + + + public OrderModifyRequestShipToInfo contact(String contact) { + this.contact = contact; + return this; + } + + /** + * The company contact provided by the reseller. + * @return contact + **/ + @javax.annotation.Nullable + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + + public OrderModifyRequestShipToInfo companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * The name of the company the order will be shipped to. + * @return companyName + **/ + @javax.annotation.Nullable + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public OrderModifyRequestShipToInfo name1(String name1) { + this.name1 = name1; + return this; + } + + /** + * name1. + * @return name1 + **/ + @javax.annotation.Nullable + public String getName1() { + return name1; + } + + public void setName1(String name1) { + this.name1 = name1; + } + + + public OrderModifyRequestShipToInfo name2(String name2) { + this.name2 = name2; + return this; + } + + /** + * name2. + * @return name2 + **/ + @javax.annotation.Nullable + public String getName2() { + return name2; + } + + public void setName2(String name2) { + this.name2 = name2; + } + + + public OrderModifyRequestShipToInfo addressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + return this; + } + + /** + * The street address and building or house number the order will be shipped to. + * @return addressLine1 + **/ + @javax.annotation.Nullable + public String getAddressLine1() { + return addressLine1; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + + public OrderModifyRequestShipToInfo addressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + return this; + } + + /** + * The apartment number the order will be shipped to. + * @return addressLine2 + **/ + @javax.annotation.Nullable + public String getAddressLine2() { + return addressLine2; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + + public OrderModifyRequestShipToInfo addressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + return this; + } + + /** + * Line 3 of the address the order will be shipped to. + * @return addressLine3 + **/ + @javax.annotation.Nullable + public String getAddressLine3() { + return addressLine3; + } + + public void setAddressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + } + + + public OrderModifyRequestShipToInfo city(String city) { + this.city = city; + return this; + } + + /** + * The city the order will be shipped to. + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public OrderModifyRequestShipToInfo state(String state) { + this.state = state; + return this; + } + + /** + * The state the order will be shipped to. + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public OrderModifyRequestShipToInfo postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * The zip or postal code the order will be shipped to. + * @return postalCode + **/ + @javax.annotation.Nullable + public String getPostalCode() { + return postalCode; + } + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public OrderModifyRequestShipToInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * The two-character ISO country code the order will be shipped to. + * @return countryCode + **/ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public OrderModifyRequestShipToInfo phoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * The company contact phone number. + * @return phoneNumber + **/ + @javax.annotation.Nullable + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public OrderModifyRequestShipToInfo email(String email) { + this.email = email; + return this; + } + + /** + * The company contact email address. + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderModifyRequestShipToInfo orderModifyRequestShipToInfo = (OrderModifyRequestShipToInfo) o; + return Objects.equals(this.addressId, orderModifyRequestShipToInfo.addressId) && + Objects.equals(this.contact, orderModifyRequestShipToInfo.contact) && + Objects.equals(this.companyName, orderModifyRequestShipToInfo.companyName) && + Objects.equals(this.name1, orderModifyRequestShipToInfo.name1) && + Objects.equals(this.name2, orderModifyRequestShipToInfo.name2) && + Objects.equals(this.addressLine1, orderModifyRequestShipToInfo.addressLine1) && + Objects.equals(this.addressLine2, orderModifyRequestShipToInfo.addressLine2) && + Objects.equals(this.addressLine3, orderModifyRequestShipToInfo.addressLine3) && + Objects.equals(this.city, orderModifyRequestShipToInfo.city) && + Objects.equals(this.state, orderModifyRequestShipToInfo.state) && + Objects.equals(this.postalCode, orderModifyRequestShipToInfo.postalCode) && + Objects.equals(this.countryCode, orderModifyRequestShipToInfo.countryCode) && + Objects.equals(this.phoneNumber, orderModifyRequestShipToInfo.phoneNumber) && + Objects.equals(this.email, orderModifyRequestShipToInfo.email); + } + + @Override + public int hashCode() { + return Objects.hash(addressId, contact, companyName, name1, name2, addressLine1, addressLine2, addressLine3, city, state, postalCode, countryCode, phoneNumber, email); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderModifyRequestShipToInfo {\n"); + sb.append(" addressId: ").append(toIndentedString(addressId)).append("\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" name1: ").append(toIndentedString(name1)).append("\n"); + sb.append(" name2: ").append(toIndentedString(name2)).append("\n"); + sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); + sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); + sb.append(" addressLine3: ").append(toIndentedString(addressLine3)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("addressId"); + openapiFields.add("contact"); + openapiFields.add("companyName"); + openapiFields.add("name1"); + openapiFields.add("name2"); + openapiFields.add("addressLine1"); + openapiFields.add("addressLine2"); + openapiFields.add("addressLine3"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalCode"); + openapiFields.add("countryCode"); + openapiFields.add("phoneNumber"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderModifyRequestShipToInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderModifyRequestShipToInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderModifyRequestShipToInfo is not found in the empty JSON string", OrderModifyRequestShipToInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderModifyRequestShipToInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderModifyRequestShipToInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("addressId") != null && !jsonObj.get("addressId").isJsonNull()) && !jsonObj.get("addressId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressId").toString())); + } + if ((jsonObj.get("contact") != null && !jsonObj.get("contact").isJsonNull()) && !jsonObj.get("contact").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contact` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact").toString())); + } + if ((jsonObj.get("companyName") != null && !jsonObj.get("companyName").isJsonNull()) && !jsonObj.get("companyName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); + } + if ((jsonObj.get("name1") != null && !jsonObj.get("name1").isJsonNull()) && !jsonObj.get("name1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name1").toString())); + } + if ((jsonObj.get("name2") != null && !jsonObj.get("name2").isJsonNull()) && !jsonObj.get("name2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name2").toString())); + } + if ((jsonObj.get("addressLine1") != null && !jsonObj.get("addressLine1").isJsonNull()) && !jsonObj.get("addressLine1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine1").toString())); + } + if ((jsonObj.get("addressLine2") != null && !jsonObj.get("addressLine2").isJsonNull()) && !jsonObj.get("addressLine2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine2").toString())); + } + if ((jsonObj.get("addressLine3") != null && !jsonObj.get("addressLine3").isJsonNull()) && !jsonObj.get("addressLine3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine3").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderModifyRequestShipToInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderModifyRequestShipToInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderModifyRequestShipToInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderModifyRequestShipToInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderModifyRequestShipToInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderModifyRequestShipToInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderModifyRequestShipToInfo + * @throws IOException if the JSON string is invalid with respect to OrderModifyRequestShipToInfo + */ + public static OrderModifyRequestShipToInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderModifyRequestShipToInfo.class); + } + + /** + * Convert an instance of OrderModifyRequestShipToInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderModifyResponse.java b/src/main/java/xiresellers/client/model/OrderModifyResponse.java new file mode 100644 index 00000000..6fd481e2 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderModifyResponse.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderModifyResponseServiceresponse; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Response schema for order modify endpoint + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderModifyResponse { + public static final String SERIALIZED_NAME_SERVICERESPONSE = "serviceresponse"; + @SerializedName(SERIALIZED_NAME_SERVICERESPONSE) + private OrderModifyResponseServiceresponse serviceresponse; + + public OrderModifyResponse() { + } + + public OrderModifyResponse serviceresponse(OrderModifyResponseServiceresponse serviceresponse) { + this.serviceresponse = serviceresponse; + return this; + } + + /** + * Get serviceresponse + * @return serviceresponse + **/ + @javax.annotation.Nullable + public OrderModifyResponseServiceresponse getServiceresponse() { + return serviceresponse; + } + + public void setServiceresponse(OrderModifyResponseServiceresponse serviceresponse) { + this.serviceresponse = serviceresponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderModifyResponse orderModifyResponse = (OrderModifyResponse) o; + return Objects.equals(this.serviceresponse, orderModifyResponse.serviceresponse); + } + + @Override + public int hashCode() { + return Objects.hash(serviceresponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderModifyResponse {\n"); + sb.append(" serviceresponse: ").append(toIndentedString(serviceresponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("serviceresponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderModifyResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderModifyResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderModifyResponse is not found in the empty JSON string", OrderModifyResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderModifyResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderModifyResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `serviceresponse` + if (jsonObj.get("serviceresponse") != null && !jsonObj.get("serviceresponse").isJsonNull()) { + OrderModifyResponseServiceresponse.validateJsonElement(jsonObj.get("serviceresponse")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderModifyResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderModifyResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderModifyResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderModifyResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderModifyResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderModifyResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderModifyResponse + * @throws IOException if the JSON string is invalid with respect to OrderModifyResponse + */ + public static OrderModifyResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderModifyResponse.class); + } + + /** + * Convert an instance of OrderModifyResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderModifyResponseLinesInner.java b/src/main/java/xiresellers/client/model/OrderModifyResponseLinesInner.java new file mode 100644 index 00000000..e96903eb --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderModifyResponseLinesInner.java @@ -0,0 +1,511 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderModifyResponseLinesInnerAdditionalAttributesInner; +import xiresellers.client.model.OrderModifyResponseLinesInnerShipmentDetails; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderModifyResponseLinesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderModifyResponseLinesInner { + public static final String SERIALIZED_NAME_SUB_ORDER_NUMBER = "subOrderNumber"; + @SerializedName(SERIALIZED_NAME_SUB_ORDER_NUMBER) + private String subOrderNumber; + + public static final String SERIALIZED_NAME_INGRAM_LINE_NUMBER = "ingramLineNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_LINE_NUMBER) + private String ingramLineNumber; + + public static final String SERIALIZED_NAME_CUSTOMER_LINE_NUMBER = "customerLineNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_LINE_NUMBER) + private String customerLineNumber; + + public static final String SERIALIZED_NAME_INGRAM_PART_NUMBER = "ingramPartNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PART_NUMBER) + private String ingramPartNumber; + + public static final String SERIALIZED_NAME_VENDOR_PART_NUMBER = "vendorPartNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_PART_NUMBER) + private String vendorPartNumber; + + public static final String SERIALIZED_NAME_QUANTITY_ORDERED = "quantityOrdered"; + @SerializedName(SERIALIZED_NAME_QUANTITY_ORDERED) + private Integer quantityOrdered; + + public static final String SERIALIZED_NAME_QUANTITY_CONFIRMED = "quantityConfirmed"; + @SerializedName(SERIALIZED_NAME_QUANTITY_CONFIRMED) + private Integer quantityConfirmed; + + public static final String SERIALIZED_NAME_QUANTITY_BACK_ORDERED = "quantityBackOrdered"; + @SerializedName(SERIALIZED_NAME_QUANTITY_BACK_ORDERED) + private Integer quantityBackOrdered; + + public static final String SERIALIZED_NAME_SHIPMENT_DETAILS = "shipmentDetails"; + @SerializedName(SERIALIZED_NAME_SHIPMENT_DETAILS) + private OrderModifyResponseLinesInnerShipmentDetails shipmentDetails; + + public static final String SERIALIZED_NAME_ADDITIONAL_ATTRIBUTES = "additionalAttributes"; + @SerializedName(SERIALIZED_NAME_ADDITIONAL_ATTRIBUTES) + private List additionalAttributes; + + public static final String SERIALIZED_NAME_NOTES = "notes"; + @SerializedName(SERIALIZED_NAME_NOTES) + private String notes; + + public OrderModifyResponseLinesInner() { + } + + public OrderModifyResponseLinesInner subOrderNumber(String subOrderNumber) { + this.subOrderNumber = subOrderNumber; + return this; + } + + /** + * The sub order number. The two-digit prefix is the warehouse code of the warehouse nearest the reseller. The middle number is the order number. The two-digit suffix is the sub order number. + * @return subOrderNumber + **/ + @javax.annotation.Nullable + public String getSubOrderNumber() { + return subOrderNumber; + } + + public void setSubOrderNumber(String subOrderNumber) { + this.subOrderNumber = subOrderNumber; + } + + + public OrderModifyResponseLinesInner ingramLineNumber(String ingramLineNumber) { + this.ingramLineNumber = ingramLineNumber; + return this; + } + + /** + * The IngramMicro line number. + * @return ingramLineNumber + **/ + @javax.annotation.Nullable + public String getIngramLineNumber() { + return ingramLineNumber; + } + + public void setIngramLineNumber(String ingramLineNumber) { + this.ingramLineNumber = ingramLineNumber; + } + + + public OrderModifyResponseLinesInner customerLineNumber(String customerLineNumber) { + this.customerLineNumber = customerLineNumber; + return this; + } + + /** + * The reseller's line number for reference in their system. + * @return customerLineNumber + **/ + @javax.annotation.Nullable + public String getCustomerLineNumber() { + return customerLineNumber; + } + + public void setCustomerLineNumber(String customerLineNumber) { + this.customerLineNumber = customerLineNumber; + } + + + public OrderModifyResponseLinesInner ingramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + return this; + } + + /** + * The unique IngramMicro part number for the line item. + * @return ingramPartNumber + **/ + @javax.annotation.Nullable + public String getIngramPartNumber() { + return ingramPartNumber; + } + + public void setIngramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + } + + + public OrderModifyResponseLinesInner vendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + return this; + } + + /** + * The vendor's part number for the line item. + * @return vendorPartNumber + **/ + @javax.annotation.Nullable + public String getVendorPartNumber() { + return vendorPartNumber; + } + + public void setVendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + } + + + public OrderModifyResponseLinesInner quantityOrdered(Integer quantityOrdered) { + this.quantityOrdered = quantityOrdered; + return this; + } + + /** + * The quantity ordered of the line item. + * @return quantityOrdered + **/ + @javax.annotation.Nullable + public Integer getQuantityOrdered() { + return quantityOrdered; + } + + public void setQuantityOrdered(Integer quantityOrdered) { + this.quantityOrdered = quantityOrdered; + } + + + public OrderModifyResponseLinesInner quantityConfirmed(Integer quantityConfirmed) { + this.quantityConfirmed = quantityConfirmed; + return this; + } + + /** + * The quantity confirmed of the line item. + * @return quantityConfirmed + **/ + @javax.annotation.Nullable + public Integer getQuantityConfirmed() { + return quantityConfirmed; + } + + public void setQuantityConfirmed(Integer quantityConfirmed) { + this.quantityConfirmed = quantityConfirmed; + } + + + public OrderModifyResponseLinesInner quantityBackOrdered(Integer quantityBackOrdered) { + this.quantityBackOrdered = quantityBackOrdered; + return this; + } + + /** + * The quantity backordered of the line item. + * @return quantityBackOrdered + **/ + @javax.annotation.Nullable + public Integer getQuantityBackOrdered() { + return quantityBackOrdered; + } + + public void setQuantityBackOrdered(Integer quantityBackOrdered) { + this.quantityBackOrdered = quantityBackOrdered; + } + + + public OrderModifyResponseLinesInner shipmentDetails(OrderModifyResponseLinesInnerShipmentDetails shipmentDetails) { + this.shipmentDetails = shipmentDetails; + return this; + } + + /** + * Get shipmentDetails + * @return shipmentDetails + **/ + @javax.annotation.Nullable + public OrderModifyResponseLinesInnerShipmentDetails getShipmentDetails() { + return shipmentDetails; + } + + public void setShipmentDetails(OrderModifyResponseLinesInnerShipmentDetails shipmentDetails) { + this.shipmentDetails = shipmentDetails; + } + + + public OrderModifyResponseLinesInner additionalAttributes(List additionalAttributes) { + this.additionalAttributes = additionalAttributes; + return this; + } + + public OrderModifyResponseLinesInner addAdditionalAttributesItem(OrderModifyResponseLinesInnerAdditionalAttributesInner additionalAttributesItem) { + if (this.additionalAttributes == null) { + this.additionalAttributes = new ArrayList<>(); + } + this.additionalAttributes.add(additionalAttributesItem); + return this; + } + + /** + * SAP requested and country-specific line level details. + * @return additionalAttributes + **/ + @javax.annotation.Nullable + public List getAdditionalAttributes() { + return additionalAttributes; + } + + public void setAdditionalAttributes(List additionalAttributes) { + this.additionalAttributes = additionalAttributes; + } + + + public OrderModifyResponseLinesInner notes(String notes) { + this.notes = notes; + return this; + } + + /** + * Line-level notes for the order. + * @return notes + **/ + @javax.annotation.Nullable + public String getNotes() { + return notes; + } + + public void setNotes(String notes) { + this.notes = notes; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderModifyResponseLinesInner orderModifyResponseLinesInner = (OrderModifyResponseLinesInner) o; + return Objects.equals(this.subOrderNumber, orderModifyResponseLinesInner.subOrderNumber) && + Objects.equals(this.ingramLineNumber, orderModifyResponseLinesInner.ingramLineNumber) && + Objects.equals(this.customerLineNumber, orderModifyResponseLinesInner.customerLineNumber) && + Objects.equals(this.ingramPartNumber, orderModifyResponseLinesInner.ingramPartNumber) && + Objects.equals(this.vendorPartNumber, orderModifyResponseLinesInner.vendorPartNumber) && + Objects.equals(this.quantityOrdered, orderModifyResponseLinesInner.quantityOrdered) && + Objects.equals(this.quantityConfirmed, orderModifyResponseLinesInner.quantityConfirmed) && + Objects.equals(this.quantityBackOrdered, orderModifyResponseLinesInner.quantityBackOrdered) && + Objects.equals(this.shipmentDetails, orderModifyResponseLinesInner.shipmentDetails) && + Objects.equals(this.additionalAttributes, orderModifyResponseLinesInner.additionalAttributes) && + Objects.equals(this.notes, orderModifyResponseLinesInner.notes); + } + + @Override + public int hashCode() { + return Objects.hash(subOrderNumber, ingramLineNumber, customerLineNumber, ingramPartNumber, vendorPartNumber, quantityOrdered, quantityConfirmed, quantityBackOrdered, shipmentDetails, additionalAttributes, notes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderModifyResponseLinesInner {\n"); + sb.append(" subOrderNumber: ").append(toIndentedString(subOrderNumber)).append("\n"); + sb.append(" ingramLineNumber: ").append(toIndentedString(ingramLineNumber)).append("\n"); + sb.append(" customerLineNumber: ").append(toIndentedString(customerLineNumber)).append("\n"); + sb.append(" ingramPartNumber: ").append(toIndentedString(ingramPartNumber)).append("\n"); + sb.append(" vendorPartNumber: ").append(toIndentedString(vendorPartNumber)).append("\n"); + sb.append(" quantityOrdered: ").append(toIndentedString(quantityOrdered)).append("\n"); + sb.append(" quantityConfirmed: ").append(toIndentedString(quantityConfirmed)).append("\n"); + sb.append(" quantityBackOrdered: ").append(toIndentedString(quantityBackOrdered)).append("\n"); + sb.append(" shipmentDetails: ").append(toIndentedString(shipmentDetails)).append("\n"); + sb.append(" additionalAttributes: ").append(toIndentedString(additionalAttributes)).append("\n"); + sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("subOrderNumber"); + openapiFields.add("ingramLineNumber"); + openapiFields.add("customerLineNumber"); + openapiFields.add("ingramPartNumber"); + openapiFields.add("vendorPartNumber"); + openapiFields.add("quantityOrdered"); + openapiFields.add("quantityConfirmed"); + openapiFields.add("quantityBackOrdered"); + openapiFields.add("shipmentDetails"); + openapiFields.add("additionalAttributes"); + openapiFields.add("notes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderModifyResponseLinesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderModifyResponseLinesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderModifyResponseLinesInner is not found in the empty JSON string", OrderModifyResponseLinesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderModifyResponseLinesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderModifyResponseLinesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("subOrderNumber") != null && !jsonObj.get("subOrderNumber").isJsonNull()) && !jsonObj.get("subOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subOrderNumber").toString())); + } + if ((jsonObj.get("ingramLineNumber") != null && !jsonObj.get("ingramLineNumber").isJsonNull()) && !jsonObj.get("ingramLineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramLineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramLineNumber").toString())); + } + if ((jsonObj.get("customerLineNumber") != null && !jsonObj.get("customerLineNumber").isJsonNull()) && !jsonObj.get("customerLineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerLineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerLineNumber").toString())); + } + if ((jsonObj.get("ingramPartNumber") != null && !jsonObj.get("ingramPartNumber").isJsonNull()) && !jsonObj.get("ingramPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPartNumber").toString())); + } + if ((jsonObj.get("vendorPartNumber") != null && !jsonObj.get("vendorPartNumber").isJsonNull()) && !jsonObj.get("vendorPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorPartNumber").toString())); + } + // validate the optional field `shipmentDetails` + if (jsonObj.get("shipmentDetails") != null && !jsonObj.get("shipmentDetails").isJsonNull()) { + OrderModifyResponseLinesInnerShipmentDetails.validateJsonElement(jsonObj.get("shipmentDetails")); + } + if (jsonObj.get("additionalAttributes") != null && !jsonObj.get("additionalAttributes").isJsonNull()) { + JsonArray jsonArrayadditionalAttributes = jsonObj.getAsJsonArray("additionalAttributes"); + if (jsonArrayadditionalAttributes != null) { + // ensure the json data is an array + if (!jsonObj.get("additionalAttributes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `additionalAttributes` to be an array in the JSON string but got `%s`", jsonObj.get("additionalAttributes").toString())); + } + + // validate the optional field `additionalAttributes` (array) + for (int i = 0; i < jsonArrayadditionalAttributes.size(); i++) { + OrderModifyResponseLinesInnerAdditionalAttributesInner.validateJsonElement(jsonArrayadditionalAttributes.get(i)); + }; + } + } + if ((jsonObj.get("notes") != null && !jsonObj.get("notes").isJsonNull()) && !jsonObj.get("notes").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `notes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("notes").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderModifyResponseLinesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderModifyResponseLinesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderModifyResponseLinesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderModifyResponseLinesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderModifyResponseLinesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderModifyResponseLinesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderModifyResponseLinesInner + * @throws IOException if the JSON string is invalid with respect to OrderModifyResponseLinesInner + */ + public static OrderModifyResponseLinesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderModifyResponseLinesInner.class); + } + + /** + * Convert an instance of OrderModifyResponseLinesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderModifyResponseLinesInnerAdditionalAttributesInner.java b/src/main/java/xiresellers/client/model/OrderModifyResponseLinesInnerAdditionalAttributesInner.java new file mode 100644 index 00000000..70081876 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderModifyResponseLinesInnerAdditionalAttributesInner.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderModifyResponseLinesInnerAdditionalAttributesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderModifyResponseLinesInnerAdditionalAttributesInner { + public static final String SERIALIZED_NAME_ATTRIBUTE_NAME = "attributeName"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_NAME) + private String attributeName; + + public static final String SERIALIZED_NAME_ATTRIBUTE_VALUE = "attributeValue"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_VALUE) + private String attributeValue; + + public OrderModifyResponseLinesInnerAdditionalAttributesInner() { + } + + public OrderModifyResponseLinesInnerAdditionalAttributesInner attributeName(String attributeName) { + this.attributeName = attributeName; + return this; + } + + /** + * Attribute Name. + * @return attributeName + **/ + @javax.annotation.Nullable + public String getAttributeName() { + return attributeName; + } + + public void setAttributeName(String attributeName) { + this.attributeName = attributeName; + } + + + public OrderModifyResponseLinesInnerAdditionalAttributesInner attributeValue(String attributeValue) { + this.attributeValue = attributeValue; + return this; + } + + /** + * Attribute Value. + * @return attributeValue + **/ + @javax.annotation.Nullable + public String getAttributeValue() { + return attributeValue; + } + + public void setAttributeValue(String attributeValue) { + this.attributeValue = attributeValue; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderModifyResponseLinesInnerAdditionalAttributesInner orderModifyResponseLinesInnerAdditionalAttributesInner = (OrderModifyResponseLinesInnerAdditionalAttributesInner) o; + return Objects.equals(this.attributeName, orderModifyResponseLinesInnerAdditionalAttributesInner.attributeName) && + Objects.equals(this.attributeValue, orderModifyResponseLinesInnerAdditionalAttributesInner.attributeValue); + } + + @Override + public int hashCode() { + return Objects.hash(attributeName, attributeValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderModifyResponseLinesInnerAdditionalAttributesInner {\n"); + sb.append(" attributeName: ").append(toIndentedString(attributeName)).append("\n"); + sb.append(" attributeValue: ").append(toIndentedString(attributeValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributeName"); + openapiFields.add("attributeValue"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderModifyResponseLinesInnerAdditionalAttributesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderModifyResponseLinesInnerAdditionalAttributesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderModifyResponseLinesInnerAdditionalAttributesInner is not found in the empty JSON string", OrderModifyResponseLinesInnerAdditionalAttributesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderModifyResponseLinesInnerAdditionalAttributesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderModifyResponseLinesInnerAdditionalAttributesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("attributeName") != null && !jsonObj.get("attributeName").isJsonNull()) && !jsonObj.get("attributeName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeName").toString())); + } + if ((jsonObj.get("attributeValue") != null && !jsonObj.get("attributeValue").isJsonNull()) && !jsonObj.get("attributeValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeValue").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderModifyResponseLinesInnerAdditionalAttributesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderModifyResponseLinesInnerAdditionalAttributesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderModifyResponseLinesInnerAdditionalAttributesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderModifyResponseLinesInnerAdditionalAttributesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderModifyResponseLinesInnerAdditionalAttributesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderModifyResponseLinesInnerAdditionalAttributesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderModifyResponseLinesInnerAdditionalAttributesInner + * @throws IOException if the JSON string is invalid with respect to OrderModifyResponseLinesInnerAdditionalAttributesInner + */ + public static OrderModifyResponseLinesInnerAdditionalAttributesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderModifyResponseLinesInnerAdditionalAttributesInner.class); + } + + /** + * Convert an instance of OrderModifyResponseLinesInnerAdditionalAttributesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderModifyResponseLinesInnerShipmentDetails.java b/src/main/java/xiresellers/client/model/OrderModifyResponseLinesInnerShipmentDetails.java new file mode 100644 index 00000000..e9e4d628 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderModifyResponseLinesInnerShipmentDetails.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Shipping details for the order provided by the reseller. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderModifyResponseLinesInnerShipmentDetails { + public static final String SERIALIZED_NAME_CARRIER_CODE = "carrierCode"; + @SerializedName(SERIALIZED_NAME_CARRIER_CODE) + private String carrierCode; + + public static final String SERIALIZED_NAME_CARRIER_NAME = "carrierName"; + @SerializedName(SERIALIZED_NAME_CARRIER_NAME) + private String carrierName; + + public static final String SERIALIZED_NAME_FREIGHT_ACCOUNT_NUMBER = "freightAccountNumber"; + @SerializedName(SERIALIZED_NAME_FREIGHT_ACCOUNT_NUMBER) + private String freightAccountNumber; + + public OrderModifyResponseLinesInnerShipmentDetails() { + } + + public OrderModifyResponseLinesInnerShipmentDetails carrierCode(String carrierCode) { + this.carrierCode = carrierCode; + return this; + } + + /** + * The carrier code for the shipment containing the line item. + * @return carrierCode + **/ + @javax.annotation.Nullable + public String getCarrierCode() { + return carrierCode; + } + + public void setCarrierCode(String carrierCode) { + this.carrierCode = carrierCode; + } + + + public OrderModifyResponseLinesInnerShipmentDetails carrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** + * The name of the carrier of the shipment containing the line item. + * @return carrierName + **/ + @javax.annotation.Nullable + public String getCarrierName() { + return carrierName; + } + + public void setCarrierName(String carrierName) { + this.carrierName = carrierName; + } + + + public OrderModifyResponseLinesInnerShipmentDetails freightAccountNumber(String freightAccountNumber) { + this.freightAccountNumber = freightAccountNumber; + return this; + } + + /** + * The reseller's shipping account number with carrier. Used to bill the shipping carrier directly from the reseller's account with the carrier. + * @return freightAccountNumber + **/ + @javax.annotation.Nullable + public String getFreightAccountNumber() { + return freightAccountNumber; + } + + public void setFreightAccountNumber(String freightAccountNumber) { + this.freightAccountNumber = freightAccountNumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderModifyResponseLinesInnerShipmentDetails orderModifyResponseLinesInnerShipmentDetails = (OrderModifyResponseLinesInnerShipmentDetails) o; + return Objects.equals(this.carrierCode, orderModifyResponseLinesInnerShipmentDetails.carrierCode) && + Objects.equals(this.carrierName, orderModifyResponseLinesInnerShipmentDetails.carrierName) && + Objects.equals(this.freightAccountNumber, orderModifyResponseLinesInnerShipmentDetails.freightAccountNumber); + } + + @Override + public int hashCode() { + return Objects.hash(carrierCode, carrierName, freightAccountNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderModifyResponseLinesInnerShipmentDetails {\n"); + sb.append(" carrierCode: ").append(toIndentedString(carrierCode)).append("\n"); + sb.append(" carrierName: ").append(toIndentedString(carrierName)).append("\n"); + sb.append(" freightAccountNumber: ").append(toIndentedString(freightAccountNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("carrierCode"); + openapiFields.add("carrierName"); + openapiFields.add("freightAccountNumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderModifyResponseLinesInnerShipmentDetails + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderModifyResponseLinesInnerShipmentDetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderModifyResponseLinesInnerShipmentDetails is not found in the empty JSON string", OrderModifyResponseLinesInnerShipmentDetails.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderModifyResponseLinesInnerShipmentDetails.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderModifyResponseLinesInnerShipmentDetails` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("carrierCode") != null && !jsonObj.get("carrierCode").isJsonNull()) && !jsonObj.get("carrierCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `carrierCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierCode").toString())); + } + if ((jsonObj.get("carrierName") != null && !jsonObj.get("carrierName").isJsonNull()) && !jsonObj.get("carrierName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `carrierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierName").toString())); + } + if ((jsonObj.get("freightAccountNumber") != null && !jsonObj.get("freightAccountNumber").isJsonNull()) && !jsonObj.get("freightAccountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `freightAccountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("freightAccountNumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderModifyResponseLinesInnerShipmentDetails.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderModifyResponseLinesInnerShipmentDetails' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderModifyResponseLinesInnerShipmentDetails.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderModifyResponseLinesInnerShipmentDetails value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderModifyResponseLinesInnerShipmentDetails read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderModifyResponseLinesInnerShipmentDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderModifyResponseLinesInnerShipmentDetails + * @throws IOException if the JSON string is invalid with respect to OrderModifyResponseLinesInnerShipmentDetails + */ + public static OrderModifyResponseLinesInnerShipmentDetails fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderModifyResponseLinesInnerShipmentDetails.class); + } + + /** + * Convert an instance of OrderModifyResponseLinesInnerShipmentDetails to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderModifyResponseRejectedLineItemsInner.java b/src/main/java/xiresellers/client/model/OrderModifyResponseRejectedLineItemsInner.java new file mode 100644 index 00000000..49b0525b --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderModifyResponseRejectedLineItemsInner.java @@ -0,0 +1,377 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderModifyResponseRejectedLineItemsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderModifyResponseRejectedLineItemsInner { + public static final String SERIALIZED_NAME_INGRAM_LINE_NUMBER = "ingramLineNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_LINE_NUMBER) + private String ingramLineNumber; + + public static final String SERIALIZED_NAME_CUSTOMER_LINE_NUMBER = "customerLineNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_LINE_NUMBER) + private String customerLineNumber; + + public static final String SERIALIZED_NAME_INGRAM_PART_NUMBER = "ingramPartNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PART_NUMBER) + private String ingramPartNumber; + + public static final String SERIALIZED_NAME_VENDOR_PART_NUMBER = "vendorPartNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_PART_NUMBER) + private String vendorPartNumber; + + public static final String SERIALIZED_NAME_QUANTITY_ORDERED = "quantityOrdered"; + @SerializedName(SERIALIZED_NAME_QUANTITY_ORDERED) + private Integer quantityOrdered; + + public static final String SERIALIZED_NAME_REJECT_CODE = "rejectCode"; + @SerializedName(SERIALIZED_NAME_REJECT_CODE) + private String rejectCode; + + public static final String SERIALIZED_NAME_REJECT_REASON = "rejectReason"; + @SerializedName(SERIALIZED_NAME_REJECT_REASON) + private String rejectReason; + + public OrderModifyResponseRejectedLineItemsInner() { + } + + public OrderModifyResponseRejectedLineItemsInner ingramLineNumber(String ingramLineNumber) { + this.ingramLineNumber = ingramLineNumber; + return this; + } + + /** + * The IngramMicro line number for the failed line item. + * @return ingramLineNumber + **/ + @javax.annotation.Nullable + public String getIngramLineNumber() { + return ingramLineNumber; + } + + public void setIngramLineNumber(String ingramLineNumber) { + this.ingramLineNumber = ingramLineNumber; + } + + + public OrderModifyResponseRejectedLineItemsInner customerLineNumber(String customerLineNumber) { + this.customerLineNumber = customerLineNumber; + return this; + } + + /** + * The reseller's line number of the failed line item for reference in their system. + * @return customerLineNumber + **/ + @javax.annotation.Nullable + public String getCustomerLineNumber() { + return customerLineNumber; + } + + public void setCustomerLineNumber(String customerLineNumber) { + this.customerLineNumber = customerLineNumber; + } + + + public OrderModifyResponseRejectedLineItemsInner ingramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + return this; + } + + /** + * The IngramMicro part number for the failed line item. + * @return ingramPartNumber + **/ + @javax.annotation.Nullable + public String getIngramPartNumber() { + return ingramPartNumber; + } + + public void setIngramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + } + + + public OrderModifyResponseRejectedLineItemsInner vendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + return this; + } + + /** + * The vendor's part number for the failed line item. + * @return vendorPartNumber + **/ + @javax.annotation.Nullable + public String getVendorPartNumber() { + return vendorPartNumber; + } + + public void setVendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + } + + + public OrderModifyResponseRejectedLineItemsInner quantityOrdered(Integer quantityOrdered) { + this.quantityOrdered = quantityOrdered; + return this; + } + + /** + * The quantity ordered of the failed line item. + * @return quantityOrdered + **/ + @javax.annotation.Nullable + public Integer getQuantityOrdered() { + return quantityOrdered; + } + + public void setQuantityOrdered(Integer quantityOrdered) { + this.quantityOrdered = quantityOrdered; + } + + + public OrderModifyResponseRejectedLineItemsInner rejectCode(String rejectCode) { + this.rejectCode = rejectCode; + return this; + } + + /** + * The rejection code for the failed line item. + * @return rejectCode + **/ + @javax.annotation.Nullable + public String getRejectCode() { + return rejectCode; + } + + public void setRejectCode(String rejectCode) { + this.rejectCode = rejectCode; + } + + + public OrderModifyResponseRejectedLineItemsInner rejectReason(String rejectReason) { + this.rejectReason = rejectReason; + return this; + } + + /** + * The rejection reason for the failed line item. + * @return rejectReason + **/ + @javax.annotation.Nullable + public String getRejectReason() { + return rejectReason; + } + + public void setRejectReason(String rejectReason) { + this.rejectReason = rejectReason; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderModifyResponseRejectedLineItemsInner orderModifyResponseRejectedLineItemsInner = (OrderModifyResponseRejectedLineItemsInner) o; + return Objects.equals(this.ingramLineNumber, orderModifyResponseRejectedLineItemsInner.ingramLineNumber) && + Objects.equals(this.customerLineNumber, orderModifyResponseRejectedLineItemsInner.customerLineNumber) && + Objects.equals(this.ingramPartNumber, orderModifyResponseRejectedLineItemsInner.ingramPartNumber) && + Objects.equals(this.vendorPartNumber, orderModifyResponseRejectedLineItemsInner.vendorPartNumber) && + Objects.equals(this.quantityOrdered, orderModifyResponseRejectedLineItemsInner.quantityOrdered) && + Objects.equals(this.rejectCode, orderModifyResponseRejectedLineItemsInner.rejectCode) && + Objects.equals(this.rejectReason, orderModifyResponseRejectedLineItemsInner.rejectReason); + } + + @Override + public int hashCode() { + return Objects.hash(ingramLineNumber, customerLineNumber, ingramPartNumber, vendorPartNumber, quantityOrdered, rejectCode, rejectReason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderModifyResponseRejectedLineItemsInner {\n"); + sb.append(" ingramLineNumber: ").append(toIndentedString(ingramLineNumber)).append("\n"); + sb.append(" customerLineNumber: ").append(toIndentedString(customerLineNumber)).append("\n"); + sb.append(" ingramPartNumber: ").append(toIndentedString(ingramPartNumber)).append("\n"); + sb.append(" vendorPartNumber: ").append(toIndentedString(vendorPartNumber)).append("\n"); + sb.append(" quantityOrdered: ").append(toIndentedString(quantityOrdered)).append("\n"); + sb.append(" rejectCode: ").append(toIndentedString(rejectCode)).append("\n"); + sb.append(" rejectReason: ").append(toIndentedString(rejectReason)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("ingramLineNumber"); + openapiFields.add("customerLineNumber"); + openapiFields.add("ingramPartNumber"); + openapiFields.add("vendorPartNumber"); + openapiFields.add("quantityOrdered"); + openapiFields.add("rejectCode"); + openapiFields.add("rejectReason"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderModifyResponseRejectedLineItemsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderModifyResponseRejectedLineItemsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderModifyResponseRejectedLineItemsInner is not found in the empty JSON string", OrderModifyResponseRejectedLineItemsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderModifyResponseRejectedLineItemsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderModifyResponseRejectedLineItemsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("ingramLineNumber") != null && !jsonObj.get("ingramLineNumber").isJsonNull()) && !jsonObj.get("ingramLineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramLineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramLineNumber").toString())); + } + if ((jsonObj.get("customerLineNumber") != null && !jsonObj.get("customerLineNumber").isJsonNull()) && !jsonObj.get("customerLineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerLineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerLineNumber").toString())); + } + if ((jsonObj.get("ingramPartNumber") != null && !jsonObj.get("ingramPartNumber").isJsonNull()) && !jsonObj.get("ingramPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPartNumber").toString())); + } + if ((jsonObj.get("vendorPartNumber") != null && !jsonObj.get("vendorPartNumber").isJsonNull()) && !jsonObj.get("vendorPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorPartNumber").toString())); + } + if ((jsonObj.get("rejectCode") != null && !jsonObj.get("rejectCode").isJsonNull()) && !jsonObj.get("rejectCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `rejectCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rejectCode").toString())); + } + if ((jsonObj.get("rejectReason") != null && !jsonObj.get("rejectReason").isJsonNull()) && !jsonObj.get("rejectReason").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `rejectReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rejectReason").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderModifyResponseRejectedLineItemsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderModifyResponseRejectedLineItemsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderModifyResponseRejectedLineItemsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderModifyResponseRejectedLineItemsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderModifyResponseRejectedLineItemsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderModifyResponseRejectedLineItemsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderModifyResponseRejectedLineItemsInner + * @throws IOException if the JSON string is invalid with respect to OrderModifyResponseRejectedLineItemsInner + */ + public static OrderModifyResponseRejectedLineItemsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderModifyResponseRejectedLineItemsInner.class); + } + + /** + * Convert an instance of OrderModifyResponseRejectedLineItemsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderModifyResponseServiceresponse.java b/src/main/java/xiresellers/client/model/OrderModifyResponseServiceresponse.java new file mode 100644 index 00000000..a075c54c --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderModifyResponseServiceresponse.java @@ -0,0 +1,239 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderModifyResponseServiceresponseOrdermodifyresponse; +import xiresellers.client.model.OrderModifyResponseServiceresponseResponsepreamble; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderModifyResponseServiceresponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderModifyResponseServiceresponse { + public static final String SERIALIZED_NAME_RESPONSEPREAMBLE = "responsepreamble"; + @SerializedName(SERIALIZED_NAME_RESPONSEPREAMBLE) + private OrderModifyResponseServiceresponseResponsepreamble responsepreamble; + + public static final String SERIALIZED_NAME_ORDERMODIFYRESPONSE = "ordermodifyresponse"; + @SerializedName(SERIALIZED_NAME_ORDERMODIFYRESPONSE) + private OrderModifyResponseServiceresponseOrdermodifyresponse ordermodifyresponse; + + public OrderModifyResponseServiceresponse() { + } + + public OrderModifyResponseServiceresponse responsepreamble(OrderModifyResponseServiceresponseResponsepreamble responsepreamble) { + this.responsepreamble = responsepreamble; + return this; + } + + /** + * Get responsepreamble + * @return responsepreamble + **/ + @javax.annotation.Nullable + public OrderModifyResponseServiceresponseResponsepreamble getResponsepreamble() { + return responsepreamble; + } + + public void setResponsepreamble(OrderModifyResponseServiceresponseResponsepreamble responsepreamble) { + this.responsepreamble = responsepreamble; + } + + + public OrderModifyResponseServiceresponse ordermodifyresponse(OrderModifyResponseServiceresponseOrdermodifyresponse ordermodifyresponse) { + this.ordermodifyresponse = ordermodifyresponse; + return this; + } + + /** + * Get ordermodifyresponse + * @return ordermodifyresponse + **/ + @javax.annotation.Nullable + public OrderModifyResponseServiceresponseOrdermodifyresponse getOrdermodifyresponse() { + return ordermodifyresponse; + } + + public void setOrdermodifyresponse(OrderModifyResponseServiceresponseOrdermodifyresponse ordermodifyresponse) { + this.ordermodifyresponse = ordermodifyresponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderModifyResponseServiceresponse orderModifyResponseServiceresponse = (OrderModifyResponseServiceresponse) o; + return Objects.equals(this.responsepreamble, orderModifyResponseServiceresponse.responsepreamble) && + Objects.equals(this.ordermodifyresponse, orderModifyResponseServiceresponse.ordermodifyresponse); + } + + @Override + public int hashCode() { + return Objects.hash(responsepreamble, ordermodifyresponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderModifyResponseServiceresponse {\n"); + sb.append(" responsepreamble: ").append(toIndentedString(responsepreamble)).append("\n"); + sb.append(" ordermodifyresponse: ").append(toIndentedString(ordermodifyresponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("responsepreamble"); + openapiFields.add("ordermodifyresponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderModifyResponseServiceresponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderModifyResponseServiceresponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderModifyResponseServiceresponse is not found in the empty JSON string", OrderModifyResponseServiceresponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderModifyResponseServiceresponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderModifyResponseServiceresponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `responsepreamble` + if (jsonObj.get("responsepreamble") != null && !jsonObj.get("responsepreamble").isJsonNull()) { + OrderModifyResponseServiceresponseResponsepreamble.validateJsonElement(jsonObj.get("responsepreamble")); + } + // validate the optional field `ordermodifyresponse` + if (jsonObj.get("ordermodifyresponse") != null && !jsonObj.get("ordermodifyresponse").isJsonNull()) { + OrderModifyResponseServiceresponseOrdermodifyresponse.validateJsonElement(jsonObj.get("ordermodifyresponse")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderModifyResponseServiceresponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderModifyResponseServiceresponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderModifyResponseServiceresponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderModifyResponseServiceresponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderModifyResponseServiceresponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderModifyResponseServiceresponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderModifyResponseServiceresponse + * @throws IOException if the JSON string is invalid with respect to OrderModifyResponseServiceresponse + */ + public static OrderModifyResponseServiceresponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderModifyResponseServiceresponse.class); + } + + /** + * Convert an instance of OrderModifyResponseServiceresponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderModifyResponseServiceresponseOrdermodifyresponse.java b/src/main/java/xiresellers/client/model/OrderModifyResponseServiceresponseOrdermodifyresponse.java new file mode 100644 index 00000000..5e7740f5 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderModifyResponseServiceresponseOrdermodifyresponse.java @@ -0,0 +1,322 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderModifyResponseServiceresponseOrdermodifyresponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderModifyResponseServiceresponseOrdermodifyresponse { + public static final String SERIALIZED_NAME_RESPONSEFLAG = "responseflag"; + @SerializedName(SERIALIZED_NAME_RESPONSEFLAG) + private String responseflag; + + public static final String SERIALIZED_NAME_ERRORTYPE = "errortype"; + @SerializedName(SERIALIZED_NAME_ERRORTYPE) + private String errortype; + + public static final String SERIALIZED_NAME_ACKTRIGGERED = "acktriggered"; + @SerializedName(SERIALIZED_NAME_ACKTRIGGERED) + private String acktriggered; + + public static final String SERIALIZED_NAME_WARNCODE = "warncode"; + @SerializedName(SERIALIZED_NAME_WARNCODE) + private String warncode; + + public static final String SERIALIZED_NAME_HEADERRESPONSE = "headerresponse"; + @SerializedName(SERIALIZED_NAME_HEADERRESPONSE) + private String headerresponse; + + public OrderModifyResponseServiceresponseOrdermodifyresponse() { + } + + public OrderModifyResponseServiceresponseOrdermodifyresponse responseflag(String responseflag) { + this.responseflag = responseflag; + return this; + } + + /** + * Get responseflag + * @return responseflag + **/ + @javax.annotation.Nullable + public String getResponseflag() { + return responseflag; + } + + public void setResponseflag(String responseflag) { + this.responseflag = responseflag; + } + + + public OrderModifyResponseServiceresponseOrdermodifyresponse errortype(String errortype) { + this.errortype = errortype; + return this; + } + + /** + * Get errortype + * @return errortype + **/ + @javax.annotation.Nullable + public String getErrortype() { + return errortype; + } + + public void setErrortype(String errortype) { + this.errortype = errortype; + } + + + public OrderModifyResponseServiceresponseOrdermodifyresponse acktriggered(String acktriggered) { + this.acktriggered = acktriggered; + return this; + } + + /** + * Get acktriggered + * @return acktriggered + **/ + @javax.annotation.Nullable + public String getAcktriggered() { + return acktriggered; + } + + public void setAcktriggered(String acktriggered) { + this.acktriggered = acktriggered; + } + + + public OrderModifyResponseServiceresponseOrdermodifyresponse warncode(String warncode) { + this.warncode = warncode; + return this; + } + + /** + * Get warncode + * @return warncode + **/ + @javax.annotation.Nullable + public String getWarncode() { + return warncode; + } + + public void setWarncode(String warncode) { + this.warncode = warncode; + } + + + public OrderModifyResponseServiceresponseOrdermodifyresponse headerresponse(String headerresponse) { + this.headerresponse = headerresponse; + return this; + } + + /** + * Get headerresponse + * @return headerresponse + **/ + @javax.annotation.Nullable + public String getHeaderresponse() { + return headerresponse; + } + + public void setHeaderresponse(String headerresponse) { + this.headerresponse = headerresponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderModifyResponseServiceresponseOrdermodifyresponse orderModifyResponseServiceresponseOrdermodifyresponse = (OrderModifyResponseServiceresponseOrdermodifyresponse) o; + return Objects.equals(this.responseflag, orderModifyResponseServiceresponseOrdermodifyresponse.responseflag) && + Objects.equals(this.errortype, orderModifyResponseServiceresponseOrdermodifyresponse.errortype) && + Objects.equals(this.acktriggered, orderModifyResponseServiceresponseOrdermodifyresponse.acktriggered) && + Objects.equals(this.warncode, orderModifyResponseServiceresponseOrdermodifyresponse.warncode) && + Objects.equals(this.headerresponse, orderModifyResponseServiceresponseOrdermodifyresponse.headerresponse); + } + + @Override + public int hashCode() { + return Objects.hash(responseflag, errortype, acktriggered, warncode, headerresponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderModifyResponseServiceresponseOrdermodifyresponse {\n"); + sb.append(" responseflag: ").append(toIndentedString(responseflag)).append("\n"); + sb.append(" errortype: ").append(toIndentedString(errortype)).append("\n"); + sb.append(" acktriggered: ").append(toIndentedString(acktriggered)).append("\n"); + sb.append(" warncode: ").append(toIndentedString(warncode)).append("\n"); + sb.append(" headerresponse: ").append(toIndentedString(headerresponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("responseflag"); + openapiFields.add("errortype"); + openapiFields.add("acktriggered"); + openapiFields.add("warncode"); + openapiFields.add("headerresponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderModifyResponseServiceresponseOrdermodifyresponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderModifyResponseServiceresponseOrdermodifyresponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderModifyResponseServiceresponseOrdermodifyresponse is not found in the empty JSON string", OrderModifyResponseServiceresponseOrdermodifyresponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderModifyResponseServiceresponseOrdermodifyresponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderModifyResponseServiceresponseOrdermodifyresponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("responseflag") != null && !jsonObj.get("responseflag").isJsonNull()) && !jsonObj.get("responseflag").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `responseflag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("responseflag").toString())); + } + if ((jsonObj.get("errortype") != null && !jsonObj.get("errortype").isJsonNull()) && !jsonObj.get("errortype").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `errortype` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errortype").toString())); + } + if ((jsonObj.get("acktriggered") != null && !jsonObj.get("acktriggered").isJsonNull()) && !jsonObj.get("acktriggered").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `acktriggered` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acktriggered").toString())); + } + if ((jsonObj.get("warncode") != null && !jsonObj.get("warncode").isJsonNull()) && !jsonObj.get("warncode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `warncode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("warncode").toString())); + } + if ((jsonObj.get("headerresponse") != null && !jsonObj.get("headerresponse").isJsonNull()) && !jsonObj.get("headerresponse").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `headerresponse` to be a primitive type in the JSON string but got `%s`", jsonObj.get("headerresponse").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderModifyResponseServiceresponseOrdermodifyresponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderModifyResponseServiceresponseOrdermodifyresponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderModifyResponseServiceresponseOrdermodifyresponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderModifyResponseServiceresponseOrdermodifyresponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderModifyResponseServiceresponseOrdermodifyresponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderModifyResponseServiceresponseOrdermodifyresponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderModifyResponseServiceresponseOrdermodifyresponse + * @throws IOException if the JSON string is invalid with respect to OrderModifyResponseServiceresponseOrdermodifyresponse + */ + public static OrderModifyResponseServiceresponseOrdermodifyresponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderModifyResponseServiceresponseOrdermodifyresponse.class); + } + + /** + * Convert an instance of OrderModifyResponseServiceresponseOrdermodifyresponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderModifyResponseServiceresponseResponsepreamble.java b/src/main/java/xiresellers/client/model/OrderModifyResponseServiceresponseResponsepreamble.java new file mode 100644 index 00000000..3109ca6e --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderModifyResponseServiceresponseResponsepreamble.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderModifyResponseServiceresponseResponsepreamble + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderModifyResponseServiceresponseResponsepreamble { + public static final String SERIALIZED_NAME_RESPONSESTATUS = "responsestatus"; + @SerializedName(SERIALIZED_NAME_RESPONSESTATUS) + private String responsestatus; + + public static final String SERIALIZED_NAME_RESPONSEMESSAGE = "responsemessage"; + @SerializedName(SERIALIZED_NAME_RESPONSEMESSAGE) + private String responsemessage; + + public OrderModifyResponseServiceresponseResponsepreamble() { + } + + public OrderModifyResponseServiceresponseResponsepreamble responsestatus(String responsestatus) { + this.responsestatus = responsestatus; + return this; + } + + /** + * Get responsestatus + * @return responsestatus + **/ + @javax.annotation.Nullable + public String getResponsestatus() { + return responsestatus; + } + + public void setResponsestatus(String responsestatus) { + this.responsestatus = responsestatus; + } + + + public OrderModifyResponseServiceresponseResponsepreamble responsemessage(String responsemessage) { + this.responsemessage = responsemessage; + return this; + } + + /** + * Get responsemessage + * @return responsemessage + **/ + @javax.annotation.Nullable + public String getResponsemessage() { + return responsemessage; + } + + public void setResponsemessage(String responsemessage) { + this.responsemessage = responsemessage; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderModifyResponseServiceresponseResponsepreamble orderModifyResponseServiceresponseResponsepreamble = (OrderModifyResponseServiceresponseResponsepreamble) o; + return Objects.equals(this.responsestatus, orderModifyResponseServiceresponseResponsepreamble.responsestatus) && + Objects.equals(this.responsemessage, orderModifyResponseServiceresponseResponsepreamble.responsemessage); + } + + @Override + public int hashCode() { + return Objects.hash(responsestatus, responsemessage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderModifyResponseServiceresponseResponsepreamble {\n"); + sb.append(" responsestatus: ").append(toIndentedString(responsestatus)).append("\n"); + sb.append(" responsemessage: ").append(toIndentedString(responsemessage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("responsestatus"); + openapiFields.add("responsemessage"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderModifyResponseServiceresponseResponsepreamble + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderModifyResponseServiceresponseResponsepreamble.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderModifyResponseServiceresponseResponsepreamble is not found in the empty JSON string", OrderModifyResponseServiceresponseResponsepreamble.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderModifyResponseServiceresponseResponsepreamble.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderModifyResponseServiceresponseResponsepreamble` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("responsestatus") != null && !jsonObj.get("responsestatus").isJsonNull()) && !jsonObj.get("responsestatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `responsestatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("responsestatus").toString())); + } + if ((jsonObj.get("responsemessage") != null && !jsonObj.get("responsemessage").isJsonNull()) && !jsonObj.get("responsemessage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `responsemessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("responsemessage").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderModifyResponseServiceresponseResponsepreamble.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderModifyResponseServiceresponseResponsepreamble' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderModifyResponseServiceresponseResponsepreamble.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderModifyResponseServiceresponseResponsepreamble value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderModifyResponseServiceresponseResponsepreamble read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderModifyResponseServiceresponseResponsepreamble given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderModifyResponseServiceresponseResponsepreamble + * @throws IOException if the JSON string is invalid with respect to OrderModifyResponseServiceresponseResponsepreamble + */ + public static OrderModifyResponseServiceresponseResponsepreamble fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderModifyResponseServiceresponseResponsepreamble.class); + } + + /** + * Convert an instance of OrderModifyResponseServiceresponseResponsepreamble to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderModifyResponseShipToInfo.java b/src/main/java/xiresellers/client/model/OrderModifyResponseShipToInfo.java new file mode 100644 index 00000000..86b1dd90 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderModifyResponseShipToInfo.java @@ -0,0 +1,525 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * The shipping information for the order provided by the reseller. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderModifyResponseShipToInfo { + public static final String SERIALIZED_NAME_ADDRESS_ID = "addressId"; + @SerializedName(SERIALIZED_NAME_ADDRESS_ID) + private String addressId; + + public static final String SERIALIZED_NAME_CONTACT = "contact"; + @SerializedName(SERIALIZED_NAME_CONTACT) + private String contact; + + public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; + @SerializedName(SERIALIZED_NAME_COMPANY_NAME) + private String companyName; + + public static final String SERIALIZED_NAME_ADDRESS_LINE1 = "addressLine1"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE1) + private String addressLine1; + + public static final String SERIALIZED_NAME_ADDRESS_LINE2 = "addressLine2"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE2) + private String addressLine2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE3 = "addressLine3"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE3) + private String addressLine3; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; + @SerializedName(SERIALIZED_NAME_POSTAL_CODE) + private String postalCode; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) + private String phoneNumber; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public OrderModifyResponseShipToInfo() { + } + + public OrderModifyResponseShipToInfo addressId(String addressId) { + this.addressId = addressId; + return this; + } + + /** + * Suffix used to identify shipping address. Created during onboarding. Resellers are provided with one or more address IDs depending on how many bill to addresses they need for various flooring companies they are using for credit. + * @return addressId + **/ + @javax.annotation.Nullable + public String getAddressId() { + return addressId; + } + + public void setAddressId(String addressId) { + this.addressId = addressId; + } + + + public OrderModifyResponseShipToInfo contact(String contact) { + this.contact = contact; + return this; + } + + /** + * The company contact provided by the reseller. + * @return contact + **/ + @javax.annotation.Nullable + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + + public OrderModifyResponseShipToInfo companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * The name of the company the order will be shipped to. + * @return companyName + **/ + @javax.annotation.Nullable + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public OrderModifyResponseShipToInfo addressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + return this; + } + + /** + * The street address and building or house number the order will be shipped to. + * @return addressLine1 + **/ + @javax.annotation.Nullable + public String getAddressLine1() { + return addressLine1; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + + public OrderModifyResponseShipToInfo addressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + return this; + } + + /** + * The apartment number the order will be shipped to. + * @return addressLine2 + **/ + @javax.annotation.Nullable + public String getAddressLine2() { + return addressLine2; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + + public OrderModifyResponseShipToInfo addressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + return this; + } + + /** + * Line 3 of the address the order will be shipped to. + * @return addressLine3 + **/ + @javax.annotation.Nullable + public String getAddressLine3() { + return addressLine3; + } + + public void setAddressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + } + + + public OrderModifyResponseShipToInfo city(String city) { + this.city = city; + return this; + } + + /** + * The city the order will be shipped to. + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public OrderModifyResponseShipToInfo state(String state) { + this.state = state; + return this; + } + + /** + * The state the order will be shipped to. + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public OrderModifyResponseShipToInfo postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * The zip or postal code the order will be shipped to. + * @return postalCode + **/ + @javax.annotation.Nullable + public String getPostalCode() { + return postalCode; + } + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public OrderModifyResponseShipToInfo countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * The two-character ISO country code the order will be shipped to. + * @return countryCode + **/ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public OrderModifyResponseShipToInfo phoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * The company contact phone number. + * @return phoneNumber + **/ + @javax.annotation.Nullable + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public OrderModifyResponseShipToInfo email(String email) { + this.email = email; + return this; + } + + /** + * The company contact email address. + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderModifyResponseShipToInfo orderModifyResponseShipToInfo = (OrderModifyResponseShipToInfo) o; + return Objects.equals(this.addressId, orderModifyResponseShipToInfo.addressId) && + Objects.equals(this.contact, orderModifyResponseShipToInfo.contact) && + Objects.equals(this.companyName, orderModifyResponseShipToInfo.companyName) && + Objects.equals(this.addressLine1, orderModifyResponseShipToInfo.addressLine1) && + Objects.equals(this.addressLine2, orderModifyResponseShipToInfo.addressLine2) && + Objects.equals(this.addressLine3, orderModifyResponseShipToInfo.addressLine3) && + Objects.equals(this.city, orderModifyResponseShipToInfo.city) && + Objects.equals(this.state, orderModifyResponseShipToInfo.state) && + Objects.equals(this.postalCode, orderModifyResponseShipToInfo.postalCode) && + Objects.equals(this.countryCode, orderModifyResponseShipToInfo.countryCode) && + Objects.equals(this.phoneNumber, orderModifyResponseShipToInfo.phoneNumber) && + Objects.equals(this.email, orderModifyResponseShipToInfo.email); + } + + @Override + public int hashCode() { + return Objects.hash(addressId, contact, companyName, addressLine1, addressLine2, addressLine3, city, state, postalCode, countryCode, phoneNumber, email); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderModifyResponseShipToInfo {\n"); + sb.append(" addressId: ").append(toIndentedString(addressId)).append("\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); + sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); + sb.append(" addressLine3: ").append(toIndentedString(addressLine3)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("addressId"); + openapiFields.add("contact"); + openapiFields.add("companyName"); + openapiFields.add("addressLine1"); + openapiFields.add("addressLine2"); + openapiFields.add("addressLine3"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalCode"); + openapiFields.add("countryCode"); + openapiFields.add("phoneNumber"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderModifyResponseShipToInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderModifyResponseShipToInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderModifyResponseShipToInfo is not found in the empty JSON string", OrderModifyResponseShipToInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderModifyResponseShipToInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderModifyResponseShipToInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("addressId") != null && !jsonObj.get("addressId").isJsonNull()) && !jsonObj.get("addressId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressId").toString())); + } + if ((jsonObj.get("contact") != null && !jsonObj.get("contact").isJsonNull()) && !jsonObj.get("contact").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contact` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact").toString())); + } + if ((jsonObj.get("companyName") != null && !jsonObj.get("companyName").isJsonNull()) && !jsonObj.get("companyName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); + } + if ((jsonObj.get("addressLine1") != null && !jsonObj.get("addressLine1").isJsonNull()) && !jsonObj.get("addressLine1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine1").toString())); + } + if ((jsonObj.get("addressLine2") != null && !jsonObj.get("addressLine2").isJsonNull()) && !jsonObj.get("addressLine2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine2").toString())); + } + if ((jsonObj.get("addressLine3") != null && !jsonObj.get("addressLine3").isJsonNull()) && !jsonObj.get("addressLine3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine3").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderModifyResponseShipToInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderModifyResponseShipToInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderModifyResponseShipToInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderModifyResponseShipToInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderModifyResponseShipToInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderModifyResponseShipToInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderModifyResponseShipToInfo + * @throws IOException if the JSON string is invalid with respect to OrderModifyResponseShipToInfo + */ + public static OrderModifyResponseShipToInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderModifyResponseShipToInfo.class); + } + + /** + * Convert an instance of OrderModifyResponseShipToInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderSearchRequest.java b/src/main/java/xiresellers/client/model/OrderSearchRequest.java new file mode 100644 index 00000000..6537dc98 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderSearchRequest.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderSearchRequestServicerequest; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Request schema for order search endpoint + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderSearchRequest { + public static final String SERIALIZED_NAME_SERVICEREQUEST = "servicerequest"; + @SerializedName(SERIALIZED_NAME_SERVICEREQUEST) + private OrderSearchRequestServicerequest servicerequest; + + public OrderSearchRequest() { + } + + public OrderSearchRequest servicerequest(OrderSearchRequestServicerequest servicerequest) { + this.servicerequest = servicerequest; + return this; + } + + /** + * Get servicerequest + * @return servicerequest + **/ + @javax.annotation.Nullable + public OrderSearchRequestServicerequest getServicerequest() { + return servicerequest; + } + + public void setServicerequest(OrderSearchRequestServicerequest servicerequest) { + this.servicerequest = servicerequest; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderSearchRequest orderSearchRequest = (OrderSearchRequest) o; + return Objects.equals(this.servicerequest, orderSearchRequest.servicerequest); + } + + @Override + public int hashCode() { + return Objects.hash(servicerequest); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderSearchRequest {\n"); + sb.append(" servicerequest: ").append(toIndentedString(servicerequest)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("servicerequest"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderSearchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderSearchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderSearchRequest is not found in the empty JSON string", OrderSearchRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderSearchRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderSearchRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `servicerequest` + if (jsonObj.get("servicerequest") != null && !jsonObj.get("servicerequest").isJsonNull()) { + OrderSearchRequestServicerequest.validateJsonElement(jsonObj.get("servicerequest")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderSearchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderSearchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderSearchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderSearchRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderSearchRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderSearchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderSearchRequest + * @throws IOException if the JSON string is invalid with respect to OrderSearchRequest + */ + public static OrderSearchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderSearchRequest.class); + } + + /** + * Convert an instance of OrderSearchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderSearchRequestServicerequest.java b/src/main/java/xiresellers/client/model/OrderSearchRequestServicerequest.java new file mode 100644 index 00000000..3303e7a2 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderSearchRequestServicerequest.java @@ -0,0 +1,245 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderSearchRequestServicerequestOrderLookupRequest; +import xiresellers.client.model.OrderSearchRequestServicerequestRequestpreamble; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderSearchRequestServicerequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderSearchRequestServicerequest { + public static final String SERIALIZED_NAME_REQUESTPREAMBLE = "requestpreamble"; + @SerializedName(SERIALIZED_NAME_REQUESTPREAMBLE) + private OrderSearchRequestServicerequestRequestpreamble requestpreamble; + + public static final String SERIALIZED_NAME_ORDER_LOOKUP_REQUEST = "orderLookupRequest"; + @SerializedName(SERIALIZED_NAME_ORDER_LOOKUP_REQUEST) + private OrderSearchRequestServicerequestOrderLookupRequest orderLookupRequest; + + public OrderSearchRequestServicerequest() { + } + + public OrderSearchRequestServicerequest requestpreamble(OrderSearchRequestServicerequestRequestpreamble requestpreamble) { + this.requestpreamble = requestpreamble; + return this; + } + + /** + * Get requestpreamble + * @return requestpreamble + **/ + @javax.annotation.Nonnull + public OrderSearchRequestServicerequestRequestpreamble getRequestpreamble() { + return requestpreamble; + } + + public void setRequestpreamble(OrderSearchRequestServicerequestRequestpreamble requestpreamble) { + this.requestpreamble = requestpreamble; + } + + + public OrderSearchRequestServicerequest orderLookupRequest(OrderSearchRequestServicerequestOrderLookupRequest orderLookupRequest) { + this.orderLookupRequest = orderLookupRequest; + return this; + } + + /** + * Get orderLookupRequest + * @return orderLookupRequest + **/ + @javax.annotation.Nullable + public OrderSearchRequestServicerequestOrderLookupRequest getOrderLookupRequest() { + return orderLookupRequest; + } + + public void setOrderLookupRequest(OrderSearchRequestServicerequestOrderLookupRequest orderLookupRequest) { + this.orderLookupRequest = orderLookupRequest; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderSearchRequestServicerequest orderSearchRequestServicerequest = (OrderSearchRequestServicerequest) o; + return Objects.equals(this.requestpreamble, orderSearchRequestServicerequest.requestpreamble) && + Objects.equals(this.orderLookupRequest, orderSearchRequestServicerequest.orderLookupRequest); + } + + @Override + public int hashCode() { + return Objects.hash(requestpreamble, orderLookupRequest); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderSearchRequestServicerequest {\n"); + sb.append(" requestpreamble: ").append(toIndentedString(requestpreamble)).append("\n"); + sb.append(" orderLookupRequest: ").append(toIndentedString(orderLookupRequest)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("requestpreamble"); + openapiFields.add("orderLookupRequest"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("requestpreamble"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderSearchRequestServicerequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderSearchRequestServicerequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderSearchRequestServicerequest is not found in the empty JSON string", OrderSearchRequestServicerequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderSearchRequestServicerequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderSearchRequestServicerequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrderSearchRequestServicerequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `requestpreamble` + OrderSearchRequestServicerequestRequestpreamble.validateJsonElement(jsonObj.get("requestpreamble")); + // validate the optional field `orderLookupRequest` + if (jsonObj.get("orderLookupRequest") != null && !jsonObj.get("orderLookupRequest").isJsonNull()) { + OrderSearchRequestServicerequestOrderLookupRequest.validateJsonElement(jsonObj.get("orderLookupRequest")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderSearchRequestServicerequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderSearchRequestServicerequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderSearchRequestServicerequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderSearchRequestServicerequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderSearchRequestServicerequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderSearchRequestServicerequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderSearchRequestServicerequest + * @throws IOException if the JSON string is invalid with respect to OrderSearchRequestServicerequest + */ + public static OrderSearchRequestServicerequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderSearchRequestServicerequest.class); + } + + /** + * Convert an instance of OrderSearchRequestServicerequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderSearchRequestServicerequestOrderLookupRequest.java b/src/main/java/xiresellers/client/model/OrderSearchRequestServicerequestOrderLookupRequest.java new file mode 100644 index 00000000..a6f5ecf2 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderSearchRequestServicerequestOrderLookupRequest.java @@ -0,0 +1,239 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber; +import xiresellers.client.model.OrderSearchRequestServicerequestOrderLookupRequestOrderNumber; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderSearchRequestServicerequestOrderLookupRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderSearchRequestServicerequestOrderLookupRequest { + public static final String SERIALIZED_NAME_ORDER_NUMBER = "orderNumber"; + @SerializedName(SERIALIZED_NAME_ORDER_NUMBER) + private OrderSearchRequestServicerequestOrderLookupRequestOrderNumber orderNumber; + + public static final String SERIALIZED_NAME_CUSTOMER_ORDER_NUMBER = "customerOrderNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_ORDER_NUMBER) + private OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber customerOrderNumber; + + public OrderSearchRequestServicerequestOrderLookupRequest() { + } + + public OrderSearchRequestServicerequestOrderLookupRequest orderNumber(OrderSearchRequestServicerequestOrderLookupRequestOrderNumber orderNumber) { + this.orderNumber = orderNumber; + return this; + } + + /** + * Get orderNumber + * @return orderNumber + **/ + @javax.annotation.Nullable + public OrderSearchRequestServicerequestOrderLookupRequestOrderNumber getOrderNumber() { + return orderNumber; + } + + public void setOrderNumber(OrderSearchRequestServicerequestOrderLookupRequestOrderNumber orderNumber) { + this.orderNumber = orderNumber; + } + + + public OrderSearchRequestServicerequestOrderLookupRequest customerOrderNumber(OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber customerOrderNumber) { + this.customerOrderNumber = customerOrderNumber; + return this; + } + + /** + * Get customerOrderNumber + * @return customerOrderNumber + **/ + @javax.annotation.Nullable + public OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber getCustomerOrderNumber() { + return customerOrderNumber; + } + + public void setCustomerOrderNumber(OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber customerOrderNumber) { + this.customerOrderNumber = customerOrderNumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderSearchRequestServicerequestOrderLookupRequest orderSearchRequestServicerequestOrderLookupRequest = (OrderSearchRequestServicerequestOrderLookupRequest) o; + return Objects.equals(this.orderNumber, orderSearchRequestServicerequestOrderLookupRequest.orderNumber) && + Objects.equals(this.customerOrderNumber, orderSearchRequestServicerequestOrderLookupRequest.customerOrderNumber); + } + + @Override + public int hashCode() { + return Objects.hash(orderNumber, customerOrderNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderSearchRequestServicerequestOrderLookupRequest {\n"); + sb.append(" orderNumber: ").append(toIndentedString(orderNumber)).append("\n"); + sb.append(" customerOrderNumber: ").append(toIndentedString(customerOrderNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("orderNumber"); + openapiFields.add("customerOrderNumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderSearchRequestServicerequestOrderLookupRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderSearchRequestServicerequestOrderLookupRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderSearchRequestServicerequestOrderLookupRequest is not found in the empty JSON string", OrderSearchRequestServicerequestOrderLookupRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderSearchRequestServicerequestOrderLookupRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderSearchRequestServicerequestOrderLookupRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `orderNumber` + if (jsonObj.get("orderNumber") != null && !jsonObj.get("orderNumber").isJsonNull()) { + OrderSearchRequestServicerequestOrderLookupRequestOrderNumber.validateJsonElement(jsonObj.get("orderNumber")); + } + // validate the optional field `customerOrderNumber` + if (jsonObj.get("customerOrderNumber") != null && !jsonObj.get("customerOrderNumber").isJsonNull()) { + OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber.validateJsonElement(jsonObj.get("customerOrderNumber")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderSearchRequestServicerequestOrderLookupRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderSearchRequestServicerequestOrderLookupRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderSearchRequestServicerequestOrderLookupRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderSearchRequestServicerequestOrderLookupRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderSearchRequestServicerequestOrderLookupRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderSearchRequestServicerequestOrderLookupRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderSearchRequestServicerequestOrderLookupRequest + * @throws IOException if the JSON string is invalid with respect to OrderSearchRequestServicerequestOrderLookupRequest + */ + public static OrderSearchRequestServicerequestOrderLookupRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderSearchRequestServicerequestOrderLookupRequest.class); + } + + /** + * Convert an instance of OrderSearchRequestServicerequestOrderLookupRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber.java b/src/main/java/xiresellers/client/model/OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber.java new file mode 100644 index 00000000..fc2f2d40 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber.java @@ -0,0 +1,206 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber { + public static final String SERIALIZED_NAME_CUSTOMER_ORDER_NUMBER = "customerOrderNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_ORDER_NUMBER) + private String customerOrderNumber; + + public OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber() { + } + + public OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber customerOrderNumber(String customerOrderNumber) { + this.customerOrderNumber = customerOrderNumber; + return this; + } + + /** + * Get customerOrderNumber + * @return customerOrderNumber + **/ + @javax.annotation.Nullable + public String getCustomerOrderNumber() { + return customerOrderNumber; + } + + public void setCustomerOrderNumber(String customerOrderNumber) { + this.customerOrderNumber = customerOrderNumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber orderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber = (OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber) o; + return Objects.equals(this.customerOrderNumber, orderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber.customerOrderNumber); + } + + @Override + public int hashCode() { + return Objects.hash(customerOrderNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber {\n"); + sb.append(" customerOrderNumber: ").append(toIndentedString(customerOrderNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("customerOrderNumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber is not found in the empty JSON string", OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("customerOrderNumber") != null && !jsonObj.get("customerOrderNumber").isJsonNull()) && !jsonObj.get("customerOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerOrderNumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber + * @throws IOException if the JSON string is invalid with respect to OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber + */ + public static OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber.class); + } + + /** + * Convert an instance of OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderSearchRequestServicerequestOrderLookupRequestOrderNumber.java b/src/main/java/xiresellers/client/model/OrderSearchRequestServicerequestOrderLookupRequestOrderNumber.java new file mode 100644 index 00000000..073c9bbc --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderSearchRequestServicerequestOrderLookupRequestOrderNumber.java @@ -0,0 +1,331 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderSearchRequestServicerequestOrderLookupRequestOrderNumber + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderSearchRequestServicerequestOrderLookupRequestOrderNumber { + public static final String SERIALIZED_NAME_ENTRY_DATE = "entryDate"; + @SerializedName(SERIALIZED_NAME_ENTRY_DATE) + private String entryDate; + + public static final String SERIALIZED_NAME_ORDER_BRANCH = "orderBranch"; + @SerializedName(SERIALIZED_NAME_ORDER_BRANCH) + private String orderBranch; + + public static final String SERIALIZED_NAME_ORDER_NUMBER = "orderNumber"; + @SerializedName(SERIALIZED_NAME_ORDER_NUMBER) + private String orderNumber; + + public static final String SERIALIZED_NAME_DISTRIBUTION_NUMBER = "distributionNumber"; + @SerializedName(SERIALIZED_NAME_DISTRIBUTION_NUMBER) + private String distributionNumber; + + public static final String SERIALIZED_NAME_SHIPMENT_NUMBER = "shipmentNumber"; + @SerializedName(SERIALIZED_NAME_SHIPMENT_NUMBER) + private String shipmentNumber; + + public OrderSearchRequestServicerequestOrderLookupRequestOrderNumber() { + } + + public OrderSearchRequestServicerequestOrderLookupRequestOrderNumber entryDate(String entryDate) { + this.entryDate = entryDate; + return this; + } + + /** + * Get entryDate + * @return entryDate + **/ + @javax.annotation.Nonnull + public String getEntryDate() { + return entryDate; + } + + public void setEntryDate(String entryDate) { + this.entryDate = entryDate; + } + + + public OrderSearchRequestServicerequestOrderLookupRequestOrderNumber orderBranch(String orderBranch) { + this.orderBranch = orderBranch; + return this; + } + + /** + * Get orderBranch + * @return orderBranch + **/ + @javax.annotation.Nonnull + public String getOrderBranch() { + return orderBranch; + } + + public void setOrderBranch(String orderBranch) { + this.orderBranch = orderBranch; + } + + + public OrderSearchRequestServicerequestOrderLookupRequestOrderNumber orderNumber(String orderNumber) { + this.orderNumber = orderNumber; + return this; + } + + /** + * Get orderNumber + * @return orderNumber + **/ + @javax.annotation.Nullable + public String getOrderNumber() { + return orderNumber; + } + + public void setOrderNumber(String orderNumber) { + this.orderNumber = orderNumber; + } + + + public OrderSearchRequestServicerequestOrderLookupRequestOrderNumber distributionNumber(String distributionNumber) { + this.distributionNumber = distributionNumber; + return this; + } + + /** + * Get distributionNumber + * @return distributionNumber + **/ + @javax.annotation.Nullable + public String getDistributionNumber() { + return distributionNumber; + } + + public void setDistributionNumber(String distributionNumber) { + this.distributionNumber = distributionNumber; + } + + + public OrderSearchRequestServicerequestOrderLookupRequestOrderNumber shipmentNumber(String shipmentNumber) { + this.shipmentNumber = shipmentNumber; + return this; + } + + /** + * Get shipmentNumber + * @return shipmentNumber + **/ + @javax.annotation.Nullable + public String getShipmentNumber() { + return shipmentNumber; + } + + public void setShipmentNumber(String shipmentNumber) { + this.shipmentNumber = shipmentNumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderSearchRequestServicerequestOrderLookupRequestOrderNumber orderSearchRequestServicerequestOrderLookupRequestOrderNumber = (OrderSearchRequestServicerequestOrderLookupRequestOrderNumber) o; + return Objects.equals(this.entryDate, orderSearchRequestServicerequestOrderLookupRequestOrderNumber.entryDate) && + Objects.equals(this.orderBranch, orderSearchRequestServicerequestOrderLookupRequestOrderNumber.orderBranch) && + Objects.equals(this.orderNumber, orderSearchRequestServicerequestOrderLookupRequestOrderNumber.orderNumber) && + Objects.equals(this.distributionNumber, orderSearchRequestServicerequestOrderLookupRequestOrderNumber.distributionNumber) && + Objects.equals(this.shipmentNumber, orderSearchRequestServicerequestOrderLookupRequestOrderNumber.shipmentNumber); + } + + @Override + public int hashCode() { + return Objects.hash(entryDate, orderBranch, orderNumber, distributionNumber, shipmentNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderSearchRequestServicerequestOrderLookupRequestOrderNumber {\n"); + sb.append(" entryDate: ").append(toIndentedString(entryDate)).append("\n"); + sb.append(" orderBranch: ").append(toIndentedString(orderBranch)).append("\n"); + sb.append(" orderNumber: ").append(toIndentedString(orderNumber)).append("\n"); + sb.append(" distributionNumber: ").append(toIndentedString(distributionNumber)).append("\n"); + sb.append(" shipmentNumber: ").append(toIndentedString(shipmentNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("entryDate"); + openapiFields.add("orderBranch"); + openapiFields.add("orderNumber"); + openapiFields.add("distributionNumber"); + openapiFields.add("shipmentNumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("entryDate"); + openapiRequiredFields.add("orderBranch"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderSearchRequestServicerequestOrderLookupRequestOrderNumber + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderSearchRequestServicerequestOrderLookupRequestOrderNumber.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderSearchRequestServicerequestOrderLookupRequestOrderNumber is not found in the empty JSON string", OrderSearchRequestServicerequestOrderLookupRequestOrderNumber.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderSearchRequestServicerequestOrderLookupRequestOrderNumber.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderSearchRequestServicerequestOrderLookupRequestOrderNumber` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrderSearchRequestServicerequestOrderLookupRequestOrderNumber.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("entryDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `entryDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("entryDate").toString())); + } + if (!jsonObj.get("orderBranch").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `orderBranch` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orderBranch").toString())); + } + if ((jsonObj.get("orderNumber") != null && !jsonObj.get("orderNumber").isJsonNull()) && !jsonObj.get("orderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `orderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orderNumber").toString())); + } + if ((jsonObj.get("distributionNumber") != null && !jsonObj.get("distributionNumber").isJsonNull()) && !jsonObj.get("distributionNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `distributionNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("distributionNumber").toString())); + } + if ((jsonObj.get("shipmentNumber") != null && !jsonObj.get("shipmentNumber").isJsonNull()) && !jsonObj.get("shipmentNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shipmentNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shipmentNumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderSearchRequestServicerequestOrderLookupRequestOrderNumber.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderSearchRequestServicerequestOrderLookupRequestOrderNumber' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderSearchRequestServicerequestOrderLookupRequestOrderNumber.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderSearchRequestServicerequestOrderLookupRequestOrderNumber value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderSearchRequestServicerequestOrderLookupRequestOrderNumber read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderSearchRequestServicerequestOrderLookupRequestOrderNumber given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderSearchRequestServicerequestOrderLookupRequestOrderNumber + * @throws IOException if the JSON string is invalid with respect to OrderSearchRequestServicerequestOrderLookupRequestOrderNumber + */ + public static OrderSearchRequestServicerequestOrderLookupRequestOrderNumber fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderSearchRequestServicerequestOrderLookupRequestOrderNumber.class); + } + + /** + * Convert an instance of OrderSearchRequestServicerequestOrderLookupRequestOrderNumber to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderSearchRequestServicerequestRequestpreamble.java b/src/main/java/xiresellers/client/model/OrderSearchRequestServicerequestRequestpreamble.java new file mode 100644 index 00000000..c7ab7abb --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderSearchRequestServicerequestRequestpreamble.java @@ -0,0 +1,244 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderSearchRequestServicerequestRequestpreamble + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderSearchRequestServicerequestRequestpreamble { + public static final String SERIALIZED_NAME_ISO_COUNTRY_CODE = "isoCountryCode"; + @SerializedName(SERIALIZED_NAME_ISO_COUNTRY_CODE) + private String isoCountryCode; + + public static final String SERIALIZED_NAME_CUSTOMER_NUMBER = "customerNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_NUMBER) + private String customerNumber; + + public OrderSearchRequestServicerequestRequestpreamble() { + } + + public OrderSearchRequestServicerequestRequestpreamble isoCountryCode(String isoCountryCode) { + this.isoCountryCode = isoCountryCode; + return this; + } + + /** + * Get isoCountryCode + * @return isoCountryCode + **/ + @javax.annotation.Nonnull + public String getIsoCountryCode() { + return isoCountryCode; + } + + public void setIsoCountryCode(String isoCountryCode) { + this.isoCountryCode = isoCountryCode; + } + + + public OrderSearchRequestServicerequestRequestpreamble customerNumber(String customerNumber) { + this.customerNumber = customerNumber; + return this; + } + + /** + * Get customerNumber + * @return customerNumber + **/ + @javax.annotation.Nonnull + public String getCustomerNumber() { + return customerNumber; + } + + public void setCustomerNumber(String customerNumber) { + this.customerNumber = customerNumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderSearchRequestServicerequestRequestpreamble orderSearchRequestServicerequestRequestpreamble = (OrderSearchRequestServicerequestRequestpreamble) o; + return Objects.equals(this.isoCountryCode, orderSearchRequestServicerequestRequestpreamble.isoCountryCode) && + Objects.equals(this.customerNumber, orderSearchRequestServicerequestRequestpreamble.customerNumber); + } + + @Override + public int hashCode() { + return Objects.hash(isoCountryCode, customerNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderSearchRequestServicerequestRequestpreamble {\n"); + sb.append(" isoCountryCode: ").append(toIndentedString(isoCountryCode)).append("\n"); + sb.append(" customerNumber: ").append(toIndentedString(customerNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("isoCountryCode"); + openapiFields.add("customerNumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("isoCountryCode"); + openapiRequiredFields.add("customerNumber"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderSearchRequestServicerequestRequestpreamble + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderSearchRequestServicerequestRequestpreamble.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderSearchRequestServicerequestRequestpreamble is not found in the empty JSON string", OrderSearchRequestServicerequestRequestpreamble.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderSearchRequestServicerequestRequestpreamble.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderSearchRequestServicerequestRequestpreamble` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrderSearchRequestServicerequestRequestpreamble.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("isoCountryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `isoCountryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isoCountryCode").toString())); + } + if (!jsonObj.get("customerNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerNumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderSearchRequestServicerequestRequestpreamble.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderSearchRequestServicerequestRequestpreamble' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderSearchRequestServicerequestRequestpreamble.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderSearchRequestServicerequestRequestpreamble value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderSearchRequestServicerequestRequestpreamble read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderSearchRequestServicerequestRequestpreamble given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderSearchRequestServicerequestRequestpreamble + * @throws IOException if the JSON string is invalid with respect to OrderSearchRequestServicerequestRequestpreamble + */ + public static OrderSearchRequestServicerequestRequestpreamble fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderSearchRequestServicerequestRequestpreamble.class); + } + + /** + * Convert an instance of OrderSearchRequestServicerequestRequestpreamble to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderSearchResponse.java b/src/main/java/xiresellers/client/model/OrderSearchResponse.java new file mode 100644 index 00000000..9b3b5fae --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderSearchResponse.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderSearchResponseServiceResponse; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Response schema for order search endpoint + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderSearchResponse { + public static final String SERIALIZED_NAME_SERVICE_RESPONSE = "serviceResponse"; + @SerializedName(SERIALIZED_NAME_SERVICE_RESPONSE) + private OrderSearchResponseServiceResponse serviceResponse; + + public OrderSearchResponse() { + } + + public OrderSearchResponse serviceResponse(OrderSearchResponseServiceResponse serviceResponse) { + this.serviceResponse = serviceResponse; + return this; + } + + /** + * Get serviceResponse + * @return serviceResponse + **/ + @javax.annotation.Nullable + public OrderSearchResponseServiceResponse getServiceResponse() { + return serviceResponse; + } + + public void setServiceResponse(OrderSearchResponseServiceResponse serviceResponse) { + this.serviceResponse = serviceResponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderSearchResponse orderSearchResponse = (OrderSearchResponse) o; + return Objects.equals(this.serviceResponse, orderSearchResponse.serviceResponse); + } + + @Override + public int hashCode() { + return Objects.hash(serviceResponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderSearchResponse {\n"); + sb.append(" serviceResponse: ").append(toIndentedString(serviceResponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("serviceResponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderSearchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderSearchResponse is not found in the empty JSON string", OrderSearchResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderSearchResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderSearchResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `serviceResponse` + if (jsonObj.get("serviceResponse") != null && !jsonObj.get("serviceResponse").isJsonNull()) { + OrderSearchResponseServiceResponse.validateJsonElement(jsonObj.get("serviceResponse")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderSearchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderSearchResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderSearchResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderSearchResponse + * @throws IOException if the JSON string is invalid with respect to OrderSearchResponse + */ + public static OrderSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderSearchResponse.class); + } + + /** + * Convert an instance of OrderSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderSearchResponseOrdersInner.java b/src/main/java/xiresellers/client/model/OrderSearchResponseOrdersInner.java new file mode 100644 index 00000000..713b2adc --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderSearchResponseOrdersInner.java @@ -0,0 +1,489 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderSearchResponseOrdersInnerLinks; +import xiresellers.client.model.OrderSearchResponseOrdersInnerSubOrdersInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderSearchResponseOrdersInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderSearchResponseOrdersInner { + public static final String SERIALIZED_NAME_INGRAM_ORDER_NUMBER = "ingramOrderNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_ORDER_NUMBER) + private String ingramOrderNumber; + + public static final String SERIALIZED_NAME_INGRAM_ORDER_DATE = "ingramOrderDate"; + @SerializedName(SERIALIZED_NAME_INGRAM_ORDER_DATE) + private String ingramOrderDate; + + public static final String SERIALIZED_NAME_CUSTOMER_ORDER_NUMBER = "customerOrderNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_ORDER_NUMBER) + private String customerOrderNumber; + + public static final String SERIALIZED_NAME_VENDOR_SALES_ORDER_NUMBER = "vendorSalesOrderNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_SALES_ORDER_NUMBER) + private String vendorSalesOrderNumber; + + public static final String SERIALIZED_NAME_VENDOR_NAME = "vendorName"; + @SerializedName(SERIALIZED_NAME_VENDOR_NAME) + private String vendorName; + + public static final String SERIALIZED_NAME_END_USER_COMPANY_NAME = "endUserCompanyName"; + @SerializedName(SERIALIZED_NAME_END_USER_COMPANY_NAME) + private String endUserCompanyName; + + public static final String SERIALIZED_NAME_ORDER_TOTAL = "orderTotal"; + @SerializedName(SERIALIZED_NAME_ORDER_TOTAL) + private BigDecimal orderTotal; + + public static final String SERIALIZED_NAME_ORDER_STATUS = "orderStatus"; + @SerializedName(SERIALIZED_NAME_ORDER_STATUS) + private String orderStatus; + + public static final String SERIALIZED_NAME_SUB_ORDERS = "subOrders"; + @SerializedName(SERIALIZED_NAME_SUB_ORDERS) + private List subOrders; + + public static final String SERIALIZED_NAME_LINKS = "links"; + @SerializedName(SERIALIZED_NAME_LINKS) + private OrderSearchResponseOrdersInnerLinks links; + + public OrderSearchResponseOrdersInner() { + } + + public OrderSearchResponseOrdersInner ingramOrderNumber(String ingramOrderNumber) { + this.ingramOrderNumber = ingramOrderNumber; + return this; + } + + /** + * The Ingram Micro order number. + * @return ingramOrderNumber + **/ + @javax.annotation.Nullable + public String getIngramOrderNumber() { + return ingramOrderNumber; + } + + public void setIngramOrderNumber(String ingramOrderNumber) { + this.ingramOrderNumber = ingramOrderNumber; + } + + + public OrderSearchResponseOrdersInner ingramOrderDate(String ingramOrderDate) { + this.ingramOrderDate = ingramOrderDate; + return this; + } + + /** + * The date the order was created(UTC). + * @return ingramOrderDate + **/ + @javax.annotation.Nullable + public String getIngramOrderDate() { + return ingramOrderDate; + } + + public void setIngramOrderDate(String ingramOrderDate) { + this.ingramOrderDate = ingramOrderDate; + } + + + public OrderSearchResponseOrdersInner customerOrderNumber(String customerOrderNumber) { + this.customerOrderNumber = customerOrderNumber; + return this; + } + + /** + * The reseller's order number for reference in their system. + * @return customerOrderNumber + **/ + @javax.annotation.Nullable + public String getCustomerOrderNumber() { + return customerOrderNumber; + } + + public void setCustomerOrderNumber(String customerOrderNumber) { + this.customerOrderNumber = customerOrderNumber; + } + + + public OrderSearchResponseOrdersInner vendorSalesOrderNumber(String vendorSalesOrderNumber) { + this.vendorSalesOrderNumber = vendorSalesOrderNumber; + return this; + } + + /** + * The vendor's order number.(only for D-Type Orders) + * @return vendorSalesOrderNumber + **/ + @javax.annotation.Nullable + public String getVendorSalesOrderNumber() { + return vendorSalesOrderNumber; + } + + public void setVendorSalesOrderNumber(String vendorSalesOrderNumber) { + this.vendorSalesOrderNumber = vendorSalesOrderNumber; + } + + + public OrderSearchResponseOrdersInner vendorName(String vendorName) { + this.vendorName = vendorName; + return this; + } + + /** + * The name of the vendor. + * @return vendorName + **/ + @javax.annotation.Nullable + public String getVendorName() { + return vendorName; + } + + public void setVendorName(String vendorName) { + this.vendorName = vendorName; + } + + + public OrderSearchResponseOrdersInner endUserCompanyName(String endUserCompanyName) { + this.endUserCompanyName = endUserCompanyName; + return this; + } + + /** + * The company name of the end user/customer. + * @return endUserCompanyName + **/ + @javax.annotation.Nullable + public String getEndUserCompanyName() { + return endUserCompanyName; + } + + public void setEndUserCompanyName(String endUserCompanyName) { + this.endUserCompanyName = endUserCompanyName; + } + + + public OrderSearchResponseOrdersInner orderTotal(BigDecimal orderTotal) { + this.orderTotal = orderTotal; + return this; + } + + /** + * The total of the order. + * @return orderTotal + **/ + @javax.annotation.Nullable + public BigDecimal getOrderTotal() { + return orderTotal; + } + + public void setOrderTotal(BigDecimal orderTotal) { + this.orderTotal = orderTotal; + } + + + public OrderSearchResponseOrdersInner orderStatus(String orderStatus) { + this.orderStatus = orderStatus; + return this; + } + + /** + * The header-level status of the order.(OPEN/CLOSED/CANCELLED) + * @return orderStatus + **/ + @javax.annotation.Nullable + public String getOrderStatus() { + return orderStatus; + } + + public void setOrderStatus(String orderStatus) { + this.orderStatus = orderStatus; + } + + + public OrderSearchResponseOrdersInner subOrders(List subOrders) { + this.subOrders = subOrders; + return this; + } + + public OrderSearchResponseOrdersInner addSubOrdersItem(OrderSearchResponseOrdersInnerSubOrdersInner subOrdersItem) { + if (this.subOrders == null) { + this.subOrders = new ArrayList<>(); + } + this.subOrders.add(subOrdersItem); + return this; + } + + /** + * Individual Ingram Micro order numbers associated with a single reseller PO. + * @return subOrders + **/ + @javax.annotation.Nullable + public List getSubOrders() { + return subOrders; + } + + public void setSubOrders(List subOrders) { + this.subOrders = subOrders; + } + + + public OrderSearchResponseOrdersInner links(OrderSearchResponseOrdersInnerLinks links) { + this.links = links; + return this; + } + + /** + * Get links + * @return links + **/ + @javax.annotation.Nullable + public OrderSearchResponseOrdersInnerLinks getLinks() { + return links; + } + + public void setLinks(OrderSearchResponseOrdersInnerLinks links) { + this.links = links; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderSearchResponseOrdersInner orderSearchResponseOrdersInner = (OrderSearchResponseOrdersInner) o; + return Objects.equals(this.ingramOrderNumber, orderSearchResponseOrdersInner.ingramOrderNumber) && + Objects.equals(this.ingramOrderDate, orderSearchResponseOrdersInner.ingramOrderDate) && + Objects.equals(this.customerOrderNumber, orderSearchResponseOrdersInner.customerOrderNumber) && + Objects.equals(this.vendorSalesOrderNumber, orderSearchResponseOrdersInner.vendorSalesOrderNumber) && + Objects.equals(this.vendorName, orderSearchResponseOrdersInner.vendorName) && + Objects.equals(this.endUserCompanyName, orderSearchResponseOrdersInner.endUserCompanyName) && + Objects.equals(this.orderTotal, orderSearchResponseOrdersInner.orderTotal) && + Objects.equals(this.orderStatus, orderSearchResponseOrdersInner.orderStatus) && + Objects.equals(this.subOrders, orderSearchResponseOrdersInner.subOrders) && + Objects.equals(this.links, orderSearchResponseOrdersInner.links); + } + + @Override + public int hashCode() { + return Objects.hash(ingramOrderNumber, ingramOrderDate, customerOrderNumber, vendorSalesOrderNumber, vendorName, endUserCompanyName, orderTotal, orderStatus, subOrders, links); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderSearchResponseOrdersInner {\n"); + sb.append(" ingramOrderNumber: ").append(toIndentedString(ingramOrderNumber)).append("\n"); + sb.append(" ingramOrderDate: ").append(toIndentedString(ingramOrderDate)).append("\n"); + sb.append(" customerOrderNumber: ").append(toIndentedString(customerOrderNumber)).append("\n"); + sb.append(" vendorSalesOrderNumber: ").append(toIndentedString(vendorSalesOrderNumber)).append("\n"); + sb.append(" vendorName: ").append(toIndentedString(vendorName)).append("\n"); + sb.append(" endUserCompanyName: ").append(toIndentedString(endUserCompanyName)).append("\n"); + sb.append(" orderTotal: ").append(toIndentedString(orderTotal)).append("\n"); + sb.append(" orderStatus: ").append(toIndentedString(orderStatus)).append("\n"); + sb.append(" subOrders: ").append(toIndentedString(subOrders)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("ingramOrderNumber"); + openapiFields.add("ingramOrderDate"); + openapiFields.add("customerOrderNumber"); + openapiFields.add("vendorSalesOrderNumber"); + openapiFields.add("vendorName"); + openapiFields.add("endUserCompanyName"); + openapiFields.add("orderTotal"); + openapiFields.add("orderStatus"); + openapiFields.add("subOrders"); + openapiFields.add("links"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderSearchResponseOrdersInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderSearchResponseOrdersInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderSearchResponseOrdersInner is not found in the empty JSON string", OrderSearchResponseOrdersInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderSearchResponseOrdersInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderSearchResponseOrdersInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("ingramOrderNumber") != null && !jsonObj.get("ingramOrderNumber").isJsonNull()) && !jsonObj.get("ingramOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramOrderNumber").toString())); + } + if ((jsonObj.get("ingramOrderDate") != null && !jsonObj.get("ingramOrderDate").isJsonNull()) && !jsonObj.get("ingramOrderDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramOrderDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramOrderDate").toString())); + } + if ((jsonObj.get("customerOrderNumber") != null && !jsonObj.get("customerOrderNumber").isJsonNull()) && !jsonObj.get("customerOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerOrderNumber").toString())); + } + if ((jsonObj.get("vendorSalesOrderNumber") != null && !jsonObj.get("vendorSalesOrderNumber").isJsonNull()) && !jsonObj.get("vendorSalesOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorSalesOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorSalesOrderNumber").toString())); + } + if ((jsonObj.get("vendorName") != null && !jsonObj.get("vendorName").isJsonNull()) && !jsonObj.get("vendorName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorName").toString())); + } + if ((jsonObj.get("endUserCompanyName") != null && !jsonObj.get("endUserCompanyName").isJsonNull()) && !jsonObj.get("endUserCompanyName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endUserCompanyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endUserCompanyName").toString())); + } + if ((jsonObj.get("orderStatus") != null && !jsonObj.get("orderStatus").isJsonNull()) && !jsonObj.get("orderStatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `orderStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orderStatus").toString())); + } + if (jsonObj.get("subOrders") != null && !jsonObj.get("subOrders").isJsonNull()) { + JsonArray jsonArraysubOrders = jsonObj.getAsJsonArray("subOrders"); + if (jsonArraysubOrders != null) { + // ensure the json data is an array + if (!jsonObj.get("subOrders").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `subOrders` to be an array in the JSON string but got `%s`", jsonObj.get("subOrders").toString())); + } + + // validate the optional field `subOrders` (array) + for (int i = 0; i < jsonArraysubOrders.size(); i++) { + OrderSearchResponseOrdersInnerSubOrdersInner.validateJsonElement(jsonArraysubOrders.get(i)); + }; + } + } + // validate the optional field `links` + if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull()) { + OrderSearchResponseOrdersInnerLinks.validateJsonElement(jsonObj.get("links")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderSearchResponseOrdersInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderSearchResponseOrdersInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderSearchResponseOrdersInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderSearchResponseOrdersInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderSearchResponseOrdersInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderSearchResponseOrdersInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderSearchResponseOrdersInner + * @throws IOException if the JSON string is invalid with respect to OrderSearchResponseOrdersInner + */ + public static OrderSearchResponseOrdersInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderSearchResponseOrdersInner.class); + } + + /** + * Convert an instance of OrderSearchResponseOrdersInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderSearchResponseOrdersInnerLinks.java b/src/main/java/xiresellers/client/model/OrderSearchResponseOrdersInnerLinks.java new file mode 100644 index 00000000..89cf775c --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderSearchResponseOrdersInnerLinks.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Link to Order Details for the order(s). + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderSearchResponseOrdersInnerLinks { + public static final String SERIALIZED_NAME_TOPIC = "topic"; + @SerializedName(SERIALIZED_NAME_TOPIC) + private String topic; + + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + private String href; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public OrderSearchResponseOrdersInnerLinks() { + } + + public OrderSearchResponseOrdersInnerLinks topic(String topic) { + this.topic = topic; + return this; + } + + /** + * Provides the details of the orders. + * @return topic + **/ + @javax.annotation.Nullable + public String getTopic() { + return topic; + } + + public void setTopic(String topic) { + this.topic = topic; + } + + + public OrderSearchResponseOrdersInnerLinks href(String href) { + this.href = href; + return this; + } + + /** + * The URL endpoint for accessing the relevant data. + * @return href + **/ + @javax.annotation.Nullable + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + + public OrderSearchResponseOrdersInnerLinks type(String type) { + this.type = type; + return this; + } + + /** + * The type of call that can be made to the href link (GET, POST, Etc.). + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderSearchResponseOrdersInnerLinks orderSearchResponseOrdersInnerLinks = (OrderSearchResponseOrdersInnerLinks) o; + return Objects.equals(this.topic, orderSearchResponseOrdersInnerLinks.topic) && + Objects.equals(this.href, orderSearchResponseOrdersInnerLinks.href) && + Objects.equals(this.type, orderSearchResponseOrdersInnerLinks.type); + } + + @Override + public int hashCode() { + return Objects.hash(topic, href, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderSearchResponseOrdersInnerLinks {\n"); + sb.append(" topic: ").append(toIndentedString(topic)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("topic"); + openapiFields.add("href"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderSearchResponseOrdersInnerLinks + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderSearchResponseOrdersInnerLinks.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderSearchResponseOrdersInnerLinks is not found in the empty JSON string", OrderSearchResponseOrdersInnerLinks.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderSearchResponseOrdersInnerLinks.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderSearchResponseOrdersInnerLinks` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("topic") != null && !jsonObj.get("topic").isJsonNull()) && !jsonObj.get("topic").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `topic` to be a primitive type in the JSON string but got `%s`", jsonObj.get("topic").toString())); + } + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderSearchResponseOrdersInnerLinks.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderSearchResponseOrdersInnerLinks' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderSearchResponseOrdersInnerLinks.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderSearchResponseOrdersInnerLinks value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderSearchResponseOrdersInnerLinks read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderSearchResponseOrdersInnerLinks given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderSearchResponseOrdersInnerLinks + * @throws IOException if the JSON string is invalid with respect to OrderSearchResponseOrdersInnerLinks + */ + public static OrderSearchResponseOrdersInnerLinks fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderSearchResponseOrdersInnerLinks.class); + } + + /** + * Convert an instance of OrderSearchResponseOrdersInnerLinks to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderSearchResponseOrdersInnerSubOrdersInner.java b/src/main/java/xiresellers/client/model/OrderSearchResponseOrdersInnerSubOrdersInner.java new file mode 100644 index 00000000..b0306000 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderSearchResponseOrdersInnerSubOrdersInner.java @@ -0,0 +1,313 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderSearchResponseOrdersInnerSubOrdersInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderSearchResponseOrdersInnerSubOrdersInner { + public static final String SERIALIZED_NAME_SUB_ORDER_NUMBER = "subOrderNumber"; + @SerializedName(SERIALIZED_NAME_SUB_ORDER_NUMBER) + private String subOrderNumber; + + public static final String SERIALIZED_NAME_SUB_ORDER_TOTAL = "subOrderTotal"; + @SerializedName(SERIALIZED_NAME_SUB_ORDER_TOTAL) + private BigDecimal subOrderTotal; + + public static final String SERIALIZED_NAME_SUB_ORDER_STATUS = "subOrderStatus"; + @SerializedName(SERIALIZED_NAME_SUB_ORDER_STATUS) + private String subOrderStatus; + + public static final String SERIALIZED_NAME_LINKS = "links"; + @SerializedName(SERIALIZED_NAME_LINKS) + private List links; + + public OrderSearchResponseOrdersInnerSubOrdersInner() { + } + + public OrderSearchResponseOrdersInnerSubOrdersInner subOrderNumber(String subOrderNumber) { + this.subOrderNumber = subOrderNumber; + return this; + } + + /** + * The sub order number. The two-digit prefix is the warehouse code of the warehouse nearest to the reseller. The middle number is the order number. The two-digit suffix is the sub order number. + * @return subOrderNumber + **/ + @javax.annotation.Nullable + public String getSubOrderNumber() { + return subOrderNumber; + } + + public void setSubOrderNumber(String subOrderNumber) { + this.subOrderNumber = subOrderNumber; + } + + + public OrderSearchResponseOrdersInnerSubOrdersInner subOrderTotal(BigDecimal subOrderTotal) { + this.subOrderTotal = subOrderTotal; + return this; + } + + /** + * The total for the suborder. + * @return subOrderTotal + **/ + @javax.annotation.Nullable + public BigDecimal getSubOrderTotal() { + return subOrderTotal; + } + + public void setSubOrderTotal(BigDecimal subOrderTotal) { + this.subOrderTotal = subOrderTotal; + } + + + public OrderSearchResponseOrdersInnerSubOrdersInner subOrderStatus(String subOrderStatus) { + this.subOrderStatus = subOrderStatus; + return this; + } + + /** + * The status of the suborder. One of:- Shipped, Canceled, Backordered, Processing, On Hold, Delivered + * @return subOrderStatus + **/ + @javax.annotation.Nullable + public String getSubOrderStatus() { + return subOrderStatus; + } + + public void setSubOrderStatus(String subOrderStatus) { + this.subOrderStatus = subOrderStatus; + } + + + public OrderSearchResponseOrdersInnerSubOrdersInner links(List links) { + this.links = links; + return this; + } + + public OrderSearchResponseOrdersInnerSubOrdersInner addLinksItem(OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * Link to Order Details for the sub order(s). + * @return links + **/ + @javax.annotation.Nullable + public List getLinks() { + return links; + } + + public void setLinks(List links) { + this.links = links; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderSearchResponseOrdersInnerSubOrdersInner orderSearchResponseOrdersInnerSubOrdersInner = (OrderSearchResponseOrdersInnerSubOrdersInner) o; + return Objects.equals(this.subOrderNumber, orderSearchResponseOrdersInnerSubOrdersInner.subOrderNumber) && + Objects.equals(this.subOrderTotal, orderSearchResponseOrdersInnerSubOrdersInner.subOrderTotal) && + Objects.equals(this.subOrderStatus, orderSearchResponseOrdersInnerSubOrdersInner.subOrderStatus) && + Objects.equals(this.links, orderSearchResponseOrdersInnerSubOrdersInner.links); + } + + @Override + public int hashCode() { + return Objects.hash(subOrderNumber, subOrderTotal, subOrderStatus, links); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderSearchResponseOrdersInnerSubOrdersInner {\n"); + sb.append(" subOrderNumber: ").append(toIndentedString(subOrderNumber)).append("\n"); + sb.append(" subOrderTotal: ").append(toIndentedString(subOrderTotal)).append("\n"); + sb.append(" subOrderStatus: ").append(toIndentedString(subOrderStatus)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("subOrderNumber"); + openapiFields.add("subOrderTotal"); + openapiFields.add("subOrderStatus"); + openapiFields.add("links"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderSearchResponseOrdersInnerSubOrdersInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderSearchResponseOrdersInnerSubOrdersInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderSearchResponseOrdersInnerSubOrdersInner is not found in the empty JSON string", OrderSearchResponseOrdersInnerSubOrdersInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderSearchResponseOrdersInnerSubOrdersInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderSearchResponseOrdersInnerSubOrdersInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("subOrderNumber") != null && !jsonObj.get("subOrderNumber").isJsonNull()) && !jsonObj.get("subOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subOrderNumber").toString())); + } + if ((jsonObj.get("subOrderStatus") != null && !jsonObj.get("subOrderStatus").isJsonNull()) && !jsonObj.get("subOrderStatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subOrderStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subOrderStatus").toString())); + } + if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull()) { + JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); + if (jsonArraylinks != null) { + // ensure the json data is an array + if (!jsonObj.get("links").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + } + + // validate the optional field `links` (array) + for (int i = 0; i < jsonArraylinks.size(); i++) { + OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner.validateJsonElement(jsonArraylinks.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderSearchResponseOrdersInnerSubOrdersInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderSearchResponseOrdersInnerSubOrdersInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderSearchResponseOrdersInnerSubOrdersInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderSearchResponseOrdersInnerSubOrdersInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderSearchResponseOrdersInnerSubOrdersInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderSearchResponseOrdersInnerSubOrdersInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderSearchResponseOrdersInnerSubOrdersInner + * @throws IOException if the JSON string is invalid with respect to OrderSearchResponseOrdersInnerSubOrdersInner + */ + public static OrderSearchResponseOrdersInnerSubOrdersInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderSearchResponseOrdersInnerSubOrdersInner.class); + } + + /** + * Convert an instance of OrderSearchResponseOrdersInnerSubOrdersInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner.java b/src/main/java/xiresellers/client/model/OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner.java new file mode 100644 index 00000000..4d4613fd --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner { + public static final String SERIALIZED_NAME_TOPIC = "topic"; + @SerializedName(SERIALIZED_NAME_TOPIC) + private String topic; + + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + private String href; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner() { + } + + public OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner topic(String topic) { + this.topic = topic; + return this; + } + + /** + * For orders or invoices. For orders the link provides details of the order. For invoices the link provides details of the invoice. + * @return topic + **/ + @javax.annotation.Nullable + public String getTopic() { + return topic; + } + + public void setTopic(String topic) { + this.topic = topic; + } + + + public OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner href(String href) { + this.href = href; + return this; + } + + /** + * The URL endpoint for accessing the relevant data. + * @return href + **/ + @javax.annotation.Nullable + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + + public OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner type(String type) { + this.type = type; + return this; + } + + /** + * The type of call that can be made to the href link (GET, POST, Etc.). + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner orderSearchResponseOrdersInnerSubOrdersInnerLinksInner = (OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner) o; + return Objects.equals(this.topic, orderSearchResponseOrdersInnerSubOrdersInnerLinksInner.topic) && + Objects.equals(this.href, orderSearchResponseOrdersInnerSubOrdersInnerLinksInner.href) && + Objects.equals(this.type, orderSearchResponseOrdersInnerSubOrdersInnerLinksInner.type); + } + + @Override + public int hashCode() { + return Objects.hash(topic, href, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner {\n"); + sb.append(" topic: ").append(toIndentedString(topic)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("topic"); + openapiFields.add("href"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner is not found in the empty JSON string", OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("topic") != null && !jsonObj.get("topic").isJsonNull()) && !jsonObj.get("topic").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `topic` to be a primitive type in the JSON string but got `%s`", jsonObj.get("topic").toString())); + } + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner + * @throws IOException if the JSON string is invalid with respect to OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner + */ + public static OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner.class); + } + + /** + * Convert an instance of OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponse.java b/src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponse.java new file mode 100644 index 00000000..47d8375d --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponse.java @@ -0,0 +1,239 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderSearchResponseServiceResponseOrdersearchresponse; +import xiresellers.client.model.OrderSearchResponseServiceResponseResponsepreamble; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderSearchResponseServiceResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderSearchResponseServiceResponse { + public static final String SERIALIZED_NAME_RESPONSEPREAMBLE = "responsepreamble"; + @SerializedName(SERIALIZED_NAME_RESPONSEPREAMBLE) + private OrderSearchResponseServiceResponseResponsepreamble responsepreamble; + + public static final String SERIALIZED_NAME_ORDERSEARCHRESPONSE = "ordersearchresponse"; + @SerializedName(SERIALIZED_NAME_ORDERSEARCHRESPONSE) + private OrderSearchResponseServiceResponseOrdersearchresponse ordersearchresponse; + + public OrderSearchResponseServiceResponse() { + } + + public OrderSearchResponseServiceResponse responsepreamble(OrderSearchResponseServiceResponseResponsepreamble responsepreamble) { + this.responsepreamble = responsepreamble; + return this; + } + + /** + * Get responsepreamble + * @return responsepreamble + **/ + @javax.annotation.Nullable + public OrderSearchResponseServiceResponseResponsepreamble getResponsepreamble() { + return responsepreamble; + } + + public void setResponsepreamble(OrderSearchResponseServiceResponseResponsepreamble responsepreamble) { + this.responsepreamble = responsepreamble; + } + + + public OrderSearchResponseServiceResponse ordersearchresponse(OrderSearchResponseServiceResponseOrdersearchresponse ordersearchresponse) { + this.ordersearchresponse = ordersearchresponse; + return this; + } + + /** + * Get ordersearchresponse + * @return ordersearchresponse + **/ + @javax.annotation.Nullable + public OrderSearchResponseServiceResponseOrdersearchresponse getOrdersearchresponse() { + return ordersearchresponse; + } + + public void setOrdersearchresponse(OrderSearchResponseServiceResponseOrdersearchresponse ordersearchresponse) { + this.ordersearchresponse = ordersearchresponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderSearchResponseServiceResponse orderSearchResponseServiceResponse = (OrderSearchResponseServiceResponse) o; + return Objects.equals(this.responsepreamble, orderSearchResponseServiceResponse.responsepreamble) && + Objects.equals(this.ordersearchresponse, orderSearchResponseServiceResponse.ordersearchresponse); + } + + @Override + public int hashCode() { + return Objects.hash(responsepreamble, ordersearchresponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderSearchResponseServiceResponse {\n"); + sb.append(" responsepreamble: ").append(toIndentedString(responsepreamble)).append("\n"); + sb.append(" ordersearchresponse: ").append(toIndentedString(ordersearchresponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("responsepreamble"); + openapiFields.add("ordersearchresponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderSearchResponseServiceResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderSearchResponseServiceResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderSearchResponseServiceResponse is not found in the empty JSON string", OrderSearchResponseServiceResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderSearchResponseServiceResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderSearchResponseServiceResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `responsepreamble` + if (jsonObj.get("responsepreamble") != null && !jsonObj.get("responsepreamble").isJsonNull()) { + OrderSearchResponseServiceResponseResponsepreamble.validateJsonElement(jsonObj.get("responsepreamble")); + } + // validate the optional field `ordersearchresponse` + if (jsonObj.get("ordersearchresponse") != null && !jsonObj.get("ordersearchresponse").isJsonNull()) { + OrderSearchResponseServiceResponseOrdersearchresponse.validateJsonElement(jsonObj.get("ordersearchresponse")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderSearchResponseServiceResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderSearchResponseServiceResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderSearchResponseServiceResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderSearchResponseServiceResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderSearchResponseServiceResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderSearchResponseServiceResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderSearchResponseServiceResponse + * @throws IOException if the JSON string is invalid with respect to OrderSearchResponseServiceResponse + */ + public static OrderSearchResponseServiceResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderSearchResponseServiceResponse.class); + } + + /** + * Convert an instance of OrderSearchResponseServiceResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponse.java b/src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponse.java new file mode 100644 index 00000000..72e88ddc --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponse.java @@ -0,0 +1,323 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderSearchResponseServiceResponseOrdersearchresponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderSearchResponseServiceResponseOrdersearchresponse { + public static final String SERIALIZED_NAME_ORDERSFOUND = "ordersfound"; + @SerializedName(SERIALIZED_NAME_ORDERSFOUND) + private String ordersfound; + + public static final String SERIALIZED_NAME_PAGESIZE = "pagesize"; + @SerializedName(SERIALIZED_NAME_PAGESIZE) + private String pagesize; + + public static final String SERIALIZED_NAME_PAGENUMBER = "pagenumber"; + @SerializedName(SERIALIZED_NAME_PAGENUMBER) + private String pagenumber; + + public static final String SERIALIZED_NAME_ORDERS = "orders"; + @SerializedName(SERIALIZED_NAME_ORDERS) + private List orders; + + public OrderSearchResponseServiceResponseOrdersearchresponse() { + } + + public OrderSearchResponseServiceResponseOrdersearchresponse ordersfound(String ordersfound) { + this.ordersfound = ordersfound; + return this; + } + + /** + * Number of records found in the search result + * @return ordersfound + **/ + @javax.annotation.Nonnull + public String getOrdersfound() { + return ordersfound; + } + + public void setOrdersfound(String ordersfound) { + this.ordersfound = ordersfound; + } + + + public OrderSearchResponseServiceResponseOrdersearchresponse pagesize(String pagesize) { + this.pagesize = pagesize; + return this; + } + + /** + * The submitted pagesize, default is 25 + * @return pagesize + **/ + @javax.annotation.Nullable + public String getPagesize() { + return pagesize; + } + + public void setPagesize(String pagesize) { + this.pagesize = pagesize; + } + + + public OrderSearchResponseServiceResponseOrdersearchresponse pagenumber(String pagenumber) { + this.pagenumber = pagenumber; + return this; + } + + /** + * The submitted pager number, default is 1 + * @return pagenumber + **/ + @javax.annotation.Nullable + public String getPagenumber() { + return pagenumber; + } + + public void setPagenumber(String pagenumber) { + this.pagenumber = pagenumber; + } + + + public OrderSearchResponseServiceResponseOrdersearchresponse orders(List orders) { + this.orders = orders; + return this; + } + + public OrderSearchResponseServiceResponseOrdersearchresponse addOrdersItem(OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner ordersItem) { + if (this.orders == null) { + this.orders = new ArrayList<>(); + } + this.orders.add(ordersItem); + return this; + } + + /** + * An array of orders in the search result + * @return orders + **/ + @javax.annotation.Nullable + public List getOrders() { + return orders; + } + + public void setOrders(List orders) { + this.orders = orders; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderSearchResponseServiceResponseOrdersearchresponse orderSearchResponseServiceResponseOrdersearchresponse = (OrderSearchResponseServiceResponseOrdersearchresponse) o; + return Objects.equals(this.ordersfound, orderSearchResponseServiceResponseOrdersearchresponse.ordersfound) && + Objects.equals(this.pagesize, orderSearchResponseServiceResponseOrdersearchresponse.pagesize) && + Objects.equals(this.pagenumber, orderSearchResponseServiceResponseOrdersearchresponse.pagenumber) && + Objects.equals(this.orders, orderSearchResponseServiceResponseOrdersearchresponse.orders); + } + + @Override + public int hashCode() { + return Objects.hash(ordersfound, pagesize, pagenumber, orders); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderSearchResponseServiceResponseOrdersearchresponse {\n"); + sb.append(" ordersfound: ").append(toIndentedString(ordersfound)).append("\n"); + sb.append(" pagesize: ").append(toIndentedString(pagesize)).append("\n"); + sb.append(" pagenumber: ").append(toIndentedString(pagenumber)).append("\n"); + sb.append(" orders: ").append(toIndentedString(orders)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("ordersfound"); + openapiFields.add("pagesize"); + openapiFields.add("pagenumber"); + openapiFields.add("orders"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("ordersfound"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderSearchResponseServiceResponseOrdersearchresponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderSearchResponseServiceResponseOrdersearchresponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderSearchResponseServiceResponseOrdersearchresponse is not found in the empty JSON string", OrderSearchResponseServiceResponseOrdersearchresponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderSearchResponseServiceResponseOrdersearchresponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderSearchResponseServiceResponseOrdersearchresponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrderSearchResponseServiceResponseOrdersearchresponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("ordersfound").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ordersfound` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ordersfound").toString())); + } + if ((jsonObj.get("pagesize") != null && !jsonObj.get("pagesize").isJsonNull()) && !jsonObj.get("pagesize").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `pagesize` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pagesize").toString())); + } + if ((jsonObj.get("pagenumber") != null && !jsonObj.get("pagenumber").isJsonNull()) && !jsonObj.get("pagenumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `pagenumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pagenumber").toString())); + } + if (jsonObj.get("orders") != null && !jsonObj.get("orders").isJsonNull()) { + JsonArray jsonArrayorders = jsonObj.getAsJsonArray("orders"); + if (jsonArrayorders != null) { + // ensure the json data is an array + if (!jsonObj.get("orders").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `orders` to be an array in the JSON string but got `%s`", jsonObj.get("orders").toString())); + } + + // validate the optional field `orders` (array) + for (int i = 0; i < jsonArrayorders.size(); i++) { + OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner.validateJsonElement(jsonArrayorders.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderSearchResponseServiceResponseOrdersearchresponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderSearchResponseServiceResponseOrdersearchresponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderSearchResponseServiceResponseOrdersearchresponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderSearchResponseServiceResponseOrdersearchresponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderSearchResponseServiceResponseOrdersearchresponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderSearchResponseServiceResponseOrdersearchresponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderSearchResponseServiceResponseOrdersearchresponse + * @throws IOException if the JSON string is invalid with respect to OrderSearchResponseServiceResponseOrdersearchresponse + */ + public static OrderSearchResponseServiceResponseOrdersearchresponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderSearchResponseServiceResponseOrdersearchresponse.class); + } + + /** + * Convert an instance of OrderSearchResponseServiceResponseOrdersearchresponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner.java b/src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner.java new file mode 100644 index 00000000..66ed58c8 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner.java @@ -0,0 +1,355 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks; +import xiresellers.client.model.OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner { + public static final String SERIALIZED_NAME_ORDERNUMBER = "ordernumber"; + @SerializedName(SERIALIZED_NAME_ORDERNUMBER) + private String ordernumber; + + public static final String SERIALIZED_NAME_ENTRYTIMESTAMP = "entrytimestamp"; + @SerializedName(SERIALIZED_NAME_ENTRYTIMESTAMP) + private String entrytimestamp; + + public static final String SERIALIZED_NAME_CUSTOMERORDERNUMBER = "customerordernumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMERORDERNUMBER) + private String customerordernumber; + + public static final String SERIALIZED_NAME_SUBORDERS = "suborders"; + @SerializedName(SERIALIZED_NAME_SUBORDERS) + private List suborders; + + public static final String SERIALIZED_NAME_LINKS = "links"; + @SerializedName(SERIALIZED_NAME_LINKS) + private OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks links; + + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner() { + } + + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner ordernumber(String ordernumber) { + this.ordernumber = ordernumber; + return this; + } + + /** + * Ingram micro sales order number + * @return ordernumber + **/ + @javax.annotation.Nonnull + public String getOrdernumber() { + return ordernumber; + } + + public void setOrdernumber(String ordernumber) { + this.ordernumber = ordernumber; + } + + + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner entrytimestamp(String entrytimestamp) { + this.entrytimestamp = entrytimestamp; + return this; + } + + /** + * The order creation date-time in UTC format + * @return entrytimestamp + **/ + @javax.annotation.Nonnull + public String getEntrytimestamp() { + return entrytimestamp; + } + + public void setEntrytimestamp(String entrytimestamp) { + this.entrytimestamp = entrytimestamp; + } + + + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner customerordernumber(String customerordernumber) { + this.customerordernumber = customerordernumber; + return this; + } + + /** + * PO/Order number submitted while creating the order + * @return customerordernumber + **/ + @javax.annotation.Nullable + public String getCustomerordernumber() { + return customerordernumber; + } + + public void setCustomerordernumber(String customerordernumber) { + this.customerordernumber = customerordernumber; + } + + + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner suborders(List suborders) { + this.suborders = suborders; + return this; + } + + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner addSubordersItem(OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner subordersItem) { + if (this.suborders == null) { + this.suborders = new ArrayList<>(); + } + this.suborders.add(subordersItem); + return this; + } + + /** + * An order MAY get divided into various sub orders, for example if the SKUs are being shipped from different warehouse. + * @return suborders + **/ + @javax.annotation.Nullable + public List getSuborders() { + return suborders; + } + + public void setSuborders(List suborders) { + this.suborders = suborders; + } + + + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner links(OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks links) { + this.links = links; + return this; + } + + /** + * Get links + * @return links + **/ + @javax.annotation.Nullable + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks getLinks() { + return links; + } + + public void setLinks(OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks links) { + this.links = links; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner orderSearchResponseServiceResponseOrdersearchresponseOrdersInner = (OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner) o; + return Objects.equals(this.ordernumber, orderSearchResponseServiceResponseOrdersearchresponseOrdersInner.ordernumber) && + Objects.equals(this.entrytimestamp, orderSearchResponseServiceResponseOrdersearchresponseOrdersInner.entrytimestamp) && + Objects.equals(this.customerordernumber, orderSearchResponseServiceResponseOrdersearchresponseOrdersInner.customerordernumber) && + Objects.equals(this.suborders, orderSearchResponseServiceResponseOrdersearchresponseOrdersInner.suborders) && + Objects.equals(this.links, orderSearchResponseServiceResponseOrdersearchresponseOrdersInner.links); + } + + @Override + public int hashCode() { + return Objects.hash(ordernumber, entrytimestamp, customerordernumber, suborders, links); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner {\n"); + sb.append(" ordernumber: ").append(toIndentedString(ordernumber)).append("\n"); + sb.append(" entrytimestamp: ").append(toIndentedString(entrytimestamp)).append("\n"); + sb.append(" customerordernumber: ").append(toIndentedString(customerordernumber)).append("\n"); + sb.append(" suborders: ").append(toIndentedString(suborders)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("ordernumber"); + openapiFields.add("entrytimestamp"); + openapiFields.add("customerordernumber"); + openapiFields.add("suborders"); + openapiFields.add("links"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("ordernumber"); + openapiRequiredFields.add("entrytimestamp"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner is not found in the empty JSON string", OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("ordernumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ordernumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ordernumber").toString())); + } + if (!jsonObj.get("entrytimestamp").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `entrytimestamp` to be a primitive type in the JSON string but got `%s`", jsonObj.get("entrytimestamp").toString())); + } + if ((jsonObj.get("customerordernumber") != null && !jsonObj.get("customerordernumber").isJsonNull()) && !jsonObj.get("customerordernumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerordernumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerordernumber").toString())); + } + if (jsonObj.get("suborders") != null && !jsonObj.get("suborders").isJsonNull()) { + JsonArray jsonArraysuborders = jsonObj.getAsJsonArray("suborders"); + if (jsonArraysuborders != null) { + // ensure the json data is an array + if (!jsonObj.get("suborders").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `suborders` to be an array in the JSON string but got `%s`", jsonObj.get("suborders").toString())); + } + + // validate the optional field `suborders` (array) + for (int i = 0; i < jsonArraysuborders.size(); i++) { + OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner.validateJsonElement(jsonArraysuborders.get(i)); + }; + } + } + // validate the optional field `links` + if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull()) { + OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks.validateJsonElement(jsonObj.get("links")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner + * @throws IOException if the JSON string is invalid with respect to OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner + */ + public static OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner.class); + } + + /** + * Convert an instance of OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks.java b/src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks.java new file mode 100644 index 00000000..93e445a4 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks.java @@ -0,0 +1,379 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * HATEOAS links for the main order + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks { + /** + * Topic being orders in this case, if it is orders then the link will provide details of the order. + */ + @JsonAdapter(TopicEnum.Adapter.class) + public enum TopicEnum { + ORDERS("orders"), + + INVOICES("invoices"); + + private String value; + + TopicEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TopicEnum fromValue(String value) { + for (TopicEnum b : TopicEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TopicEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TopicEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TopicEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TopicEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TOPIC = "topic"; + @SerializedName(SERIALIZED_NAME_TOPIC) + private TopicEnum topic; + + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + private URI href; + + /** + * The type of call that can be made to the href link + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + GET("GET"), + + POST("POST"), + + PUT("PUT"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks() { + } + + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks topic(TopicEnum topic) { + this.topic = topic; + return this; + } + + /** + * Topic being orders in this case, if it is orders then the link will provide details of the order. + * @return topic + **/ + @javax.annotation.Nullable + public TopicEnum getTopic() { + return topic; + } + + public void setTopic(TopicEnum topic) { + this.topic = topic; + } + + + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks href(URI href) { + this.href = href; + return this; + } + + /** + * The API endpoint for accessing the relevant data + * @return href + **/ + @javax.annotation.Nullable + public URI getHref() { + return href; + } + + public void setHref(URI href) { + this.href = href; + } + + + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * The type of call that can be made to the href link + * @return type + **/ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks orderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks = (OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks) o; + return Objects.equals(this.topic, orderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks.topic) && + Objects.equals(this.href, orderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks.href) && + Objects.equals(this.type, orderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks.type); + } + + @Override + public int hashCode() { + return Objects.hash(topic, href, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks {\n"); + sb.append(" topic: ").append(toIndentedString(topic)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("topic"); + openapiFields.add("href"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks is not found in the empty JSON string", OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("topic") != null && !jsonObj.get("topic").isJsonNull()) && !jsonObj.get("topic").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `topic` to be a primitive type in the JSON string but got `%s`", jsonObj.get("topic").toString())); + } + // validate the optional field `topic` + if (jsonObj.get("topic") != null && !jsonObj.get("topic").isJsonNull()) { + TopicEnum.validateJsonElement(jsonObj.get("topic")); + } + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks + * @throws IOException if the JSON string is invalid with respect to OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks + */ + public static OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks.class); + } + + /** + * Convert an instance of OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner.java b/src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner.java new file mode 100644 index 00000000..75599cdb --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner.java @@ -0,0 +1,373 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner { + public static final String SERIALIZED_NAME_SUBORDERNUMBER = "subordernumber"; + @SerializedName(SERIALIZED_NAME_SUBORDERNUMBER) + private String subordernumber; + + public static final String SERIALIZED_NAME_STATUSCODE = "statuscode"; + @SerializedName(SERIALIZED_NAME_STATUSCODE) + private String statuscode; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_HOLDREASONCODE = "holdreasoncode"; + @SerializedName(SERIALIZED_NAME_HOLDREASONCODE) + private String holdreasoncode; + + public static final String SERIALIZED_NAME_HOLDREASON = "holdreason"; + @SerializedName(SERIALIZED_NAME_HOLDREASON) + private String holdreason; + + public static final String SERIALIZED_NAME_LINKS = "links"; + @SerializedName(SERIALIZED_NAME_LINKS) + private List links; + + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner() { + } + + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner subordernumber(String subordernumber) { + this.subordernumber = subordernumber; + return this; + } + + /** + * A sub order number + * @return subordernumber + **/ + @javax.annotation.Nullable + public String getSubordernumber() { + return subordernumber; + } + + public void setSubordernumber(String subordernumber) { + this.subordernumber = subordernumber; + } + + + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner statuscode(String statuscode) { + this.statuscode = statuscode; + return this; + } + + /** + * Order status code + * @return statuscode + **/ + @javax.annotation.Nullable + public String getStatuscode() { + return statuscode; + } + + public void setStatuscode(String statuscode) { + this.statuscode = statuscode; + } + + + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner status(String status) { + this.status = status; + return this; + } + + /** + * Details of the order statuscode - i.e. statuscode = 4 then status = SHIPPED + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner holdreasoncode(String holdreasoncode) { + this.holdreasoncode = holdreasoncode; + return this; + } + + /** + * Will be returned in case of order on hold + * @return holdreasoncode + **/ + @javax.annotation.Nullable + public String getHoldreasoncode() { + return holdreasoncode; + } + + public void setHoldreasoncode(String holdreasoncode) { + this.holdreasoncode = holdreasoncode; + } + + + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner holdreason(String holdreason) { + this.holdreason = holdreason; + return this; + } + + /** + * Reason for order hold - will be returned if the order is on hold + * @return holdreason + **/ + @javax.annotation.Nullable + public String getHoldreason() { + return holdreason; + } + + public void setHoldreason(String holdreason) { + this.holdreason = holdreason; + } + + + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner links(List links) { + this.links = links; + return this; + } + + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner addLinksItem(OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * HATEOAS links for the details and invoices of the sub-orders if available + * @return links + **/ + @javax.annotation.Nullable + public List getLinks() { + return links; + } + + public void setLinks(List links) { + this.links = links; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner orderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner = (OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner) o; + return Objects.equals(this.subordernumber, orderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner.subordernumber) && + Objects.equals(this.statuscode, orderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner.statuscode) && + Objects.equals(this.status, orderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner.status) && + Objects.equals(this.holdreasoncode, orderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner.holdreasoncode) && + Objects.equals(this.holdreason, orderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner.holdreason) && + Objects.equals(this.links, orderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner.links); + } + + @Override + public int hashCode() { + return Objects.hash(subordernumber, statuscode, status, holdreasoncode, holdreason, links); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner {\n"); + sb.append(" subordernumber: ").append(toIndentedString(subordernumber)).append("\n"); + sb.append(" statuscode: ").append(toIndentedString(statuscode)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" holdreasoncode: ").append(toIndentedString(holdreasoncode)).append("\n"); + sb.append(" holdreason: ").append(toIndentedString(holdreason)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("subordernumber"); + openapiFields.add("statuscode"); + openapiFields.add("status"); + openapiFields.add("holdreasoncode"); + openapiFields.add("holdreason"); + openapiFields.add("links"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner is not found in the empty JSON string", OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("subordernumber") != null && !jsonObj.get("subordernumber").isJsonNull()) && !jsonObj.get("subordernumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subordernumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subordernumber").toString())); + } + if ((jsonObj.get("statuscode") != null && !jsonObj.get("statuscode").isJsonNull()) && !jsonObj.get("statuscode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `statuscode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("statuscode").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if ((jsonObj.get("holdreasoncode") != null && !jsonObj.get("holdreasoncode").isJsonNull()) && !jsonObj.get("holdreasoncode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `holdreasoncode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("holdreasoncode").toString())); + } + if ((jsonObj.get("holdreason") != null && !jsonObj.get("holdreason").isJsonNull()) && !jsonObj.get("holdreason").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `holdreason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("holdreason").toString())); + } + if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull()) { + JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); + if (jsonArraylinks != null) { + // ensure the json data is an array + if (!jsonObj.get("links").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + } + + // validate the optional field `links` (array) + for (int i = 0; i < jsonArraylinks.size(); i++) { + OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner.validateJsonElement(jsonArraylinks.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner + * @throws IOException if the JSON string is invalid with respect to OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner + */ + public static OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner.class); + } + + /** + * Convert an instance of OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner.java b/src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner.java new file mode 100644 index 00000000..1ccbb178 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner.java @@ -0,0 +1,379 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner { + /** + * topic being orders or invoices, if it is orders then the link will provide details of the order. If its invoices then the link provides details of the invoice + */ + @JsonAdapter(TopicEnum.Adapter.class) + public enum TopicEnum { + ORDERS("orders"), + + INVOICES("invoices"); + + private String value; + + TopicEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TopicEnum fromValue(String value) { + for (TopicEnum b : TopicEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TopicEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TopicEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TopicEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TopicEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TOPIC = "topic"; + @SerializedName(SERIALIZED_NAME_TOPIC) + private TopicEnum topic; + + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + private URI href; + + /** + * The type of call that can be made to the href link + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + GET("GET"), + + POST("POST"), + + PUT("PUT"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner() { + } + + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner topic(TopicEnum topic) { + this.topic = topic; + return this; + } + + /** + * topic being orders or invoices, if it is orders then the link will provide details of the order. If its invoices then the link provides details of the invoice + * @return topic + **/ + @javax.annotation.Nullable + public TopicEnum getTopic() { + return topic; + } + + public void setTopic(TopicEnum topic) { + this.topic = topic; + } + + + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner href(URI href) { + this.href = href; + return this; + } + + /** + * The API endpoint for accessing the relevant data + * @return href + **/ + @javax.annotation.Nullable + public URI getHref() { + return href; + } + + public void setHref(URI href) { + this.href = href; + } + + + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * The type of call that can be made to the href link + * @return type + **/ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner orderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner = (OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner) o; + return Objects.equals(this.topic, orderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner.topic) && + Objects.equals(this.href, orderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner.href) && + Objects.equals(this.type, orderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner.type); + } + + @Override + public int hashCode() { + return Objects.hash(topic, href, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner {\n"); + sb.append(" topic: ").append(toIndentedString(topic)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("topic"); + openapiFields.add("href"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner is not found in the empty JSON string", OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("topic") != null && !jsonObj.get("topic").isJsonNull()) && !jsonObj.get("topic").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `topic` to be a primitive type in the JSON string but got `%s`", jsonObj.get("topic").toString())); + } + // validate the optional field `topic` + if (jsonObj.get("topic") != null && !jsonObj.get("topic").isJsonNull()) { + TopicEnum.validateJsonElement(jsonObj.get("topic")); + } + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner + * @throws IOException if the JSON string is invalid with respect to OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner + */ + public static OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner.class); + } + + /** + * Convert an instance of OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponseResponsepreamble.java b/src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponseResponsepreamble.java new file mode 100644 index 00000000..b7e149b8 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderSearchResponseServiceResponseResponsepreamble.java @@ -0,0 +1,244 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderSearchResponseServiceResponseResponsepreamble + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderSearchResponseServiceResponseResponsepreamble { + public static final String SERIALIZED_NAME_REQUESTSTATUS = "requeststatus"; + @SerializedName(SERIALIZED_NAME_REQUESTSTATUS) + private String requeststatus; + + public static final String SERIALIZED_NAME_RETURNMESSAGE = "returnmessage"; + @SerializedName(SERIALIZED_NAME_RETURNMESSAGE) + private String returnmessage; + + public OrderSearchResponseServiceResponseResponsepreamble() { + } + + public OrderSearchResponseServiceResponseResponsepreamble requeststatus(String requeststatus) { + this.requeststatus = requeststatus; + return this; + } + + /** + * Get requeststatus + * @return requeststatus + **/ + @javax.annotation.Nonnull + public String getRequeststatus() { + return requeststatus; + } + + public void setRequeststatus(String requeststatus) { + this.requeststatus = requeststatus; + } + + + public OrderSearchResponseServiceResponseResponsepreamble returnmessage(String returnmessage) { + this.returnmessage = returnmessage; + return this; + } + + /** + * Get returnmessage + * @return returnmessage + **/ + @javax.annotation.Nonnull + public String getReturnmessage() { + return returnmessage; + } + + public void setReturnmessage(String returnmessage) { + this.returnmessage = returnmessage; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderSearchResponseServiceResponseResponsepreamble orderSearchResponseServiceResponseResponsepreamble = (OrderSearchResponseServiceResponseResponsepreamble) o; + return Objects.equals(this.requeststatus, orderSearchResponseServiceResponseResponsepreamble.requeststatus) && + Objects.equals(this.returnmessage, orderSearchResponseServiceResponseResponsepreamble.returnmessage); + } + + @Override + public int hashCode() { + return Objects.hash(requeststatus, returnmessage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderSearchResponseServiceResponseResponsepreamble {\n"); + sb.append(" requeststatus: ").append(toIndentedString(requeststatus)).append("\n"); + sb.append(" returnmessage: ").append(toIndentedString(returnmessage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("requeststatus"); + openapiFields.add("returnmessage"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("requeststatus"); + openapiRequiredFields.add("returnmessage"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderSearchResponseServiceResponseResponsepreamble + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderSearchResponseServiceResponseResponsepreamble.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderSearchResponseServiceResponseResponsepreamble is not found in the empty JSON string", OrderSearchResponseServiceResponseResponsepreamble.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderSearchResponseServiceResponseResponsepreamble.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderSearchResponseServiceResponseResponsepreamble` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrderSearchResponseServiceResponseResponsepreamble.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("requeststatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `requeststatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requeststatus").toString())); + } + if (!jsonObj.get("returnmessage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `returnmessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("returnmessage").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderSearchResponseServiceResponseResponsepreamble.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderSearchResponseServiceResponseResponsepreamble' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderSearchResponseServiceResponseResponsepreamble.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderSearchResponseServiceResponseResponsepreamble value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderSearchResponseServiceResponseResponsepreamble read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderSearchResponseServiceResponseResponsepreamble given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderSearchResponseServiceResponseResponsepreamble + * @throws IOException if the JSON string is invalid with respect to OrderSearchResponseServiceResponseResponsepreamble + */ + public static OrderSearchResponseServiceResponseResponsepreamble fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderSearchResponseServiceResponseResponsepreamble.class); + } + + /** + * Convert an instance of OrderSearchResponseServiceResponseResponsepreamble to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequest.java b/src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequest.java new file mode 100644 index 00000000..eea0517a --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequest.java @@ -0,0 +1,344 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderStatusAsyncNotificationRequestResourceInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderStatusAsyncNotificationRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderStatusAsyncNotificationRequest { + public static final String SERIALIZED_NAME_TOPIC = "topic"; + @SerializedName(SERIALIZED_NAME_TOPIC) + private String topic; + + public static final String SERIALIZED_NAME_EVENT = "event"; + @SerializedName(SERIALIZED_NAME_EVENT) + private String event; + + public static final String SERIALIZED_NAME_EVENT_TIME_STAMP = "eventTimeStamp"; + @SerializedName(SERIALIZED_NAME_EVENT_TIME_STAMP) + private String eventTimeStamp; + + public static final String SERIALIZED_NAME_EVENT_ID = "eventId"; + @SerializedName(SERIALIZED_NAME_EVENT_ID) + private String eventId; + + public static final String SERIALIZED_NAME_RESOURCE = "resource"; + @SerializedName(SERIALIZED_NAME_RESOURCE) + private List resource; + + public OrderStatusAsyncNotificationRequest() { + } + + public OrderStatusAsyncNotificationRequest topic(String topic) { + this.topic = topic; + return this; + } + + /** + * Field for identifying whether it is a reseller or vendor event. For eg, resellers/orders + * @return topic + **/ + @javax.annotation.Nullable + public String getTopic() { + return topic; + } + + public void setTopic(String topic) { + this.topic = topic; + } + + + public OrderStatusAsyncNotificationRequest event(String event) { + this.event = event; + return this; + } + + /** + * The event sent in the request. For eg, im::create. + * @return event + **/ + @javax.annotation.Nullable + public String getEvent() { + return event; + } + + public void setEvent(String event) { + this.event = event; + } + + + public OrderStatusAsyncNotificationRequest eventTimeStamp(String eventTimeStamp) { + this.eventTimeStamp = eventTimeStamp; + return this; + } + + /** + * The timestamp at which the event was sent. + * @return eventTimeStamp + **/ + @javax.annotation.Nullable + public String getEventTimeStamp() { + return eventTimeStamp; + } + + public void setEventTimeStamp(String eventTimeStamp) { + this.eventTimeStamp = eventTimeStamp; + } + + + public OrderStatusAsyncNotificationRequest eventId(String eventId) { + this.eventId = eventId; + return this; + } + + /** + * A unique id used as identifier for the sepcific event and used for generating the x-hub signature. + * @return eventId + **/ + @javax.annotation.Nullable + public String getEventId() { + return eventId; + } + + public void setEventId(String eventId) { + this.eventId = eventId; + } + + + public OrderStatusAsyncNotificationRequest resource(List resource) { + this.resource = resource; + return this; + } + + public OrderStatusAsyncNotificationRequest addResourceItem(OrderStatusAsyncNotificationRequestResourceInner resourceItem) { + if (this.resource == null) { + this.resource = new ArrayList<>(); + } + this.resource.add(resourceItem); + return this; + } + + /** + * Get resource + * @return resource + **/ + @javax.annotation.Nullable + public List getResource() { + return resource; + } + + public void setResource(List resource) { + this.resource = resource; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderStatusAsyncNotificationRequest orderStatusAsyncNotificationRequest = (OrderStatusAsyncNotificationRequest) o; + return Objects.equals(this.topic, orderStatusAsyncNotificationRequest.topic) && + Objects.equals(this.event, orderStatusAsyncNotificationRequest.event) && + Objects.equals(this.eventTimeStamp, orderStatusAsyncNotificationRequest.eventTimeStamp) && + Objects.equals(this.eventId, orderStatusAsyncNotificationRequest.eventId) && + Objects.equals(this.resource, orderStatusAsyncNotificationRequest.resource); + } + + @Override + public int hashCode() { + return Objects.hash(topic, event, eventTimeStamp, eventId, resource); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderStatusAsyncNotificationRequest {\n"); + sb.append(" topic: ").append(toIndentedString(topic)).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append(" eventTimeStamp: ").append(toIndentedString(eventTimeStamp)).append("\n"); + sb.append(" eventId: ").append(toIndentedString(eventId)).append("\n"); + sb.append(" resource: ").append(toIndentedString(resource)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("topic"); + openapiFields.add("event"); + openapiFields.add("eventTimeStamp"); + openapiFields.add("eventId"); + openapiFields.add("resource"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderStatusAsyncNotificationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderStatusAsyncNotificationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderStatusAsyncNotificationRequest is not found in the empty JSON string", OrderStatusAsyncNotificationRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderStatusAsyncNotificationRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderStatusAsyncNotificationRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("topic") != null && !jsonObj.get("topic").isJsonNull()) && !jsonObj.get("topic").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `topic` to be a primitive type in the JSON string but got `%s`", jsonObj.get("topic").toString())); + } + if ((jsonObj.get("event") != null && !jsonObj.get("event").isJsonNull()) && !jsonObj.get("event").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `event` to be a primitive type in the JSON string but got `%s`", jsonObj.get("event").toString())); + } + if ((jsonObj.get("eventTimeStamp") != null && !jsonObj.get("eventTimeStamp").isJsonNull()) && !jsonObj.get("eventTimeStamp").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `eventTimeStamp` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventTimeStamp").toString())); + } + if ((jsonObj.get("eventId") != null && !jsonObj.get("eventId").isJsonNull()) && !jsonObj.get("eventId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `eventId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventId").toString())); + } + if (jsonObj.get("resource") != null && !jsonObj.get("resource").isJsonNull()) { + JsonArray jsonArrayresource = jsonObj.getAsJsonArray("resource"); + if (jsonArrayresource != null) { + // ensure the json data is an array + if (!jsonObj.get("resource").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `resource` to be an array in the JSON string but got `%s`", jsonObj.get("resource").toString())); + } + + // validate the optional field `resource` (array) + for (int i = 0; i < jsonArrayresource.size(); i++) { + OrderStatusAsyncNotificationRequestResourceInner.validateJsonElement(jsonArrayresource.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderStatusAsyncNotificationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderStatusAsyncNotificationRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderStatusAsyncNotificationRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderStatusAsyncNotificationRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderStatusAsyncNotificationRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderStatusAsyncNotificationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderStatusAsyncNotificationRequest + * @throws IOException if the JSON string is invalid with respect to OrderStatusAsyncNotificationRequest + */ + public static OrderStatusAsyncNotificationRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderStatusAsyncNotificationRequest.class); + } + + /** + * Convert an instance of OrderStatusAsyncNotificationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInner.java b/src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInner.java new file mode 100644 index 00000000..411b8135 --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInner.java @@ -0,0 +1,393 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderStatusAsyncNotificationRequestResourceInnerLinesInner; +import xiresellers.client.model.OrderStatusAsyncNotificationRequestResourceInnerLinksInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderStatusAsyncNotificationRequestResourceInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderStatusAsyncNotificationRequestResourceInner { + public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; + @SerializedName(SERIALIZED_NAME_EVENT_TYPE) + private String eventType; + + public static final String SERIALIZED_NAME_ORDER_NUMBER = "orderNumber"; + @SerializedName(SERIALIZED_NAME_ORDER_NUMBER) + private String orderNumber; + + public static final String SERIALIZED_NAME_CUSTOMER_ORDER_NUMBER = "customerOrderNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_ORDER_NUMBER) + private String customerOrderNumber; + + public static final String SERIALIZED_NAME_ORDER_ENTRY_TIME_STAMP = "orderEntryTimeStamp"; + @SerializedName(SERIALIZED_NAME_ORDER_ENTRY_TIME_STAMP) + private String orderEntryTimeStamp; + + public static final String SERIALIZED_NAME_LINES = "lines"; + @SerializedName(SERIALIZED_NAME_LINES) + private List lines; + + public static final String SERIALIZED_NAME_LINKS = "links"; + @SerializedName(SERIALIZED_NAME_LINKS) + private List links; + + public OrderStatusAsyncNotificationRequestResourceInner() { + } + + public OrderStatusAsyncNotificationRequestResourceInner eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The event name sent in the event request. + * @return eventType + **/ + @javax.annotation.Nullable + public String getEventType() { + return eventType; + } + + public void setEventType(String eventType) { + this.eventType = eventType; + } + + + public OrderStatusAsyncNotificationRequestResourceInner orderNumber(String orderNumber) { + this.orderNumber = orderNumber; + return this; + } + + /** + * The Ingram Micro order number. + * @return orderNumber + **/ + @javax.annotation.Nullable + public String getOrderNumber() { + return orderNumber; + } + + public void setOrderNumber(String orderNumber) { + this.orderNumber = orderNumber; + } + + + public OrderStatusAsyncNotificationRequestResourceInner customerOrderNumber(String customerOrderNumber) { + this.customerOrderNumber = customerOrderNumber; + return this; + } + + /** + * The reseller's unique PO/Order number. + * @return customerOrderNumber + **/ + @javax.annotation.Nullable + public String getCustomerOrderNumber() { + return customerOrderNumber; + } + + public void setCustomerOrderNumber(String customerOrderNumber) { + this.customerOrderNumber = customerOrderNumber; + } + + + public OrderStatusAsyncNotificationRequestResourceInner orderEntryTimeStamp(String orderEntryTimeStamp) { + this.orderEntryTimeStamp = orderEntryTimeStamp; + return this; + } + + /** + * The timestamp at which the order was created. + * @return orderEntryTimeStamp + **/ + @javax.annotation.Nullable + public String getOrderEntryTimeStamp() { + return orderEntryTimeStamp; + } + + public void setOrderEntryTimeStamp(String orderEntryTimeStamp) { + this.orderEntryTimeStamp = orderEntryTimeStamp; + } + + + public OrderStatusAsyncNotificationRequestResourceInner lines(List lines) { + this.lines = lines; + return this; + } + + public OrderStatusAsyncNotificationRequestResourceInner addLinesItem(OrderStatusAsyncNotificationRequestResourceInnerLinesInner linesItem) { + if (this.lines == null) { + this.lines = new ArrayList<>(); + } + this.lines.add(linesItem); + return this; + } + + /** + * The line-level details for the order. + * @return lines + **/ + @javax.annotation.Nullable + public List getLines() { + return lines; + } + + public void setLines(List lines) { + this.lines = lines; + } + + + public OrderStatusAsyncNotificationRequestResourceInner links(List links) { + this.links = links; + return this; + } + + public OrderStatusAsyncNotificationRequestResourceInner addLinksItem(OrderStatusAsyncNotificationRequestResourceInnerLinksInner linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * Link to Order Details for the order(s). + * @return links + **/ + @javax.annotation.Nullable + public List getLinks() { + return links; + } + + public void setLinks(List links) { + this.links = links; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderStatusAsyncNotificationRequestResourceInner orderStatusAsyncNotificationRequestResourceInner = (OrderStatusAsyncNotificationRequestResourceInner) o; + return Objects.equals(this.eventType, orderStatusAsyncNotificationRequestResourceInner.eventType) && + Objects.equals(this.orderNumber, orderStatusAsyncNotificationRequestResourceInner.orderNumber) && + Objects.equals(this.customerOrderNumber, orderStatusAsyncNotificationRequestResourceInner.customerOrderNumber) && + Objects.equals(this.orderEntryTimeStamp, orderStatusAsyncNotificationRequestResourceInner.orderEntryTimeStamp) && + Objects.equals(this.lines, orderStatusAsyncNotificationRequestResourceInner.lines) && + Objects.equals(this.links, orderStatusAsyncNotificationRequestResourceInner.links); + } + + @Override + public int hashCode() { + return Objects.hash(eventType, orderNumber, customerOrderNumber, orderEntryTimeStamp, lines, links); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderStatusAsyncNotificationRequestResourceInner {\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" orderNumber: ").append(toIndentedString(orderNumber)).append("\n"); + sb.append(" customerOrderNumber: ").append(toIndentedString(customerOrderNumber)).append("\n"); + sb.append(" orderEntryTimeStamp: ").append(toIndentedString(orderEntryTimeStamp)).append("\n"); + sb.append(" lines: ").append(toIndentedString(lines)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("eventType"); + openapiFields.add("orderNumber"); + openapiFields.add("customerOrderNumber"); + openapiFields.add("orderEntryTimeStamp"); + openapiFields.add("lines"); + openapiFields.add("links"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderStatusAsyncNotificationRequestResourceInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderStatusAsyncNotificationRequestResourceInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderStatusAsyncNotificationRequestResourceInner is not found in the empty JSON string", OrderStatusAsyncNotificationRequestResourceInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderStatusAsyncNotificationRequestResourceInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderStatusAsyncNotificationRequestResourceInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + } + if ((jsonObj.get("orderNumber") != null && !jsonObj.get("orderNumber").isJsonNull()) && !jsonObj.get("orderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `orderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orderNumber").toString())); + } + if ((jsonObj.get("customerOrderNumber") != null && !jsonObj.get("customerOrderNumber").isJsonNull()) && !jsonObj.get("customerOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerOrderNumber").toString())); + } + if ((jsonObj.get("orderEntryTimeStamp") != null && !jsonObj.get("orderEntryTimeStamp").isJsonNull()) && !jsonObj.get("orderEntryTimeStamp").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `orderEntryTimeStamp` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orderEntryTimeStamp").toString())); + } + if (jsonObj.get("lines") != null && !jsonObj.get("lines").isJsonNull()) { + JsonArray jsonArraylines = jsonObj.getAsJsonArray("lines"); + if (jsonArraylines != null) { + // ensure the json data is an array + if (!jsonObj.get("lines").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `lines` to be an array in the JSON string but got `%s`", jsonObj.get("lines").toString())); + } + + // validate the optional field `lines` (array) + for (int i = 0; i < jsonArraylines.size(); i++) { + OrderStatusAsyncNotificationRequestResourceInnerLinesInner.validateJsonElement(jsonArraylines.get(i)); + }; + } + } + if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull()) { + JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); + if (jsonArraylinks != null) { + // ensure the json data is an array + if (!jsonObj.get("links").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + } + + // validate the optional field `links` (array) + for (int i = 0; i < jsonArraylinks.size(); i++) { + OrderStatusAsyncNotificationRequestResourceInnerLinksInner.validateJsonElement(jsonArraylinks.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderStatusAsyncNotificationRequestResourceInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderStatusAsyncNotificationRequestResourceInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderStatusAsyncNotificationRequestResourceInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderStatusAsyncNotificationRequestResourceInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderStatusAsyncNotificationRequestResourceInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderStatusAsyncNotificationRequestResourceInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderStatusAsyncNotificationRequestResourceInner + * @throws IOException if the JSON string is invalid with respect to OrderStatusAsyncNotificationRequestResourceInner + */ + public static OrderStatusAsyncNotificationRequestResourceInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderStatusAsyncNotificationRequestResourceInner.class); + } + + /** + * Convert an instance of OrderStatusAsyncNotificationRequestResourceInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInner.java b/src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInner.java new file mode 100644 index 00000000..57617cbb --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInner.java @@ -0,0 +1,509 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner; +import xiresellers.client.model.OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderStatusAsyncNotificationRequestResourceInnerLinesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderStatusAsyncNotificationRequestResourceInnerLinesInner { + public static final String SERIALIZED_NAME_LINE_NUMBER = "LineNumber"; + @SerializedName(SERIALIZED_NAME_LINE_NUMBER) + private String lineNumber; + + public static final String SERIALIZED_NAME_SUB_ORDER_NUMBER = "subOrderNumber"; + @SerializedName(SERIALIZED_NAME_SUB_ORDER_NUMBER) + private String subOrderNumber; + + public static final String SERIALIZED_NAME_LINE_STATUS = "lineStatus"; + @SerializedName(SERIALIZED_NAME_LINE_STATUS) + private String lineStatus; + + public static final String SERIALIZED_NAME_INGRAM_PART_NUMBER = "ingramPartNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PART_NUMBER) + private String ingramPartNumber; + + public static final String SERIALIZED_NAME_VENDOR_PART_NUMBER = "vendorPartNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_PART_NUMBER) + private String vendorPartNumber; + + public static final String SERIALIZED_NAME_REQUESTED_QUANTITY = "requestedQuantity"; + @SerializedName(SERIALIZED_NAME_REQUESTED_QUANTITY) + private String requestedQuantity; + + public static final String SERIALIZED_NAME_SHIPPED_QUANTITY = "shippedQuantity"; + @SerializedName(SERIALIZED_NAME_SHIPPED_QUANTITY) + private String shippedQuantity; + + public static final String SERIALIZED_NAME_BACKORDERED_QUANTITY = "backorderedQuantity"; + @SerializedName(SERIALIZED_NAME_BACKORDERED_QUANTITY) + private String backorderedQuantity; + + public static final String SERIALIZED_NAME_SHIPMENT_DETAILS = "shipmentDetails"; + @SerializedName(SERIALIZED_NAME_SHIPMENT_DETAILS) + private List shipmentDetails; + + public static final String SERIALIZED_NAME_SERIAL_NUMBER_DETAILS = "serialNumberDetails"; + @SerializedName(SERIALIZED_NAME_SERIAL_NUMBER_DETAILS) + private List serialNumberDetails; + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInner() { + } + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInner lineNumber(String lineNumber) { + this.lineNumber = lineNumber; + return this; + } + + /** + * The Ingram Micro line number for the product + * @return lineNumber + **/ + @javax.annotation.Nullable + public String getLineNumber() { + return lineNumber; + } + + public void setLineNumber(String lineNumber) { + this.lineNumber = lineNumber; + } + + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInner subOrderNumber(String subOrderNumber) { + this.subOrderNumber = subOrderNumber; + return this; + } + + /** + * The sub order number. The two-digit prefix is the warehouse code of the warehouse nearest the reseller. The middle number is the order number. The two-digit suffix is the sub order number. + * @return subOrderNumber + **/ + @javax.annotation.Nullable + public String getSubOrderNumber() { + return subOrderNumber; + } + + public void setSubOrderNumber(String subOrderNumber) { + this.subOrderNumber = subOrderNumber; + } + + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInner lineStatus(String lineStatus) { + this.lineStatus = lineStatus; + return this; + } + + /** + * The status for the line item in the order. One of: Backordered, Open, Shipped + * @return lineStatus + **/ + @javax.annotation.Nullable + public String getLineStatus() { + return lineStatus; + } + + public void setLineStatus(String lineStatus) { + this.lineStatus = lineStatus; + } + + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInner ingramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + return this; + } + + /** + * The Ingram Micro part number for the line item. + * @return ingramPartNumber + **/ + @javax.annotation.Nullable + public String getIngramPartNumber() { + return ingramPartNumber; + } + + public void setIngramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + } + + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInner vendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + return this; + } + + /** + * The vendor part number for the line item. + * @return vendorPartNumber + **/ + @javax.annotation.Nullable + public String getVendorPartNumber() { + return vendorPartNumber; + } + + public void setVendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + } + + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInner requestedQuantity(String requestedQuantity) { + this.requestedQuantity = requestedQuantity; + return this; + } + + /** + * The quantity of the line item requested. + * @return requestedQuantity + **/ + @javax.annotation.Nullable + public String getRequestedQuantity() { + return requestedQuantity; + } + + public void setRequestedQuantity(String requestedQuantity) { + this.requestedQuantity = requestedQuantity; + } + + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInner shippedQuantity(String shippedQuantity) { + this.shippedQuantity = shippedQuantity; + return this; + } + + /** + * The quantity of the line item that has been shipped. + * @return shippedQuantity + **/ + @javax.annotation.Nullable + public String getShippedQuantity() { + return shippedQuantity; + } + + public void setShippedQuantity(String shippedQuantity) { + this.shippedQuantity = shippedQuantity; + } + + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInner backorderedQuantity(String backorderedQuantity) { + this.backorderedQuantity = backorderedQuantity; + return this; + } + + /** + * The quantity of the line item that is backordered. + * @return backorderedQuantity + **/ + @javax.annotation.Nullable + public String getBackorderedQuantity() { + return backorderedQuantity; + } + + public void setBackorderedQuantity(String backorderedQuantity) { + this.backorderedQuantity = backorderedQuantity; + } + + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInner shipmentDetails(List shipmentDetails) { + this.shipmentDetails = shipmentDetails; + return this; + } + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInner addShipmentDetailsItem(OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner shipmentDetailsItem) { + if (this.shipmentDetails == null) { + this.shipmentDetails = new ArrayList<>(); + } + this.shipmentDetails.add(shipmentDetailsItem); + return this; + } + + /** + * Get shipmentDetails + * @return shipmentDetails + **/ + @javax.annotation.Nullable + public List getShipmentDetails() { + return shipmentDetails; + } + + public void setShipmentDetails(List shipmentDetails) { + this.shipmentDetails = shipmentDetails; + } + + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInner serialNumberDetails(List serialNumberDetails) { + this.serialNumberDetails = serialNumberDetails; + return this; + } + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInner addSerialNumberDetailsItem(OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner serialNumberDetailsItem) { + if (this.serialNumberDetails == null) { + this.serialNumberDetails = new ArrayList<>(); + } + this.serialNumberDetails.add(serialNumberDetailsItem); + return this; + } + + /** + * Get serialNumberDetails + * @return serialNumberDetails + **/ + @javax.annotation.Nullable + public List getSerialNumberDetails() { + return serialNumberDetails; + } + + public void setSerialNumberDetails(List serialNumberDetails) { + this.serialNumberDetails = serialNumberDetails; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderStatusAsyncNotificationRequestResourceInnerLinesInner orderStatusAsyncNotificationRequestResourceInnerLinesInner = (OrderStatusAsyncNotificationRequestResourceInnerLinesInner) o; + return Objects.equals(this.lineNumber, orderStatusAsyncNotificationRequestResourceInnerLinesInner.lineNumber) && + Objects.equals(this.subOrderNumber, orderStatusAsyncNotificationRequestResourceInnerLinesInner.subOrderNumber) && + Objects.equals(this.lineStatus, orderStatusAsyncNotificationRequestResourceInnerLinesInner.lineStatus) && + Objects.equals(this.ingramPartNumber, orderStatusAsyncNotificationRequestResourceInnerLinesInner.ingramPartNumber) && + Objects.equals(this.vendorPartNumber, orderStatusAsyncNotificationRequestResourceInnerLinesInner.vendorPartNumber) && + Objects.equals(this.requestedQuantity, orderStatusAsyncNotificationRequestResourceInnerLinesInner.requestedQuantity) && + Objects.equals(this.shippedQuantity, orderStatusAsyncNotificationRequestResourceInnerLinesInner.shippedQuantity) && + Objects.equals(this.backorderedQuantity, orderStatusAsyncNotificationRequestResourceInnerLinesInner.backorderedQuantity) && + Objects.equals(this.shipmentDetails, orderStatusAsyncNotificationRequestResourceInnerLinesInner.shipmentDetails) && + Objects.equals(this.serialNumberDetails, orderStatusAsyncNotificationRequestResourceInnerLinesInner.serialNumberDetails); + } + + @Override + public int hashCode() { + return Objects.hash(lineNumber, subOrderNumber, lineStatus, ingramPartNumber, vendorPartNumber, requestedQuantity, shippedQuantity, backorderedQuantity, shipmentDetails, serialNumberDetails); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderStatusAsyncNotificationRequestResourceInnerLinesInner {\n"); + sb.append(" lineNumber: ").append(toIndentedString(lineNumber)).append("\n"); + sb.append(" subOrderNumber: ").append(toIndentedString(subOrderNumber)).append("\n"); + sb.append(" lineStatus: ").append(toIndentedString(lineStatus)).append("\n"); + sb.append(" ingramPartNumber: ").append(toIndentedString(ingramPartNumber)).append("\n"); + sb.append(" vendorPartNumber: ").append(toIndentedString(vendorPartNumber)).append("\n"); + sb.append(" requestedQuantity: ").append(toIndentedString(requestedQuantity)).append("\n"); + sb.append(" shippedQuantity: ").append(toIndentedString(shippedQuantity)).append("\n"); + sb.append(" backorderedQuantity: ").append(toIndentedString(backorderedQuantity)).append("\n"); + sb.append(" shipmentDetails: ").append(toIndentedString(shipmentDetails)).append("\n"); + sb.append(" serialNumberDetails: ").append(toIndentedString(serialNumberDetails)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("LineNumber"); + openapiFields.add("subOrderNumber"); + openapiFields.add("lineStatus"); + openapiFields.add("ingramPartNumber"); + openapiFields.add("vendorPartNumber"); + openapiFields.add("requestedQuantity"); + openapiFields.add("shippedQuantity"); + openapiFields.add("backorderedQuantity"); + openapiFields.add("shipmentDetails"); + openapiFields.add("serialNumberDetails"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderStatusAsyncNotificationRequestResourceInnerLinesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderStatusAsyncNotificationRequestResourceInnerLinesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderStatusAsyncNotificationRequestResourceInnerLinesInner is not found in the empty JSON string", OrderStatusAsyncNotificationRequestResourceInnerLinesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderStatusAsyncNotificationRequestResourceInnerLinesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderStatusAsyncNotificationRequestResourceInnerLinesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("LineNumber") != null && !jsonObj.get("LineNumber").isJsonNull()) && !jsonObj.get("LineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `LineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("LineNumber").toString())); + } + if ((jsonObj.get("subOrderNumber") != null && !jsonObj.get("subOrderNumber").isJsonNull()) && !jsonObj.get("subOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subOrderNumber").toString())); + } + if ((jsonObj.get("lineStatus") != null && !jsonObj.get("lineStatus").isJsonNull()) && !jsonObj.get("lineStatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lineStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lineStatus").toString())); + } + if ((jsonObj.get("ingramPartNumber") != null && !jsonObj.get("ingramPartNumber").isJsonNull()) && !jsonObj.get("ingramPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPartNumber").toString())); + } + if ((jsonObj.get("vendorPartNumber") != null && !jsonObj.get("vendorPartNumber").isJsonNull()) && !jsonObj.get("vendorPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorPartNumber").toString())); + } + if ((jsonObj.get("requestedQuantity") != null && !jsonObj.get("requestedQuantity").isJsonNull()) && !jsonObj.get("requestedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `requestedQuantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestedQuantity").toString())); + } + if ((jsonObj.get("shippedQuantity") != null && !jsonObj.get("shippedQuantity").isJsonNull()) && !jsonObj.get("shippedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shippedQuantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shippedQuantity").toString())); + } + if ((jsonObj.get("backorderedQuantity") != null && !jsonObj.get("backorderedQuantity").isJsonNull()) && !jsonObj.get("backorderedQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `backorderedQuantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("backorderedQuantity").toString())); + } + if (jsonObj.get("shipmentDetails") != null && !jsonObj.get("shipmentDetails").isJsonNull()) { + JsonArray jsonArrayshipmentDetails = jsonObj.getAsJsonArray("shipmentDetails"); + if (jsonArrayshipmentDetails != null) { + // ensure the json data is an array + if (!jsonObj.get("shipmentDetails").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `shipmentDetails` to be an array in the JSON string but got `%s`", jsonObj.get("shipmentDetails").toString())); + } + + // validate the optional field `shipmentDetails` (array) + for (int i = 0; i < jsonArrayshipmentDetails.size(); i++) { + OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner.validateJsonElement(jsonArrayshipmentDetails.get(i)); + }; + } + } + if (jsonObj.get("serialNumberDetails") != null && !jsonObj.get("serialNumberDetails").isJsonNull()) { + JsonArray jsonArrayserialNumberDetails = jsonObj.getAsJsonArray("serialNumberDetails"); + if (jsonArrayserialNumberDetails != null) { + // ensure the json data is an array + if (!jsonObj.get("serialNumberDetails").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `serialNumberDetails` to be an array in the JSON string but got `%s`", jsonObj.get("serialNumberDetails").toString())); + } + + // validate the optional field `serialNumberDetails` (array) + for (int i = 0; i < jsonArrayserialNumberDetails.size(); i++) { + OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner.validateJsonElement(jsonArrayserialNumberDetails.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderStatusAsyncNotificationRequestResourceInnerLinesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderStatusAsyncNotificationRequestResourceInnerLinesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderStatusAsyncNotificationRequestResourceInnerLinesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderStatusAsyncNotificationRequestResourceInnerLinesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderStatusAsyncNotificationRequestResourceInnerLinesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderStatusAsyncNotificationRequestResourceInnerLinesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderStatusAsyncNotificationRequestResourceInnerLinesInner + * @throws IOException if the JSON string is invalid with respect to OrderStatusAsyncNotificationRequestResourceInnerLinesInner + */ + public static OrderStatusAsyncNotificationRequestResourceInnerLinesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderStatusAsyncNotificationRequestResourceInnerLinesInner.class); + } + + /** + * Convert an instance of OrderStatusAsyncNotificationRequestResourceInnerLinesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner.java b/src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner.java new file mode 100644 index 00000000..91a912db --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner.java @@ -0,0 +1,206 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner { + public static final String SERIALIZED_NAME_SERIAL_NUMBER = "serialNumber"; + @SerializedName(SERIALIZED_NAME_SERIAL_NUMBER) + private String serialNumber; + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner() { + } + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner serialNumber(String serialNumber) { + this.serialNumber = serialNumber; + return this; + } + + /** + * The serial number for the line item. + * @return serialNumber + **/ + @javax.annotation.Nullable + public String getSerialNumber() { + return serialNumber; + } + + public void setSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner orderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner = (OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner) o; + return Objects.equals(this.serialNumber, orderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner.serialNumber); + } + + @Override + public int hashCode() { + return Objects.hash(serialNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner {\n"); + sb.append(" serialNumber: ").append(toIndentedString(serialNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("serialNumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner is not found in the empty JSON string", OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("serialNumber") != null && !jsonObj.get("serialNumber").isJsonNull()) && !jsonObj.get("serialNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `serialNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("serialNumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner + * @throws IOException if the JSON string is invalid with respect to OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner + */ + public static OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner.class); + } + + /** + * Convert an instance of OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner.java b/src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner.java new file mode 100644 index 00000000..3b4a364c --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner.java @@ -0,0 +1,373 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner { + public static final String SERIALIZED_NAME_SHIPMENT_DATE = "shipmentDate"; + @SerializedName(SERIALIZED_NAME_SHIPMENT_DATE) + private String shipmentDate; + + public static final String SERIALIZED_NAME_SHIP_FROM_WAREHOUSE_ID = "shipFromWarehouseId"; + @SerializedName(SERIALIZED_NAME_SHIP_FROM_WAREHOUSE_ID) + private String shipFromWarehouseId; + + public static final String SERIALIZED_NAME_WAREHOUSE_NAME = "warehouseName"; + @SerializedName(SERIALIZED_NAME_WAREHOUSE_NAME) + private String warehouseName; + + public static final String SERIALIZED_NAME_CARRIER_CODE = "carrierCode"; + @SerializedName(SERIALIZED_NAME_CARRIER_CODE) + private String carrierCode; + + public static final String SERIALIZED_NAME_CARRIER_NAME = "carrierName"; + @SerializedName(SERIALIZED_NAME_CARRIER_NAME) + private String carrierName; + + public static final String SERIALIZED_NAME_PACKAGE_DETAILS = "packageDetails"; + @SerializedName(SERIALIZED_NAME_PACKAGE_DETAILS) + private List packageDetails; + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner() { + } + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner shipmentDate(String shipmentDate) { + this.shipmentDate = shipmentDate; + return this; + } + + /** + * The date the line item was shipped. + * @return shipmentDate + **/ + @javax.annotation.Nullable + public String getShipmentDate() { + return shipmentDate; + } + + public void setShipmentDate(String shipmentDate) { + this.shipmentDate = shipmentDate; + } + + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner shipFromWarehouseId(String shipFromWarehouseId) { + this.shipFromWarehouseId = shipFromWarehouseId; + return this; + } + + /** + * The ID of the warehouse the product will ship from. + * @return shipFromWarehouseId + **/ + @javax.annotation.Nullable + public String getShipFromWarehouseId() { + return shipFromWarehouseId; + } + + public void setShipFromWarehouseId(String shipFromWarehouseId) { + this.shipFromWarehouseId = shipFromWarehouseId; + } + + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner warehouseName(String warehouseName) { + this.warehouseName = warehouseName; + return this; + } + + /** + * \"\" + * @return warehouseName + **/ + @javax.annotation.Nullable + public String getWarehouseName() { + return warehouseName; + } + + public void setWarehouseName(String warehouseName) { + this.warehouseName = warehouseName; + } + + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner carrierCode(String carrierCode) { + this.carrierCode = carrierCode; + return this; + } + + /** + * The carrier code for the shipment containing the line item. + * @return carrierCode + **/ + @javax.annotation.Nullable + public String getCarrierCode() { + return carrierCode; + } + + public void setCarrierCode(String carrierCode) { + this.carrierCode = carrierCode; + } + + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner carrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** + * The name of the carrier of the shipment containing the line item. + * @return carrierName + **/ + @javax.annotation.Nullable + public String getCarrierName() { + return carrierName; + } + + public void setCarrierName(String carrierName) { + this.carrierName = carrierName; + } + + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner packageDetails(List packageDetails) { + this.packageDetails = packageDetails; + return this; + } + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner addPackageDetailsItem(OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner packageDetailsItem) { + if (this.packageDetails == null) { + this.packageDetails = new ArrayList<>(); + } + this.packageDetails.add(packageDetailsItem); + return this; + } + + /** + * Get packageDetails + * @return packageDetails + **/ + @javax.annotation.Nullable + public List getPackageDetails() { + return packageDetails; + } + + public void setPackageDetails(List packageDetails) { + this.packageDetails = packageDetails; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner orderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner = (OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner) o; + return Objects.equals(this.shipmentDate, orderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner.shipmentDate) && + Objects.equals(this.shipFromWarehouseId, orderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner.shipFromWarehouseId) && + Objects.equals(this.warehouseName, orderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner.warehouseName) && + Objects.equals(this.carrierCode, orderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner.carrierCode) && + Objects.equals(this.carrierName, orderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner.carrierName) && + Objects.equals(this.packageDetails, orderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner.packageDetails); + } + + @Override + public int hashCode() { + return Objects.hash(shipmentDate, shipFromWarehouseId, warehouseName, carrierCode, carrierName, packageDetails); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner {\n"); + sb.append(" shipmentDate: ").append(toIndentedString(shipmentDate)).append("\n"); + sb.append(" shipFromWarehouseId: ").append(toIndentedString(shipFromWarehouseId)).append("\n"); + sb.append(" warehouseName: ").append(toIndentedString(warehouseName)).append("\n"); + sb.append(" carrierCode: ").append(toIndentedString(carrierCode)).append("\n"); + sb.append(" carrierName: ").append(toIndentedString(carrierName)).append("\n"); + sb.append(" packageDetails: ").append(toIndentedString(packageDetails)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("shipmentDate"); + openapiFields.add("shipFromWarehouseId"); + openapiFields.add("warehouseName"); + openapiFields.add("carrierCode"); + openapiFields.add("carrierName"); + openapiFields.add("packageDetails"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner is not found in the empty JSON string", OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("shipmentDate") != null && !jsonObj.get("shipmentDate").isJsonNull()) && !jsonObj.get("shipmentDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shipmentDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shipmentDate").toString())); + } + if ((jsonObj.get("shipFromWarehouseId") != null && !jsonObj.get("shipFromWarehouseId").isJsonNull()) && !jsonObj.get("shipFromWarehouseId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shipFromWarehouseId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shipFromWarehouseId").toString())); + } + if ((jsonObj.get("warehouseName") != null && !jsonObj.get("warehouseName").isJsonNull()) && !jsonObj.get("warehouseName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `warehouseName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("warehouseName").toString())); + } + if ((jsonObj.get("carrierCode") != null && !jsonObj.get("carrierCode").isJsonNull()) && !jsonObj.get("carrierCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `carrierCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierCode").toString())); + } + if ((jsonObj.get("carrierName") != null && !jsonObj.get("carrierName").isJsonNull()) && !jsonObj.get("carrierName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `carrierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierName").toString())); + } + if (jsonObj.get("packageDetails") != null && !jsonObj.get("packageDetails").isJsonNull()) { + JsonArray jsonArraypackageDetails = jsonObj.getAsJsonArray("packageDetails"); + if (jsonArraypackageDetails != null) { + // ensure the json data is an array + if (!jsonObj.get("packageDetails").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `packageDetails` to be an array in the JSON string but got `%s`", jsonObj.get("packageDetails").toString())); + } + + // validate the optional field `packageDetails` (array) + for (int i = 0; i < jsonArraypackageDetails.size(); i++) { + OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner.validateJsonElement(jsonArraypackageDetails.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner + * @throws IOException if the JSON string is invalid with respect to OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner + */ + public static OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner.class); + } + + /** + * Convert an instance of OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner.java b/src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner.java new file mode 100644 index 00000000..6a71e72a --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner { + public static final String SERIALIZED_NAME_CARTON_NUMBER = "cartonNumber"; + @SerializedName(SERIALIZED_NAME_CARTON_NUMBER) + private String cartonNumber; + + public static final String SERIALIZED_NAME_QUANTITY_INBOX = "quantityInbox"; + @SerializedName(SERIALIZED_NAME_QUANTITY_INBOX) + private String quantityInbox; + + public static final String SERIALIZED_NAME_TRACKING_NUMBER = "trackingNumber"; + @SerializedName(SERIALIZED_NAME_TRACKING_NUMBER) + private String trackingNumber; + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner() { + } + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner cartonNumber(String cartonNumber) { + this.cartonNumber = cartonNumber; + return this; + } + + /** + * The shipment carton number that contains the line item. + * @return cartonNumber + **/ + @javax.annotation.Nullable + public String getCartonNumber() { + return cartonNumber; + } + + public void setCartonNumber(String cartonNumber) { + this.cartonNumber = cartonNumber; + } + + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner quantityInbox(String quantityInbox) { + this.quantityInbox = quantityInbox; + return this; + } + + /** + * The quantity of line items in the box. + * @return quantityInbox + **/ + @javax.annotation.Nullable + public String getQuantityInbox() { + return quantityInbox; + } + + public void setQuantityInbox(String quantityInbox) { + this.quantityInbox = quantityInbox; + } + + + public OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner trackingNumber(String trackingNumber) { + this.trackingNumber = trackingNumber; + return this; + } + + /** + * The tracking number for the shipment containing the line item. + * @return trackingNumber + **/ + @javax.annotation.Nullable + public String getTrackingNumber() { + return trackingNumber; + } + + public void setTrackingNumber(String trackingNumber) { + this.trackingNumber = trackingNumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner orderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner = (OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner) o; + return Objects.equals(this.cartonNumber, orderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner.cartonNumber) && + Objects.equals(this.quantityInbox, orderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner.quantityInbox) && + Objects.equals(this.trackingNumber, orderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner.trackingNumber); + } + + @Override + public int hashCode() { + return Objects.hash(cartonNumber, quantityInbox, trackingNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner {\n"); + sb.append(" cartonNumber: ").append(toIndentedString(cartonNumber)).append("\n"); + sb.append(" quantityInbox: ").append(toIndentedString(quantityInbox)).append("\n"); + sb.append(" trackingNumber: ").append(toIndentedString(trackingNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("cartonNumber"); + openapiFields.add("quantityInbox"); + openapiFields.add("trackingNumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner is not found in the empty JSON string", OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("cartonNumber") != null && !jsonObj.get("cartonNumber").isJsonNull()) && !jsonObj.get("cartonNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cartonNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cartonNumber").toString())); + } + if ((jsonObj.get("quantityInbox") != null && !jsonObj.get("quantityInbox").isJsonNull()) && !jsonObj.get("quantityInbox").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quantityInbox` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quantityInbox").toString())); + } + if ((jsonObj.get("trackingNumber") != null && !jsonObj.get("trackingNumber").isJsonNull()) && !jsonObj.get("trackingNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `trackingNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("trackingNumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner + * @throws IOException if the JSON string is invalid with respect to OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner + */ + public static OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner.class); + } + + /** + * Convert an instance of OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinksInner.java b/src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinksInner.java new file mode 100644 index 00000000..4f912f4f --- /dev/null +++ b/src/main/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinksInner.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * OrderStatusAsyncNotificationRequestResourceInnerLinksInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class OrderStatusAsyncNotificationRequestResourceInnerLinksInner { + public static final String SERIALIZED_NAME_TOPIC = "topic"; + @SerializedName(SERIALIZED_NAME_TOPIC) + private String topic; + + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + private String href; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public OrderStatusAsyncNotificationRequestResourceInnerLinksInner() { + } + + public OrderStatusAsyncNotificationRequestResourceInnerLinksInner topic(String topic) { + this.topic = topic; + return this; + } + + /** + * Provides the details of the orders. + * @return topic + **/ + @javax.annotation.Nullable + public String getTopic() { + return topic; + } + + public void setTopic(String topic) { + this.topic = topic; + } + + + public OrderStatusAsyncNotificationRequestResourceInnerLinksInner href(String href) { + this.href = href; + return this; + } + + /** + * The URL endpoint for accessing the relevant data. + * @return href + **/ + @javax.annotation.Nullable + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + + public OrderStatusAsyncNotificationRequestResourceInnerLinksInner type(String type) { + this.type = type; + return this; + } + + /** + * The type of call that can be made to the href link (GET, POST, Etc.). + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderStatusAsyncNotificationRequestResourceInnerLinksInner orderStatusAsyncNotificationRequestResourceInnerLinksInner = (OrderStatusAsyncNotificationRequestResourceInnerLinksInner) o; + return Objects.equals(this.topic, orderStatusAsyncNotificationRequestResourceInnerLinksInner.topic) && + Objects.equals(this.href, orderStatusAsyncNotificationRequestResourceInnerLinksInner.href) && + Objects.equals(this.type, orderStatusAsyncNotificationRequestResourceInnerLinksInner.type); + } + + @Override + public int hashCode() { + return Objects.hash(topic, href, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderStatusAsyncNotificationRequestResourceInnerLinksInner {\n"); + sb.append(" topic: ").append(toIndentedString(topic)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("topic"); + openapiFields.add("href"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrderStatusAsyncNotificationRequestResourceInnerLinksInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderStatusAsyncNotificationRequestResourceInnerLinksInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrderStatusAsyncNotificationRequestResourceInnerLinksInner is not found in the empty JSON string", OrderStatusAsyncNotificationRequestResourceInnerLinksInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderStatusAsyncNotificationRequestResourceInnerLinksInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderStatusAsyncNotificationRequestResourceInnerLinksInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("topic") != null && !jsonObj.get("topic").isJsonNull()) && !jsonObj.get("topic").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `topic` to be a primitive type in the JSON string but got `%s`", jsonObj.get("topic").toString())); + } + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderStatusAsyncNotificationRequestResourceInnerLinksInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderStatusAsyncNotificationRequestResourceInnerLinksInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrderStatusAsyncNotificationRequestResourceInnerLinksInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderStatusAsyncNotificationRequestResourceInnerLinksInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderStatusAsyncNotificationRequestResourceInnerLinksInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrderStatusAsyncNotificationRequestResourceInnerLinksInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderStatusAsyncNotificationRequestResourceInnerLinksInner + * @throws IOException if the JSON string is invalid with respect to OrderStatusAsyncNotificationRequestResourceInnerLinksInner + */ + public static OrderStatusAsyncNotificationRequestResourceInnerLinksInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderStatusAsyncNotificationRequestResourceInnerLinksInner.class); + } + + /** + * Convert an instance of OrderStatusAsyncNotificationRequestResourceInnerLinksInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PostQuoteToOrderV6400Response.java b/src/main/java/xiresellers/client/model/PostQuoteToOrderV6400Response.java new file mode 100644 index 00000000..975837c4 --- /dev/null +++ b/src/main/java/xiresellers/client/model/PostQuoteToOrderV6400Response.java @@ -0,0 +1,315 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.PostQuoteToOrderV6400ResponseFieldsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * PostQuoteToOrderV6400Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PostQuoteToOrderV6400Response { + public static final String SERIALIZED_NAME_TRACEID = "traceid"; + @SerializedName(SERIALIZED_NAME_TRACEID) + private String traceid; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public static final String SERIALIZED_NAME_FIELDS = "fields"; + @SerializedName(SERIALIZED_NAME_FIELDS) + private List fields; + + public PostQuoteToOrderV6400Response() { + } + + public PostQuoteToOrderV6400Response traceid(String traceid) { + this.traceid = traceid; + return this; + } + + /** + * A unique trace id to identify the issue. + * @return traceid + **/ + @javax.annotation.Nullable + public String getTraceid() { + return traceid; + } + + public void setTraceid(String traceid) { + this.traceid = traceid; + } + + + public PostQuoteToOrderV6400Response type(String type) { + this.type = type; + return this; + } + + /** + * Type of the error message. + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + + public PostQuoteToOrderV6400Response message(String message) { + this.message = message; + return this; + } + + /** + * A detailed error message. + * @return message + **/ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + public PostQuoteToOrderV6400Response fields(List fields) { + this.fields = fields; + return this; + } + + public PostQuoteToOrderV6400Response addFieldsItem(PostQuoteToOrderV6400ResponseFieldsInner fieldsItem) { + if (this.fields == null) { + this.fields = new ArrayList<>(); + } + this.fields.add(fieldsItem); + return this; + } + + /** + * Get fields + * @return fields + **/ + @javax.annotation.Nullable + public List getFields() { + return fields; + } + + public void setFields(List fields) { + this.fields = fields; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostQuoteToOrderV6400Response postQuoteToOrderV6400Response = (PostQuoteToOrderV6400Response) o; + return Objects.equals(this.traceid, postQuoteToOrderV6400Response.traceid) && + Objects.equals(this.type, postQuoteToOrderV6400Response.type) && + Objects.equals(this.message, postQuoteToOrderV6400Response.message) && + Objects.equals(this.fields, postQuoteToOrderV6400Response.fields); + } + + @Override + public int hashCode() { + return Objects.hash(traceid, type, message, fields); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PostQuoteToOrderV6400Response {\n"); + sb.append(" traceid: ").append(toIndentedString(traceid)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" fields: ").append(toIndentedString(fields)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("traceid"); + openapiFields.add("type"); + openapiFields.add("message"); + openapiFields.add("fields"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PostQuoteToOrderV6400Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PostQuoteToOrderV6400Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PostQuoteToOrderV6400Response is not found in the empty JSON string", PostQuoteToOrderV6400Response.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PostQuoteToOrderV6400Response.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PostQuoteToOrderV6400Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("traceid") != null && !jsonObj.get("traceid").isJsonNull()) && !jsonObj.get("traceid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `traceid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("traceid").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + if (jsonObj.get("fields") != null && !jsonObj.get("fields").isJsonNull()) { + JsonArray jsonArrayfields = jsonObj.getAsJsonArray("fields"); + if (jsonArrayfields != null) { + // ensure the json data is an array + if (!jsonObj.get("fields").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `fields` to be an array in the JSON string but got `%s`", jsonObj.get("fields").toString())); + } + + // validate the optional field `fields` (array) + for (int i = 0; i < jsonArrayfields.size(); i++) { + PostQuoteToOrderV6400ResponseFieldsInner.validateJsonElement(jsonArrayfields.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PostQuoteToOrderV6400Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PostQuoteToOrderV6400Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PostQuoteToOrderV6400Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PostQuoteToOrderV6400Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PostQuoteToOrderV6400Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PostQuoteToOrderV6400Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of PostQuoteToOrderV6400Response + * @throws IOException if the JSON string is invalid with respect to PostQuoteToOrderV6400Response + */ + public static PostQuoteToOrderV6400Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PostQuoteToOrderV6400Response.class); + } + + /** + * Convert an instance of PostQuoteToOrderV6400Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PostQuoteToOrderV6400ResponseFieldsInner.java b/src/main/java/xiresellers/client/model/PostQuoteToOrderV6400ResponseFieldsInner.java new file mode 100644 index 00000000..69edbdc0 --- /dev/null +++ b/src/main/java/xiresellers/client/model/PostQuoteToOrderV6400ResponseFieldsInner.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * PostQuoteToOrderV6400ResponseFieldsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PostQuoteToOrderV6400ResponseFieldsInner { + public static final String SERIALIZED_NAME_FIELD = "field"; + @SerializedName(SERIALIZED_NAME_FIELD) + private String field; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private String value; + + public PostQuoteToOrderV6400ResponseFieldsInner() { + } + + public PostQuoteToOrderV6400ResponseFieldsInner field(String field) { + this.field = field; + return this; + } + + /** + * Name of the field. + * @return field + **/ + @javax.annotation.Nullable + public String getField() { + return field; + } + + public void setField(String field) { + this.field = field; + } + + + public PostQuoteToOrderV6400ResponseFieldsInner message(String message) { + this.message = message; + return this; + } + + /** + * A filed level error message. + * @return message + **/ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + public PostQuoteToOrderV6400ResponseFieldsInner value(String value) { + this.value = value; + return this; + } + + /** + * Value of the message. + * @return value + **/ + @javax.annotation.Nullable + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostQuoteToOrderV6400ResponseFieldsInner postQuoteToOrderV6400ResponseFieldsInner = (PostQuoteToOrderV6400ResponseFieldsInner) o; + return Objects.equals(this.field, postQuoteToOrderV6400ResponseFieldsInner.field) && + Objects.equals(this.message, postQuoteToOrderV6400ResponseFieldsInner.message) && + Objects.equals(this.value, postQuoteToOrderV6400ResponseFieldsInner.value); + } + + @Override + public int hashCode() { + return Objects.hash(field, message, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PostQuoteToOrderV6400ResponseFieldsInner {\n"); + sb.append(" field: ").append(toIndentedString(field)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("field"); + openapiFields.add("message"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PostQuoteToOrderV6400ResponseFieldsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PostQuoteToOrderV6400ResponseFieldsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PostQuoteToOrderV6400ResponseFieldsInner is not found in the empty JSON string", PostQuoteToOrderV6400ResponseFieldsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PostQuoteToOrderV6400ResponseFieldsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PostQuoteToOrderV6400ResponseFieldsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("field") != null && !jsonObj.get("field").isJsonNull()) && !jsonObj.get("field").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `field` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field").toString())); + } + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PostQuoteToOrderV6400ResponseFieldsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PostQuoteToOrderV6400ResponseFieldsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PostQuoteToOrderV6400ResponseFieldsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PostQuoteToOrderV6400ResponseFieldsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PostQuoteToOrderV6400ResponseFieldsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PostQuoteToOrderV6400ResponseFieldsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of PostQuoteToOrderV6400ResponseFieldsInner + * @throws IOException if the JSON string is invalid with respect to PostQuoteToOrderV6400ResponseFieldsInner + */ + public static PostQuoteToOrderV6400ResponseFieldsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PostQuoteToOrderV6400ResponseFieldsInner.class); + } + + /** + * Convert an instance of PostQuoteToOrderV6400ResponseFieldsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PostRenewalssearch400Response.java b/src/main/java/xiresellers/client/model/PostRenewalssearch400Response.java new file mode 100644 index 00000000..2130fa04 --- /dev/null +++ b/src/main/java/xiresellers/client/model/PostRenewalssearch400Response.java @@ -0,0 +1,286 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.GetResellerV6ValidateQuote400ResponseFieldsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * PostRenewalssearch400Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PostRenewalssearch400Response { + public static final String SERIALIZED_NAME_TRACEID = "traceid"; + @SerializedName(SERIALIZED_NAME_TRACEID) + private String traceid; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_FIELDS = "fields"; + @SerializedName(SERIALIZED_NAME_FIELDS) + private List fields; + + public PostRenewalssearch400Response() { + } + + public PostRenewalssearch400Response traceid(String traceid) { + this.traceid = traceid; + return this; + } + + /** + * Unique Id to identify error. + * @return traceid + **/ + @javax.annotation.Nullable + public String getTraceid() { + return traceid; + } + + public void setTraceid(String traceid) { + this.traceid = traceid; + } + + + public PostRenewalssearch400Response type(String type) { + this.type = type; + return this; + } + + /** + * Describes the type of the error. + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + + public PostRenewalssearch400Response fields(List fields) { + this.fields = fields; + return this; + } + + public PostRenewalssearch400Response addFieldsItem(GetResellerV6ValidateQuote400ResponseFieldsInner fieldsItem) { + if (this.fields == null) { + this.fields = new ArrayList<>(); + } + this.fields.add(fieldsItem); + return this; + } + + /** + * Get fields + * @return fields + **/ + @javax.annotation.Nullable + public List getFields() { + return fields; + } + + public void setFields(List fields) { + this.fields = fields; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostRenewalssearch400Response postRenewalssearch400Response = (PostRenewalssearch400Response) o; + return Objects.equals(this.traceid, postRenewalssearch400Response.traceid) && + Objects.equals(this.type, postRenewalssearch400Response.type) && + Objects.equals(this.fields, postRenewalssearch400Response.fields); + } + + @Override + public int hashCode() { + return Objects.hash(traceid, type, fields); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PostRenewalssearch400Response {\n"); + sb.append(" traceid: ").append(toIndentedString(traceid)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" fields: ").append(toIndentedString(fields)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("traceid"); + openapiFields.add("type"); + openapiFields.add("fields"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PostRenewalssearch400Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PostRenewalssearch400Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PostRenewalssearch400Response is not found in the empty JSON string", PostRenewalssearch400Response.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PostRenewalssearch400Response.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PostRenewalssearch400Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("traceid") != null && !jsonObj.get("traceid").isJsonNull()) && !jsonObj.get("traceid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `traceid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("traceid").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if (jsonObj.get("fields") != null && !jsonObj.get("fields").isJsonNull()) { + JsonArray jsonArrayfields = jsonObj.getAsJsonArray("fields"); + if (jsonArrayfields != null) { + // ensure the json data is an array + if (!jsonObj.get("fields").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `fields` to be an array in the JSON string but got `%s`", jsonObj.get("fields").toString())); + } + + // validate the optional field `fields` (array) + for (int i = 0; i < jsonArrayfields.size(); i++) { + GetResellerV6ValidateQuote400ResponseFieldsInner.validateJsonElement(jsonArrayfields.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PostRenewalssearch400Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PostRenewalssearch400Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PostRenewalssearch400Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PostRenewalssearch400Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PostRenewalssearch400Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PostRenewalssearch400Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of PostRenewalssearch400Response + * @throws IOException if the JSON string is invalid with respect to PostRenewalssearch400Response + */ + public static PostRenewalssearch400Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PostRenewalssearch400Response.class); + } + + /** + * Convert an instance of PostRenewalssearch400Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequest.java b/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequest.java new file mode 100644 index 00000000..1d7f113e --- /dev/null +++ b/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequest.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.PriceAndAvailabilityRequestServicerequest; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Request object model for the multi sku price and stock API endpoint + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PriceAndAvailabilityRequest { + public static final String SERIALIZED_NAME_SERVICEREQUEST = "servicerequest"; + @SerializedName(SERIALIZED_NAME_SERVICEREQUEST) + private PriceAndAvailabilityRequestServicerequest servicerequest; + + public PriceAndAvailabilityRequest() { + } + + public PriceAndAvailabilityRequest servicerequest(PriceAndAvailabilityRequestServicerequest servicerequest) { + this.servicerequest = servicerequest; + return this; + } + + /** + * Get servicerequest + * @return servicerequest + **/ + @javax.annotation.Nullable + public PriceAndAvailabilityRequestServicerequest getServicerequest() { + return servicerequest; + } + + public void setServicerequest(PriceAndAvailabilityRequestServicerequest servicerequest) { + this.servicerequest = servicerequest; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceAndAvailabilityRequest priceAndAvailabilityRequest = (PriceAndAvailabilityRequest) o; + return Objects.equals(this.servicerequest, priceAndAvailabilityRequest.servicerequest); + } + + @Override + public int hashCode() { + return Objects.hash(servicerequest); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceAndAvailabilityRequest {\n"); + sb.append(" servicerequest: ").append(toIndentedString(servicerequest)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("servicerequest"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PriceAndAvailabilityRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceAndAvailabilityRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PriceAndAvailabilityRequest is not found in the empty JSON string", PriceAndAvailabilityRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceAndAvailabilityRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PriceAndAvailabilityRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `servicerequest` + if (jsonObj.get("servicerequest") != null && !jsonObj.get("servicerequest").isJsonNull()) { + PriceAndAvailabilityRequestServicerequest.validateJsonElement(jsonObj.get("servicerequest")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceAndAvailabilityRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceAndAvailabilityRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceAndAvailabilityRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceAndAvailabilityRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceAndAvailabilityRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceAndAvailabilityRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceAndAvailabilityRequest + * @throws IOException if the JSON string is invalid with respect to PriceAndAvailabilityRequest + */ + public static PriceAndAvailabilityRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceAndAvailabilityRequest.class); + } + + /** + * Convert an instance of PriceAndAvailabilityRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestAdditionalAttributesInner.java b/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestAdditionalAttributesInner.java new file mode 100644 index 00000000..f7776e8a --- /dev/null +++ b/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestAdditionalAttributesInner.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * PriceAndAvailabilityRequestAdditionalAttributesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PriceAndAvailabilityRequestAdditionalAttributesInner { + public static final String SERIALIZED_NAME_ATTRIBUTE_NAME = "attributeName"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_NAME) + private String attributeName; + + public static final String SERIALIZED_NAME_ATTRIBUTE_VALUE = "attributeValue"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_VALUE) + private String attributeValue; + + public PriceAndAvailabilityRequestAdditionalAttributesInner() { + } + + public PriceAndAvailabilityRequestAdditionalAttributesInner attributeName(String attributeName) { + this.attributeName = attributeName; + return this; + } + + /** + * key value pair -key Name. + * @return attributeName + **/ + @javax.annotation.Nullable + public String getAttributeName() { + return attributeName; + } + + public void setAttributeName(String attributeName) { + this.attributeName = attributeName; + } + + + public PriceAndAvailabilityRequestAdditionalAttributesInner attributeValue(String attributeValue) { + this.attributeValue = attributeValue; + return this; + } + + /** + * key value pair -key value. + * @return attributeValue + **/ + @javax.annotation.Nullable + public String getAttributeValue() { + return attributeValue; + } + + public void setAttributeValue(String attributeValue) { + this.attributeValue = attributeValue; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceAndAvailabilityRequestAdditionalAttributesInner priceAndAvailabilityRequestAdditionalAttributesInner = (PriceAndAvailabilityRequestAdditionalAttributesInner) o; + return Objects.equals(this.attributeName, priceAndAvailabilityRequestAdditionalAttributesInner.attributeName) && + Objects.equals(this.attributeValue, priceAndAvailabilityRequestAdditionalAttributesInner.attributeValue); + } + + @Override + public int hashCode() { + return Objects.hash(attributeName, attributeValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceAndAvailabilityRequestAdditionalAttributesInner {\n"); + sb.append(" attributeName: ").append(toIndentedString(attributeName)).append("\n"); + sb.append(" attributeValue: ").append(toIndentedString(attributeValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributeName"); + openapiFields.add("attributeValue"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PriceAndAvailabilityRequestAdditionalAttributesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceAndAvailabilityRequestAdditionalAttributesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PriceAndAvailabilityRequestAdditionalAttributesInner is not found in the empty JSON string", PriceAndAvailabilityRequestAdditionalAttributesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceAndAvailabilityRequestAdditionalAttributesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PriceAndAvailabilityRequestAdditionalAttributesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("attributeName") != null && !jsonObj.get("attributeName").isJsonNull()) && !jsonObj.get("attributeName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeName").toString())); + } + if ((jsonObj.get("attributeValue") != null && !jsonObj.get("attributeValue").isJsonNull()) && !jsonObj.get("attributeValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeValue").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceAndAvailabilityRequestAdditionalAttributesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceAndAvailabilityRequestAdditionalAttributesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceAndAvailabilityRequestAdditionalAttributesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceAndAvailabilityRequestAdditionalAttributesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceAndAvailabilityRequestAdditionalAttributesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceAndAvailabilityRequestAdditionalAttributesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceAndAvailabilityRequestAdditionalAttributesInner + * @throws IOException if the JSON string is invalid with respect to PriceAndAvailabilityRequestAdditionalAttributesInner + */ + public static PriceAndAvailabilityRequestAdditionalAttributesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceAndAvailabilityRequestAdditionalAttributesInner.class); + } + + /** + * Convert an instance of PriceAndAvailabilityRequestAdditionalAttributesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestAvailabilityByWarehouseInner.java b/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestAvailabilityByWarehouseInner.java new file mode 100644 index 00000000..94fdaede --- /dev/null +++ b/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestAvailabilityByWarehouseInner.java @@ -0,0 +1,232 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * PriceAndAvailabilityRequestAvailabilityByWarehouseInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PriceAndAvailabilityRequestAvailabilityByWarehouseInner { + public static final String SERIALIZED_NAME_AVAILABILITY_BY_WAREHOUSE_ID = "availabilityByWarehouseId"; + @SerializedName(SERIALIZED_NAME_AVAILABILITY_BY_WAREHOUSE_ID) + private String availabilityByWarehouseId; + + public static final String SERIALIZED_NAME_AVAILABILITY_FOR_ALL_LOCATION = "availabilityForAllLocation"; + @SerializedName(SERIALIZED_NAME_AVAILABILITY_FOR_ALL_LOCATION) + private Boolean availabilityForAllLocation; + + public PriceAndAvailabilityRequestAvailabilityByWarehouseInner() { + } + + public PriceAndAvailabilityRequestAvailabilityByWarehouseInner availabilityByWarehouseId(String availabilityByWarehouseId) { + this.availabilityByWarehouseId = availabilityByWarehouseId; + return this; + } + + /** + * Plant/warehouse Id of a particular location in order to get just the inventory of that location. + * @return availabilityByWarehouseId + **/ + @javax.annotation.Nullable + public String getAvailabilityByWarehouseId() { + return availabilityByWarehouseId; + } + + public void setAvailabilityByWarehouseId(String availabilityByWarehouseId) { + this.availabilityByWarehouseId = availabilityByWarehouseId; + } + + + public PriceAndAvailabilityRequestAvailabilityByWarehouseInner availabilityForAllLocation(Boolean availabilityForAllLocation) { + this.availabilityForAllLocation = availabilityForAllLocation; + return this; + } + + /** + * Pass boolean value as input, if true the response will contain warehouse location details, if false the response will not hold warehouse location details. By default value is true. + * @return availabilityForAllLocation + **/ + @javax.annotation.Nullable + public Boolean getAvailabilityForAllLocation() { + return availabilityForAllLocation; + } + + public void setAvailabilityForAllLocation(Boolean availabilityForAllLocation) { + this.availabilityForAllLocation = availabilityForAllLocation; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceAndAvailabilityRequestAvailabilityByWarehouseInner priceAndAvailabilityRequestAvailabilityByWarehouseInner = (PriceAndAvailabilityRequestAvailabilityByWarehouseInner) o; + return Objects.equals(this.availabilityByWarehouseId, priceAndAvailabilityRequestAvailabilityByWarehouseInner.availabilityByWarehouseId) && + Objects.equals(this.availabilityForAllLocation, priceAndAvailabilityRequestAvailabilityByWarehouseInner.availabilityForAllLocation); + } + + @Override + public int hashCode() { + return Objects.hash(availabilityByWarehouseId, availabilityForAllLocation); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceAndAvailabilityRequestAvailabilityByWarehouseInner {\n"); + sb.append(" availabilityByWarehouseId: ").append(toIndentedString(availabilityByWarehouseId)).append("\n"); + sb.append(" availabilityForAllLocation: ").append(toIndentedString(availabilityForAllLocation)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("availabilityByWarehouseId"); + openapiFields.add("availabilityForAllLocation"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PriceAndAvailabilityRequestAvailabilityByWarehouseInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceAndAvailabilityRequestAvailabilityByWarehouseInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PriceAndAvailabilityRequestAvailabilityByWarehouseInner is not found in the empty JSON string", PriceAndAvailabilityRequestAvailabilityByWarehouseInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceAndAvailabilityRequestAvailabilityByWarehouseInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PriceAndAvailabilityRequestAvailabilityByWarehouseInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("availabilityByWarehouseId") != null && !jsonObj.get("availabilityByWarehouseId").isJsonNull()) && !jsonObj.get("availabilityByWarehouseId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `availabilityByWarehouseId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("availabilityByWarehouseId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceAndAvailabilityRequestAvailabilityByWarehouseInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceAndAvailabilityRequestAvailabilityByWarehouseInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceAndAvailabilityRequestAvailabilityByWarehouseInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceAndAvailabilityRequestAvailabilityByWarehouseInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceAndAvailabilityRequestAvailabilityByWarehouseInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceAndAvailabilityRequestAvailabilityByWarehouseInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceAndAvailabilityRequestAvailabilityByWarehouseInner + * @throws IOException if the JSON string is invalid with respect to PriceAndAvailabilityRequestAvailabilityByWarehouseInner + */ + public static PriceAndAvailabilityRequestAvailabilityByWarehouseInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceAndAvailabilityRequestAvailabilityByWarehouseInner.class); + } + + /** + * Convert an instance of PriceAndAvailabilityRequestAvailabilityByWarehouseInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestProductsInner.java b/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestProductsInner.java new file mode 100644 index 00000000..5980dc2c --- /dev/null +++ b/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestProductsInner.java @@ -0,0 +1,373 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * PriceAndAvailabilityRequestProductsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PriceAndAvailabilityRequestProductsInner { + public static final String SERIALIZED_NAME_INGRAM_PART_NUMBER = "ingramPartNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PART_NUMBER) + private String ingramPartNumber; + + public static final String SERIALIZED_NAME_VENDOR_PART_NUMBER = "vendorPartNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_PART_NUMBER) + private String vendorPartNumber; + + public static final String SERIALIZED_NAME_CUSTOMER_PART_NUMBER = "customerPartNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_PART_NUMBER) + private String customerPartNumber; + + public static final String SERIALIZED_NAME_UPC = "upc"; + @SerializedName(SERIALIZED_NAME_UPC) + private String upc; + + public static final String SERIALIZED_NAME_QUANTITY_REQUESTED = "quantityRequested"; + @SerializedName(SERIALIZED_NAME_QUANTITY_REQUESTED) + private String quantityRequested; + + public static final String SERIALIZED_NAME_ADDITIONAL_ATTRIBUTES = "additionalAttributes"; + @SerializedName(SERIALIZED_NAME_ADDITIONAL_ATTRIBUTES) + private List additionalAttributes; + + public PriceAndAvailabilityRequestProductsInner() { + } + + public PriceAndAvailabilityRequestProductsInner ingramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + return this; + } + + /** + * Ingram Micro unique part number for the product. + * @return ingramPartNumber + **/ + @javax.annotation.Nullable + public String getIngramPartNumber() { + return ingramPartNumber; + } + + public void setIngramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + } + + + public PriceAndAvailabilityRequestProductsInner vendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + return this; + } + + /** + * Vendor’s part number for the product. + * @return vendorPartNumber + **/ + @javax.annotation.Nullable + public String getVendorPartNumber() { + return vendorPartNumber; + } + + public void setVendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + } + + + public PriceAndAvailabilityRequestProductsInner customerPartNumber(String customerPartNumber) { + this.customerPartNumber = customerPartNumber; + return this; + } + + /** + * Reseller/end-user’s part number for the product. + * @return customerPartNumber + **/ + @javax.annotation.Nullable + public String getCustomerPartNumber() { + return customerPartNumber; + } + + public void setCustomerPartNumber(String customerPartNumber) { + this.customerPartNumber = customerPartNumber; + } + + + public PriceAndAvailabilityRequestProductsInner upc(String upc) { + this.upc = upc; + return this; + } + + /** + * The UPC code for the product. Consists of 12 numeric digits that are uniquely assigned to each trade item. + * @return upc + **/ + @javax.annotation.Nullable + public String getUpc() { + return upc; + } + + public void setUpc(String upc) { + this.upc = upc; + } + + + public PriceAndAvailabilityRequestProductsInner quantityRequested(String quantityRequested) { + this.quantityRequested = quantityRequested; + return this; + } + + /** + * Number of quantity of the Product. + * @return quantityRequested + **/ + @javax.annotation.Nullable + public String getQuantityRequested() { + return quantityRequested; + } + + public void setQuantityRequested(String quantityRequested) { + this.quantityRequested = quantityRequested; + } + + + public PriceAndAvailabilityRequestProductsInner additionalAttributes(List additionalAttributes) { + this.additionalAttributes = additionalAttributes; + return this; + } + + public PriceAndAvailabilityRequestProductsInner addAdditionalAttributesItem(PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner additionalAttributesItem) { + if (this.additionalAttributes == null) { + this.additionalAttributes = new ArrayList<>(); + } + this.additionalAttributes.add(additionalAttributesItem); + return this; + } + + /** + * Get additionalAttributes + * @return additionalAttributes + **/ + @javax.annotation.Nullable + public List getAdditionalAttributes() { + return additionalAttributes; + } + + public void setAdditionalAttributes(List additionalAttributes) { + this.additionalAttributes = additionalAttributes; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceAndAvailabilityRequestProductsInner priceAndAvailabilityRequestProductsInner = (PriceAndAvailabilityRequestProductsInner) o; + return Objects.equals(this.ingramPartNumber, priceAndAvailabilityRequestProductsInner.ingramPartNumber) && + Objects.equals(this.vendorPartNumber, priceAndAvailabilityRequestProductsInner.vendorPartNumber) && + Objects.equals(this.customerPartNumber, priceAndAvailabilityRequestProductsInner.customerPartNumber) && + Objects.equals(this.upc, priceAndAvailabilityRequestProductsInner.upc) && + Objects.equals(this.quantityRequested, priceAndAvailabilityRequestProductsInner.quantityRequested) && + Objects.equals(this.additionalAttributes, priceAndAvailabilityRequestProductsInner.additionalAttributes); + } + + @Override + public int hashCode() { + return Objects.hash(ingramPartNumber, vendorPartNumber, customerPartNumber, upc, quantityRequested, additionalAttributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceAndAvailabilityRequestProductsInner {\n"); + sb.append(" ingramPartNumber: ").append(toIndentedString(ingramPartNumber)).append("\n"); + sb.append(" vendorPartNumber: ").append(toIndentedString(vendorPartNumber)).append("\n"); + sb.append(" customerPartNumber: ").append(toIndentedString(customerPartNumber)).append("\n"); + sb.append(" upc: ").append(toIndentedString(upc)).append("\n"); + sb.append(" quantityRequested: ").append(toIndentedString(quantityRequested)).append("\n"); + sb.append(" additionalAttributes: ").append(toIndentedString(additionalAttributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("ingramPartNumber"); + openapiFields.add("vendorPartNumber"); + openapiFields.add("customerPartNumber"); + openapiFields.add("upc"); + openapiFields.add("quantityRequested"); + openapiFields.add("additionalAttributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PriceAndAvailabilityRequestProductsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceAndAvailabilityRequestProductsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PriceAndAvailabilityRequestProductsInner is not found in the empty JSON string", PriceAndAvailabilityRequestProductsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceAndAvailabilityRequestProductsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PriceAndAvailabilityRequestProductsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("ingramPartNumber") != null && !jsonObj.get("ingramPartNumber").isJsonNull()) && !jsonObj.get("ingramPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPartNumber").toString())); + } + if ((jsonObj.get("vendorPartNumber") != null && !jsonObj.get("vendorPartNumber").isJsonNull()) && !jsonObj.get("vendorPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorPartNumber").toString())); + } + if ((jsonObj.get("customerPartNumber") != null && !jsonObj.get("customerPartNumber").isJsonNull()) && !jsonObj.get("customerPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerPartNumber").toString())); + } + if ((jsonObj.get("upc") != null && !jsonObj.get("upc").isJsonNull()) && !jsonObj.get("upc").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `upc` to be a primitive type in the JSON string but got `%s`", jsonObj.get("upc").toString())); + } + if ((jsonObj.get("quantityRequested") != null && !jsonObj.get("quantityRequested").isJsonNull()) && !jsonObj.get("quantityRequested").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quantityRequested` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quantityRequested").toString())); + } + if (jsonObj.get("additionalAttributes") != null && !jsonObj.get("additionalAttributes").isJsonNull()) { + JsonArray jsonArrayadditionalAttributes = jsonObj.getAsJsonArray("additionalAttributes"); + if (jsonArrayadditionalAttributes != null) { + // ensure the json data is an array + if (!jsonObj.get("additionalAttributes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `additionalAttributes` to be an array in the JSON string but got `%s`", jsonObj.get("additionalAttributes").toString())); + } + + // validate the optional field `additionalAttributes` (array) + for (int i = 0; i < jsonArrayadditionalAttributes.size(); i++) { + PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner.validateJsonElement(jsonArrayadditionalAttributes.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceAndAvailabilityRequestProductsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceAndAvailabilityRequestProductsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceAndAvailabilityRequestProductsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceAndAvailabilityRequestProductsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceAndAvailabilityRequestProductsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceAndAvailabilityRequestProductsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceAndAvailabilityRequestProductsInner + * @throws IOException if the JSON string is invalid with respect to PriceAndAvailabilityRequestProductsInner + */ + public static PriceAndAvailabilityRequestProductsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceAndAvailabilityRequestProductsInner.class); + } + + /** + * Convert an instance of PriceAndAvailabilityRequestProductsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner.java b/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner.java new file mode 100644 index 00000000..56d11e5b --- /dev/null +++ b/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner { + public static final String SERIALIZED_NAME_ATTRIBUTE_NAME = "attributeName"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_NAME) + private String attributeName; + + public static final String SERIALIZED_NAME_ATTRIBUTE_VALUE = "attributeValue"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_VALUE) + private String attributeValue; + + public PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner() { + } + + public PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner attributeName(String attributeName) { + this.attributeName = attributeName; + return this; + } + + /** + * governmentprogramcode: Special Discount details will be provided based on the governmentprogramcode if available. shiptostatebrazil: Attribute Specific to Brazil. shipfrombranchnumber: If provided, displays only the availability of the specified branch number. + * @return attributeName + **/ + @javax.annotation.Nullable + public String getAttributeName() { + return attributeName; + } + + public void setAttributeName(String attributeName) { + this.attributeName = attributeName; + } + + + public PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner attributeValue(String attributeValue) { + this.attributeValue = attributeValue; + return this; + } + + /** + * key value pair -key value. + * @return attributeValue + **/ + @javax.annotation.Nullable + public String getAttributeValue() { + return attributeValue; + } + + public void setAttributeValue(String attributeValue) { + this.attributeValue = attributeValue; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner priceAndAvailabilityRequestProductsInnerAdditionalAttributesInner = (PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner) o; + return Objects.equals(this.attributeName, priceAndAvailabilityRequestProductsInnerAdditionalAttributesInner.attributeName) && + Objects.equals(this.attributeValue, priceAndAvailabilityRequestProductsInnerAdditionalAttributesInner.attributeValue); + } + + @Override + public int hashCode() { + return Objects.hash(attributeName, attributeValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner {\n"); + sb.append(" attributeName: ").append(toIndentedString(attributeName)).append("\n"); + sb.append(" attributeValue: ").append(toIndentedString(attributeValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributeName"); + openapiFields.add("attributeValue"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner is not found in the empty JSON string", PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("attributeName") != null && !jsonObj.get("attributeName").isJsonNull()) && !jsonObj.get("attributeName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeName").toString())); + } + if ((jsonObj.get("attributeValue") != null && !jsonObj.get("attributeValue").isJsonNull()) && !jsonObj.get("attributeValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeValue").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner + * @throws IOException if the JSON string is invalid with respect to PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner + */ + public static PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner.class); + } + + /** + * Convert an instance of PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequest.java b/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequest.java new file mode 100644 index 00000000..0847dae2 --- /dev/null +++ b/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequest.java @@ -0,0 +1,239 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.PriceAndAvailabilityRequestServicerequestPriceandstockrequest; +import xiresellers.client.model.PriceAndAvailabilityRequestServicerequestRequestpreamble; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * PriceAndAvailabilityRequestServicerequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PriceAndAvailabilityRequestServicerequest { + public static final String SERIALIZED_NAME_REQUESTPREAMBLE = "requestpreamble"; + @SerializedName(SERIALIZED_NAME_REQUESTPREAMBLE) + private PriceAndAvailabilityRequestServicerequestRequestpreamble requestpreamble; + + public static final String SERIALIZED_NAME_PRICEANDSTOCKREQUEST = "priceandstockrequest"; + @SerializedName(SERIALIZED_NAME_PRICEANDSTOCKREQUEST) + private PriceAndAvailabilityRequestServicerequestPriceandstockrequest priceandstockrequest; + + public PriceAndAvailabilityRequestServicerequest() { + } + + public PriceAndAvailabilityRequestServicerequest requestpreamble(PriceAndAvailabilityRequestServicerequestRequestpreamble requestpreamble) { + this.requestpreamble = requestpreamble; + return this; + } + + /** + * Get requestpreamble + * @return requestpreamble + **/ + @javax.annotation.Nullable + public PriceAndAvailabilityRequestServicerequestRequestpreamble getRequestpreamble() { + return requestpreamble; + } + + public void setRequestpreamble(PriceAndAvailabilityRequestServicerequestRequestpreamble requestpreamble) { + this.requestpreamble = requestpreamble; + } + + + public PriceAndAvailabilityRequestServicerequest priceandstockrequest(PriceAndAvailabilityRequestServicerequestPriceandstockrequest priceandstockrequest) { + this.priceandstockrequest = priceandstockrequest; + return this; + } + + /** + * Get priceandstockrequest + * @return priceandstockrequest + **/ + @javax.annotation.Nullable + public PriceAndAvailabilityRequestServicerequestPriceandstockrequest getPriceandstockrequest() { + return priceandstockrequest; + } + + public void setPriceandstockrequest(PriceAndAvailabilityRequestServicerequestPriceandstockrequest priceandstockrequest) { + this.priceandstockrequest = priceandstockrequest; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceAndAvailabilityRequestServicerequest priceAndAvailabilityRequestServicerequest = (PriceAndAvailabilityRequestServicerequest) o; + return Objects.equals(this.requestpreamble, priceAndAvailabilityRequestServicerequest.requestpreamble) && + Objects.equals(this.priceandstockrequest, priceAndAvailabilityRequestServicerequest.priceandstockrequest); + } + + @Override + public int hashCode() { + return Objects.hash(requestpreamble, priceandstockrequest); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceAndAvailabilityRequestServicerequest {\n"); + sb.append(" requestpreamble: ").append(toIndentedString(requestpreamble)).append("\n"); + sb.append(" priceandstockrequest: ").append(toIndentedString(priceandstockrequest)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("requestpreamble"); + openapiFields.add("priceandstockrequest"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PriceAndAvailabilityRequestServicerequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceAndAvailabilityRequestServicerequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PriceAndAvailabilityRequestServicerequest is not found in the empty JSON string", PriceAndAvailabilityRequestServicerequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceAndAvailabilityRequestServicerequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PriceAndAvailabilityRequestServicerequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `requestpreamble` + if (jsonObj.get("requestpreamble") != null && !jsonObj.get("requestpreamble").isJsonNull()) { + PriceAndAvailabilityRequestServicerequestRequestpreamble.validateJsonElement(jsonObj.get("requestpreamble")); + } + // validate the optional field `priceandstockrequest` + if (jsonObj.get("priceandstockrequest") != null && !jsonObj.get("priceandstockrequest").isJsonNull()) { + PriceAndAvailabilityRequestServicerequestPriceandstockrequest.validateJsonElement(jsonObj.get("priceandstockrequest")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceAndAvailabilityRequestServicerequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceAndAvailabilityRequestServicerequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceAndAvailabilityRequestServicerequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceAndAvailabilityRequestServicerequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceAndAvailabilityRequestServicerequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceAndAvailabilityRequestServicerequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceAndAvailabilityRequestServicerequest + * @throws IOException if the JSON string is invalid with respect to PriceAndAvailabilityRequestServicerequest + */ + public static PriceAndAvailabilityRequestServicerequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceAndAvailabilityRequestServicerequest.class); + } + + /** + * Convert an instance of PriceAndAvailabilityRequestServicerequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestPriceandstockrequest.java b/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestPriceandstockrequest.java new file mode 100644 index 00000000..c48770ec --- /dev/null +++ b/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestPriceandstockrequest.java @@ -0,0 +1,312 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * PriceAndAvailabilityRequestServicerequestPriceandstockrequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PriceAndAvailabilityRequestServicerequestPriceandstockrequest { + public static final String SERIALIZED_NAME_SHOWWAREHOUSEAVAILABILITY = "showwarehouseavailability"; + @SerializedName(SERIALIZED_NAME_SHOWWAREHOUSEAVAILABILITY) + private String showwarehouseavailability; + + public static final String SERIALIZED_NAME_EXTRAVAILABILITYFLAG = "extravailabilityflag"; + @SerializedName(SERIALIZED_NAME_EXTRAVAILABILITYFLAG) + private String extravailabilityflag; + + public static final String SERIALIZED_NAME_INCLUDEALLSYSTEMS = "includeallsystems"; + @SerializedName(SERIALIZED_NAME_INCLUDEALLSYSTEMS) + private Boolean includeallsystems; + + public static final String SERIALIZED_NAME_ITEM = "item"; + @SerializedName(SERIALIZED_NAME_ITEM) + private List item; + + public PriceAndAvailabilityRequestServicerequestPriceandstockrequest() { + } + + public PriceAndAvailabilityRequestServicerequestPriceandstockrequest showwarehouseavailability(String showwarehouseavailability) { + this.showwarehouseavailability = showwarehouseavailability; + return this; + } + + /** + * True/false to show the availability of individual warehouses + * @return showwarehouseavailability + **/ + @javax.annotation.Nullable + public String getShowwarehouseavailability() { + return showwarehouseavailability; + } + + public void setShowwarehouseavailability(String showwarehouseavailability) { + this.showwarehouseavailability = showwarehouseavailability; + } + + + public PriceAndAvailabilityRequestServicerequestPriceandstockrequest extravailabilityflag(String extravailabilityflag) { + this.extravailabilityflag = extravailabilityflag; + return this; + } + + /** + * Y/N to show extra availability flag + * @return extravailabilityflag + **/ + @javax.annotation.Nullable + public String getExtravailabilityflag() { + return extravailabilityflag; + } + + public void setExtravailabilityflag(String extravailabilityflag) { + this.extravailabilityflag = extravailabilityflag; + } + + + public PriceAndAvailabilityRequestServicerequestPriceandstockrequest includeallsystems(Boolean includeallsystems) { + this.includeallsystems = includeallsystems; + return this; + } + + /** + * Flag to indicate if the price and stock information is required for all Ingram Micro systems. + * @return includeallsystems + **/ + @javax.annotation.Nullable + public Boolean getIncludeallsystems() { + return includeallsystems; + } + + public void setIncludeallsystems(Boolean includeallsystems) { + this.includeallsystems = includeallsystems; + } + + + public PriceAndAvailabilityRequestServicerequestPriceandstockrequest item(List item) { + this.item = item; + return this; + } + + public PriceAndAvailabilityRequestServicerequestPriceandstockrequest addItemItem(PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner itemItem) { + if (this.item == null) { + this.item = new ArrayList<>(); + } + this.item.add(itemItem); + return this; + } + + /** + * Get item + * @return item + **/ + @javax.annotation.Nullable + public List getItem() { + return item; + } + + public void setItem(List item) { + this.item = item; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceAndAvailabilityRequestServicerequestPriceandstockrequest priceAndAvailabilityRequestServicerequestPriceandstockrequest = (PriceAndAvailabilityRequestServicerequestPriceandstockrequest) o; + return Objects.equals(this.showwarehouseavailability, priceAndAvailabilityRequestServicerequestPriceandstockrequest.showwarehouseavailability) && + Objects.equals(this.extravailabilityflag, priceAndAvailabilityRequestServicerequestPriceandstockrequest.extravailabilityflag) && + Objects.equals(this.includeallsystems, priceAndAvailabilityRequestServicerequestPriceandstockrequest.includeallsystems) && + Objects.equals(this.item, priceAndAvailabilityRequestServicerequestPriceandstockrequest.item); + } + + @Override + public int hashCode() { + return Objects.hash(showwarehouseavailability, extravailabilityflag, includeallsystems, item); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceAndAvailabilityRequestServicerequestPriceandstockrequest {\n"); + sb.append(" showwarehouseavailability: ").append(toIndentedString(showwarehouseavailability)).append("\n"); + sb.append(" extravailabilityflag: ").append(toIndentedString(extravailabilityflag)).append("\n"); + sb.append(" includeallsystems: ").append(toIndentedString(includeallsystems)).append("\n"); + sb.append(" item: ").append(toIndentedString(item)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("showwarehouseavailability"); + openapiFields.add("extravailabilityflag"); + openapiFields.add("includeallsystems"); + openapiFields.add("item"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PriceAndAvailabilityRequestServicerequestPriceandstockrequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceAndAvailabilityRequestServicerequestPriceandstockrequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PriceAndAvailabilityRequestServicerequestPriceandstockrequest is not found in the empty JSON string", PriceAndAvailabilityRequestServicerequestPriceandstockrequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceAndAvailabilityRequestServicerequestPriceandstockrequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PriceAndAvailabilityRequestServicerequestPriceandstockrequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("showwarehouseavailability") != null && !jsonObj.get("showwarehouseavailability").isJsonNull()) && !jsonObj.get("showwarehouseavailability").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `showwarehouseavailability` to be a primitive type in the JSON string but got `%s`", jsonObj.get("showwarehouseavailability").toString())); + } + if ((jsonObj.get("extravailabilityflag") != null && !jsonObj.get("extravailabilityflag").isJsonNull()) && !jsonObj.get("extravailabilityflag").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `extravailabilityflag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("extravailabilityflag").toString())); + } + if (jsonObj.get("item") != null && !jsonObj.get("item").isJsonNull()) { + JsonArray jsonArrayitem = jsonObj.getAsJsonArray("item"); + if (jsonArrayitem != null) { + // ensure the json data is an array + if (!jsonObj.get("item").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `item` to be an array in the JSON string but got `%s`", jsonObj.get("item").toString())); + } + + // validate the optional field `item` (array) + for (int i = 0; i < jsonArrayitem.size(); i++) { + PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.validateJsonElement(jsonArrayitem.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceAndAvailabilityRequestServicerequestPriceandstockrequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceAndAvailabilityRequestServicerequestPriceandstockrequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceAndAvailabilityRequestServicerequestPriceandstockrequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceAndAvailabilityRequestServicerequestPriceandstockrequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceAndAvailabilityRequestServicerequestPriceandstockrequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceAndAvailabilityRequestServicerequestPriceandstockrequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceAndAvailabilityRequestServicerequestPriceandstockrequest + * @throws IOException if the JSON string is invalid with respect to PriceAndAvailabilityRequestServicerequestPriceandstockrequest + */ + public static PriceAndAvailabilityRequestServicerequestPriceandstockrequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceAndAvailabilityRequestServicerequestPriceandstockrequest.class); + } + + /** + * Convert an instance of PriceAndAvailabilityRequestServicerequestPriceandstockrequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.java b/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.java new file mode 100644 index 00000000..97c9dd6e --- /dev/null +++ b/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.java @@ -0,0 +1,531 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner { + public static final String SERIALIZED_NAME_INDEX = "index"; + @SerializedName(SERIALIZED_NAME_INDEX) + private Integer index; + + public static final String SERIALIZED_NAME_INGRAMPARTNUMBER = "ingrampartnumber"; + @SerializedName(SERIALIZED_NAME_INGRAMPARTNUMBER) + private String ingrampartnumber; + + public static final String SERIALIZED_NAME_VENDORPARTNUMBER = "vendorpartnumber"; + @SerializedName(SERIALIZED_NAME_VENDORPARTNUMBER) + private String vendorpartnumber; + + public static final String SERIALIZED_NAME_UPC = "upc"; + @SerializedName(SERIALIZED_NAME_UPC) + private String upc; + + public static final String SERIALIZED_NAME_CUSTOMERPARTNUMBER = "customerpartnumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMERPARTNUMBER) + private String customerpartnumber; + + public static final String SERIALIZED_NAME_WAREHOUSEIDLIST = "warehouseidlist"; + @SerializedName(SERIALIZED_NAME_WAREHOUSEIDLIST) + private List warehouseidlist; + + public static final String SERIALIZED_NAME_EXTENDEDVENDORPARTNUMBER = "extendedvendorpartnumber"; + @SerializedName(SERIALIZED_NAME_EXTENDEDVENDORPARTNUMBER) + private String extendedvendorpartnumber; + + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + @SerializedName(SERIALIZED_NAME_QUANTITY) + private BigDecimal quantity; + + public static final String SERIALIZED_NAME_ENDUSERID = "enduserid"; + @SerializedName(SERIALIZED_NAME_ENDUSERID) + private String enduserid; + + public static final String SERIALIZED_NAME_GOVTPROGRAMTYPE = "govtprogramtype"; + @SerializedName(SERIALIZED_NAME_GOVTPROGRAMTYPE) + private String govtprogramtype; + + public static final String SERIALIZED_NAME_GOVTENDUSERTYPE = "govtendusertype"; + @SerializedName(SERIALIZED_NAME_GOVTENDUSERTYPE) + private String govtendusertype; + + public static final String SERIALIZED_NAME_SPECIALBIDNUMBER = "specialbidnumber"; + @SerializedName(SERIALIZED_NAME_SPECIALBIDNUMBER) + private String specialbidnumber; + + public PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner() { + } + + public PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner index(Integer index) { + this.index = index; + return this; + } + + /** + * Get index + * @return index + **/ + @javax.annotation.Nullable + public Integer getIndex() { + return index; + } + + public void setIndex(Integer index) { + this.index = index; + } + + + public PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner ingrampartnumber(String ingrampartnumber) { + this.ingrampartnumber = ingrampartnumber; + return this; + } + + /** + * Ingram Micro SKU number + * @return ingrampartnumber + **/ + @javax.annotation.Nullable + public String getIngrampartnumber() { + return ingrampartnumber; + } + + public void setIngrampartnumber(String ingrampartnumber) { + this.ingrampartnumber = ingrampartnumber; + } + + + public PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner vendorpartnumber(String vendorpartnumber) { + this.vendorpartnumber = vendorpartnumber; + return this; + } + + /** + * Vendor/Manufacture Part Number + * @return vendorpartnumber + **/ + @javax.annotation.Nullable + public String getVendorpartnumber() { + return vendorpartnumber; + } + + public void setVendorpartnumber(String vendorpartnumber) { + this.vendorpartnumber = vendorpartnumber; + } + + + public PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner upc(String upc) { + this.upc = upc; + return this; + } + + /** + * Universal Product code + * @return upc + **/ + @javax.annotation.Nullable + public String getUpc() { + return upc; + } + + public void setUpc(String upc) { + this.upc = upc; + } + + + public PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner customerpartnumber(String customerpartnumber) { + this.customerpartnumber = customerpartnumber; + return this; + } + + /** + * Unique identoifier for the customer, needs custom setup. + * @return customerpartnumber + **/ + @javax.annotation.Nullable + public String getCustomerpartnumber() { + return customerpartnumber; + } + + public void setCustomerpartnumber(String customerpartnumber) { + this.customerpartnumber = customerpartnumber; + } + + + public PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner warehouseidlist(List warehouseidlist) { + this.warehouseidlist = warehouseidlist; + return this; + } + + public PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner addWarehouseidlistItem(String warehouseidlistItem) { + if (this.warehouseidlist == null) { + this.warehouseidlist = new ArrayList<>(); + } + this.warehouseidlist.add(warehouseidlistItem); + return this; + } + + /** + * Unique identity for Ingram Micro warehouses against which stock details are returned. + * @return warehouseidlist + **/ + @javax.annotation.Nullable + public List getWarehouseidlist() { + return warehouseidlist; + } + + public void setWarehouseidlist(List warehouseidlist) { + this.warehouseidlist = warehouseidlist; + } + + + public PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner extendedvendorpartnumber(String extendedvendorpartnumber) { + this.extendedvendorpartnumber = extendedvendorpartnumber; + return this; + } + + /** + * Get extendedvendorpartnumber + * @return extendedvendorpartnumber + **/ + @javax.annotation.Nullable + public String getExtendedvendorpartnumber() { + return extendedvendorpartnumber; + } + + public void setExtendedvendorpartnumber(String extendedvendorpartnumber) { + this.extendedvendorpartnumber = extendedvendorpartnumber; + } + + + public PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner quantity(BigDecimal quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + **/ + @javax.annotation.Nullable + public BigDecimal getQuantity() { + return quantity; + } + + public void setQuantity(BigDecimal quantity) { + this.quantity = quantity; + } + + + public PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner enduserid(String enduserid) { + this.enduserid = enduserid; + return this; + } + + /** + * Get enduserid + * @return enduserid + **/ + @javax.annotation.Nullable + public String getEnduserid() { + return enduserid; + } + + public void setEnduserid(String enduserid) { + this.enduserid = enduserid; + } + + + public PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner govtprogramtype(String govtprogramtype) { + this.govtprogramtype = govtprogramtype; + return this; + } + + /** + * Get govtprogramtype + * @return govtprogramtype + **/ + @javax.annotation.Nullable + public String getGovtprogramtype() { + return govtprogramtype; + } + + public void setGovtprogramtype(String govtprogramtype) { + this.govtprogramtype = govtprogramtype; + } + + + public PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner govtendusertype(String govtendusertype) { + this.govtendusertype = govtendusertype; + return this; + } + + /** + * Get govtendusertype + * @return govtendusertype + **/ + @javax.annotation.Nullable + public String getGovtendusertype() { + return govtendusertype; + } + + public void setGovtendusertype(String govtendusertype) { + this.govtendusertype = govtendusertype; + } + + + public PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner specialbidnumber(String specialbidnumber) { + this.specialbidnumber = specialbidnumber; + return this; + } + + /** + * Get specialbidnumber + * @return specialbidnumber + **/ + @javax.annotation.Nullable + public String getSpecialbidnumber() { + return specialbidnumber; + } + + public void setSpecialbidnumber(String specialbidnumber) { + this.specialbidnumber = specialbidnumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner priceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner = (PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner) o; + return Objects.equals(this.index, priceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.index) && + Objects.equals(this.ingrampartnumber, priceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.ingrampartnumber) && + Objects.equals(this.vendorpartnumber, priceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.vendorpartnumber) && + Objects.equals(this.upc, priceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.upc) && + Objects.equals(this.customerpartnumber, priceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.customerpartnumber) && + Objects.equals(this.warehouseidlist, priceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.warehouseidlist) && + Objects.equals(this.extendedvendorpartnumber, priceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.extendedvendorpartnumber) && + Objects.equals(this.quantity, priceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.quantity) && + Objects.equals(this.enduserid, priceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.enduserid) && + Objects.equals(this.govtprogramtype, priceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.govtprogramtype) && + Objects.equals(this.govtendusertype, priceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.govtendusertype) && + Objects.equals(this.specialbidnumber, priceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.specialbidnumber); + } + + @Override + public int hashCode() { + return Objects.hash(index, ingrampartnumber, vendorpartnumber, upc, customerpartnumber, warehouseidlist, extendedvendorpartnumber, quantity, enduserid, govtprogramtype, govtendusertype, specialbidnumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner {\n"); + sb.append(" index: ").append(toIndentedString(index)).append("\n"); + sb.append(" ingrampartnumber: ").append(toIndentedString(ingrampartnumber)).append("\n"); + sb.append(" vendorpartnumber: ").append(toIndentedString(vendorpartnumber)).append("\n"); + sb.append(" upc: ").append(toIndentedString(upc)).append("\n"); + sb.append(" customerpartnumber: ").append(toIndentedString(customerpartnumber)).append("\n"); + sb.append(" warehouseidlist: ").append(toIndentedString(warehouseidlist)).append("\n"); + sb.append(" extendedvendorpartnumber: ").append(toIndentedString(extendedvendorpartnumber)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" enduserid: ").append(toIndentedString(enduserid)).append("\n"); + sb.append(" govtprogramtype: ").append(toIndentedString(govtprogramtype)).append("\n"); + sb.append(" govtendusertype: ").append(toIndentedString(govtendusertype)).append("\n"); + sb.append(" specialbidnumber: ").append(toIndentedString(specialbidnumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("index"); + openapiFields.add("ingrampartnumber"); + openapiFields.add("vendorpartnumber"); + openapiFields.add("upc"); + openapiFields.add("customerpartnumber"); + openapiFields.add("warehouseidlist"); + openapiFields.add("extendedvendorpartnumber"); + openapiFields.add("quantity"); + openapiFields.add("enduserid"); + openapiFields.add("govtprogramtype"); + openapiFields.add("govtendusertype"); + openapiFields.add("specialbidnumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner is not found in the empty JSON string", PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("ingrampartnumber") != null && !jsonObj.get("ingrampartnumber").isJsonNull()) && !jsonObj.get("ingrampartnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingrampartnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingrampartnumber").toString())); + } + if ((jsonObj.get("vendorpartnumber") != null && !jsonObj.get("vendorpartnumber").isJsonNull()) && !jsonObj.get("vendorpartnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorpartnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorpartnumber").toString())); + } + if ((jsonObj.get("upc") != null && !jsonObj.get("upc").isJsonNull()) && !jsonObj.get("upc").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `upc` to be a primitive type in the JSON string but got `%s`", jsonObj.get("upc").toString())); + } + if ((jsonObj.get("customerpartnumber") != null && !jsonObj.get("customerpartnumber").isJsonNull()) && !jsonObj.get("customerpartnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerpartnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerpartnumber").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("warehouseidlist") != null && !jsonObj.get("warehouseidlist").isJsonNull() && !jsonObj.get("warehouseidlist").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warehouseidlist` to be an array in the JSON string but got `%s`", jsonObj.get("warehouseidlist").toString())); + } + if ((jsonObj.get("extendedvendorpartnumber") != null && !jsonObj.get("extendedvendorpartnumber").isJsonNull()) && !jsonObj.get("extendedvendorpartnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `extendedvendorpartnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("extendedvendorpartnumber").toString())); + } + if ((jsonObj.get("enduserid") != null && !jsonObj.get("enduserid").isJsonNull()) && !jsonObj.get("enduserid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `enduserid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("enduserid").toString())); + } + if ((jsonObj.get("govtprogramtype") != null && !jsonObj.get("govtprogramtype").isJsonNull()) && !jsonObj.get("govtprogramtype").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `govtprogramtype` to be a primitive type in the JSON string but got `%s`", jsonObj.get("govtprogramtype").toString())); + } + if ((jsonObj.get("govtendusertype") != null && !jsonObj.get("govtendusertype").isJsonNull()) && !jsonObj.get("govtendusertype").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `govtendusertype` to be a primitive type in the JSON string but got `%s`", jsonObj.get("govtendusertype").toString())); + } + if ((jsonObj.get("specialbidnumber") != null && !jsonObj.get("specialbidnumber").isJsonNull()) && !jsonObj.get("specialbidnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `specialbidnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("specialbidnumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner + * @throws IOException if the JSON string is invalid with respect to PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner + */ + public static PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner.class); + } + + /** + * Convert an instance of PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestRequestpreamble.java b/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestRequestpreamble.java new file mode 100644 index 00000000..64a1b074 --- /dev/null +++ b/src/main/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestRequestpreamble.java @@ -0,0 +1,244 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * PriceAndAvailabilityRequestServicerequestRequestpreamble + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PriceAndAvailabilityRequestServicerequestRequestpreamble { + public static final String SERIALIZED_NAME_ISOCOUNTRYCODE = "isocountrycode"; + @SerializedName(SERIALIZED_NAME_ISOCOUNTRYCODE) + private String isocountrycode; + + public static final String SERIALIZED_NAME_CUSTOMERNUMBER = "customernumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMERNUMBER) + private String customernumber; + + public PriceAndAvailabilityRequestServicerequestRequestpreamble() { + } + + public PriceAndAvailabilityRequestServicerequestRequestpreamble isocountrycode(String isocountrycode) { + this.isocountrycode = isocountrycode; + return this; + } + + /** + * 2 Digit ISO country code + * @return isocountrycode + **/ + @javax.annotation.Nonnull + public String getIsocountrycode() { + return isocountrycode; + } + + public void setIsocountrycode(String isocountrycode) { + this.isocountrycode = isocountrycode; + } + + + public PriceAndAvailabilityRequestServicerequestRequestpreamble customernumber(String customernumber) { + this.customernumber = customernumber; + return this; + } + + /** + * Your Ingram Micro customer number + * @return customernumber + **/ + @javax.annotation.Nonnull + public String getCustomernumber() { + return customernumber; + } + + public void setCustomernumber(String customernumber) { + this.customernumber = customernumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceAndAvailabilityRequestServicerequestRequestpreamble priceAndAvailabilityRequestServicerequestRequestpreamble = (PriceAndAvailabilityRequestServicerequestRequestpreamble) o; + return Objects.equals(this.isocountrycode, priceAndAvailabilityRequestServicerequestRequestpreamble.isocountrycode) && + Objects.equals(this.customernumber, priceAndAvailabilityRequestServicerequestRequestpreamble.customernumber); + } + + @Override + public int hashCode() { + return Objects.hash(isocountrycode, customernumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceAndAvailabilityRequestServicerequestRequestpreamble {\n"); + sb.append(" isocountrycode: ").append(toIndentedString(isocountrycode)).append("\n"); + sb.append(" customernumber: ").append(toIndentedString(customernumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("isocountrycode"); + openapiFields.add("customernumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("isocountrycode"); + openapiRequiredFields.add("customernumber"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PriceAndAvailabilityRequestServicerequestRequestpreamble + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceAndAvailabilityRequestServicerequestRequestpreamble.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PriceAndAvailabilityRequestServicerequestRequestpreamble is not found in the empty JSON string", PriceAndAvailabilityRequestServicerequestRequestpreamble.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceAndAvailabilityRequestServicerequestRequestpreamble.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PriceAndAvailabilityRequestServicerequestRequestpreamble` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PriceAndAvailabilityRequestServicerequestRequestpreamble.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("isocountrycode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `isocountrycode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isocountrycode").toString())); + } + if (!jsonObj.get("customernumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customernumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customernumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceAndAvailabilityRequestServicerequestRequestpreamble.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceAndAvailabilityRequestServicerequestRequestpreamble' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceAndAvailabilityRequestServicerequestRequestpreamble.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceAndAvailabilityRequestServicerequestRequestpreamble value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceAndAvailabilityRequestServicerequestRequestpreamble read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceAndAvailabilityRequestServicerequestRequestpreamble given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceAndAvailabilityRequestServicerequestRequestpreamble + * @throws IOException if the JSON string is invalid with respect to PriceAndAvailabilityRequestServicerequestRequestpreamble + */ + public static PriceAndAvailabilityRequestServicerequestRequestpreamble fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceAndAvailabilityRequestServicerequestRequestpreamble.class); + } + + /** + * Convert an instance of PriceAndAvailabilityRequestServicerequestRequestpreamble to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponse.java b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponse.java new file mode 100644 index 00000000..21f3bdb2 --- /dev/null +++ b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponse.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.PriceAndAvailabilityResponseServiceresponse; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Response object model for the multi sku price and stock API endpoint + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PriceAndAvailabilityResponse { + public static final String SERIALIZED_NAME_SERVICERESPONSE = "serviceresponse"; + @SerializedName(SERIALIZED_NAME_SERVICERESPONSE) + private PriceAndAvailabilityResponseServiceresponse serviceresponse; + + public PriceAndAvailabilityResponse() { + } + + public PriceAndAvailabilityResponse serviceresponse(PriceAndAvailabilityResponseServiceresponse serviceresponse) { + this.serviceresponse = serviceresponse; + return this; + } + + /** + * Get serviceresponse + * @return serviceresponse + **/ + @javax.annotation.Nullable + public PriceAndAvailabilityResponseServiceresponse getServiceresponse() { + return serviceresponse; + } + + public void setServiceresponse(PriceAndAvailabilityResponseServiceresponse serviceresponse) { + this.serviceresponse = serviceresponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceAndAvailabilityResponse priceAndAvailabilityResponse = (PriceAndAvailabilityResponse) o; + return Objects.equals(this.serviceresponse, priceAndAvailabilityResponse.serviceresponse); + } + + @Override + public int hashCode() { + return Objects.hash(serviceresponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceAndAvailabilityResponse {\n"); + sb.append(" serviceresponse: ").append(toIndentedString(serviceresponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("serviceresponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PriceAndAvailabilityResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceAndAvailabilityResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PriceAndAvailabilityResponse is not found in the empty JSON string", PriceAndAvailabilityResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceAndAvailabilityResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PriceAndAvailabilityResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `serviceresponse` + if (jsonObj.get("serviceresponse") != null && !jsonObj.get("serviceresponse").isJsonNull()) { + PriceAndAvailabilityResponseServiceresponse.validateJsonElement(jsonObj.get("serviceresponse")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceAndAvailabilityResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceAndAvailabilityResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceAndAvailabilityResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceAndAvailabilityResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceAndAvailabilityResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceAndAvailabilityResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceAndAvailabilityResponse + * @throws IOException if the JSON string is invalid with respect to PriceAndAvailabilityResponse + */ + public static PriceAndAvailabilityResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceAndAvailabilityResponse.class); + } + + /** + * Convert an instance of PriceAndAvailabilityResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInner.java b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInner.java new file mode 100644 index 00000000..a42fdab8 --- /dev/null +++ b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInner.java @@ -0,0 +1,1008 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.PriceAndAvailabilityResponseInnerAvailability; +import xiresellers.client.model.PriceAndAvailabilityResponseInnerDiscountsInner; +import xiresellers.client.model.PriceAndAvailabilityResponseInnerPricing; +import xiresellers.client.model.PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner; +import xiresellers.client.model.PriceAndAvailabilityResponseInnerServiceFeesInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * PriceAndAvailabilityResponseInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PriceAndAvailabilityResponseInner { + public static final String SERIALIZED_NAME_PRODUCT_STATUS_CODE = "productStatusCode"; + @SerializedName(SERIALIZED_NAME_PRODUCT_STATUS_CODE) + private String productStatusCode; + + public static final String SERIALIZED_NAME_PRODUCT_STATUS_MESSAGE = "productStatusMessage"; + @SerializedName(SERIALIZED_NAME_PRODUCT_STATUS_MESSAGE) + private String productStatusMessage; + + public static final String SERIALIZED_NAME_INGRAM_PART_NUMBER = "ingramPartNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PART_NUMBER) + private String ingramPartNumber; + + public static final String SERIALIZED_NAME_VENDOR_PART_NUMBER = "vendorPartNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_PART_NUMBER) + private String vendorPartNumber; + + public static final String SERIALIZED_NAME_EXTENDED_VENDOR_PART_NUMBER = "extendedVendorPartNumber"; + @SerializedName(SERIALIZED_NAME_EXTENDED_VENDOR_PART_NUMBER) + private String extendedVendorPartNumber; + + public static final String SERIALIZED_NAME_CUSTOMER_PART_NUMBER = "customerPartNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_PART_NUMBER) + private String customerPartNumber; + + public static final String SERIALIZED_NAME_UPC = "upc"; + @SerializedName(SERIALIZED_NAME_UPC) + private String upc; + + public static final String SERIALIZED_NAME_PART_NUMBER_TYPE = "partNumberType"; + @SerializedName(SERIALIZED_NAME_PART_NUMBER_TYPE) + private String partNumberType; + + public static final String SERIALIZED_NAME_VENDOR_NUMBER = "vendorNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_NUMBER) + private String vendorNumber; + + public static final String SERIALIZED_NAME_VENDOR_NAME = "vendorName"; + @SerializedName(SERIALIZED_NAME_VENDOR_NAME) + private String vendorName; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_PRODUCT_CLASS = "productClass"; + @SerializedName(SERIALIZED_NAME_PRODUCT_CLASS) + private String productClass; + + public static final String SERIALIZED_NAME_UOM = "uom"; + @SerializedName(SERIALIZED_NAME_UOM) + private String uom; + + public static final String SERIALIZED_NAME_PRODUCT_STATUS = "productStatus"; + @SerializedName(SERIALIZED_NAME_PRODUCT_STATUS) + private String productStatus; + + public static final String SERIALIZED_NAME_ACCEPT_BACK_ORDER = "acceptBackOrder"; + @SerializedName(SERIALIZED_NAME_ACCEPT_BACK_ORDER) + private Boolean acceptBackOrder; + + public static final String SERIALIZED_NAME_PRODUCT_AUTHORIZED = "productAuthorized"; + @SerializedName(SERIALIZED_NAME_PRODUCT_AUTHORIZED) + private Boolean productAuthorized; + + public static final String SERIALIZED_NAME_RETURNABLE_PRODUCT = "returnableProduct"; + @SerializedName(SERIALIZED_NAME_RETURNABLE_PRODUCT) + private Boolean returnableProduct; + + public static final String SERIALIZED_NAME_END_USER_INFO_REQUIRED = "endUserInfoRequired"; + @SerializedName(SERIALIZED_NAME_END_USER_INFO_REQUIRED) + private Boolean endUserInfoRequired; + + public static final String SERIALIZED_NAME_GOVT_SPECIAL_PRICE_AVAILABLE = "govtSpecialPriceAvailable"; + @SerializedName(SERIALIZED_NAME_GOVT_SPECIAL_PRICE_AVAILABLE) + private Boolean govtSpecialPriceAvailable; + + public static final String SERIALIZED_NAME_GOVT_PROGRAM_TYPE = "govtProgramType"; + @SerializedName(SERIALIZED_NAME_GOVT_PROGRAM_TYPE) + private String govtProgramType; + + public static final String SERIALIZED_NAME_GOVT_END_USER_TYPE = "govtEndUserType"; + @SerializedName(SERIALIZED_NAME_GOVT_END_USER_TYPE) + private String govtEndUserType; + + public static final String SERIALIZED_NAME_AVAILABILITY = "availability"; + @SerializedName(SERIALIZED_NAME_AVAILABILITY) + private PriceAndAvailabilityResponseInnerAvailability availability; + + public static final String SERIALIZED_NAME_RESERVE_INVENTORY_DETAILS = "reserveInventoryDetails"; + @SerializedName(SERIALIZED_NAME_RESERVE_INVENTORY_DETAILS) + private List reserveInventoryDetails; + + public static final String SERIALIZED_NAME_PRICING = "pricing"; + @SerializedName(SERIALIZED_NAME_PRICING) + private PriceAndAvailabilityResponseInnerPricing pricing; + + public static final String SERIALIZED_NAME_DISCOUNTS = "discounts"; + @SerializedName(SERIALIZED_NAME_DISCOUNTS) + private List discounts; + + public static final String SERIALIZED_NAME_BUNDLE_PART_INDICATOR = "bundlePartIndicator"; + @SerializedName(SERIALIZED_NAME_BUNDLE_PART_INDICATOR) + private Boolean bundlePartIndicator; + + public static final String SERIALIZED_NAME_SERVICE_FEES = "serviceFees"; + @SerializedName(SERIALIZED_NAME_SERVICE_FEES) + private List serviceFees; + + public PriceAndAvailabilityResponseInner() { + } + + public PriceAndAvailabilityResponseInner productStatusCode(String productStatusCode) { + this.productStatusCode = productStatusCode; + return this; + } + + /** + * Codes signifying whether the sku is active or not. + * @return productStatusCode + **/ + @javax.annotation.Nullable + public String getProductStatusCode() { + return productStatusCode; + } + + public void setProductStatusCode(String productStatusCode) { + this.productStatusCode = productStatusCode; + } + + + public PriceAndAvailabilityResponseInner productStatusMessage(String productStatusMessage) { + this.productStatusMessage = productStatusMessage; + return this; + } + + /** + * Message returned saying whether sku is active. + * @return productStatusMessage + **/ + @javax.annotation.Nullable + public String getProductStatusMessage() { + return productStatusMessage; + } + + public void setProductStatusMessage(String productStatusMessage) { + this.productStatusMessage = productStatusMessage; + } + + + public PriceAndAvailabilityResponseInner ingramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + return this; + } + + /** + * Ingram Micro unique part number for the product. + * @return ingramPartNumber + **/ + @javax.annotation.Nullable + public String getIngramPartNumber() { + return ingramPartNumber; + } + + public void setIngramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + } + + + public PriceAndAvailabilityResponseInner vendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + return this; + } + + /** + * Vendor’s part number for the product. + * @return vendorPartNumber + **/ + @javax.annotation.Nullable + public String getVendorPartNumber() { + return vendorPartNumber; + } + + public void setVendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + } + + + public PriceAndAvailabilityResponseInner extendedVendorPartNumber(String extendedVendorPartNumber) { + this.extendedVendorPartNumber = extendedVendorPartNumber; + return this; + } + + /** + * Extended Vendor Part Number. *Currently, this feature is not available in these countries (Mexico, Turkey, New Zealand, Colombia, Chile, Brazil, Peru, Western Sahara). + * @return extendedVendorPartNumber + **/ + @javax.annotation.Nullable + public String getExtendedVendorPartNumber() { + return extendedVendorPartNumber; + } + + public void setExtendedVendorPartNumber(String extendedVendorPartNumber) { + this.extendedVendorPartNumber = extendedVendorPartNumber; + } + + + public PriceAndAvailabilityResponseInner customerPartNumber(String customerPartNumber) { + this.customerPartNumber = customerPartNumber; + return this; + } + + /** + * Reseller / end-user’s part number for the product. + * @return customerPartNumber + **/ + @javax.annotation.Nullable + public String getCustomerPartNumber() { + return customerPartNumber; + } + + public void setCustomerPartNumber(String customerPartNumber) { + this.customerPartNumber = customerPartNumber; + } + + + public PriceAndAvailabilityResponseInner upc(String upc) { + this.upc = upc; + return this; + } + + /** + * The UPC code for the product. Consists of 12 numeric digits that are uniquely assigned to each trade item. + * @return upc + **/ + @javax.annotation.Nullable + public String getUpc() { + return upc; + } + + public void setUpc(String upc) { + this.upc = upc; + } + + + public PriceAndAvailabilityResponseInner partNumberType(String partNumberType) { + this.partNumberType = partNumberType; + return this; + } + + /** + * Number type of the part. + * @return partNumberType + **/ + @javax.annotation.Nullable + public String getPartNumberType() { + return partNumberType; + } + + public void setPartNumberType(String partNumberType) { + this.partNumberType = partNumberType; + } + + + public PriceAndAvailabilityResponseInner vendorNumber(String vendorNumber) { + this.vendorNumber = vendorNumber; + return this; + } + + /** + * Vendor number that identifies the product. + * @return vendorNumber + **/ + @javax.annotation.Nullable + public String getVendorNumber() { + return vendorNumber; + } + + public void setVendorNumber(String vendorNumber) { + this.vendorNumber = vendorNumber; + } + + + public PriceAndAvailabilityResponseInner vendorName(String vendorName) { + this.vendorName = vendorName; + return this; + } + + /** + * Vendor name for the order. + * @return vendorName + **/ + @javax.annotation.Nullable + public String getVendorName() { + return vendorName; + } + + public void setVendorName(String vendorName) { + this.vendorName = vendorName; + } + + + public PriceAndAvailabilityResponseInner description(String description) { + this.description = description; + return this; + } + + /** + * The description given for the product. + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + + public PriceAndAvailabilityResponseInner productClass(String productClass) { + this.productClass = productClass; + return this; + } + + /** + * Indicates whether the product is directly shipped from the vendor’s warehouse or if the product ships from Ingram Micro’s warehouse. Class Codes are Ingram classifications on how skus are stocked A = Product that is stocked usually in all IM warehouses and replenished on a regular basis. B = Product that is stocked in limited IM warehouses and replenished on a regular basis C = Product that is stocked in fewer IM warehouses and replenished on a regular basis. D = Product that Ingram Micro has elected to discontinue. E = Product that will be phased out later, according to the vendor. You may not want to replenish this product, but instead sell down what is in stock. F = Product that we carry for a specific customer or supplier under a contractual agreement. N = New Sku. Classification before first receipt O = Discontinued product to be liquidated S= Order for Specialized Demand (Order to backorder) X= direct ship from Vendor V = product that vendor has elected to discontinue. + * @return productClass + **/ + @javax.annotation.Nullable + public String getProductClass() { + return productClass; + } + + public void setProductClass(String productClass) { + this.productClass = productClass; + } + + + public PriceAndAvailabilityResponseInner uom(String uom) { + this.uom = uom; + return this; + } + + /** + * The description given for the product. + * @return uom + **/ + @javax.annotation.Nullable + public String getUom() { + return uom; + } + + public void setUom(String uom) { + this.uom = uom; + } + + + public PriceAndAvailabilityResponseInner productStatus(String productStatus) { + this.productStatus = productStatus; + return this; + } + + /** + * Status that gives whether the product is Active. + * @return productStatus + **/ + @javax.annotation.Nullable + public String getProductStatus() { + return productStatus; + } + + public void setProductStatus(String productStatus) { + this.productStatus = productStatus; + } + + + public PriceAndAvailabilityResponseInner acceptBackOrder(Boolean acceptBackOrder) { + this.acceptBackOrder = acceptBackOrder; + return this; + } + + /** + * Boolean that indicates if the product accepts backorder. + * @return acceptBackOrder + **/ + @javax.annotation.Nullable + public Boolean getAcceptBackOrder() { + return acceptBackOrder; + } + + public void setAcceptBackOrder(Boolean acceptBackOrder) { + this.acceptBackOrder = acceptBackOrder; + } + + + public PriceAndAvailabilityResponseInner productAuthorized(Boolean productAuthorized) { + this.productAuthorized = productAuthorized; + return this; + } + + /** + * Boolean that indicates whether a product is authorized. + * @return productAuthorized + **/ + @javax.annotation.Nullable + public Boolean getProductAuthorized() { + return productAuthorized; + } + + public void setProductAuthorized(Boolean productAuthorized) { + this.productAuthorized = productAuthorized; + } + + + public PriceAndAvailabilityResponseInner returnableProduct(Boolean returnableProduct) { + this.returnableProduct = returnableProduct; + return this; + } + + /** + * Boolean that indicates if the product can be returned. + * @return returnableProduct + **/ + @javax.annotation.Nullable + public Boolean getReturnableProduct() { + return returnableProduct; + } + + public void setReturnableProduct(Boolean returnableProduct) { + this.returnableProduct = returnableProduct; + } + + + public PriceAndAvailabilityResponseInner endUserInfoRequired(Boolean endUserInfoRequired) { + this.endUserInfoRequired = endUserInfoRequired; + return this; + } + + /** + * Boolean that indicates if end user information is required. + * @return endUserInfoRequired + **/ + @javax.annotation.Nullable + public Boolean getEndUserInfoRequired() { + return endUserInfoRequired; + } + + public void setEndUserInfoRequired(Boolean endUserInfoRequired) { + this.endUserInfoRequired = endUserInfoRequired; + } + + + public PriceAndAvailabilityResponseInner govtSpecialPriceAvailable(Boolean govtSpecialPriceAvailable) { + this.govtSpecialPriceAvailable = govtSpecialPriceAvailable; + return this; + } + + /** + * Boolean that indicates if special pricing is available for the product. + * @return govtSpecialPriceAvailable + **/ + @javax.annotation.Nullable + public Boolean getGovtSpecialPriceAvailable() { + return govtSpecialPriceAvailable; + } + + public void setGovtSpecialPriceAvailable(Boolean govtSpecialPriceAvailable) { + this.govtSpecialPriceAvailable = govtSpecialPriceAvailable; + } + + + public PriceAndAvailabilityResponseInner govtProgramType(String govtProgramType) { + this.govtProgramType = govtProgramType; + return this; + } + + /** + * Program type, “PA” for government orders, “ED” for education order. + * @return govtProgramType + **/ + @javax.annotation.Nullable + public String getGovtProgramType() { + return govtProgramType; + } + + public void setGovtProgramType(String govtProgramType) { + this.govtProgramType = govtProgramType; + } + + + public PriceAndAvailabilityResponseInner govtEndUserType(String govtEndUserType) { + this.govtEndUserType = govtEndUserType; + return this; + } + + /** + * Type of end user of the program. F = Federal, S = State, E = Local, K = K-12 school, and H = Higher Education. + * @return govtEndUserType + **/ + @javax.annotation.Nullable + public String getGovtEndUserType() { + return govtEndUserType; + } + + public void setGovtEndUserType(String govtEndUserType) { + this.govtEndUserType = govtEndUserType; + } + + + public PriceAndAvailabilityResponseInner availability(PriceAndAvailabilityResponseInnerAvailability availability) { + this.availability = availability; + return this; + } + + /** + * Get availability + * @return availability + **/ + @javax.annotation.Nullable + public PriceAndAvailabilityResponseInnerAvailability getAvailability() { + return availability; + } + + public void setAvailability(PriceAndAvailabilityResponseInnerAvailability availability) { + this.availability = availability; + } + + + public PriceAndAvailabilityResponseInner reserveInventoryDetails(List reserveInventoryDetails) { + this.reserveInventoryDetails = reserveInventoryDetails; + return this; + } + + public PriceAndAvailabilityResponseInner addReserveInventoryDetailsItem(PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner reserveInventoryDetailsItem) { + if (this.reserveInventoryDetails == null) { + this.reserveInventoryDetails = new ArrayList<>(); + } + this.reserveInventoryDetails.add(reserveInventoryDetailsItem); + return this; + } + + /** + * Get reserveInventoryDetails + * @return reserveInventoryDetails + **/ + @javax.annotation.Nullable + public List getReserveInventoryDetails() { + return reserveInventoryDetails; + } + + public void setReserveInventoryDetails(List reserveInventoryDetails) { + this.reserveInventoryDetails = reserveInventoryDetails; + } + + + public PriceAndAvailabilityResponseInner pricing(PriceAndAvailabilityResponseInnerPricing pricing) { + this.pricing = pricing; + return this; + } + + /** + * Get pricing + * @return pricing + **/ + @javax.annotation.Nullable + public PriceAndAvailabilityResponseInnerPricing getPricing() { + return pricing; + } + + public void setPricing(PriceAndAvailabilityResponseInnerPricing pricing) { + this.pricing = pricing; + } + + + public PriceAndAvailabilityResponseInner discounts(List discounts) { + this.discounts = discounts; + return this; + } + + public PriceAndAvailabilityResponseInner addDiscountsItem(PriceAndAvailabilityResponseInnerDiscountsInner discountsItem) { + if (this.discounts == null) { + this.discounts = new ArrayList<>(); + } + this.discounts.add(discountsItem); + return this; + } + + /** + * Get discounts + * @return discounts + **/ + @javax.annotation.Nullable + public List getDiscounts() { + return discounts; + } + + public void setDiscounts(List discounts) { + this.discounts = discounts; + } + + + public PriceAndAvailabilityResponseInner bundlePartIndicator(Boolean bundlePartIndicator) { + this.bundlePartIndicator = bundlePartIndicator; + return this; + } + + /** + * True of false value to indicate whether it’s bundle part. *Currently, this feature is not available in these countries (Mexico, Turkey, New Zealand, Colombia, Chile, Brazil, Peru, Western Sahara). + * @return bundlePartIndicator + **/ + @javax.annotation.Nullable + public Boolean getBundlePartIndicator() { + return bundlePartIndicator; + } + + public void setBundlePartIndicator(Boolean bundlePartIndicator) { + this.bundlePartIndicator = bundlePartIndicator; + } + + + public PriceAndAvailabilityResponseInner serviceFees(List serviceFees) { + this.serviceFees = serviceFees; + return this; + } + + public PriceAndAvailabilityResponseInner addServiceFeesItem(PriceAndAvailabilityResponseInnerServiceFeesInner serviceFeesItem) { + if (this.serviceFees == null) { + this.serviceFees = new ArrayList<>(); + } + this.serviceFees.add(serviceFeesItem); + return this; + } + + /** + * *Currently, this feature is not available in these countries (Mexico, Turkey, New Zealand, Colombia, Chile, Brazil, Peru, Western Sahara). + * @return serviceFees + **/ + @javax.annotation.Nullable + public List getServiceFees() { + return serviceFees; + } + + public void setServiceFees(List serviceFees) { + this.serviceFees = serviceFees; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceAndAvailabilityResponseInner priceAndAvailabilityResponseInner = (PriceAndAvailabilityResponseInner) o; + return Objects.equals(this.productStatusCode, priceAndAvailabilityResponseInner.productStatusCode) && + Objects.equals(this.productStatusMessage, priceAndAvailabilityResponseInner.productStatusMessage) && + Objects.equals(this.ingramPartNumber, priceAndAvailabilityResponseInner.ingramPartNumber) && + Objects.equals(this.vendorPartNumber, priceAndAvailabilityResponseInner.vendorPartNumber) && + Objects.equals(this.extendedVendorPartNumber, priceAndAvailabilityResponseInner.extendedVendorPartNumber) && + Objects.equals(this.customerPartNumber, priceAndAvailabilityResponseInner.customerPartNumber) && + Objects.equals(this.upc, priceAndAvailabilityResponseInner.upc) && + Objects.equals(this.partNumberType, priceAndAvailabilityResponseInner.partNumberType) && + Objects.equals(this.vendorNumber, priceAndAvailabilityResponseInner.vendorNumber) && + Objects.equals(this.vendorName, priceAndAvailabilityResponseInner.vendorName) && + Objects.equals(this.description, priceAndAvailabilityResponseInner.description) && + Objects.equals(this.productClass, priceAndAvailabilityResponseInner.productClass) && + Objects.equals(this.uom, priceAndAvailabilityResponseInner.uom) && + Objects.equals(this.productStatus, priceAndAvailabilityResponseInner.productStatus) && + Objects.equals(this.acceptBackOrder, priceAndAvailabilityResponseInner.acceptBackOrder) && + Objects.equals(this.productAuthorized, priceAndAvailabilityResponseInner.productAuthorized) && + Objects.equals(this.returnableProduct, priceAndAvailabilityResponseInner.returnableProduct) && + Objects.equals(this.endUserInfoRequired, priceAndAvailabilityResponseInner.endUserInfoRequired) && + Objects.equals(this.govtSpecialPriceAvailable, priceAndAvailabilityResponseInner.govtSpecialPriceAvailable) && + Objects.equals(this.govtProgramType, priceAndAvailabilityResponseInner.govtProgramType) && + Objects.equals(this.govtEndUserType, priceAndAvailabilityResponseInner.govtEndUserType) && + Objects.equals(this.availability, priceAndAvailabilityResponseInner.availability) && + Objects.equals(this.reserveInventoryDetails, priceAndAvailabilityResponseInner.reserveInventoryDetails) && + Objects.equals(this.pricing, priceAndAvailabilityResponseInner.pricing) && + Objects.equals(this.discounts, priceAndAvailabilityResponseInner.discounts) && + Objects.equals(this.bundlePartIndicator, priceAndAvailabilityResponseInner.bundlePartIndicator) && + Objects.equals(this.serviceFees, priceAndAvailabilityResponseInner.serviceFees); + } + + @Override + public int hashCode() { + return Objects.hash(productStatusCode, productStatusMessage, ingramPartNumber, vendorPartNumber, extendedVendorPartNumber, customerPartNumber, upc, partNumberType, vendorNumber, vendorName, description, productClass, uom, productStatus, acceptBackOrder, productAuthorized, returnableProduct, endUserInfoRequired, govtSpecialPriceAvailable, govtProgramType, govtEndUserType, availability, reserveInventoryDetails, pricing, discounts, bundlePartIndicator, serviceFees); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceAndAvailabilityResponseInner {\n"); + sb.append(" productStatusCode: ").append(toIndentedString(productStatusCode)).append("\n"); + sb.append(" productStatusMessage: ").append(toIndentedString(productStatusMessage)).append("\n"); + sb.append(" ingramPartNumber: ").append(toIndentedString(ingramPartNumber)).append("\n"); + sb.append(" vendorPartNumber: ").append(toIndentedString(vendorPartNumber)).append("\n"); + sb.append(" extendedVendorPartNumber: ").append(toIndentedString(extendedVendorPartNumber)).append("\n"); + sb.append(" customerPartNumber: ").append(toIndentedString(customerPartNumber)).append("\n"); + sb.append(" upc: ").append(toIndentedString(upc)).append("\n"); + sb.append(" partNumberType: ").append(toIndentedString(partNumberType)).append("\n"); + sb.append(" vendorNumber: ").append(toIndentedString(vendorNumber)).append("\n"); + sb.append(" vendorName: ").append(toIndentedString(vendorName)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" productClass: ").append(toIndentedString(productClass)).append("\n"); + sb.append(" uom: ").append(toIndentedString(uom)).append("\n"); + sb.append(" productStatus: ").append(toIndentedString(productStatus)).append("\n"); + sb.append(" acceptBackOrder: ").append(toIndentedString(acceptBackOrder)).append("\n"); + sb.append(" productAuthorized: ").append(toIndentedString(productAuthorized)).append("\n"); + sb.append(" returnableProduct: ").append(toIndentedString(returnableProduct)).append("\n"); + sb.append(" endUserInfoRequired: ").append(toIndentedString(endUserInfoRequired)).append("\n"); + sb.append(" govtSpecialPriceAvailable: ").append(toIndentedString(govtSpecialPriceAvailable)).append("\n"); + sb.append(" govtProgramType: ").append(toIndentedString(govtProgramType)).append("\n"); + sb.append(" govtEndUserType: ").append(toIndentedString(govtEndUserType)).append("\n"); + sb.append(" availability: ").append(toIndentedString(availability)).append("\n"); + sb.append(" reserveInventoryDetails: ").append(toIndentedString(reserveInventoryDetails)).append("\n"); + sb.append(" pricing: ").append(toIndentedString(pricing)).append("\n"); + sb.append(" discounts: ").append(toIndentedString(discounts)).append("\n"); + sb.append(" bundlePartIndicator: ").append(toIndentedString(bundlePartIndicator)).append("\n"); + sb.append(" serviceFees: ").append(toIndentedString(serviceFees)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("productStatusCode"); + openapiFields.add("productStatusMessage"); + openapiFields.add("ingramPartNumber"); + openapiFields.add("vendorPartNumber"); + openapiFields.add("extendedVendorPartNumber"); + openapiFields.add("customerPartNumber"); + openapiFields.add("upc"); + openapiFields.add("partNumberType"); + openapiFields.add("vendorNumber"); + openapiFields.add("vendorName"); + openapiFields.add("description"); + openapiFields.add("productClass"); + openapiFields.add("uom"); + openapiFields.add("productStatus"); + openapiFields.add("acceptBackOrder"); + openapiFields.add("productAuthorized"); + openapiFields.add("returnableProduct"); + openapiFields.add("endUserInfoRequired"); + openapiFields.add("govtSpecialPriceAvailable"); + openapiFields.add("govtProgramType"); + openapiFields.add("govtEndUserType"); + openapiFields.add("availability"); + openapiFields.add("reserveInventoryDetails"); + openapiFields.add("pricing"); + openapiFields.add("discounts"); + openapiFields.add("bundlePartIndicator"); + openapiFields.add("serviceFees"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PriceAndAvailabilityResponseInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceAndAvailabilityResponseInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PriceAndAvailabilityResponseInner is not found in the empty JSON string", PriceAndAvailabilityResponseInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceAndAvailabilityResponseInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PriceAndAvailabilityResponseInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("productStatusCode") != null && !jsonObj.get("productStatusCode").isJsonNull()) && !jsonObj.get("productStatusCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `productStatusCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productStatusCode").toString())); + } + if ((jsonObj.get("productStatusMessage") != null && !jsonObj.get("productStatusMessage").isJsonNull()) && !jsonObj.get("productStatusMessage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `productStatusMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productStatusMessage").toString())); + } + if ((jsonObj.get("ingramPartNumber") != null && !jsonObj.get("ingramPartNumber").isJsonNull()) && !jsonObj.get("ingramPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPartNumber").toString())); + } + if ((jsonObj.get("vendorPartNumber") != null && !jsonObj.get("vendorPartNumber").isJsonNull()) && !jsonObj.get("vendorPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorPartNumber").toString())); + } + if ((jsonObj.get("extendedVendorPartNumber") != null && !jsonObj.get("extendedVendorPartNumber").isJsonNull()) && !jsonObj.get("extendedVendorPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `extendedVendorPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("extendedVendorPartNumber").toString())); + } + if ((jsonObj.get("customerPartNumber") != null && !jsonObj.get("customerPartNumber").isJsonNull()) && !jsonObj.get("customerPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerPartNumber").toString())); + } + if ((jsonObj.get("upc") != null && !jsonObj.get("upc").isJsonNull()) && !jsonObj.get("upc").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `upc` to be a primitive type in the JSON string but got `%s`", jsonObj.get("upc").toString())); + } + if ((jsonObj.get("partNumberType") != null && !jsonObj.get("partNumberType").isJsonNull()) && !jsonObj.get("partNumberType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `partNumberType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("partNumberType").toString())); + } + if ((jsonObj.get("vendorNumber") != null && !jsonObj.get("vendorNumber").isJsonNull()) && !jsonObj.get("vendorNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorNumber").toString())); + } + if ((jsonObj.get("vendorName") != null && !jsonObj.get("vendorName").isJsonNull()) && !jsonObj.get("vendorName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorName").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("productClass") != null && !jsonObj.get("productClass").isJsonNull()) && !jsonObj.get("productClass").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `productClass` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productClass").toString())); + } + if ((jsonObj.get("uom") != null && !jsonObj.get("uom").isJsonNull()) && !jsonObj.get("uom").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `uom` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uom").toString())); + } + if ((jsonObj.get("productStatus") != null && !jsonObj.get("productStatus").isJsonNull()) && !jsonObj.get("productStatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `productStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productStatus").toString())); + } + if ((jsonObj.get("govtProgramType") != null && !jsonObj.get("govtProgramType").isJsonNull()) && !jsonObj.get("govtProgramType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `govtProgramType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("govtProgramType").toString())); + } + if ((jsonObj.get("govtEndUserType") != null && !jsonObj.get("govtEndUserType").isJsonNull()) && !jsonObj.get("govtEndUserType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `govtEndUserType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("govtEndUserType").toString())); + } + // validate the optional field `availability` + if (jsonObj.get("availability") != null && !jsonObj.get("availability").isJsonNull()) { + PriceAndAvailabilityResponseInnerAvailability.validateJsonElement(jsonObj.get("availability")); + } + if (jsonObj.get("reserveInventoryDetails") != null && !jsonObj.get("reserveInventoryDetails").isJsonNull()) { + JsonArray jsonArrayreserveInventoryDetails = jsonObj.getAsJsonArray("reserveInventoryDetails"); + if (jsonArrayreserveInventoryDetails != null) { + // ensure the json data is an array + if (!jsonObj.get("reserveInventoryDetails").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `reserveInventoryDetails` to be an array in the JSON string but got `%s`", jsonObj.get("reserveInventoryDetails").toString())); + } + + // validate the optional field `reserveInventoryDetails` (array) + for (int i = 0; i < jsonArrayreserveInventoryDetails.size(); i++) { + PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner.validateJsonElement(jsonArrayreserveInventoryDetails.get(i)); + }; + } + } + // validate the optional field `pricing` + if (jsonObj.get("pricing") != null && !jsonObj.get("pricing").isJsonNull()) { + PriceAndAvailabilityResponseInnerPricing.validateJsonElement(jsonObj.get("pricing")); + } + if (jsonObj.get("discounts") != null && !jsonObj.get("discounts").isJsonNull()) { + JsonArray jsonArraydiscounts = jsonObj.getAsJsonArray("discounts"); + if (jsonArraydiscounts != null) { + // ensure the json data is an array + if (!jsonObj.get("discounts").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `discounts` to be an array in the JSON string but got `%s`", jsonObj.get("discounts").toString())); + } + + // validate the optional field `discounts` (array) + for (int i = 0; i < jsonArraydiscounts.size(); i++) { + PriceAndAvailabilityResponseInnerDiscountsInner.validateJsonElement(jsonArraydiscounts.get(i)); + }; + } + } + if (jsonObj.get("serviceFees") != null && !jsonObj.get("serviceFees").isJsonNull()) { + JsonArray jsonArrayserviceFees = jsonObj.getAsJsonArray("serviceFees"); + if (jsonArrayserviceFees != null) { + // ensure the json data is an array + if (!jsonObj.get("serviceFees").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `serviceFees` to be an array in the JSON string but got `%s`", jsonObj.get("serviceFees").toString())); + } + + // validate the optional field `serviceFees` (array) + for (int i = 0; i < jsonArrayserviceFees.size(); i++) { + PriceAndAvailabilityResponseInnerServiceFeesInner.validateJsonElement(jsonArrayserviceFees.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceAndAvailabilityResponseInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceAndAvailabilityResponseInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceAndAvailabilityResponseInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceAndAvailabilityResponseInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceAndAvailabilityResponseInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceAndAvailabilityResponseInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceAndAvailabilityResponseInner + * @throws IOException if the JSON string is invalid with respect to PriceAndAvailabilityResponseInner + */ + public static PriceAndAvailabilityResponseInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceAndAvailabilityResponseInner.class); + } + + /** + * Convert an instance of PriceAndAvailabilityResponseInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerAvailability.java b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerAvailability.java new file mode 100644 index 00000000..d2c669ac --- /dev/null +++ b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerAvailability.java @@ -0,0 +1,280 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * PriceAndAvailabilityResponseInnerAvailability + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PriceAndAvailabilityResponseInnerAvailability { + public static final String SERIALIZED_NAME_AVAILABLE = "available"; + @SerializedName(SERIALIZED_NAME_AVAILABLE) + private Boolean available; + + public static final String SERIALIZED_NAME_TOTAL_AVAILABILITY = "totalAvailability"; + @SerializedName(SERIALIZED_NAME_TOTAL_AVAILABILITY) + private Integer totalAvailability; + + public static final String SERIALIZED_NAME_AVAILABILITY_BY_WAREHOUSE = "availabilityByWarehouse"; + @SerializedName(SERIALIZED_NAME_AVAILABILITY_BY_WAREHOUSE) + private List availabilityByWarehouse; + + public PriceAndAvailabilityResponseInnerAvailability() { + } + + public PriceAndAvailabilityResponseInnerAvailability available(Boolean available) { + this.available = available; + return this; + } + + /** + * Boolean that indicates if the product ordered is available + * @return available + **/ + @javax.annotation.Nullable + public Boolean getAvailable() { + return available; + } + + public void setAvailable(Boolean available) { + this.available = available; + } + + + public PriceAndAvailabilityResponseInnerAvailability totalAvailability(Integer totalAvailability) { + this.totalAvailability = totalAvailability; + return this; + } + + /** + * The total amount of available products + * @return totalAvailability + **/ + @javax.annotation.Nullable + public Integer getTotalAvailability() { + return totalAvailability; + } + + public void setTotalAvailability(Integer totalAvailability) { + this.totalAvailability = totalAvailability; + } + + + public PriceAndAvailabilityResponseInnerAvailability availabilityByWarehouse(List availabilityByWarehouse) { + this.availabilityByWarehouse = availabilityByWarehouse; + return this; + } + + public PriceAndAvailabilityResponseInnerAvailability addAvailabilityByWarehouseItem(PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner availabilityByWarehouseItem) { + if (this.availabilityByWarehouse == null) { + this.availabilityByWarehouse = new ArrayList<>(); + } + this.availabilityByWarehouse.add(availabilityByWarehouseItem); + return this; + } + + /** + * Get availabilityByWarehouse + * @return availabilityByWarehouse + **/ + @javax.annotation.Nullable + public List getAvailabilityByWarehouse() { + return availabilityByWarehouse; + } + + public void setAvailabilityByWarehouse(List availabilityByWarehouse) { + this.availabilityByWarehouse = availabilityByWarehouse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceAndAvailabilityResponseInnerAvailability priceAndAvailabilityResponseInnerAvailability = (PriceAndAvailabilityResponseInnerAvailability) o; + return Objects.equals(this.available, priceAndAvailabilityResponseInnerAvailability.available) && + Objects.equals(this.totalAvailability, priceAndAvailabilityResponseInnerAvailability.totalAvailability) && + Objects.equals(this.availabilityByWarehouse, priceAndAvailabilityResponseInnerAvailability.availabilityByWarehouse); + } + + @Override + public int hashCode() { + return Objects.hash(available, totalAvailability, availabilityByWarehouse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceAndAvailabilityResponseInnerAvailability {\n"); + sb.append(" available: ").append(toIndentedString(available)).append("\n"); + sb.append(" totalAvailability: ").append(toIndentedString(totalAvailability)).append("\n"); + sb.append(" availabilityByWarehouse: ").append(toIndentedString(availabilityByWarehouse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("available"); + openapiFields.add("totalAvailability"); + openapiFields.add("availabilityByWarehouse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PriceAndAvailabilityResponseInnerAvailability + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceAndAvailabilityResponseInnerAvailability.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PriceAndAvailabilityResponseInnerAvailability is not found in the empty JSON string", PriceAndAvailabilityResponseInnerAvailability.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceAndAvailabilityResponseInnerAvailability.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PriceAndAvailabilityResponseInnerAvailability` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("availabilityByWarehouse") != null && !jsonObj.get("availabilityByWarehouse").isJsonNull()) { + JsonArray jsonArrayavailabilityByWarehouse = jsonObj.getAsJsonArray("availabilityByWarehouse"); + if (jsonArrayavailabilityByWarehouse != null) { + // ensure the json data is an array + if (!jsonObj.get("availabilityByWarehouse").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `availabilityByWarehouse` to be an array in the JSON string but got `%s`", jsonObj.get("availabilityByWarehouse").toString())); + } + + // validate the optional field `availabilityByWarehouse` (array) + for (int i = 0; i < jsonArrayavailabilityByWarehouse.size(); i++) { + PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner.validateJsonElement(jsonArrayavailabilityByWarehouse.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceAndAvailabilityResponseInnerAvailability.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceAndAvailabilityResponseInnerAvailability' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceAndAvailabilityResponseInnerAvailability.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceAndAvailabilityResponseInnerAvailability value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceAndAvailabilityResponseInnerAvailability read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceAndAvailabilityResponseInnerAvailability given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceAndAvailabilityResponseInnerAvailability + * @throws IOException if the JSON string is invalid with respect to PriceAndAvailabilityResponseInnerAvailability + */ + public static PriceAndAvailabilityResponseInnerAvailability fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceAndAvailabilityResponseInnerAvailability.class); + } + + /** + * Convert an instance of PriceAndAvailabilityResponseInnerAvailability to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner.java b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner.java new file mode 100644 index 00000000..5f94239f --- /dev/null +++ b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner.java @@ -0,0 +1,367 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner { + public static final String SERIALIZED_NAME_LOCATION = "location"; + @SerializedName(SERIALIZED_NAME_LOCATION) + private String location; + + public static final String SERIALIZED_NAME_WAREHOUSE_ID = "warehouseId"; + @SerializedName(SERIALIZED_NAME_WAREHOUSE_ID) + private String warehouseId; + + public static final String SERIALIZED_NAME_QUANTITY_AVAILABLE = "quantityAvailable"; + @SerializedName(SERIALIZED_NAME_QUANTITY_AVAILABLE) + private Integer quantityAvailable; + + public static final String SERIALIZED_NAME_QUANTITY_BACKORDERED = "quantityBackordered"; + @SerializedName(SERIALIZED_NAME_QUANTITY_BACKORDERED) + private Integer quantityBackordered; + + public static final String SERIALIZED_NAME_QUANTITY_BACKORDERED_ETA = "quantityBackorderedEta"; + @SerializedName(SERIALIZED_NAME_QUANTITY_BACKORDERED_ETA) + private String quantityBackorderedEta; + + public static final String SERIALIZED_NAME_BACK_ORDER_INFO = "backOrderInfo"; + @SerializedName(SERIALIZED_NAME_BACK_ORDER_INFO) + private List backOrderInfo; + + public PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner() { + } + + public PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner location(String location) { + this.location = location; + return this; + } + + /** + * Indicates where (location) the product is available. + * @return location + **/ + @javax.annotation.Nullable + public String getLocation() { + return location; + } + + public void setLocation(String location) { + this.location = location; + } + + + public PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner warehouseId(String warehouseId) { + this.warehouseId = warehouseId; + return this; + } + + /** + * Indicates where (Ingram Warehouse Id) the product is available. + * @return warehouseId + **/ + @javax.annotation.Nullable + public String getWarehouseId() { + return warehouseId; + } + + public void setWarehouseId(String warehouseId) { + this.warehouseId = warehouseId; + } + + + public PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner quantityAvailable(Integer quantityAvailable) { + this.quantityAvailable = quantityAvailable; + return this; + } + + /** + * The quantity of the product available in a given warehouse. + * @return quantityAvailable + **/ + @javax.annotation.Nullable + public Integer getQuantityAvailable() { + return quantityAvailable; + } + + public void setQuantityAvailable(Integer quantityAvailable) { + this.quantityAvailable = quantityAvailable; + } + + + public PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner quantityBackordered(Integer quantityBackordered) { + this.quantityBackordered = quantityBackordered; + return this; + } + + /** + * The quantity of a product backordered in a given warehouse. + * @return quantityBackordered + **/ + @javax.annotation.Nullable + public Integer getQuantityBackordered() { + return quantityBackordered; + } + + public void setQuantityBackordered(Integer quantityBackordered) { + this.quantityBackordered = quantityBackordered; + } + + + public PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner quantityBackorderedEta(String quantityBackorderedEta) { + this.quantityBackorderedEta = quantityBackorderedEta; + return this; + } + + /** + * The estimated time of arrival of a product that has been backordered in a given warehouse. + * @return quantityBackorderedEta + **/ + @javax.annotation.Nullable + public String getQuantityBackorderedEta() { + return quantityBackorderedEta; + } + + public void setQuantityBackorderedEta(String quantityBackorderedEta) { + this.quantityBackorderedEta = quantityBackorderedEta; + } + + + public PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner backOrderInfo(List backOrderInfo) { + this.backOrderInfo = backOrderInfo; + return this; + } + + public PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner addBackOrderInfoItem(PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner backOrderInfoItem) { + if (this.backOrderInfo == null) { + this.backOrderInfo = new ArrayList<>(); + } + this.backOrderInfo.add(backOrderInfoItem); + return this; + } + + /** + * *Currently, this feature is not available in these countries (Mexico, Turkey, New Zealand, Colombia, Chile, Brazil, Peru, Western Sahara). + * @return backOrderInfo + **/ + @javax.annotation.Nullable + public List getBackOrderInfo() { + return backOrderInfo; + } + + public void setBackOrderInfo(List backOrderInfo) { + this.backOrderInfo = backOrderInfo; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner priceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner = (PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner) o; + return Objects.equals(this.location, priceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner.location) && + Objects.equals(this.warehouseId, priceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner.warehouseId) && + Objects.equals(this.quantityAvailable, priceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner.quantityAvailable) && + Objects.equals(this.quantityBackordered, priceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner.quantityBackordered) && + Objects.equals(this.quantityBackorderedEta, priceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner.quantityBackorderedEta) && + Objects.equals(this.backOrderInfo, priceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner.backOrderInfo); + } + + @Override + public int hashCode() { + return Objects.hash(location, warehouseId, quantityAvailable, quantityBackordered, quantityBackorderedEta, backOrderInfo); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner {\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" warehouseId: ").append(toIndentedString(warehouseId)).append("\n"); + sb.append(" quantityAvailable: ").append(toIndentedString(quantityAvailable)).append("\n"); + sb.append(" quantityBackordered: ").append(toIndentedString(quantityBackordered)).append("\n"); + sb.append(" quantityBackorderedEta: ").append(toIndentedString(quantityBackorderedEta)).append("\n"); + sb.append(" backOrderInfo: ").append(toIndentedString(backOrderInfo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("location"); + openapiFields.add("warehouseId"); + openapiFields.add("quantityAvailable"); + openapiFields.add("quantityBackordered"); + openapiFields.add("quantityBackorderedEta"); + openapiFields.add("backOrderInfo"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner is not found in the empty JSON string", PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("location") != null && !jsonObj.get("location").isJsonNull()) && !jsonObj.get("location").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("location").toString())); + } + if ((jsonObj.get("warehouseId") != null && !jsonObj.get("warehouseId").isJsonNull()) && !jsonObj.get("warehouseId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `warehouseId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("warehouseId").toString())); + } + if ((jsonObj.get("quantityBackorderedEta") != null && !jsonObj.get("quantityBackorderedEta").isJsonNull()) && !jsonObj.get("quantityBackorderedEta").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quantityBackorderedEta` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quantityBackorderedEta").toString())); + } + if (jsonObj.get("backOrderInfo") != null && !jsonObj.get("backOrderInfo").isJsonNull()) { + JsonArray jsonArraybackOrderInfo = jsonObj.getAsJsonArray("backOrderInfo"); + if (jsonArraybackOrderInfo != null) { + // ensure the json data is an array + if (!jsonObj.get("backOrderInfo").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `backOrderInfo` to be an array in the JSON string but got `%s`", jsonObj.get("backOrderInfo").toString())); + } + + // validate the optional field `backOrderInfo` (array) + for (int i = 0; i < jsonArraybackOrderInfo.size(); i++) { + PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner.validateJsonElement(jsonArraybackOrderInfo.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner + * @throws IOException if the JSON string is invalid with respect to PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner + */ + public static PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner.class); + } + + /** + * Convert an instance of PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner.java b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner.java new file mode 100644 index 00000000..e7396131 --- /dev/null +++ b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner.java @@ -0,0 +1,232 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner { + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + @SerializedName(SERIALIZED_NAME_QUANTITY) + private Integer quantity; + + public static final String SERIALIZED_NAME_ETA_DATE = "etaDate"; + @SerializedName(SERIALIZED_NAME_ETA_DATE) + private String etaDate; + + public PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner() { + } + + public PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Quantity backordered. + * @return quantity + **/ + @javax.annotation.Nullable + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + + public PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner etaDate(String etaDate) { + this.etaDate = etaDate; + return this; + } + + /** + * Expected availability date. + * @return etaDate + **/ + @javax.annotation.Nullable + public String getEtaDate() { + return etaDate; + } + + public void setEtaDate(String etaDate) { + this.etaDate = etaDate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner priceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner = (PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner) o; + return Objects.equals(this.quantity, priceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner.quantity) && + Objects.equals(this.etaDate, priceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner.etaDate); + } + + @Override + public int hashCode() { + return Objects.hash(quantity, etaDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner {\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" etaDate: ").append(toIndentedString(etaDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("quantity"); + openapiFields.add("etaDate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner is not found in the empty JSON string", PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("etaDate") != null && !jsonObj.get("etaDate").isJsonNull()) && !jsonObj.get("etaDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `etaDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("etaDate").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner + * @throws IOException if the JSON string is invalid with respect to PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner + */ + public static PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner.class); + } + + /** + * Convert an instance of PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerDiscountsInner.java b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerDiscountsInner.java new file mode 100644 index 00000000..280802cd --- /dev/null +++ b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerDiscountsInner.java @@ -0,0 +1,277 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner; +import xiresellers.client.model.PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * PriceAndAvailabilityResponseInnerDiscountsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PriceAndAvailabilityResponseInnerDiscountsInner { + public static final String SERIALIZED_NAME_SPECIAL_PRICING = "specialPricing"; + @SerializedName(SERIALIZED_NAME_SPECIAL_PRICING) + private List specialPricing; + + public static final String SERIALIZED_NAME_QUANTITY_DISCOUNTS = "quantityDiscounts"; + @SerializedName(SERIALIZED_NAME_QUANTITY_DISCOUNTS) + private List quantityDiscounts; + + public PriceAndAvailabilityResponseInnerDiscountsInner() { + } + + public PriceAndAvailabilityResponseInnerDiscountsInner specialPricing(List specialPricing) { + this.specialPricing = specialPricing; + return this; + } + + public PriceAndAvailabilityResponseInnerDiscountsInner addSpecialPricingItem(PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner specialPricingItem) { + if (this.specialPricing == null) { + this.specialPricing = new ArrayList<>(); + } + this.specialPricing.add(specialPricingItem); + return this; + } + + /** + * Get specialPricing + * @return specialPricing + **/ + @javax.annotation.Nullable + public List getSpecialPricing() { + return specialPricing; + } + + public void setSpecialPricing(List specialPricing) { + this.specialPricing = specialPricing; + } + + + public PriceAndAvailabilityResponseInnerDiscountsInner quantityDiscounts(List quantityDiscounts) { + this.quantityDiscounts = quantityDiscounts; + return this; + } + + public PriceAndAvailabilityResponseInnerDiscountsInner addQuantityDiscountsItem(PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner quantityDiscountsItem) { + if (this.quantityDiscounts == null) { + this.quantityDiscounts = new ArrayList<>(); + } + this.quantityDiscounts.add(quantityDiscountsItem); + return this; + } + + /** + * Get quantityDiscounts + * @return quantityDiscounts + **/ + @javax.annotation.Nullable + public List getQuantityDiscounts() { + return quantityDiscounts; + } + + public void setQuantityDiscounts(List quantityDiscounts) { + this.quantityDiscounts = quantityDiscounts; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceAndAvailabilityResponseInnerDiscountsInner priceAndAvailabilityResponseInnerDiscountsInner = (PriceAndAvailabilityResponseInnerDiscountsInner) o; + return Objects.equals(this.specialPricing, priceAndAvailabilityResponseInnerDiscountsInner.specialPricing) && + Objects.equals(this.quantityDiscounts, priceAndAvailabilityResponseInnerDiscountsInner.quantityDiscounts); + } + + @Override + public int hashCode() { + return Objects.hash(specialPricing, quantityDiscounts); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceAndAvailabilityResponseInnerDiscountsInner {\n"); + sb.append(" specialPricing: ").append(toIndentedString(specialPricing)).append("\n"); + sb.append(" quantityDiscounts: ").append(toIndentedString(quantityDiscounts)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("specialPricing"); + openapiFields.add("quantityDiscounts"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PriceAndAvailabilityResponseInnerDiscountsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceAndAvailabilityResponseInnerDiscountsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PriceAndAvailabilityResponseInnerDiscountsInner is not found in the empty JSON string", PriceAndAvailabilityResponseInnerDiscountsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceAndAvailabilityResponseInnerDiscountsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PriceAndAvailabilityResponseInnerDiscountsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("specialPricing") != null && !jsonObj.get("specialPricing").isJsonNull()) { + JsonArray jsonArrayspecialPricing = jsonObj.getAsJsonArray("specialPricing"); + if (jsonArrayspecialPricing != null) { + // ensure the json data is an array + if (!jsonObj.get("specialPricing").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `specialPricing` to be an array in the JSON string but got `%s`", jsonObj.get("specialPricing").toString())); + } + + // validate the optional field `specialPricing` (array) + for (int i = 0; i < jsonArrayspecialPricing.size(); i++) { + PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.validateJsonElement(jsonArrayspecialPricing.get(i)); + }; + } + } + if (jsonObj.get("quantityDiscounts") != null && !jsonObj.get("quantityDiscounts").isJsonNull()) { + JsonArray jsonArrayquantityDiscounts = jsonObj.getAsJsonArray("quantityDiscounts"); + if (jsonArrayquantityDiscounts != null) { + // ensure the json data is an array + if (!jsonObj.get("quantityDiscounts").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `quantityDiscounts` to be an array in the JSON string but got `%s`", jsonObj.get("quantityDiscounts").toString())); + } + + // validate the optional field `quantityDiscounts` (array) + for (int i = 0; i < jsonArrayquantityDiscounts.size(); i++) { + PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner.validateJsonElement(jsonArrayquantityDiscounts.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceAndAvailabilityResponseInnerDiscountsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceAndAvailabilityResponseInnerDiscountsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceAndAvailabilityResponseInnerDiscountsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceAndAvailabilityResponseInnerDiscountsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceAndAvailabilityResponseInnerDiscountsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceAndAvailabilityResponseInnerDiscountsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceAndAvailabilityResponseInnerDiscountsInner + * @throws IOException if the JSON string is invalid with respect to PriceAndAvailabilityResponseInnerDiscountsInner + */ + public static PriceAndAvailabilityResponseInnerDiscountsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceAndAvailabilityResponseInnerDiscountsInner.class); + } + + /** + * Convert an instance of PriceAndAvailabilityResponseInnerDiscountsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner.java b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner.java new file mode 100644 index 00000000..16a9c144 --- /dev/null +++ b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner.java @@ -0,0 +1,317 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner { + public static final String SERIALIZED_NAME_CONDITION_TYPE = "conditionType"; + @SerializedName(SERIALIZED_NAME_CONDITION_TYPE) + private String conditionType; + + public static final String SERIALIZED_NAME_CURRENCY_CODE = "currencyCode"; + @SerializedName(SERIALIZED_NAME_CURRENCY_CODE) + private String currencyCode; + + public static final String SERIALIZED_NAME_CURRENCY_TYPE = "currencyType"; + @SerializedName(SERIALIZED_NAME_CURRENCY_TYPE) + private String currencyType; + + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + @SerializedName(SERIALIZED_NAME_QUANTITY) + private Integer quantity; + + public static final String SERIALIZED_NAME_AMOUNT = "amount"; + @SerializedName(SERIALIZED_NAME_AMOUNT) + private BigDecimal amount; + + public PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner() { + } + + public PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner conditionType(String conditionType) { + this.conditionType = conditionType; + return this; + } + + /** + * Indicates when the discount is applied after ordering the product. + * @return conditionType + **/ + @javax.annotation.Nullable + public String getConditionType() { + return conditionType; + } + + public void setConditionType(String conditionType) { + this.conditionType = conditionType; + } + + + public PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner currencyCode(String currencyCode) { + this.currencyCode = currencyCode; + return this; + } + + /** + * The country-specific three digit ISO 4217 currency code for the order. + * @return currencyCode + **/ + @javax.annotation.Nullable + public String getCurrencyCode() { + return currencyCode; + } + + public void setCurrencyCode(String currencyCode) { + this.currencyCode = currencyCode; + } + + + public PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner currencyType(String currencyType) { + this.currencyType = currencyType; + return this; + } + + /** + * Type of currency. + * @return currencyType + **/ + @javax.annotation.Nullable + public String getCurrencyType() { + return currencyType; + } + + public void setCurrencyType(String currencyType) { + this.currencyType = currencyType; + } + + + public PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * The total discounted quantity of the product. + * @return quantity + **/ + @javax.annotation.Nullable + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + + public PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner amount(BigDecimal amount) { + this.amount = amount; + return this; + } + + /** + * The total price of all the discounts applied. + * @return amount + **/ + @javax.annotation.Nullable + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner priceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner = (PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner) o; + return Objects.equals(this.conditionType, priceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner.conditionType) && + Objects.equals(this.currencyCode, priceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner.currencyCode) && + Objects.equals(this.currencyType, priceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner.currencyType) && + Objects.equals(this.quantity, priceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner.quantity) && + Objects.equals(this.amount, priceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner.amount); + } + + @Override + public int hashCode() { + return Objects.hash(conditionType, currencyCode, currencyType, quantity, amount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner {\n"); + sb.append(" conditionType: ").append(toIndentedString(conditionType)).append("\n"); + sb.append(" currencyCode: ").append(toIndentedString(currencyCode)).append("\n"); + sb.append(" currencyType: ").append(toIndentedString(currencyType)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("conditionType"); + openapiFields.add("currencyCode"); + openapiFields.add("currencyType"); + openapiFields.add("quantity"); + openapiFields.add("amount"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner is not found in the empty JSON string", PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("conditionType") != null && !jsonObj.get("conditionType").isJsonNull()) && !jsonObj.get("conditionType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `conditionType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conditionType").toString())); + } + if ((jsonObj.get("currencyCode") != null && !jsonObj.get("currencyCode").isJsonNull()) && !jsonObj.get("currencyCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `currencyCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currencyCode").toString())); + } + if ((jsonObj.get("currencyType") != null && !jsonObj.get("currencyType").isJsonNull()) && !jsonObj.get("currencyType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `currencyType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currencyType").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner + * @throws IOException if the JSON string is invalid with respect to PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner + */ + public static PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner.class); + } + + /** + * Convert an instance of PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.java b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.java new file mode 100644 index 00000000..aad6ae1c --- /dev/null +++ b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.java @@ -0,0 +1,422 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner { + public static final String SERIALIZED_NAME_DISCOUNT_TYPE = "discountType"; + @SerializedName(SERIALIZED_NAME_DISCOUNT_TYPE) + private String discountType; + + public static final String SERIALIZED_NAME_SPECIAL_BID_NUMER = "specialBidNumer"; + @SerializedName(SERIALIZED_NAME_SPECIAL_BID_NUMER) + private String specialBidNumer; + + public static final String SERIALIZED_NAME_SPECIAL_PRICING_DISCOUNT = "specialPricingDiscount"; + @SerializedName(SERIALIZED_NAME_SPECIAL_PRICING_DISCOUNT) + private BigDecimal specialPricingDiscount; + + public static final String SERIALIZED_NAME_SPECIAL_PRICING_EFFECTIVE_DATE = "specialPricingEffectiveDate"; + @SerializedName(SERIALIZED_NAME_SPECIAL_PRICING_EFFECTIVE_DATE) + private LocalDate specialPricingEffectiveDate; + + public static final String SERIALIZED_NAME_SPECIAL_PRICING_EXPIRATION_DATE = "specialPricingExpirationDate"; + @SerializedName(SERIALIZED_NAME_SPECIAL_PRICING_EXPIRATION_DATE) + private LocalDate specialPricingExpirationDate; + + public static final String SERIALIZED_NAME_SPECIAL_PRICING_AVAILABLE_QUANTITY = "specialPricingAvailableQuantity"; + @SerializedName(SERIALIZED_NAME_SPECIAL_PRICING_AVAILABLE_QUANTITY) + private Integer specialPricingAvailableQuantity; + + public static final String SERIALIZED_NAME_SPECIAL_PRICING_MIN_QUANTITY = "specialPricingMinQuantity"; + @SerializedName(SERIALIZED_NAME_SPECIAL_PRICING_MIN_QUANTITY) + private Integer specialPricingMinQuantity; + + public static final String SERIALIZED_NAME_GOVERNMENT_DISCOUNT_TYPE = "governmentDiscountType"; + @SerializedName(SERIALIZED_NAME_GOVERNMENT_DISCOUNT_TYPE) + private String governmentDiscountType; + + public static final String SERIALIZED_NAME_GOVERNMENT_DISCOUNTED_CUSTOMER_PRICE = "governmentDiscountedCustomerPrice"; + @SerializedName(SERIALIZED_NAME_GOVERNMENT_DISCOUNTED_CUSTOMER_PRICE) + private BigDecimal governmentDiscountedCustomerPrice; + + public PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner() { + } + + public PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner discountType(String discountType) { + this.discountType = discountType; + return this; + } + + /** + * The type of discount being given to the customer. + * @return discountType + **/ + @javax.annotation.Nullable + public String getDiscountType() { + return discountType; + } + + public void setDiscountType(String discountType) { + this.discountType = discountType; + } + + + public PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner specialBidNumer(String specialBidNumer) { + this.specialBidNumer = specialBidNumer; + return this; + } + + /** + * Pre-approved special pricing/bid number provided to the reseller by the vendor for special pricing and discounts. Used to track the bid number where different line items have different bid numbers. Line-level bid numbers take precedence over header-level bid numbers. + * @return specialBidNumer + **/ + @javax.annotation.Nullable + public String getSpecialBidNumer() { + return specialBidNumer; + } + + public void setSpecialBidNumer(String specialBidNumer) { + this.specialBidNumer = specialBidNumer; + } + + + public PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner specialPricingDiscount(BigDecimal specialPricingDiscount) { + this.specialPricingDiscount = specialPricingDiscount; + return this; + } + + /** + * Special pricing discount amount given to the customer. + * @return specialPricingDiscount + **/ + @javax.annotation.Nullable + public BigDecimal getSpecialPricingDiscount() { + return specialPricingDiscount; + } + + public void setSpecialPricingDiscount(BigDecimal specialPricingDiscount) { + this.specialPricingDiscount = specialPricingDiscount; + } + + + public PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner specialPricingEffectiveDate(LocalDate specialPricingEffectiveDate) { + this.specialPricingEffectiveDate = specialPricingEffectiveDate; + return this; + } + + /** + * The effective date of the special pricing available to the customer. + * @return specialPricingEffectiveDate + **/ + @javax.annotation.Nullable + public LocalDate getSpecialPricingEffectiveDate() { + return specialPricingEffectiveDate; + } + + public void setSpecialPricingEffectiveDate(LocalDate specialPricingEffectiveDate) { + this.specialPricingEffectiveDate = specialPricingEffectiveDate; + } + + + public PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner specialPricingExpirationDate(LocalDate specialPricingExpirationDate) { + this.specialPricingExpirationDate = specialPricingExpirationDate; + return this; + } + + /** + * The expiration date of the special pricing available to the customer. + * @return specialPricingExpirationDate + **/ + @javax.annotation.Nullable + public LocalDate getSpecialPricingExpirationDate() { + return specialPricingExpirationDate; + } + + public void setSpecialPricingExpirationDate(LocalDate specialPricingExpirationDate) { + this.specialPricingExpirationDate = specialPricingExpirationDate; + } + + + public PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner specialPricingAvailableQuantity(Integer specialPricingAvailableQuantity) { + this.specialPricingAvailableQuantity = specialPricingAvailableQuantity; + return this; + } + + /** + * The available quantity of products with discounts. + * @return specialPricingAvailableQuantity + **/ + @javax.annotation.Nullable + public Integer getSpecialPricingAvailableQuantity() { + return specialPricingAvailableQuantity; + } + + public void setSpecialPricingAvailableQuantity(Integer specialPricingAvailableQuantity) { + this.specialPricingAvailableQuantity = specialPricingAvailableQuantity; + } + + + public PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner specialPricingMinQuantity(Integer specialPricingMinQuantity) { + this.specialPricingMinQuantity = specialPricingMinQuantity; + return this; + } + + /** + * The minimum quantity of products that have to be purchased to ensure the discount is applied. + * @return specialPricingMinQuantity + **/ + @javax.annotation.Nullable + public Integer getSpecialPricingMinQuantity() { + return specialPricingMinQuantity; + } + + public void setSpecialPricingMinQuantity(Integer specialPricingMinQuantity) { + this.specialPricingMinQuantity = specialPricingMinQuantity; + } + + + public PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner governmentDiscountType(String governmentDiscountType) { + this.governmentDiscountType = governmentDiscountType; + return this; + } + + /** + * Type of Government Discount. *Currently, this discount is only available in the USA. + * @return governmentDiscountType + **/ + @javax.annotation.Nullable + public String getGovernmentDiscountType() { + return governmentDiscountType; + } + + public void setGovernmentDiscountType(String governmentDiscountType) { + this.governmentDiscountType = governmentDiscountType; + } + + + public PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner governmentDiscountedCustomerPrice(BigDecimal governmentDiscountedCustomerPrice) { + this.governmentDiscountedCustomerPrice = governmentDiscountedCustomerPrice; + return this; + } + + /** + * Government Discounted Customer Price. *Currently, this discount is only available in the USA. + * @return governmentDiscountedCustomerPrice + **/ + @javax.annotation.Nullable + public BigDecimal getGovernmentDiscountedCustomerPrice() { + return governmentDiscountedCustomerPrice; + } + + public void setGovernmentDiscountedCustomerPrice(BigDecimal governmentDiscountedCustomerPrice) { + this.governmentDiscountedCustomerPrice = governmentDiscountedCustomerPrice; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner priceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner = (PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner) o; + return Objects.equals(this.discountType, priceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.discountType) && + Objects.equals(this.specialBidNumer, priceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.specialBidNumer) && + Objects.equals(this.specialPricingDiscount, priceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.specialPricingDiscount) && + Objects.equals(this.specialPricingEffectiveDate, priceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.specialPricingEffectiveDate) && + Objects.equals(this.specialPricingExpirationDate, priceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.specialPricingExpirationDate) && + Objects.equals(this.specialPricingAvailableQuantity, priceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.specialPricingAvailableQuantity) && + Objects.equals(this.specialPricingMinQuantity, priceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.specialPricingMinQuantity) && + Objects.equals(this.governmentDiscountType, priceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.governmentDiscountType) && + Objects.equals(this.governmentDiscountedCustomerPrice, priceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.governmentDiscountedCustomerPrice); + } + + @Override + public int hashCode() { + return Objects.hash(discountType, specialBidNumer, specialPricingDiscount, specialPricingEffectiveDate, specialPricingExpirationDate, specialPricingAvailableQuantity, specialPricingMinQuantity, governmentDiscountType, governmentDiscountedCustomerPrice); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner {\n"); + sb.append(" discountType: ").append(toIndentedString(discountType)).append("\n"); + sb.append(" specialBidNumer: ").append(toIndentedString(specialBidNumer)).append("\n"); + sb.append(" specialPricingDiscount: ").append(toIndentedString(specialPricingDiscount)).append("\n"); + sb.append(" specialPricingEffectiveDate: ").append(toIndentedString(specialPricingEffectiveDate)).append("\n"); + sb.append(" specialPricingExpirationDate: ").append(toIndentedString(specialPricingExpirationDate)).append("\n"); + sb.append(" specialPricingAvailableQuantity: ").append(toIndentedString(specialPricingAvailableQuantity)).append("\n"); + sb.append(" specialPricingMinQuantity: ").append(toIndentedString(specialPricingMinQuantity)).append("\n"); + sb.append(" governmentDiscountType: ").append(toIndentedString(governmentDiscountType)).append("\n"); + sb.append(" governmentDiscountedCustomerPrice: ").append(toIndentedString(governmentDiscountedCustomerPrice)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("discountType"); + openapiFields.add("specialBidNumer"); + openapiFields.add("specialPricingDiscount"); + openapiFields.add("specialPricingEffectiveDate"); + openapiFields.add("specialPricingExpirationDate"); + openapiFields.add("specialPricingAvailableQuantity"); + openapiFields.add("specialPricingMinQuantity"); + openapiFields.add("governmentDiscountType"); + openapiFields.add("governmentDiscountedCustomerPrice"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner is not found in the empty JSON string", PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("discountType") != null && !jsonObj.get("discountType").isJsonNull()) && !jsonObj.get("discountType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `discountType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("discountType").toString())); + } + if ((jsonObj.get("specialBidNumer") != null && !jsonObj.get("specialBidNumer").isJsonNull()) && !jsonObj.get("specialBidNumer").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `specialBidNumer` to be a primitive type in the JSON string but got `%s`", jsonObj.get("specialBidNumer").toString())); + } + if ((jsonObj.get("governmentDiscountType") != null && !jsonObj.get("governmentDiscountType").isJsonNull()) && !jsonObj.get("governmentDiscountType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `governmentDiscountType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("governmentDiscountType").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner + * @throws IOException if the JSON string is invalid with respect to PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner + */ + public static PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner.class); + } + + /** + * Convert an instance of PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerPricing.java b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerPricing.java new file mode 100644 index 00000000..5c56b573 --- /dev/null +++ b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerPricing.java @@ -0,0 +1,337 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * PriceAndAvailabilityResponseInnerPricing + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PriceAndAvailabilityResponseInnerPricing { + public static final String SERIALIZED_NAME_CURRENCY_CODE = "currencyCode"; + @SerializedName(SERIALIZED_NAME_CURRENCY_CODE) + private String currencyCode; + + public static final String SERIALIZED_NAME_RETAIL_PRICE = "retailPrice"; + @SerializedName(SERIALIZED_NAME_RETAIL_PRICE) + private BigDecimal retailPrice; + + public static final String SERIALIZED_NAME_MAP_PRICE = "mapPrice"; + @SerializedName(SERIALIZED_NAME_MAP_PRICE) + private BigDecimal mapPrice; + + public static final String SERIALIZED_NAME_CUSTOMER_PRICE = "customerPrice"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_PRICE) + private BigDecimal customerPrice; + + public static final String SERIALIZED_NAME_SPECIAL_BID_PRICING_AVAILABLE = "specialBidPricingAvailable"; + @SerializedName(SERIALIZED_NAME_SPECIAL_BID_PRICING_AVAILABLE) + private Boolean specialBidPricingAvailable; + + public static final String SERIALIZED_NAME_WEB_DISCOUNTS_AVAILABLE = "webDiscountsAvailable"; + @SerializedName(SERIALIZED_NAME_WEB_DISCOUNTS_AVAILABLE) + private Boolean webDiscountsAvailable; + + public PriceAndAvailabilityResponseInnerPricing() { + } + + public PriceAndAvailabilityResponseInnerPricing currencyCode(String currencyCode) { + this.currencyCode = currencyCode; + return this; + } + + /** + * The 3-digit ISO currency code. + * @return currencyCode + **/ + @javax.annotation.Nullable + public String getCurrencyCode() { + return currencyCode; + } + + public void setCurrencyCode(String currencyCode) { + this.currencyCode = currencyCode; + } + + + public PriceAndAvailabilityResponseInnerPricing retailPrice(BigDecimal retailPrice) { + this.retailPrice = retailPrice; + return this; + } + + /** + * The retail price of the product. + * @return retailPrice + **/ + @javax.annotation.Nullable + public BigDecimal getRetailPrice() { + return retailPrice; + } + + public void setRetailPrice(BigDecimal retailPrice) { + this.retailPrice = retailPrice; + } + + + public PriceAndAvailabilityResponseInnerPricing mapPrice(BigDecimal mapPrice) { + this.mapPrice = mapPrice; + return this; + } + + /** + * Minimum Advertised Price (MAP). If required by the vendor, resellers can not sell below MAP price. + * @return mapPrice + **/ + @javax.annotation.Nullable + public BigDecimal getMapPrice() { + return mapPrice; + } + + public void setMapPrice(BigDecimal mapPrice) { + this.mapPrice = mapPrice; + } + + + public PriceAndAvailabilityResponseInnerPricing customerPrice(BigDecimal customerPrice) { + this.customerPrice = customerPrice; + return this; + } + + /** + * The price customer pays after all special pricing and discounts have been applied. + * @return customerPrice + **/ + @javax.annotation.Nullable + public BigDecimal getCustomerPrice() { + return customerPrice; + } + + public void setCustomerPrice(BigDecimal customerPrice) { + this.customerPrice = customerPrice; + } + + + public PriceAndAvailabilityResponseInnerPricing specialBidPricingAvailable(Boolean specialBidPricingAvailable) { + this.specialBidPricingAvailable = specialBidPricingAvailable; + return this; + } + + /** + * Boolean values specifies whether special Bid discounts are available for the product. + * @return specialBidPricingAvailable + **/ + @javax.annotation.Nullable + public Boolean getSpecialBidPricingAvailable() { + return specialBidPricingAvailable; + } + + public void setSpecialBidPricingAvailable(Boolean specialBidPricingAvailable) { + this.specialBidPricingAvailable = specialBidPricingAvailable; + } + + + public PriceAndAvailabilityResponseInnerPricing webDiscountsAvailable(Boolean webDiscountsAvailable) { + this.webDiscountsAvailable = webDiscountsAvailable; + return this; + } + + /** + * Boolean values specifies whether web Discounts are available for the product. + * @return webDiscountsAvailable + **/ + @javax.annotation.Nullable + public Boolean getWebDiscountsAvailable() { + return webDiscountsAvailable; + } + + public void setWebDiscountsAvailable(Boolean webDiscountsAvailable) { + this.webDiscountsAvailable = webDiscountsAvailable; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceAndAvailabilityResponseInnerPricing priceAndAvailabilityResponseInnerPricing = (PriceAndAvailabilityResponseInnerPricing) o; + return Objects.equals(this.currencyCode, priceAndAvailabilityResponseInnerPricing.currencyCode) && + Objects.equals(this.retailPrice, priceAndAvailabilityResponseInnerPricing.retailPrice) && + Objects.equals(this.mapPrice, priceAndAvailabilityResponseInnerPricing.mapPrice) && + Objects.equals(this.customerPrice, priceAndAvailabilityResponseInnerPricing.customerPrice) && + Objects.equals(this.specialBidPricingAvailable, priceAndAvailabilityResponseInnerPricing.specialBidPricingAvailable) && + Objects.equals(this.webDiscountsAvailable, priceAndAvailabilityResponseInnerPricing.webDiscountsAvailable); + } + + @Override + public int hashCode() { + return Objects.hash(currencyCode, retailPrice, mapPrice, customerPrice, specialBidPricingAvailable, webDiscountsAvailable); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceAndAvailabilityResponseInnerPricing {\n"); + sb.append(" currencyCode: ").append(toIndentedString(currencyCode)).append("\n"); + sb.append(" retailPrice: ").append(toIndentedString(retailPrice)).append("\n"); + sb.append(" mapPrice: ").append(toIndentedString(mapPrice)).append("\n"); + sb.append(" customerPrice: ").append(toIndentedString(customerPrice)).append("\n"); + sb.append(" specialBidPricingAvailable: ").append(toIndentedString(specialBidPricingAvailable)).append("\n"); + sb.append(" webDiscountsAvailable: ").append(toIndentedString(webDiscountsAvailable)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("currencyCode"); + openapiFields.add("retailPrice"); + openapiFields.add("mapPrice"); + openapiFields.add("customerPrice"); + openapiFields.add("specialBidPricingAvailable"); + openapiFields.add("webDiscountsAvailable"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PriceAndAvailabilityResponseInnerPricing + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceAndAvailabilityResponseInnerPricing.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PriceAndAvailabilityResponseInnerPricing is not found in the empty JSON string", PriceAndAvailabilityResponseInnerPricing.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceAndAvailabilityResponseInnerPricing.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PriceAndAvailabilityResponseInnerPricing` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("currencyCode") != null && !jsonObj.get("currencyCode").isJsonNull()) && !jsonObj.get("currencyCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `currencyCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currencyCode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceAndAvailabilityResponseInnerPricing.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceAndAvailabilityResponseInnerPricing' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceAndAvailabilityResponseInnerPricing.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceAndAvailabilityResponseInnerPricing value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceAndAvailabilityResponseInnerPricing read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceAndAvailabilityResponseInnerPricing given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceAndAvailabilityResponseInnerPricing + * @throws IOException if the JSON string is invalid with respect to PriceAndAvailabilityResponseInnerPricing + */ + public static PriceAndAvailabilityResponseInnerPricing fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceAndAvailabilityResponseInnerPricing.class); + } + + /** + * Convert an instance of PriceAndAvailabilityResponseInnerPricing to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner.java b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner.java new file mode 100644 index 00000000..0a2ecfb1 --- /dev/null +++ b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner.java @@ -0,0 +1,287 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner { + public static final String SERIALIZED_NAME_QUANTITY_RESERVED = "quantityReserved"; + @SerializedName(SERIALIZED_NAME_QUANTITY_RESERVED) + private Integer quantityReserved; + + public static final String SERIALIZED_NAME_QUANTITY_AVAILABLE = "quantityAvailable"; + @SerializedName(SERIALIZED_NAME_QUANTITY_AVAILABLE) + private Integer quantityAvailable; + + public static final String SERIALIZED_NAME_EFFECTIVEDATE = "effectivedate"; + @SerializedName(SERIALIZED_NAME_EFFECTIVEDATE) + private String effectivedate; + + public static final String SERIALIZED_NAME_EXPIRYDATE = "expirydate"; + @SerializedName(SERIALIZED_NAME_EXPIRYDATE) + private String expirydate; + + public PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner() { + } + + public PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner quantityReserved(Integer quantityReserved) { + this.quantityReserved = quantityReserved; + return this; + } + + /** + * The quantity of the product reserved for the customer. + * @return quantityReserved + **/ + @javax.annotation.Nullable + public Integer getQuantityReserved() { + return quantityReserved; + } + + public void setQuantityReserved(Integer quantityReserved) { + this.quantityReserved = quantityReserved; + } + + + public PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner quantityAvailable(Integer quantityAvailable) { + this.quantityAvailable = quantityAvailable; + return this; + } + + /** + * The availability of the product reserved. + * @return quantityAvailable + **/ + @javax.annotation.Nullable + public Integer getQuantityAvailable() { + return quantityAvailable; + } + + public void setQuantityAvailable(Integer quantityAvailable) { + this.quantityAvailable = quantityAvailable; + } + + + public PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner effectivedate(String effectivedate) { + this.effectivedate = effectivedate; + return this; + } + + /** + * The reservation date for the product in UTC format. + * @return effectivedate + **/ + @javax.annotation.Nullable + public String getEffectivedate() { + return effectivedate; + } + + public void setEffectivedate(String effectivedate) { + this.effectivedate = effectivedate; + } + + + public PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner expirydate(String expirydate) { + this.expirydate = expirydate; + return this; + } + + /** + * The expiration date for the reservation of the product in UTC format. + * @return expirydate + **/ + @javax.annotation.Nullable + public String getExpirydate() { + return expirydate; + } + + public void setExpirydate(String expirydate) { + this.expirydate = expirydate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner priceAndAvailabilityResponseInnerReserveInventoryDetailsInner = (PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner) o; + return Objects.equals(this.quantityReserved, priceAndAvailabilityResponseInnerReserveInventoryDetailsInner.quantityReserved) && + Objects.equals(this.quantityAvailable, priceAndAvailabilityResponseInnerReserveInventoryDetailsInner.quantityAvailable) && + Objects.equals(this.effectivedate, priceAndAvailabilityResponseInnerReserveInventoryDetailsInner.effectivedate) && + Objects.equals(this.expirydate, priceAndAvailabilityResponseInnerReserveInventoryDetailsInner.expirydate); + } + + @Override + public int hashCode() { + return Objects.hash(quantityReserved, quantityAvailable, effectivedate, expirydate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner {\n"); + sb.append(" quantityReserved: ").append(toIndentedString(quantityReserved)).append("\n"); + sb.append(" quantityAvailable: ").append(toIndentedString(quantityAvailable)).append("\n"); + sb.append(" effectivedate: ").append(toIndentedString(effectivedate)).append("\n"); + sb.append(" expirydate: ").append(toIndentedString(expirydate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("quantityReserved"); + openapiFields.add("quantityAvailable"); + openapiFields.add("effectivedate"); + openapiFields.add("expirydate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner is not found in the empty JSON string", PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("effectivedate") != null && !jsonObj.get("effectivedate").isJsonNull()) && !jsonObj.get("effectivedate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `effectivedate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("effectivedate").toString())); + } + if ((jsonObj.get("expirydate") != null && !jsonObj.get("expirydate").isJsonNull()) && !jsonObj.get("expirydate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `expirydate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expirydate").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner + * @throws IOException if the JSON string is invalid with respect to PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner + */ + public static PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner.class); + } + + /** + * Convert an instance of PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerServiceFeesInner.java b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerServiceFeesInner.java new file mode 100644 index 00000000..57dc4e97 --- /dev/null +++ b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerServiceFeesInner.java @@ -0,0 +1,320 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * PriceAndAvailabilityResponseInnerServiceFeesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PriceAndAvailabilityResponseInnerServiceFeesInner { + public static final String SERIALIZED_NAME_CONDITION_TYPE = "conditionType"; + @SerializedName(SERIALIZED_NAME_CONDITION_TYPE) + private String conditionType; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_AMOUNT = "amount"; + @SerializedName(SERIALIZED_NAME_AMOUNT) + private BigDecimal amount; + + public static final String SERIALIZED_NAME_END_DATE = "endDate"; + @SerializedName(SERIALIZED_NAME_END_DATE) + private String endDate; + + public static final String SERIALIZED_NAME_CURRENCY_CODE = "currencyCode"; + @SerializedName(SERIALIZED_NAME_CURRENCY_CODE) + private String currencyCode; + + public PriceAndAvailabilityResponseInnerServiceFeesInner() { + } + + public PriceAndAvailabilityResponseInnerServiceFeesInner conditionType(String conditionType) { + this.conditionType = conditionType; + return this; + } + + /** + * Condition Type of the service fees. + * @return conditionType + **/ + @javax.annotation.Nullable + public String getConditionType() { + return conditionType; + } + + public void setConditionType(String conditionType) { + this.conditionType = conditionType; + } + + + public PriceAndAvailabilityResponseInnerServiceFeesInner description(String description) { + this.description = description; + return this; + } + + /** + * Description of the service fees. + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + + public PriceAndAvailabilityResponseInnerServiceFeesInner amount(BigDecimal amount) { + this.amount = amount; + return this; + } + + /** + * Amount of the service fees. + * @return amount + **/ + @javax.annotation.Nullable + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + + public PriceAndAvailabilityResponseInnerServiceFeesInner endDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * End Date of the service fees. + * @return endDate + **/ + @javax.annotation.Nullable + public String getEndDate() { + return endDate; + } + + public void setEndDate(String endDate) { + this.endDate = endDate; + } + + + public PriceAndAvailabilityResponseInnerServiceFeesInner currencyCode(String currencyCode) { + this.currencyCode = currencyCode; + return this; + } + + /** + * Currency Code of the service fees. + * @return currencyCode + **/ + @javax.annotation.Nullable + public String getCurrencyCode() { + return currencyCode; + } + + public void setCurrencyCode(String currencyCode) { + this.currencyCode = currencyCode; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceAndAvailabilityResponseInnerServiceFeesInner priceAndAvailabilityResponseInnerServiceFeesInner = (PriceAndAvailabilityResponseInnerServiceFeesInner) o; + return Objects.equals(this.conditionType, priceAndAvailabilityResponseInnerServiceFeesInner.conditionType) && + Objects.equals(this.description, priceAndAvailabilityResponseInnerServiceFeesInner.description) && + Objects.equals(this.amount, priceAndAvailabilityResponseInnerServiceFeesInner.amount) && + Objects.equals(this.endDate, priceAndAvailabilityResponseInnerServiceFeesInner.endDate) && + Objects.equals(this.currencyCode, priceAndAvailabilityResponseInnerServiceFeesInner.currencyCode); + } + + @Override + public int hashCode() { + return Objects.hash(conditionType, description, amount, endDate, currencyCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceAndAvailabilityResponseInnerServiceFeesInner {\n"); + sb.append(" conditionType: ").append(toIndentedString(conditionType)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" currencyCode: ").append(toIndentedString(currencyCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("conditionType"); + openapiFields.add("description"); + openapiFields.add("amount"); + openapiFields.add("endDate"); + openapiFields.add("currencyCode"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PriceAndAvailabilityResponseInnerServiceFeesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceAndAvailabilityResponseInnerServiceFeesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PriceAndAvailabilityResponseInnerServiceFeesInner is not found in the empty JSON string", PriceAndAvailabilityResponseInnerServiceFeesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceAndAvailabilityResponseInnerServiceFeesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PriceAndAvailabilityResponseInnerServiceFeesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("conditionType") != null && !jsonObj.get("conditionType").isJsonNull()) && !jsonObj.get("conditionType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `conditionType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conditionType").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("endDate") != null && !jsonObj.get("endDate").isJsonNull()) && !jsonObj.get("endDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endDate").toString())); + } + if ((jsonObj.get("currencyCode") != null && !jsonObj.get("currencyCode").isJsonNull()) && !jsonObj.get("currencyCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `currencyCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currencyCode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceAndAvailabilityResponseInnerServiceFeesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceAndAvailabilityResponseInnerServiceFeesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceAndAvailabilityResponseInnerServiceFeesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceAndAvailabilityResponseInnerServiceFeesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceAndAvailabilityResponseInnerServiceFeesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceAndAvailabilityResponseInnerServiceFeesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceAndAvailabilityResponseInnerServiceFeesInner + * @throws IOException if the JSON string is invalid with respect to PriceAndAvailabilityResponseInnerServiceFeesInner + */ + public static PriceAndAvailabilityResponseInnerServiceFeesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceAndAvailabilityResponseInnerServiceFeesInner.class); + } + + /** + * Convert an instance of PriceAndAvailabilityResponseInnerServiceFeesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponse.java b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponse.java new file mode 100644 index 00000000..5b8e8f72 --- /dev/null +++ b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponse.java @@ -0,0 +1,239 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.PriceAndAvailabilityResponseServiceresponsePriceandstockresponse; +import xiresellers.client.model.PriceAndAvailabilityResponseServiceresponseResponsepreamble; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * PriceAndAvailabilityResponseServiceresponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PriceAndAvailabilityResponseServiceresponse { + public static final String SERIALIZED_NAME_RESPONSEPREAMBLE = "responsepreamble"; + @SerializedName(SERIALIZED_NAME_RESPONSEPREAMBLE) + private PriceAndAvailabilityResponseServiceresponseResponsepreamble responsepreamble; + + public static final String SERIALIZED_NAME_PRICEANDSTOCKRESPONSE = "priceandstockresponse"; + @SerializedName(SERIALIZED_NAME_PRICEANDSTOCKRESPONSE) + private PriceAndAvailabilityResponseServiceresponsePriceandstockresponse priceandstockresponse; + + public PriceAndAvailabilityResponseServiceresponse() { + } + + public PriceAndAvailabilityResponseServiceresponse responsepreamble(PriceAndAvailabilityResponseServiceresponseResponsepreamble responsepreamble) { + this.responsepreamble = responsepreamble; + return this; + } + + /** + * Get responsepreamble + * @return responsepreamble + **/ + @javax.annotation.Nullable + public PriceAndAvailabilityResponseServiceresponseResponsepreamble getResponsepreamble() { + return responsepreamble; + } + + public void setResponsepreamble(PriceAndAvailabilityResponseServiceresponseResponsepreamble responsepreamble) { + this.responsepreamble = responsepreamble; + } + + + public PriceAndAvailabilityResponseServiceresponse priceandstockresponse(PriceAndAvailabilityResponseServiceresponsePriceandstockresponse priceandstockresponse) { + this.priceandstockresponse = priceandstockresponse; + return this; + } + + /** + * Get priceandstockresponse + * @return priceandstockresponse + **/ + @javax.annotation.Nullable + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponse getPriceandstockresponse() { + return priceandstockresponse; + } + + public void setPriceandstockresponse(PriceAndAvailabilityResponseServiceresponsePriceandstockresponse priceandstockresponse) { + this.priceandstockresponse = priceandstockresponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceAndAvailabilityResponseServiceresponse priceAndAvailabilityResponseServiceresponse = (PriceAndAvailabilityResponseServiceresponse) o; + return Objects.equals(this.responsepreamble, priceAndAvailabilityResponseServiceresponse.responsepreamble) && + Objects.equals(this.priceandstockresponse, priceAndAvailabilityResponseServiceresponse.priceandstockresponse); + } + + @Override + public int hashCode() { + return Objects.hash(responsepreamble, priceandstockresponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceAndAvailabilityResponseServiceresponse {\n"); + sb.append(" responsepreamble: ").append(toIndentedString(responsepreamble)).append("\n"); + sb.append(" priceandstockresponse: ").append(toIndentedString(priceandstockresponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("responsepreamble"); + openapiFields.add("priceandstockresponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PriceAndAvailabilityResponseServiceresponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceAndAvailabilityResponseServiceresponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PriceAndAvailabilityResponseServiceresponse is not found in the empty JSON string", PriceAndAvailabilityResponseServiceresponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceAndAvailabilityResponseServiceresponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PriceAndAvailabilityResponseServiceresponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `responsepreamble` + if (jsonObj.get("responsepreamble") != null && !jsonObj.get("responsepreamble").isJsonNull()) { + PriceAndAvailabilityResponseServiceresponseResponsepreamble.validateJsonElement(jsonObj.get("responsepreamble")); + } + // validate the optional field `priceandstockresponse` + if (jsonObj.get("priceandstockresponse") != null && !jsonObj.get("priceandstockresponse").isJsonNull()) { + PriceAndAvailabilityResponseServiceresponsePriceandstockresponse.validateJsonElement(jsonObj.get("priceandstockresponse")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceAndAvailabilityResponseServiceresponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceAndAvailabilityResponseServiceresponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceAndAvailabilityResponseServiceresponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceAndAvailabilityResponseServiceresponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceAndAvailabilityResponseServiceresponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceAndAvailabilityResponseServiceresponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceAndAvailabilityResponseServiceresponse + * @throws IOException if the JSON string is invalid with respect to PriceAndAvailabilityResponseServiceresponse + */ + public static PriceAndAvailabilityResponseServiceresponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceAndAvailabilityResponseServiceresponse.class); + } + + /** + * Convert an instance of PriceAndAvailabilityResponseServiceresponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponsePriceandstockresponse.java b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponsePriceandstockresponse.java new file mode 100644 index 00000000..17e60309 --- /dev/null +++ b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponsePriceandstockresponse.java @@ -0,0 +1,228 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * PriceAndAvailabilityResponseServiceresponsePriceandstockresponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PriceAndAvailabilityResponseServiceresponsePriceandstockresponse { + public static final String SERIALIZED_NAME_DETAILS = "details"; + @SerializedName(SERIALIZED_NAME_DETAILS) + private List details; + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponse() { + } + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponse details(List details) { + this.details = details; + return this; + } + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponse addDetailsItem(PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner detailsItem) { + if (this.details == null) { + this.details = new ArrayList<>(); + } + this.details.add(detailsItem); + return this; + } + + /** + * Get details + * @return details + **/ + @javax.annotation.Nullable + public List getDetails() { + return details; + } + + public void setDetails(List details) { + this.details = details; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceAndAvailabilityResponseServiceresponsePriceandstockresponse priceAndAvailabilityResponseServiceresponsePriceandstockresponse = (PriceAndAvailabilityResponseServiceresponsePriceandstockresponse) o; + return Objects.equals(this.details, priceAndAvailabilityResponseServiceresponsePriceandstockresponse.details); + } + + @Override + public int hashCode() { + return Objects.hash(details); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceAndAvailabilityResponseServiceresponsePriceandstockresponse {\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("details"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PriceAndAvailabilityResponseServiceresponsePriceandstockresponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceAndAvailabilityResponseServiceresponsePriceandstockresponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PriceAndAvailabilityResponseServiceresponsePriceandstockresponse is not found in the empty JSON string", PriceAndAvailabilityResponseServiceresponsePriceandstockresponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceAndAvailabilityResponseServiceresponsePriceandstockresponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PriceAndAvailabilityResponseServiceresponsePriceandstockresponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("details") != null && !jsonObj.get("details").isJsonNull()) { + JsonArray jsonArraydetails = jsonObj.getAsJsonArray("details"); + if (jsonArraydetails != null) { + // ensure the json data is an array + if (!jsonObj.get("details").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `details` to be an array in the JSON string but got `%s`", jsonObj.get("details").toString())); + } + + // validate the optional field `details` (array) + for (int i = 0; i < jsonArraydetails.size(); i++) { + PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.validateJsonElement(jsonArraydetails.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceAndAvailabilityResponseServiceresponsePriceandstockresponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceAndAvailabilityResponseServiceresponsePriceandstockresponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceAndAvailabilityResponseServiceresponsePriceandstockresponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceAndAvailabilityResponseServiceresponsePriceandstockresponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceAndAvailabilityResponseServiceresponsePriceandstockresponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceAndAvailabilityResponseServiceresponsePriceandstockresponse + * @throws IOException if the JSON string is invalid with respect to PriceAndAvailabilityResponseServiceresponsePriceandstockresponse + */ + public static PriceAndAvailabilityResponseServiceresponsePriceandstockresponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceAndAvailabilityResponseServiceresponsePriceandstockresponse.class); + } + + /** + * Convert an instance of PriceAndAvailabilityResponseServiceresponsePriceandstockresponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.java b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.java new file mode 100644 index 00000000..1b778ab7 --- /dev/null +++ b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.java @@ -0,0 +1,1128 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.WarehouseListType; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner { + /** + * SUCCESS or FAILED + */ + @JsonAdapter(ItemstatusEnum.Adapter.class) + public enum ItemstatusEnum { + SUCCESS("SUCCESS"), + + FAILED("FAILED"); + + private String value; + + ItemstatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ItemstatusEnum fromValue(String value) { + for (ItemstatusEnum b : ItemstatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ItemstatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ItemstatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ItemstatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ItemstatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ITEMSTATUS = "itemstatus"; + @SerializedName(SERIALIZED_NAME_ITEMSTATUS) + private ItemstatusEnum itemstatus; + + public static final String SERIALIZED_NAME_STATUSMESSAGE = "statusmessage"; + @SerializedName(SERIALIZED_NAME_STATUSMESSAGE) + private String statusmessage; + + public static final String SERIALIZED_NAME_INGRAMPARTNUMBER = "ingrampartnumber"; + @SerializedName(SERIALIZED_NAME_INGRAMPARTNUMBER) + private String ingrampartnumber; + + public static final String SERIALIZED_NAME_VENDORPARTNUMBER = "vendorpartnumber"; + @SerializedName(SERIALIZED_NAME_VENDORPARTNUMBER) + private String vendorpartnumber; + + public static final String SERIALIZED_NAME_GLOBALSKUID = "globalskuid"; + @SerializedName(SERIALIZED_NAME_GLOBALSKUID) + private String globalskuid; + + public static final String SERIALIZED_NAME_CUSTOMERPRICE = "customerprice"; + @SerializedName(SERIALIZED_NAME_CUSTOMERPRICE) + private BigDecimal customerprice; + + public static final String SERIALIZED_NAME_PARTDESCRIPTION1 = "partdescription1"; + @SerializedName(SERIALIZED_NAME_PARTDESCRIPTION1) + private String partdescription1; + + public static final String SERIALIZED_NAME_PARTDESCRIPTION2 = "partdescription2"; + @SerializedName(SERIALIZED_NAME_PARTDESCRIPTION2) + private String partdescription2; + + public static final String SERIALIZED_NAME_VENDORNUMBER = "vendornumber"; + @SerializedName(SERIALIZED_NAME_VENDORNUMBER) + private String vendornumber; + + public static final String SERIALIZED_NAME_VENDORNAME = "vendorname"; + @SerializedName(SERIALIZED_NAME_VENDORNAME) + private String vendorname; + + public static final String SERIALIZED_NAME_CPUCODE = "cpucode"; + @SerializedName(SERIALIZED_NAME_CPUCODE) + private String cpucode; + + /** + * Ingram Micro assigned product classification - A-Stocked product in all IM warehouses, B-Limited stock in IM warehouses, C-Stocked in fewer wareshouses, D-Ingram discontinued, E-Planned to be phased out as per the vendor, F-Carried for specific customer as per the contract, N-New SKU, O-Discontinued to be liquidated, S-Order for specialized demand, V-Discontinued by vendor, X-Direct Ship products from vendor + */ + @JsonAdapter(PropertyClassEnum.Adapter.class) + public enum PropertyClassEnum { + A("A"), + + B("B"), + + C("C"), + + D("D"), + + E("E"), + + F("F"), + + N("N"), + + O("O"), + + S("S"), + + V("V"), + + X("X"); + + private String value; + + PropertyClassEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PropertyClassEnum fromValue(String value) { + for (PropertyClassEnum b : PropertyClassEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PropertyClassEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PropertyClassEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PropertyClassEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PropertyClassEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PROPERTY_CLASS = "class"; + @SerializedName(SERIALIZED_NAME_PROPERTY_CLASS) + private PropertyClassEnum propertyClass; + + /** + * Identifies if the SKU has been discontinued. + */ + @JsonAdapter(SkustatusEnum.Adapter.class) + public enum SkustatusEnum { + ACTIVE("ACTIVE"); + + private String value; + + SkustatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SkustatusEnum fromValue(String value) { + for (SkustatusEnum b : SkustatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SkustatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SkustatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SkustatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + SkustatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_SKUSTATUS = "skustatus"; + @SerializedName(SERIALIZED_NAME_SKUSTATUS) + private SkustatusEnum skustatus; + + public static final String SERIALIZED_NAME_MEDIACPU = "mediacpu"; + @SerializedName(SERIALIZED_NAME_MEDIACPU) + private String mediacpu; + + public static final String SERIALIZED_NAME_CATEGORYSUBCATEGORY = "categorysubcategory"; + @SerializedName(SERIALIZED_NAME_CATEGORYSUBCATEGORY) + private String categorysubcategory; + + public static final String SERIALIZED_NAME_RETAILPRICE = "retailprice"; + @SerializedName(SERIALIZED_NAME_RETAILPRICE) + private BigDecimal retailprice; + + public static final String SERIALIZED_NAME_NEWMEDIA = "newmedia"; + @SerializedName(SERIALIZED_NAME_NEWMEDIA) + private String newmedia; + + /** + * Y - End user required N - Not required End user + */ + @JsonAdapter(EnduserrequiredEnum.Adapter.class) + public enum EnduserrequiredEnum { + Y("Y"), + + N("N"); + + private String value; + + EnduserrequiredEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EnduserrequiredEnum fromValue(String value) { + for (EnduserrequiredEnum b : EnduserrequiredEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EnduserrequiredEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EnduserrequiredEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EnduserrequiredEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + EnduserrequiredEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ENDUSERREQUIRED = "enduserrequired"; + @SerializedName(SERIALIZED_NAME_ENDUSERREQUIRED) + private EnduserrequiredEnum enduserrequired; + + /** + * Y- Allow Backorder Flag N- Not allowed + */ + @JsonAdapter(BackorderflagEnum.Adapter.class) + public enum BackorderflagEnum { + Y("Y"), + + N("N"); + + private String value; + + BackorderflagEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static BackorderflagEnum fromValue(String value) { + for (BackorderflagEnum b : BackorderflagEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final BackorderflagEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public BackorderflagEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return BackorderflagEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + BackorderflagEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_BACKORDERFLAG = "backorderflag"; + @SerializedName(SERIALIZED_NAME_BACKORDERFLAG) + private BackorderflagEnum backorderflag; + + public static final String SERIALIZED_NAME_SKUAUTHORIZED = "skuauthorized"; + @SerializedName(SERIALIZED_NAME_SKUAUTHORIZED) + private String skuauthorized; + + public static final String SERIALIZED_NAME_EXTENDEDVENDORPARTNUMBER = "extendedvendorpartnumber"; + @SerializedName(SERIALIZED_NAME_EXTENDEDVENDORPARTNUMBER) + private String extendedvendorpartnumber; + + public static final String SERIALIZED_NAME_WAREHOUSEDETAILS = "warehousedetails"; + @SerializedName(SERIALIZED_NAME_WAREHOUSEDETAILS) + private List warehousedetails; + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner() { + } + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner itemstatus(ItemstatusEnum itemstatus) { + this.itemstatus = itemstatus; + return this; + } + + /** + * SUCCESS or FAILED + * @return itemstatus + **/ + @javax.annotation.Nullable + public ItemstatusEnum getItemstatus() { + return itemstatus; + } + + public void setItemstatus(ItemstatusEnum itemstatus) { + this.itemstatus = itemstatus; + } + + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner statusmessage(String statusmessage) { + this.statusmessage = statusmessage; + return this; + } + + /** + * Description of itemstatus + * @return statusmessage + **/ + @javax.annotation.Nullable + public String getStatusmessage() { + return statusmessage; + } + + public void setStatusmessage(String statusmessage) { + this.statusmessage = statusmessage; + } + + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner ingrampartnumber(String ingrampartnumber) { + this.ingrampartnumber = ingrampartnumber; + return this; + } + + /** + * Ingram Micro part number + * @return ingrampartnumber + **/ + @javax.annotation.Nullable + public String getIngrampartnumber() { + return ingrampartnumber; + } + + public void setIngrampartnumber(String ingrampartnumber) { + this.ingrampartnumber = ingrampartnumber; + } + + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner vendorpartnumber(String vendorpartnumber) { + this.vendorpartnumber = vendorpartnumber; + return this; + } + + /** + * Manufacturer/Vendor part number + * @return vendorpartnumber + **/ + @javax.annotation.Nullable + public String getVendorpartnumber() { + return vendorpartnumber; + } + + public void setVendorpartnumber(String vendorpartnumber) { + this.vendorpartnumber = vendorpartnumber; + } + + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner globalskuid(String globalskuid) { + this.globalskuid = globalskuid; + return this; + } + + /** + * Get globalskuid + * @return globalskuid + **/ + @javax.annotation.Nullable + public String getGlobalskuid() { + return globalskuid; + } + + public void setGlobalskuid(String globalskuid) { + this.globalskuid = globalskuid; + } + + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner customerprice(BigDecimal customerprice) { + this.customerprice = customerprice; + return this; + } + + /** + * Customer specific price for the product, excluding taxes + * @return customerprice + **/ + @javax.annotation.Nullable + public BigDecimal getCustomerprice() { + return customerprice; + } + + public void setCustomerprice(BigDecimal customerprice) { + this.customerprice = customerprice; + } + + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner partdescription1(String partdescription1) { + this.partdescription1 = partdescription1; + return this; + } + + /** + * Product description part 1 + * @return partdescription1 + **/ + @javax.annotation.Nullable + public String getPartdescription1() { + return partdescription1; + } + + public void setPartdescription1(String partdescription1) { + this.partdescription1 = partdescription1; + } + + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner partdescription2(String partdescription2) { + this.partdescription2 = partdescription2; + return this; + } + + /** + * Product description part 2 + * @return partdescription2 + **/ + @javax.annotation.Nullable + public String getPartdescription2() { + return partdescription2; + } + + public void setPartdescription2(String partdescription2) { + this.partdescription2 = partdescription2; + } + + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner vendornumber(String vendornumber) { + this.vendornumber = vendornumber; + return this; + } + + /** + * Get vendornumber + * @return vendornumber + **/ + @javax.annotation.Nullable + public String getVendornumber() { + return vendornumber; + } + + public void setVendornumber(String vendornumber) { + this.vendornumber = vendornumber; + } + + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner vendorname(String vendorname) { + this.vendorname = vendorname; + return this; + } + + /** + * Name of the vendor + * @return vendorname + **/ + @javax.annotation.Nullable + public String getVendorname() { + return vendorname; + } + + public void setVendorname(String vendorname) { + this.vendorname = vendorname; + } + + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner cpucode(String cpucode) { + this.cpucode = cpucode; + return this; + } + + /** + * Get cpucode + * @return cpucode + **/ + @javax.annotation.Nullable + public String getCpucode() { + return cpucode; + } + + public void setCpucode(String cpucode) { + this.cpucode = cpucode; + } + + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner propertyClass(PropertyClassEnum propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Ingram Micro assigned product classification - A-Stocked product in all IM warehouses, B-Limited stock in IM warehouses, C-Stocked in fewer wareshouses, D-Ingram discontinued, E-Planned to be phased out as per the vendor, F-Carried for specific customer as per the contract, N-New SKU, O-Discontinued to be liquidated, S-Order for specialized demand, V-Discontinued by vendor, X-Direct Ship products from vendor + * @return propertyClass + **/ + @javax.annotation.Nullable + public PropertyClassEnum getPropertyClass() { + return propertyClass; + } + + public void setPropertyClass(PropertyClassEnum propertyClass) { + this.propertyClass = propertyClass; + } + + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner skustatus(SkustatusEnum skustatus) { + this.skustatus = skustatus; + return this; + } + + /** + * Identifies if the SKU has been discontinued. + * @return skustatus + **/ + @javax.annotation.Nullable + public SkustatusEnum getSkustatus() { + return skustatus; + } + + public void setSkustatus(SkustatusEnum skustatus) { + this.skustatus = skustatus; + } + + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner mediacpu(String mediacpu) { + this.mediacpu = mediacpu; + return this; + } + + /** + * Get mediacpu + * @return mediacpu + **/ + @javax.annotation.Nullable + public String getMediacpu() { + return mediacpu; + } + + public void setMediacpu(String mediacpu) { + this.mediacpu = mediacpu; + } + + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner categorysubcategory(String categorysubcategory) { + this.categorysubcategory = categorysubcategory; + return this; + } + + /** + * Get categorysubcategory + * @return categorysubcategory + **/ + @javax.annotation.Nullable + public String getCategorysubcategory() { + return categorysubcategory; + } + + public void setCategorysubcategory(String categorysubcategory) { + this.categorysubcategory = categorysubcategory; + } + + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner retailprice(BigDecimal retailprice) { + this.retailprice = retailprice; + return this; + } + + /** + * Get retailprice + * @return retailprice + **/ + @javax.annotation.Nullable + public BigDecimal getRetailprice() { + return retailprice; + } + + public void setRetailprice(BigDecimal retailprice) { + this.retailprice = retailprice; + } + + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner newmedia(String newmedia) { + this.newmedia = newmedia; + return this; + } + + /** + * Get newmedia + * @return newmedia + **/ + @javax.annotation.Nullable + public String getNewmedia() { + return newmedia; + } + + public void setNewmedia(String newmedia) { + this.newmedia = newmedia; + } + + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner enduserrequired(EnduserrequiredEnum enduserrequired) { + this.enduserrequired = enduserrequired; + return this; + } + + /** + * Y - End user required N - Not required End user + * @return enduserrequired + **/ + @javax.annotation.Nullable + public EnduserrequiredEnum getEnduserrequired() { + return enduserrequired; + } + + public void setEnduserrequired(EnduserrequiredEnum enduserrequired) { + this.enduserrequired = enduserrequired; + } + + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner backorderflag(BackorderflagEnum backorderflag) { + this.backorderflag = backorderflag; + return this; + } + + /** + * Y- Allow Backorder Flag N- Not allowed + * @return backorderflag + **/ + @javax.annotation.Nullable + public BackorderflagEnum getBackorderflag() { + return backorderflag; + } + + public void setBackorderflag(BackorderflagEnum backorderflag) { + this.backorderflag = backorderflag; + } + + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner skuauthorized(String skuauthorized) { + this.skuauthorized = skuauthorized; + return this; + } + + /** + * Get skuauthorized + * @return skuauthorized + **/ + @javax.annotation.Nullable + public String getSkuauthorized() { + return skuauthorized; + } + + public void setSkuauthorized(String skuauthorized) { + this.skuauthorized = skuauthorized; + } + + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner extendedvendorpartnumber(String extendedvendorpartnumber) { + this.extendedvendorpartnumber = extendedvendorpartnumber; + return this; + } + + /** + * Get extendedvendorpartnumber + * @return extendedvendorpartnumber + **/ + @javax.annotation.Nullable + public String getExtendedvendorpartnumber() { + return extendedvendorpartnumber; + } + + public void setExtendedvendorpartnumber(String extendedvendorpartnumber) { + this.extendedvendorpartnumber = extendedvendorpartnumber; + } + + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner warehousedetails(List warehousedetails) { + this.warehousedetails = warehousedetails; + return this; + } + + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner addWarehousedetailsItem(WarehouseListType warehousedetailsItem) { + if (this.warehousedetails == null) { + this.warehousedetails = new ArrayList<>(); + } + this.warehousedetails.add(warehousedetailsItem); + return this; + } + + /** + * Get warehousedetails + * @return warehousedetails + **/ + @javax.annotation.Nullable + public List getWarehousedetails() { + return warehousedetails; + } + + public void setWarehousedetails(List warehousedetails) { + this.warehousedetails = warehousedetails; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner priceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner = (PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner) o; + return Objects.equals(this.itemstatus, priceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.itemstatus) && + Objects.equals(this.statusmessage, priceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.statusmessage) && + Objects.equals(this.ingrampartnumber, priceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.ingrampartnumber) && + Objects.equals(this.vendorpartnumber, priceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.vendorpartnumber) && + Objects.equals(this.globalskuid, priceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.globalskuid) && + Objects.equals(this.customerprice, priceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.customerprice) && + Objects.equals(this.partdescription1, priceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.partdescription1) && + Objects.equals(this.partdescription2, priceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.partdescription2) && + Objects.equals(this.vendornumber, priceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.vendornumber) && + Objects.equals(this.vendorname, priceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.vendorname) && + Objects.equals(this.cpucode, priceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.cpucode) && + Objects.equals(this.propertyClass, priceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.propertyClass) && + Objects.equals(this.skustatus, priceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.skustatus) && + Objects.equals(this.mediacpu, priceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.mediacpu) && + Objects.equals(this.categorysubcategory, priceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.categorysubcategory) && + Objects.equals(this.retailprice, priceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.retailprice) && + Objects.equals(this.newmedia, priceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.newmedia) && + Objects.equals(this.enduserrequired, priceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.enduserrequired) && + Objects.equals(this.backorderflag, priceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.backorderflag) && + Objects.equals(this.skuauthorized, priceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.skuauthorized) && + Objects.equals(this.extendedvendorpartnumber, priceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.extendedvendorpartnumber) && + Objects.equals(this.warehousedetails, priceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.warehousedetails); + } + + @Override + public int hashCode() { + return Objects.hash(itemstatus, statusmessage, ingrampartnumber, vendorpartnumber, globalskuid, customerprice, partdescription1, partdescription2, vendornumber, vendorname, cpucode, propertyClass, skustatus, mediacpu, categorysubcategory, retailprice, newmedia, enduserrequired, backorderflag, skuauthorized, extendedvendorpartnumber, warehousedetails); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner {\n"); + sb.append(" itemstatus: ").append(toIndentedString(itemstatus)).append("\n"); + sb.append(" statusmessage: ").append(toIndentedString(statusmessage)).append("\n"); + sb.append(" ingrampartnumber: ").append(toIndentedString(ingrampartnumber)).append("\n"); + sb.append(" vendorpartnumber: ").append(toIndentedString(vendorpartnumber)).append("\n"); + sb.append(" globalskuid: ").append(toIndentedString(globalskuid)).append("\n"); + sb.append(" customerprice: ").append(toIndentedString(customerprice)).append("\n"); + sb.append(" partdescription1: ").append(toIndentedString(partdescription1)).append("\n"); + sb.append(" partdescription2: ").append(toIndentedString(partdescription2)).append("\n"); + sb.append(" vendornumber: ").append(toIndentedString(vendornumber)).append("\n"); + sb.append(" vendorname: ").append(toIndentedString(vendorname)).append("\n"); + sb.append(" cpucode: ").append(toIndentedString(cpucode)).append("\n"); + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); + sb.append(" skustatus: ").append(toIndentedString(skustatus)).append("\n"); + sb.append(" mediacpu: ").append(toIndentedString(mediacpu)).append("\n"); + sb.append(" categorysubcategory: ").append(toIndentedString(categorysubcategory)).append("\n"); + sb.append(" retailprice: ").append(toIndentedString(retailprice)).append("\n"); + sb.append(" newmedia: ").append(toIndentedString(newmedia)).append("\n"); + sb.append(" enduserrequired: ").append(toIndentedString(enduserrequired)).append("\n"); + sb.append(" backorderflag: ").append(toIndentedString(backorderflag)).append("\n"); + sb.append(" skuauthorized: ").append(toIndentedString(skuauthorized)).append("\n"); + sb.append(" extendedvendorpartnumber: ").append(toIndentedString(extendedvendorpartnumber)).append("\n"); + sb.append(" warehousedetails: ").append(toIndentedString(warehousedetails)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("itemstatus"); + openapiFields.add("statusmessage"); + openapiFields.add("ingrampartnumber"); + openapiFields.add("vendorpartnumber"); + openapiFields.add("globalskuid"); + openapiFields.add("customerprice"); + openapiFields.add("partdescription1"); + openapiFields.add("partdescription2"); + openapiFields.add("vendornumber"); + openapiFields.add("vendorname"); + openapiFields.add("cpucode"); + openapiFields.add("class"); + openapiFields.add("skustatus"); + openapiFields.add("mediacpu"); + openapiFields.add("categorysubcategory"); + openapiFields.add("retailprice"); + openapiFields.add("newmedia"); + openapiFields.add("enduserrequired"); + openapiFields.add("backorderflag"); + openapiFields.add("skuauthorized"); + openapiFields.add("extendedvendorpartnumber"); + openapiFields.add("warehousedetails"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner is not found in the empty JSON string", PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("itemstatus") != null && !jsonObj.get("itemstatus").isJsonNull()) && !jsonObj.get("itemstatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `itemstatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("itemstatus").toString())); + } + // validate the optional field `itemstatus` + if (jsonObj.get("itemstatus") != null && !jsonObj.get("itemstatus").isJsonNull()) { + ItemstatusEnum.validateJsonElement(jsonObj.get("itemstatus")); + } + if ((jsonObj.get("statusmessage") != null && !jsonObj.get("statusmessage").isJsonNull()) && !jsonObj.get("statusmessage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `statusmessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("statusmessage").toString())); + } + if ((jsonObj.get("ingrampartnumber") != null && !jsonObj.get("ingrampartnumber").isJsonNull()) && !jsonObj.get("ingrampartnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingrampartnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingrampartnumber").toString())); + } + if ((jsonObj.get("vendorpartnumber") != null && !jsonObj.get("vendorpartnumber").isJsonNull()) && !jsonObj.get("vendorpartnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorpartnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorpartnumber").toString())); + } + if ((jsonObj.get("globalskuid") != null && !jsonObj.get("globalskuid").isJsonNull()) && !jsonObj.get("globalskuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `globalskuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("globalskuid").toString())); + } + if ((jsonObj.get("partdescription1") != null && !jsonObj.get("partdescription1").isJsonNull()) && !jsonObj.get("partdescription1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `partdescription1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("partdescription1").toString())); + } + if ((jsonObj.get("partdescription2") != null && !jsonObj.get("partdescription2").isJsonNull()) && !jsonObj.get("partdescription2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `partdescription2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("partdescription2").toString())); + } + if ((jsonObj.get("vendornumber") != null && !jsonObj.get("vendornumber").isJsonNull()) && !jsonObj.get("vendornumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendornumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendornumber").toString())); + } + if ((jsonObj.get("vendorname") != null && !jsonObj.get("vendorname").isJsonNull()) && !jsonObj.get("vendorname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorname").toString())); + } + if ((jsonObj.get("cpucode") != null && !jsonObj.get("cpucode").isJsonNull()) && !jsonObj.get("cpucode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cpucode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cpucode").toString())); + } + if ((jsonObj.get("class") != null && !jsonObj.get("class").isJsonNull()) && !jsonObj.get("class").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `class` to be a primitive type in the JSON string but got `%s`", jsonObj.get("class").toString())); + } + // validate the optional field `class` + if (jsonObj.get("class") != null && !jsonObj.get("class").isJsonNull()) { + PropertyClassEnum.validateJsonElement(jsonObj.get("class")); + } + if ((jsonObj.get("skustatus") != null && !jsonObj.get("skustatus").isJsonNull()) && !jsonObj.get("skustatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `skustatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("skustatus").toString())); + } + // validate the optional field `skustatus` + if (jsonObj.get("skustatus") != null && !jsonObj.get("skustatus").isJsonNull()) { + SkustatusEnum.validateJsonElement(jsonObj.get("skustatus")); + } + if ((jsonObj.get("mediacpu") != null && !jsonObj.get("mediacpu").isJsonNull()) && !jsonObj.get("mediacpu").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mediacpu` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediacpu").toString())); + } + if ((jsonObj.get("categorysubcategory") != null && !jsonObj.get("categorysubcategory").isJsonNull()) && !jsonObj.get("categorysubcategory").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `categorysubcategory` to be a primitive type in the JSON string but got `%s`", jsonObj.get("categorysubcategory").toString())); + } + if ((jsonObj.get("newmedia") != null && !jsonObj.get("newmedia").isJsonNull()) && !jsonObj.get("newmedia").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `newmedia` to be a primitive type in the JSON string but got `%s`", jsonObj.get("newmedia").toString())); + } + if ((jsonObj.get("enduserrequired") != null && !jsonObj.get("enduserrequired").isJsonNull()) && !jsonObj.get("enduserrequired").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `enduserrequired` to be a primitive type in the JSON string but got `%s`", jsonObj.get("enduserrequired").toString())); + } + // validate the optional field `enduserrequired` + if (jsonObj.get("enduserrequired") != null && !jsonObj.get("enduserrequired").isJsonNull()) { + EnduserrequiredEnum.validateJsonElement(jsonObj.get("enduserrequired")); + } + if ((jsonObj.get("backorderflag") != null && !jsonObj.get("backorderflag").isJsonNull()) && !jsonObj.get("backorderflag").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `backorderflag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("backorderflag").toString())); + } + // validate the optional field `backorderflag` + if (jsonObj.get("backorderflag") != null && !jsonObj.get("backorderflag").isJsonNull()) { + BackorderflagEnum.validateJsonElement(jsonObj.get("backorderflag")); + } + if ((jsonObj.get("skuauthorized") != null && !jsonObj.get("skuauthorized").isJsonNull()) && !jsonObj.get("skuauthorized").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `skuauthorized` to be a primitive type in the JSON string but got `%s`", jsonObj.get("skuauthorized").toString())); + } + if ((jsonObj.get("extendedvendorpartnumber") != null && !jsonObj.get("extendedvendorpartnumber").isJsonNull()) && !jsonObj.get("extendedvendorpartnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `extendedvendorpartnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("extendedvendorpartnumber").toString())); + } + if (jsonObj.get("warehousedetails") != null && !jsonObj.get("warehousedetails").isJsonNull()) { + JsonArray jsonArraywarehousedetails = jsonObj.getAsJsonArray("warehousedetails"); + if (jsonArraywarehousedetails != null) { + // ensure the json data is an array + if (!jsonObj.get("warehousedetails").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warehousedetails` to be an array in the JSON string but got `%s`", jsonObj.get("warehousedetails").toString())); + } + + // validate the optional field `warehousedetails` (array) + for (int i = 0; i < jsonArraywarehousedetails.size(); i++) { + WarehouseListType.validateJsonElement(jsonArraywarehousedetails.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner + * @throws IOException if the JSON string is invalid with respect to PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner + */ + public static PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner.class); + } + + /** + * Convert an instance of PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponseResponsepreamble.java b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponseResponsepreamble.java new file mode 100644 index 00000000..c436a4c4 --- /dev/null +++ b/src/main/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponseResponsepreamble.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * PriceAndAvailabilityResponseServiceresponseResponsepreamble + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class PriceAndAvailabilityResponseServiceresponseResponsepreamble { + public static final String SERIALIZED_NAME_RESPONSESTATUS = "responsestatus"; + @SerializedName(SERIALIZED_NAME_RESPONSESTATUS) + private String responsestatus; + + public static final String SERIALIZED_NAME_RESPONSEMESSAGE = "responsemessage"; + @SerializedName(SERIALIZED_NAME_RESPONSEMESSAGE) + private String responsemessage; + + public static final String SERIALIZED_NAME_STATUSCODE = "statuscode"; + @SerializedName(SERIALIZED_NAME_STATUSCODE) + private String statuscode; + + public PriceAndAvailabilityResponseServiceresponseResponsepreamble() { + } + + public PriceAndAvailabilityResponseServiceresponseResponsepreamble responsestatus(String responsestatus) { + this.responsestatus = responsestatus; + return this; + } + + /** + * SUCCESS or FAILED, sometimes PARTIAL SUCCESS if connection to 1 of the systems fails + * @return responsestatus + **/ + @javax.annotation.Nullable + public String getResponsestatus() { + return responsestatus; + } + + public void setResponsestatus(String responsestatus) { + this.responsestatus = responsestatus; + } + + + public PriceAndAvailabilityResponseServiceresponseResponsepreamble responsemessage(String responsemessage) { + this.responsemessage = responsemessage; + return this; + } + + /** + * Overall status message including error message + * @return responsemessage + **/ + @javax.annotation.Nullable + public String getResponsemessage() { + return responsemessage; + } + + public void setResponsemessage(String responsemessage) { + this.responsemessage = responsemessage; + } + + + public PriceAndAvailabilityResponseServiceresponseResponsepreamble statuscode(String statuscode) { + this.statuscode = statuscode; + return this; + } + + /** + * Statuscode Message + * @return statuscode + **/ + @javax.annotation.Nullable + public String getStatuscode() { + return statuscode; + } + + public void setStatuscode(String statuscode) { + this.statuscode = statuscode; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceAndAvailabilityResponseServiceresponseResponsepreamble priceAndAvailabilityResponseServiceresponseResponsepreamble = (PriceAndAvailabilityResponseServiceresponseResponsepreamble) o; + return Objects.equals(this.responsestatus, priceAndAvailabilityResponseServiceresponseResponsepreamble.responsestatus) && + Objects.equals(this.responsemessage, priceAndAvailabilityResponseServiceresponseResponsepreamble.responsemessage) && + Objects.equals(this.statuscode, priceAndAvailabilityResponseServiceresponseResponsepreamble.statuscode); + } + + @Override + public int hashCode() { + return Objects.hash(responsestatus, responsemessage, statuscode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceAndAvailabilityResponseServiceresponseResponsepreamble {\n"); + sb.append(" responsestatus: ").append(toIndentedString(responsestatus)).append("\n"); + sb.append(" responsemessage: ").append(toIndentedString(responsemessage)).append("\n"); + sb.append(" statuscode: ").append(toIndentedString(statuscode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("responsestatus"); + openapiFields.add("responsemessage"); + openapiFields.add("statuscode"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PriceAndAvailabilityResponseServiceresponseResponsepreamble + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceAndAvailabilityResponseServiceresponseResponsepreamble.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PriceAndAvailabilityResponseServiceresponseResponsepreamble is not found in the empty JSON string", PriceAndAvailabilityResponseServiceresponseResponsepreamble.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceAndAvailabilityResponseServiceresponseResponsepreamble.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PriceAndAvailabilityResponseServiceresponseResponsepreamble` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("responsestatus") != null && !jsonObj.get("responsestatus").isJsonNull()) && !jsonObj.get("responsestatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `responsestatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("responsestatus").toString())); + } + if ((jsonObj.get("responsemessage") != null && !jsonObj.get("responsemessage").isJsonNull()) && !jsonObj.get("responsemessage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `responsemessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("responsemessage").toString())); + } + if ((jsonObj.get("statuscode") != null && !jsonObj.get("statuscode").isJsonNull()) && !jsonObj.get("statuscode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `statuscode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("statuscode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceAndAvailabilityResponseServiceresponseResponsepreamble.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceAndAvailabilityResponseServiceresponseResponsepreamble' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceAndAvailabilityResponseServiceresponseResponsepreamble.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceAndAvailabilityResponseServiceresponseResponsepreamble value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceAndAvailabilityResponseServiceresponseResponsepreamble read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceAndAvailabilityResponseServiceresponseResponsepreamble given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceAndAvailabilityResponseServiceresponseResponsepreamble + * @throws IOException if the JSON string is invalid with respect to PriceAndAvailabilityResponseServiceresponseResponsepreamble + */ + public static PriceAndAvailabilityResponseServiceresponseResponsepreamble fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceAndAvailabilityResponseServiceresponseResponsepreamble.class); + } + + /** + * Convert an instance of PriceAndAvailabilityResponseServiceresponseResponsepreamble to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ProductDetailResponse.java b/src/main/java/xiresellers/client/model/ProductDetailResponse.java new file mode 100644 index 00000000..6f245916 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ProductDetailResponse.java @@ -0,0 +1,769 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ProductDetailResponseAdditionalInformation; +import xiresellers.client.model.ProductDetailResponseCiscoFieldsInner; +import xiresellers.client.model.ProductDetailResponseIndicatorsInner; +import xiresellers.client.model.ProductDetailResponseTechnicalSpecificationsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ProductDetailResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ProductDetailResponse { + public static final String SERIALIZED_NAME_INGRAM_PART_NUMBER = "ingramPartNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PART_NUMBER) + private String ingramPartNumber; + + public static final String SERIALIZED_NAME_VENDOR_PART_NUMBER = "vendorPartNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_PART_NUMBER) + private String vendorPartNumber; + + public static final String SERIALIZED_NAME_PRODUCT_AUTHORIZED = "productAuthorized"; + @SerializedName(SERIALIZED_NAME_PRODUCT_AUTHORIZED) + private Boolean productAuthorized; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_PRODUCT_DETAIL_DESCRIPTION = "productDetailDescription"; + @SerializedName(SERIALIZED_NAME_PRODUCT_DETAIL_DESCRIPTION) + private String productDetailDescription; + + public static final String SERIALIZED_NAME_UPC = "upc"; + @SerializedName(SERIALIZED_NAME_UPC) + private String upc; + + public static final String SERIALIZED_NAME_PRODUCT_CATEGORY = "productCategory"; + @SerializedName(SERIALIZED_NAME_PRODUCT_CATEGORY) + private String productCategory; + + public static final String SERIALIZED_NAME_PRODUCT_SUBCATEGORY = "productSubcategory"; + @SerializedName(SERIALIZED_NAME_PRODUCT_SUBCATEGORY) + private String productSubcategory; + + public static final String SERIALIZED_NAME_VENDOR_NAME = "vendorName"; + @SerializedName(SERIALIZED_NAME_VENDOR_NAME) + private String vendorName; + + public static final String SERIALIZED_NAME_VENDOR_NUMBER = "vendorNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_NUMBER) + private String vendorNumber; + + public static final String SERIALIZED_NAME_PRODUCT_STATUS_CODE = "productStatusCode"; + @SerializedName(SERIALIZED_NAME_PRODUCT_STATUS_CODE) + private String productStatusCode; + + public static final String SERIALIZED_NAME_PRODUCT_CLASS = "productClass"; + @SerializedName(SERIALIZED_NAME_PRODUCT_CLASS) + private String productClass; + + public static final String SERIALIZED_NAME_CUSTOMER_PART_NUMBER = "customerPartNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_PART_NUMBER) + private String customerPartNumber; + + public static final String SERIALIZED_NAME_INDICATORS = "indicators"; + @SerializedName(SERIALIZED_NAME_INDICATORS) + private List indicators; + + public static final String SERIALIZED_NAME_CISCO_FIELDS = "ciscoFields"; + @SerializedName(SERIALIZED_NAME_CISCO_FIELDS) + private List ciscoFields; + + public static final String SERIALIZED_NAME_TECHNICAL_SPECIFICATIONS = "technicalSpecifications"; + @SerializedName(SERIALIZED_NAME_TECHNICAL_SPECIFICATIONS) + private List technicalSpecifications; + + public static final String SERIALIZED_NAME_WARRANTY_INFORMATION = "warrantyInformation"; + @SerializedName(SERIALIZED_NAME_WARRANTY_INFORMATION) + private List warrantyInformation; + + public static final String SERIALIZED_NAME_ADDITIONAL_INFORMATION = "additionalInformation"; + @SerializedName(SERIALIZED_NAME_ADDITIONAL_INFORMATION) + private ProductDetailResponseAdditionalInformation additionalInformation; + + public ProductDetailResponse() { + } + + public ProductDetailResponse ingramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + return this; + } + + /** + * Ingram Micro unique part number for the product. + * @return ingramPartNumber + **/ + @javax.annotation.Nullable + public String getIngramPartNumber() { + return ingramPartNumber; + } + + public void setIngramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + } + + + public ProductDetailResponse vendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + return this; + } + + /** + * Vendor’s part number for the product. + * @return vendorPartNumber + **/ + @javax.annotation.Nullable + public String getVendorPartNumber() { + return vendorPartNumber; + } + + public void setVendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + } + + + public ProductDetailResponse productAuthorized(Boolean productAuthorized) { + this.productAuthorized = productAuthorized; + return this; + } + + /** + * Boolean that indicates whether a product is authorized. + * @return productAuthorized + **/ + @javax.annotation.Nullable + public Boolean getProductAuthorized() { + return productAuthorized; + } + + public void setProductAuthorized(Boolean productAuthorized) { + this.productAuthorized = productAuthorized; + } + + + public ProductDetailResponse description(String description) { + this.description = description; + return this; + } + + /** + * The description given for the product. + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + + public ProductDetailResponse productDetailDescription(String productDetailDescription) { + this.productDetailDescription = productDetailDescription; + return this; + } + + /** + * The detailed description given for the product. + * @return productDetailDescription + **/ + @javax.annotation.Nullable + public String getProductDetailDescription() { + return productDetailDescription; + } + + public void setProductDetailDescription(String productDetailDescription) { + this.productDetailDescription = productDetailDescription; + } + + + public ProductDetailResponse upc(String upc) { + this.upc = upc; + return this; + } + + /** + * The UPC code for the product. Consists of 12 numeric digits that are uniquely assigned to each trade item. + * @return upc + **/ + @javax.annotation.Nullable + public String getUpc() { + return upc; + } + + public void setUpc(String upc) { + this.upc = upc; + } + + + public ProductDetailResponse productCategory(String productCategory) { + this.productCategory = productCategory; + return this; + } + + /** + * The category of the product. + * @return productCategory + **/ + @javax.annotation.Nullable + public String getProductCategory() { + return productCategory; + } + + public void setProductCategory(String productCategory) { + this.productCategory = productCategory; + } + + + public ProductDetailResponse productSubcategory(String productSubcategory) { + this.productSubcategory = productSubcategory; + return this; + } + + /** + * The sub-category of the product. + * @return productSubcategory + **/ + @javax.annotation.Nullable + public String getProductSubcategory() { + return productSubcategory; + } + + public void setProductSubcategory(String productSubcategory) { + this.productSubcategory = productSubcategory; + } + + + public ProductDetailResponse vendorName(String vendorName) { + this.vendorName = vendorName; + return this; + } + + /** + * Vendor name for the order. + * @return vendorName + **/ + @javax.annotation.Nullable + public String getVendorName() { + return vendorName; + } + + public void setVendorName(String vendorName) { + this.vendorName = vendorName; + } + + + public ProductDetailResponse vendorNumber(String vendorNumber) { + this.vendorNumber = vendorNumber; + return this; + } + + /** + * Vendor number that identifies the product. + * @return vendorNumber + **/ + @javax.annotation.Nullable + public String getVendorNumber() { + return vendorNumber; + } + + public void setVendorNumber(String vendorNumber) { + this.vendorNumber = vendorNumber; + } + + + public ProductDetailResponse productStatusCode(String productStatusCode) { + this.productStatusCode = productStatusCode; + return this; + } + + /** + * Status code of the product. + * @return productStatusCode + **/ + @javax.annotation.Nullable + public String getProductStatusCode() { + return productStatusCode; + } + + public void setProductStatusCode(String productStatusCode) { + this.productStatusCode = productStatusCode; + } + + + public ProductDetailResponse productClass(String productClass) { + this.productClass = productClass; + return this; + } + + /** + * Indicates whether the product is directly shipped from the vendor’s warehouse or if the product ships from Ingram Micro’s warehouse. Class Codes are Ingram classifications on how skus are stocked A = Product that is stocked usually in all IM warehouses and replenished on a regular basis. B = Product that is stocked in limited IM warehouses and replenished on a regular basis C = Product that is stocked in fewer IM warehouses and replenished on a regular basis. D = Product that Ingram Micro has elected to discontinue. E = Product that will be phased out later, according to the vendor. You may not want to replenish this product, but instead sell down what is in stock. F = Product that we carry for a specific customer or supplier under a contractual agreement. N = New Sku. Classification before first receipt O = Discontinued product to be liquidated S= Order for Specialized Demand (Order to backorder) X= direct ship from Vendor V = product that vendor has elected to discontinue. + * @return productClass + **/ + @javax.annotation.Nullable + public String getProductClass() { + return productClass; + } + + public void setProductClass(String productClass) { + this.productClass = productClass; + } + + + public ProductDetailResponse customerPartNumber(String customerPartNumber) { + this.customerPartNumber = customerPartNumber; + return this; + } + + /** + * Reseller / end-user’s part number for the product. + * @return customerPartNumber + **/ + @javax.annotation.Nullable + public String getCustomerPartNumber() { + return customerPartNumber; + } + + public void setCustomerPartNumber(String customerPartNumber) { + this.customerPartNumber = customerPartNumber; + } + + + public ProductDetailResponse indicators(List indicators) { + this.indicators = indicators; + return this; + } + + public ProductDetailResponse addIndicatorsItem(ProductDetailResponseIndicatorsInner indicatorsItem) { + if (this.indicators == null) { + this.indicators = new ArrayList<>(); + } + this.indicators.add(indicatorsItem); + return this; + } + + /** + * Indicators of the Product + * @return indicators + **/ + @javax.annotation.Nullable + public List getIndicators() { + return indicators; + } + + public void setIndicators(List indicators) { + this.indicators = indicators; + } + + + public ProductDetailResponse ciscoFields(List ciscoFields) { + this.ciscoFields = ciscoFields; + return this; + } + + public ProductDetailResponse addCiscoFieldsItem(ProductDetailResponseCiscoFieldsInner ciscoFieldsItem) { + if (this.ciscoFields == null) { + this.ciscoFields = new ArrayList<>(); + } + this.ciscoFields.add(ciscoFieldsItem); + return this; + } + + /** + * Cisco product related information. + * @return ciscoFields + **/ + @javax.annotation.Nullable + public List getCiscoFields() { + return ciscoFields; + } + + public void setCiscoFields(List ciscoFields) { + this.ciscoFields = ciscoFields; + } + + + public ProductDetailResponse technicalSpecifications(List technicalSpecifications) { + this.technicalSpecifications = technicalSpecifications; + return this; + } + + public ProductDetailResponse addTechnicalSpecificationsItem(ProductDetailResponseTechnicalSpecificationsInner technicalSpecificationsItem) { + if (this.technicalSpecifications == null) { + this.technicalSpecifications = new ArrayList<>(); + } + this.technicalSpecifications.add(technicalSpecificationsItem); + return this; + } + + /** + * Technical specifications of the product. + * @return technicalSpecifications + **/ + @javax.annotation.Nullable + public List getTechnicalSpecifications() { + return technicalSpecifications; + } + + public void setTechnicalSpecifications(List technicalSpecifications) { + this.technicalSpecifications = technicalSpecifications; + } + + + public ProductDetailResponse warrantyInformation(List warrantyInformation) { + this.warrantyInformation = warrantyInformation; + return this; + } + + public ProductDetailResponse addWarrantyInformationItem(Object warrantyInformationItem) { + if (this.warrantyInformation == null) { + this.warrantyInformation = new ArrayList<>(); + } + this.warrantyInformation.add(warrantyInformationItem); + return this; + } + + /** + * Warranty information related to the product. + * @return warrantyInformation + **/ + @javax.annotation.Nullable + public List getWarrantyInformation() { + return warrantyInformation; + } + + public void setWarrantyInformation(List warrantyInformation) { + this.warrantyInformation = warrantyInformation; + } + + + public ProductDetailResponse additionalInformation(ProductDetailResponseAdditionalInformation additionalInformation) { + this.additionalInformation = additionalInformation; + return this; + } + + /** + * Get additionalInformation + * @return additionalInformation + **/ + @javax.annotation.Nullable + public ProductDetailResponseAdditionalInformation getAdditionalInformation() { + return additionalInformation; + } + + public void setAdditionalInformation(ProductDetailResponseAdditionalInformation additionalInformation) { + this.additionalInformation = additionalInformation; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductDetailResponse productDetailResponse = (ProductDetailResponse) o; + return Objects.equals(this.ingramPartNumber, productDetailResponse.ingramPartNumber) && + Objects.equals(this.vendorPartNumber, productDetailResponse.vendorPartNumber) && + Objects.equals(this.productAuthorized, productDetailResponse.productAuthorized) && + Objects.equals(this.description, productDetailResponse.description) && + Objects.equals(this.productDetailDescription, productDetailResponse.productDetailDescription) && + Objects.equals(this.upc, productDetailResponse.upc) && + Objects.equals(this.productCategory, productDetailResponse.productCategory) && + Objects.equals(this.productSubcategory, productDetailResponse.productSubcategory) && + Objects.equals(this.vendorName, productDetailResponse.vendorName) && + Objects.equals(this.vendorNumber, productDetailResponse.vendorNumber) && + Objects.equals(this.productStatusCode, productDetailResponse.productStatusCode) && + Objects.equals(this.productClass, productDetailResponse.productClass) && + Objects.equals(this.customerPartNumber, productDetailResponse.customerPartNumber) && + Objects.equals(this.indicators, productDetailResponse.indicators) && + Objects.equals(this.ciscoFields, productDetailResponse.ciscoFields) && + Objects.equals(this.technicalSpecifications, productDetailResponse.technicalSpecifications) && + Objects.equals(this.warrantyInformation, productDetailResponse.warrantyInformation) && + Objects.equals(this.additionalInformation, productDetailResponse.additionalInformation); + } + + @Override + public int hashCode() { + return Objects.hash(ingramPartNumber, vendorPartNumber, productAuthorized, description, productDetailDescription, upc, productCategory, productSubcategory, vendorName, vendorNumber, productStatusCode, productClass, customerPartNumber, indicators, ciscoFields, technicalSpecifications, warrantyInformation, additionalInformation); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductDetailResponse {\n"); + sb.append(" ingramPartNumber: ").append(toIndentedString(ingramPartNumber)).append("\n"); + sb.append(" vendorPartNumber: ").append(toIndentedString(vendorPartNumber)).append("\n"); + sb.append(" productAuthorized: ").append(toIndentedString(productAuthorized)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" productDetailDescription: ").append(toIndentedString(productDetailDescription)).append("\n"); + sb.append(" upc: ").append(toIndentedString(upc)).append("\n"); + sb.append(" productCategory: ").append(toIndentedString(productCategory)).append("\n"); + sb.append(" productSubcategory: ").append(toIndentedString(productSubcategory)).append("\n"); + sb.append(" vendorName: ").append(toIndentedString(vendorName)).append("\n"); + sb.append(" vendorNumber: ").append(toIndentedString(vendorNumber)).append("\n"); + sb.append(" productStatusCode: ").append(toIndentedString(productStatusCode)).append("\n"); + sb.append(" productClass: ").append(toIndentedString(productClass)).append("\n"); + sb.append(" customerPartNumber: ").append(toIndentedString(customerPartNumber)).append("\n"); + sb.append(" indicators: ").append(toIndentedString(indicators)).append("\n"); + sb.append(" ciscoFields: ").append(toIndentedString(ciscoFields)).append("\n"); + sb.append(" technicalSpecifications: ").append(toIndentedString(technicalSpecifications)).append("\n"); + sb.append(" warrantyInformation: ").append(toIndentedString(warrantyInformation)).append("\n"); + sb.append(" additionalInformation: ").append(toIndentedString(additionalInformation)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("ingramPartNumber"); + openapiFields.add("vendorPartNumber"); + openapiFields.add("productAuthorized"); + openapiFields.add("description"); + openapiFields.add("productDetailDescription"); + openapiFields.add("upc"); + openapiFields.add("productCategory"); + openapiFields.add("productSubcategory"); + openapiFields.add("vendorName"); + openapiFields.add("vendorNumber"); + openapiFields.add("productStatusCode"); + openapiFields.add("productClass"); + openapiFields.add("customerPartNumber"); + openapiFields.add("indicators"); + openapiFields.add("ciscoFields"); + openapiFields.add("technicalSpecifications"); + openapiFields.add("warrantyInformation"); + openapiFields.add("additionalInformation"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductDetailResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductDetailResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProductDetailResponse is not found in the empty JSON string", ProductDetailResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductDetailResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductDetailResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("ingramPartNumber") != null && !jsonObj.get("ingramPartNumber").isJsonNull()) && !jsonObj.get("ingramPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPartNumber").toString())); + } + if ((jsonObj.get("vendorPartNumber") != null && !jsonObj.get("vendorPartNumber").isJsonNull()) && !jsonObj.get("vendorPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorPartNumber").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("productDetailDescription") != null && !jsonObj.get("productDetailDescription").isJsonNull()) && !jsonObj.get("productDetailDescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `productDetailDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productDetailDescription").toString())); + } + if ((jsonObj.get("upc") != null && !jsonObj.get("upc").isJsonNull()) && !jsonObj.get("upc").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `upc` to be a primitive type in the JSON string but got `%s`", jsonObj.get("upc").toString())); + } + if ((jsonObj.get("productCategory") != null && !jsonObj.get("productCategory").isJsonNull()) && !jsonObj.get("productCategory").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `productCategory` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productCategory").toString())); + } + if ((jsonObj.get("productSubcategory") != null && !jsonObj.get("productSubcategory").isJsonNull()) && !jsonObj.get("productSubcategory").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `productSubcategory` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productSubcategory").toString())); + } + if ((jsonObj.get("vendorName") != null && !jsonObj.get("vendorName").isJsonNull()) && !jsonObj.get("vendorName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorName").toString())); + } + if ((jsonObj.get("vendorNumber") != null && !jsonObj.get("vendorNumber").isJsonNull()) && !jsonObj.get("vendorNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorNumber").toString())); + } + if ((jsonObj.get("productStatusCode") != null && !jsonObj.get("productStatusCode").isJsonNull()) && !jsonObj.get("productStatusCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `productStatusCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productStatusCode").toString())); + } + if ((jsonObj.get("productClass") != null && !jsonObj.get("productClass").isJsonNull()) && !jsonObj.get("productClass").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `productClass` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productClass").toString())); + } + if ((jsonObj.get("customerPartNumber") != null && !jsonObj.get("customerPartNumber").isJsonNull()) && !jsonObj.get("customerPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerPartNumber").toString())); + } + if (jsonObj.get("indicators") != null && !jsonObj.get("indicators").isJsonNull()) { + JsonArray jsonArrayindicators = jsonObj.getAsJsonArray("indicators"); + if (jsonArrayindicators != null) { + // ensure the json data is an array + if (!jsonObj.get("indicators").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `indicators` to be an array in the JSON string but got `%s`", jsonObj.get("indicators").toString())); + } + + // validate the optional field `indicators` (array) + for (int i = 0; i < jsonArrayindicators.size(); i++) { + ProductDetailResponseIndicatorsInner.validateJsonElement(jsonArrayindicators.get(i)); + }; + } + } + if (jsonObj.get("ciscoFields") != null && !jsonObj.get("ciscoFields").isJsonNull()) { + JsonArray jsonArrayciscoFields = jsonObj.getAsJsonArray("ciscoFields"); + if (jsonArrayciscoFields != null) { + // ensure the json data is an array + if (!jsonObj.get("ciscoFields").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `ciscoFields` to be an array in the JSON string but got `%s`", jsonObj.get("ciscoFields").toString())); + } + + // validate the optional field `ciscoFields` (array) + for (int i = 0; i < jsonArrayciscoFields.size(); i++) { + ProductDetailResponseCiscoFieldsInner.validateJsonElement(jsonArrayciscoFields.get(i)); + }; + } + } + if (jsonObj.get("technicalSpecifications") != null && !jsonObj.get("technicalSpecifications").isJsonNull()) { + JsonArray jsonArraytechnicalSpecifications = jsonObj.getAsJsonArray("technicalSpecifications"); + if (jsonArraytechnicalSpecifications != null) { + // ensure the json data is an array + if (!jsonObj.get("technicalSpecifications").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `technicalSpecifications` to be an array in the JSON string but got `%s`", jsonObj.get("technicalSpecifications").toString())); + } + + // validate the optional field `technicalSpecifications` (array) + for (int i = 0; i < jsonArraytechnicalSpecifications.size(); i++) { + ProductDetailResponseTechnicalSpecificationsInner.validateJsonElement(jsonArraytechnicalSpecifications.get(i)); + }; + } + } + // ensure the optional json data is an array if present + if (jsonObj.get("warrantyInformation") != null && !jsonObj.get("warrantyInformation").isJsonNull() && !jsonObj.get("warrantyInformation").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warrantyInformation` to be an array in the JSON string but got `%s`", jsonObj.get("warrantyInformation").toString())); + } + // validate the optional field `additionalInformation` + if (jsonObj.get("additionalInformation") != null && !jsonObj.get("additionalInformation").isJsonNull()) { + ProductDetailResponseAdditionalInformation.validateJsonElement(jsonObj.get("additionalInformation")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductDetailResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductDetailResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductDetailResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductDetailResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductDetailResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProductDetailResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductDetailResponse + * @throws IOException if the JSON string is invalid with respect to ProductDetailResponse + */ + public static ProductDetailResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProductDetailResponse.class); + } + + /** + * Convert an instance of ProductDetailResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ProductDetailResponseAdditionalInformation.java b/src/main/java/xiresellers/client/model/ProductDetailResponseAdditionalInformation.java new file mode 100644 index 00000000..e5768750 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ProductDetailResponseAdditionalInformation.java @@ -0,0 +1,399 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ProductDetailResponseAdditionalInformationProductWeightInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Additional Information related to the product. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ProductDetailResponseAdditionalInformation { + public static final String SERIALIZED_NAME_PRODUCT_WEIGHT = "productWeight"; + @SerializedName(SERIALIZED_NAME_PRODUCT_WEIGHT) + private List productWeight; + + public static final String SERIALIZED_NAME_IS_BULK_FREIGHT = "isBulkFreight"; + @SerializedName(SERIALIZED_NAME_IS_BULK_FREIGHT) + private Boolean isBulkFreight; + + public static final String SERIALIZED_NAME_HEIGHT = "height"; + @SerializedName(SERIALIZED_NAME_HEIGHT) + private String height; + + public static final String SERIALIZED_NAME_WIDTH = "width"; + @SerializedName(SERIALIZED_NAME_WIDTH) + private String width; + + public static final String SERIALIZED_NAME_LENGTH = "length"; + @SerializedName(SERIALIZED_NAME_LENGTH) + private String length; + + public static final String SERIALIZED_NAME_NET_WEIGHT = "netWeight"; + @SerializedName(SERIALIZED_NAME_NET_WEIGHT) + private String netWeight; + + public static final String SERIALIZED_NAME_DIMENSION_UNIT = "dimensionUnit"; + @SerializedName(SERIALIZED_NAME_DIMENSION_UNIT) + private String dimensionUnit; + + public ProductDetailResponseAdditionalInformation() { + } + + public ProductDetailResponseAdditionalInformation productWeight(List productWeight) { + this.productWeight = productWeight; + return this; + } + + public ProductDetailResponseAdditionalInformation addProductWeightItem(ProductDetailResponseAdditionalInformationProductWeightInner productWeightItem) { + if (this.productWeight == null) { + this.productWeight = new ArrayList<>(); + } + this.productWeight.add(productWeightItem); + return this; + } + + /** + * Weight information related to the product. + * @return productWeight + **/ + @javax.annotation.Nullable + public List getProductWeight() { + return productWeight; + } + + public void setProductWeight(List productWeight) { + this.productWeight = productWeight; + } + + + public ProductDetailResponseAdditionalInformation isBulkFreight(Boolean isBulkFreight) { + this.isBulkFreight = isBulkFreight; + return this; + } + + /** + * Example : true or false + * @return isBulkFreight + **/ + @javax.annotation.Nullable + public Boolean getIsBulkFreight() { + return isBulkFreight; + } + + public void setIsBulkFreight(Boolean isBulkFreight) { + this.isBulkFreight = isBulkFreight; + } + + + public ProductDetailResponseAdditionalInformation height(String height) { + this.height = height; + return this; + } + + /** + * Example : '5.2 Inches' + * @return height + **/ + @javax.annotation.Nullable + public String getHeight() { + return height; + } + + public void setHeight(String height) { + this.height = height; + } + + + public ProductDetailResponseAdditionalInformation width(String width) { + this.width = width; + return this; + } + + /** + * Example : '13 inches' + * @return width + **/ + @javax.annotation.Nullable + public String getWidth() { + return width; + } + + public void setWidth(String width) { + this.width = width; + } + + + public ProductDetailResponseAdditionalInformation length(String length) { + this.length = length; + return this; + } + + /** + * Example : '20.4 inches' + * @return length + **/ + @javax.annotation.Nullable + public String getLength() { + return length; + } + + public void setLength(String length) { + this.length = length; + } + + + public ProductDetailResponseAdditionalInformation netWeight(String netWeight) { + this.netWeight = netWeight; + return this; + } + + /** + * Example : '10 lb' + * @return netWeight + **/ + @javax.annotation.Nullable + public String getNetWeight() { + return netWeight; + } + + public void setNetWeight(String netWeight) { + this.netWeight = netWeight; + } + + + public ProductDetailResponseAdditionalInformation dimensionUnit(String dimensionUnit) { + this.dimensionUnit = dimensionUnit; + return this; + } + + /** + * Example : 'Unit value' + * @return dimensionUnit + **/ + @javax.annotation.Nullable + public String getDimensionUnit() { + return dimensionUnit; + } + + public void setDimensionUnit(String dimensionUnit) { + this.dimensionUnit = dimensionUnit; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductDetailResponseAdditionalInformation productDetailResponseAdditionalInformation = (ProductDetailResponseAdditionalInformation) o; + return Objects.equals(this.productWeight, productDetailResponseAdditionalInformation.productWeight) && + Objects.equals(this.isBulkFreight, productDetailResponseAdditionalInformation.isBulkFreight) && + Objects.equals(this.height, productDetailResponseAdditionalInformation.height) && + Objects.equals(this.width, productDetailResponseAdditionalInformation.width) && + Objects.equals(this.length, productDetailResponseAdditionalInformation.length) && + Objects.equals(this.netWeight, productDetailResponseAdditionalInformation.netWeight) && + Objects.equals(this.dimensionUnit, productDetailResponseAdditionalInformation.dimensionUnit); + } + + @Override + public int hashCode() { + return Objects.hash(productWeight, isBulkFreight, height, width, length, netWeight, dimensionUnit); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductDetailResponseAdditionalInformation {\n"); + sb.append(" productWeight: ").append(toIndentedString(productWeight)).append("\n"); + sb.append(" isBulkFreight: ").append(toIndentedString(isBulkFreight)).append("\n"); + sb.append(" height: ").append(toIndentedString(height)).append("\n"); + sb.append(" width: ").append(toIndentedString(width)).append("\n"); + sb.append(" length: ").append(toIndentedString(length)).append("\n"); + sb.append(" netWeight: ").append(toIndentedString(netWeight)).append("\n"); + sb.append(" dimensionUnit: ").append(toIndentedString(dimensionUnit)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("productWeight"); + openapiFields.add("isBulkFreight"); + openapiFields.add("height"); + openapiFields.add("width"); + openapiFields.add("length"); + openapiFields.add("netWeight"); + openapiFields.add("dimensionUnit"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductDetailResponseAdditionalInformation + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductDetailResponseAdditionalInformation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProductDetailResponseAdditionalInformation is not found in the empty JSON string", ProductDetailResponseAdditionalInformation.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductDetailResponseAdditionalInformation.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductDetailResponseAdditionalInformation` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("productWeight") != null && !jsonObj.get("productWeight").isJsonNull()) { + JsonArray jsonArrayproductWeight = jsonObj.getAsJsonArray("productWeight"); + if (jsonArrayproductWeight != null) { + // ensure the json data is an array + if (!jsonObj.get("productWeight").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `productWeight` to be an array in the JSON string but got `%s`", jsonObj.get("productWeight").toString())); + } + + // validate the optional field `productWeight` (array) + for (int i = 0; i < jsonArrayproductWeight.size(); i++) { + ProductDetailResponseAdditionalInformationProductWeightInner.validateJsonElement(jsonArrayproductWeight.get(i)); + }; + } + } + if ((jsonObj.get("height") != null && !jsonObj.get("height").isJsonNull()) && !jsonObj.get("height").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `height` to be a primitive type in the JSON string but got `%s`", jsonObj.get("height").toString())); + } + if ((jsonObj.get("width") != null && !jsonObj.get("width").isJsonNull()) && !jsonObj.get("width").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `width` to be a primitive type in the JSON string but got `%s`", jsonObj.get("width").toString())); + } + if ((jsonObj.get("length") != null && !jsonObj.get("length").isJsonNull()) && !jsonObj.get("length").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `length` to be a primitive type in the JSON string but got `%s`", jsonObj.get("length").toString())); + } + if ((jsonObj.get("netWeight") != null && !jsonObj.get("netWeight").isJsonNull()) && !jsonObj.get("netWeight").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `netWeight` to be a primitive type in the JSON string but got `%s`", jsonObj.get("netWeight").toString())); + } + if ((jsonObj.get("dimensionUnit") != null && !jsonObj.get("dimensionUnit").isJsonNull()) && !jsonObj.get("dimensionUnit").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `dimensionUnit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dimensionUnit").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductDetailResponseAdditionalInformation.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductDetailResponseAdditionalInformation' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductDetailResponseAdditionalInformation.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductDetailResponseAdditionalInformation value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductDetailResponseAdditionalInformation read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProductDetailResponseAdditionalInformation given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductDetailResponseAdditionalInformation + * @throws IOException if the JSON string is invalid with respect to ProductDetailResponseAdditionalInformation + */ + public static ProductDetailResponseAdditionalInformation fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProductDetailResponseAdditionalInformation.class); + } + + /** + * Convert an instance of ProductDetailResponseAdditionalInformation to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ProductDetailResponseAdditionalInformationProductWeightInner.java b/src/main/java/xiresellers/client/model/ProductDetailResponseAdditionalInformationProductWeightInner.java new file mode 100644 index 00000000..1f6ae4f5 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ProductDetailResponseAdditionalInformationProductWeightInner.java @@ -0,0 +1,262 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ProductDetailResponseAdditionalInformationProductWeightInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ProductDetailResponseAdditionalInformationProductWeightInner { + public static final String SERIALIZED_NAME_PLANT_ID = "plantId"; + @SerializedName(SERIALIZED_NAME_PLANT_ID) + private String plantId; + + public static final String SERIALIZED_NAME_WEIGHT = "weight"; + @SerializedName(SERIALIZED_NAME_WEIGHT) + private BigDecimal weight; + + public static final String SERIALIZED_NAME_WEIGHT_UNIT = "weightUnit"; + @SerializedName(SERIALIZED_NAME_WEIGHT_UNIT) + private String weightUnit; + + public ProductDetailResponseAdditionalInformationProductWeightInner() { + } + + public ProductDetailResponseAdditionalInformationProductWeightInner plantId(String plantId) { + this.plantId = plantId; + return this; + } + + /** + * ID of the plant. Example : 'US01' + * @return plantId + **/ + @javax.annotation.Nullable + public String getPlantId() { + return plantId; + } + + public void setPlantId(String plantId) { + this.plantId = plantId; + } + + + public ProductDetailResponseAdditionalInformationProductWeightInner weight(BigDecimal weight) { + this.weight = weight; + return this; + } + + /** + * Weight of the product. Example : 2 + * @return weight + **/ + @javax.annotation.Nullable + public BigDecimal getWeight() { + return weight; + } + + public void setWeight(BigDecimal weight) { + this.weight = weight; + } + + + public ProductDetailResponseAdditionalInformationProductWeightInner weightUnit(String weightUnit) { + this.weightUnit = weightUnit; + return this; + } + + /** + * Weight unit of the product. Example : 'LB' + * @return weightUnit + **/ + @javax.annotation.Nullable + public String getWeightUnit() { + return weightUnit; + } + + public void setWeightUnit(String weightUnit) { + this.weightUnit = weightUnit; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductDetailResponseAdditionalInformationProductWeightInner productDetailResponseAdditionalInformationProductWeightInner = (ProductDetailResponseAdditionalInformationProductWeightInner) o; + return Objects.equals(this.plantId, productDetailResponseAdditionalInformationProductWeightInner.plantId) && + Objects.equals(this.weight, productDetailResponseAdditionalInformationProductWeightInner.weight) && + Objects.equals(this.weightUnit, productDetailResponseAdditionalInformationProductWeightInner.weightUnit); + } + + @Override + public int hashCode() { + return Objects.hash(plantId, weight, weightUnit); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductDetailResponseAdditionalInformationProductWeightInner {\n"); + sb.append(" plantId: ").append(toIndentedString(plantId)).append("\n"); + sb.append(" weight: ").append(toIndentedString(weight)).append("\n"); + sb.append(" weightUnit: ").append(toIndentedString(weightUnit)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("plantId"); + openapiFields.add("weight"); + openapiFields.add("weightUnit"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductDetailResponseAdditionalInformationProductWeightInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductDetailResponseAdditionalInformationProductWeightInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProductDetailResponseAdditionalInformationProductWeightInner is not found in the empty JSON string", ProductDetailResponseAdditionalInformationProductWeightInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductDetailResponseAdditionalInformationProductWeightInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductDetailResponseAdditionalInformationProductWeightInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("plantId") != null && !jsonObj.get("plantId").isJsonNull()) && !jsonObj.get("plantId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `plantId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plantId").toString())); + } + if ((jsonObj.get("weightUnit") != null && !jsonObj.get("weightUnit").isJsonNull()) && !jsonObj.get("weightUnit").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `weightUnit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("weightUnit").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductDetailResponseAdditionalInformationProductWeightInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductDetailResponseAdditionalInformationProductWeightInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductDetailResponseAdditionalInformationProductWeightInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductDetailResponseAdditionalInformationProductWeightInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductDetailResponseAdditionalInformationProductWeightInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProductDetailResponseAdditionalInformationProductWeightInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductDetailResponseAdditionalInformationProductWeightInner + * @throws IOException if the JSON string is invalid with respect to ProductDetailResponseAdditionalInformationProductWeightInner + */ + public static ProductDetailResponseAdditionalInformationProductWeightInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProductDetailResponseAdditionalInformationProductWeightInner.class); + } + + /** + * Convert an instance of ProductDetailResponseAdditionalInformationProductWeightInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ProductDetailResponseCiscoFieldsInner.java b/src/main/java/xiresellers/client/model/ProductDetailResponseCiscoFieldsInner.java new file mode 100644 index 00000000..47be745d --- /dev/null +++ b/src/main/java/xiresellers/client/model/ProductDetailResponseCiscoFieldsInner.java @@ -0,0 +1,380 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ProductDetailResponseCiscoFieldsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ProductDetailResponseCiscoFieldsInner { + public static final String SERIALIZED_NAME_PRODUCT_SUB_GROUP = "productSubGroup"; + @SerializedName(SERIALIZED_NAME_PRODUCT_SUB_GROUP) + private String productSubGroup; + + public static final String SERIALIZED_NAME_SERVICE_PROGRAM_NAME = "serviceProgramName"; + @SerializedName(SERIALIZED_NAME_SERVICE_PROGRAM_NAME) + private String serviceProgramName; + + public static final String SERIALIZED_NAME_ITEM_CATALOG_CATEGORY = "itemCatalogCategory"; + @SerializedName(SERIALIZED_NAME_ITEM_CATALOG_CATEGORY) + private String itemCatalogCategory; + + public static final String SERIALIZED_NAME_CONFIGURATION_INDICATOR = "configurationIndicator"; + @SerializedName(SERIALIZED_NAME_CONFIGURATION_INDICATOR) + private String configurationIndicator; + + public static final String SERIALIZED_NAME_INTERNAL_BUSINESS_ENTITY = "internalBusinessEntity"; + @SerializedName(SERIALIZED_NAME_INTERNAL_BUSINESS_ENTITY) + private String internalBusinessEntity; + + public static final String SERIALIZED_NAME_ITEM_TYPE = "itemType"; + @SerializedName(SERIALIZED_NAME_ITEM_TYPE) + private String itemType; + + public static final String SERIALIZED_NAME_GLOBAL_LIST_PRICE = "globalListPrice"; + @SerializedName(SERIALIZED_NAME_GLOBAL_LIST_PRICE) + private String globalListPrice; + + public ProductDetailResponseCiscoFieldsInner() { + } + + public ProductDetailResponseCiscoFieldsInner productSubGroup(String productSubGroup) { + this.productSubGroup = productSubGroup; + return this; + } + + /** + * Cisco product sub-group + * @return productSubGroup + **/ + @javax.annotation.Nullable + public String getProductSubGroup() { + return productSubGroup; + } + + public void setProductSubGroup(String productSubGroup) { + this.productSubGroup = productSubGroup; + } + + + public ProductDetailResponseCiscoFieldsInner serviceProgramName(String serviceProgramName) { + this.serviceProgramName = serviceProgramName; + return this; + } + + /** + * Cisco service program name + * @return serviceProgramName + **/ + @javax.annotation.Nullable + public String getServiceProgramName() { + return serviceProgramName; + } + + public void setServiceProgramName(String serviceProgramName) { + this.serviceProgramName = serviceProgramName; + } + + + public ProductDetailResponseCiscoFieldsInner itemCatalogCategory(String itemCatalogCategory) { + this.itemCatalogCategory = itemCatalogCategory; + return this; + } + + /** + * Cisco item catalog category + * @return itemCatalogCategory + **/ + @javax.annotation.Nullable + public String getItemCatalogCategory() { + return itemCatalogCategory; + } + + public void setItemCatalogCategory(String itemCatalogCategory) { + this.itemCatalogCategory = itemCatalogCategory; + } + + + public ProductDetailResponseCiscoFieldsInner configurationIndicator(String configurationIndicator) { + this.configurationIndicator = configurationIndicator; + return this; + } + + /** + * Cisco configuration indicator + * @return configurationIndicator + **/ + @javax.annotation.Nullable + public String getConfigurationIndicator() { + return configurationIndicator; + } + + public void setConfigurationIndicator(String configurationIndicator) { + this.configurationIndicator = configurationIndicator; + } + + + public ProductDetailResponseCiscoFieldsInner internalBusinessEntity(String internalBusinessEntity) { + this.internalBusinessEntity = internalBusinessEntity; + return this; + } + + /** + * Cisco internal business entity + * @return internalBusinessEntity + **/ + @javax.annotation.Nullable + public String getInternalBusinessEntity() { + return internalBusinessEntity; + } + + public void setInternalBusinessEntity(String internalBusinessEntity) { + this.internalBusinessEntity = internalBusinessEntity; + } + + + public ProductDetailResponseCiscoFieldsInner itemType(String itemType) { + this.itemType = itemType; + return this; + } + + /** + * Cisco item type + * @return itemType + **/ + @javax.annotation.Nullable + public String getItemType() { + return itemType; + } + + public void setItemType(String itemType) { + this.itemType = itemType; + } + + + public ProductDetailResponseCiscoFieldsInner globalListPrice(String globalListPrice) { + this.globalListPrice = globalListPrice; + return this; + } + + /** + * Cisco global list price + * @return globalListPrice + **/ + @javax.annotation.Nullable + public String getGlobalListPrice() { + return globalListPrice; + } + + public void setGlobalListPrice(String globalListPrice) { + this.globalListPrice = globalListPrice; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductDetailResponseCiscoFieldsInner productDetailResponseCiscoFieldsInner = (ProductDetailResponseCiscoFieldsInner) o; + return Objects.equals(this.productSubGroup, productDetailResponseCiscoFieldsInner.productSubGroup) && + Objects.equals(this.serviceProgramName, productDetailResponseCiscoFieldsInner.serviceProgramName) && + Objects.equals(this.itemCatalogCategory, productDetailResponseCiscoFieldsInner.itemCatalogCategory) && + Objects.equals(this.configurationIndicator, productDetailResponseCiscoFieldsInner.configurationIndicator) && + Objects.equals(this.internalBusinessEntity, productDetailResponseCiscoFieldsInner.internalBusinessEntity) && + Objects.equals(this.itemType, productDetailResponseCiscoFieldsInner.itemType) && + Objects.equals(this.globalListPrice, productDetailResponseCiscoFieldsInner.globalListPrice); + } + + @Override + public int hashCode() { + return Objects.hash(productSubGroup, serviceProgramName, itemCatalogCategory, configurationIndicator, internalBusinessEntity, itemType, globalListPrice); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductDetailResponseCiscoFieldsInner {\n"); + sb.append(" productSubGroup: ").append(toIndentedString(productSubGroup)).append("\n"); + sb.append(" serviceProgramName: ").append(toIndentedString(serviceProgramName)).append("\n"); + sb.append(" itemCatalogCategory: ").append(toIndentedString(itemCatalogCategory)).append("\n"); + sb.append(" configurationIndicator: ").append(toIndentedString(configurationIndicator)).append("\n"); + sb.append(" internalBusinessEntity: ").append(toIndentedString(internalBusinessEntity)).append("\n"); + sb.append(" itemType: ").append(toIndentedString(itemType)).append("\n"); + sb.append(" globalListPrice: ").append(toIndentedString(globalListPrice)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("productSubGroup"); + openapiFields.add("serviceProgramName"); + openapiFields.add("itemCatalogCategory"); + openapiFields.add("configurationIndicator"); + openapiFields.add("internalBusinessEntity"); + openapiFields.add("itemType"); + openapiFields.add("globalListPrice"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductDetailResponseCiscoFieldsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductDetailResponseCiscoFieldsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProductDetailResponseCiscoFieldsInner is not found in the empty JSON string", ProductDetailResponseCiscoFieldsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductDetailResponseCiscoFieldsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductDetailResponseCiscoFieldsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("productSubGroup") != null && !jsonObj.get("productSubGroup").isJsonNull()) && !jsonObj.get("productSubGroup").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `productSubGroup` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productSubGroup").toString())); + } + if ((jsonObj.get("serviceProgramName") != null && !jsonObj.get("serviceProgramName").isJsonNull()) && !jsonObj.get("serviceProgramName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `serviceProgramName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("serviceProgramName").toString())); + } + if ((jsonObj.get("itemCatalogCategory") != null && !jsonObj.get("itemCatalogCategory").isJsonNull()) && !jsonObj.get("itemCatalogCategory").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `itemCatalogCategory` to be a primitive type in the JSON string but got `%s`", jsonObj.get("itemCatalogCategory").toString())); + } + if ((jsonObj.get("configurationIndicator") != null && !jsonObj.get("configurationIndicator").isJsonNull()) && !jsonObj.get("configurationIndicator").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `configurationIndicator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("configurationIndicator").toString())); + } + if ((jsonObj.get("internalBusinessEntity") != null && !jsonObj.get("internalBusinessEntity").isJsonNull()) && !jsonObj.get("internalBusinessEntity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `internalBusinessEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalBusinessEntity").toString())); + } + if ((jsonObj.get("itemType") != null && !jsonObj.get("itemType").isJsonNull()) && !jsonObj.get("itemType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `itemType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("itemType").toString())); + } + if ((jsonObj.get("globalListPrice") != null && !jsonObj.get("globalListPrice").isJsonNull()) && !jsonObj.get("globalListPrice").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `globalListPrice` to be a primitive type in the JSON string but got `%s`", jsonObj.get("globalListPrice").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductDetailResponseCiscoFieldsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductDetailResponseCiscoFieldsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductDetailResponseCiscoFieldsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductDetailResponseCiscoFieldsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductDetailResponseCiscoFieldsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProductDetailResponseCiscoFieldsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductDetailResponseCiscoFieldsInner + * @throws IOException if the JSON string is invalid with respect to ProductDetailResponseCiscoFieldsInner + */ + public static ProductDetailResponseCiscoFieldsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProductDetailResponseCiscoFieldsInner.class); + } + + /** + * Convert an instance of ProductDetailResponseCiscoFieldsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ProductDetailResponseIndicatorsInner.java b/src/main/java/xiresellers/client/model/ProductDetailResponseIndicatorsInner.java new file mode 100644 index 00000000..02f3a50f --- /dev/null +++ b/src/main/java/xiresellers/client/model/ProductDetailResponseIndicatorsInner.java @@ -0,0 +1,986 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ProductDetailResponseIndicatorsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ProductDetailResponseIndicatorsInner { + public static final String SERIALIZED_NAME_HAS_WARRANTY = "hasWarranty"; + @SerializedName(SERIALIZED_NAME_HAS_WARRANTY) + private Boolean hasWarranty; + + public static final String SERIALIZED_NAME_IS_NEW_PRODUCT = "isNewProduct"; + @SerializedName(SERIALIZED_NAME_IS_NEW_PRODUCT) + private Boolean isNewProduct; + + public static final String SERIALIZED_NAME_HAS_RETURN_LIMITS = "HasReturnLimits"; + @SerializedName(SERIALIZED_NAME_HAS_RETURN_LIMITS) + private Boolean hasReturnLimits; + + public static final String SERIALIZED_NAME_IS_BACK_ORDER_ALLOWED = "IsBackOrderAllowed"; + @SerializedName(SERIALIZED_NAME_IS_BACK_ORDER_ALLOWED) + private Boolean isBackOrderAllowed; + + public static final String SERIALIZED_NAME_IS_SHIPPED_FROM_PARTNER = "isShippedFromPartner"; + @SerializedName(SERIALIZED_NAME_IS_SHIPPED_FROM_PARTNER) + private Boolean isShippedFromPartner; + + public static final String SERIALIZED_NAME_IS_REPLACEMENT_PRODUCT = "isReplacementProduct"; + @SerializedName(SERIALIZED_NAME_IS_REPLACEMENT_PRODUCT) + private Boolean isReplacementProduct; + + public static final String SERIALIZED_NAME_IS_DIRECTSHIP = "isDirectship"; + @SerializedName(SERIALIZED_NAME_IS_DIRECTSHIP) + private Boolean isDirectship; + + public static final String SERIALIZED_NAME_IS_DOWNLOADABLE = "isDownloadable"; + @SerializedName(SERIALIZED_NAME_IS_DOWNLOADABLE) + private Boolean isDownloadable; + + public static final String SERIALIZED_NAME_IS_DIGITAL_TYPE = "isDigitalType"; + @SerializedName(SERIALIZED_NAME_IS_DIGITAL_TYPE) + private Boolean isDigitalType; + + public static final String SERIALIZED_NAME_SKU_TYPE = "skuType"; + @SerializedName(SERIALIZED_NAME_SKU_TYPE) + private String skuType; + + public static final String SERIALIZED_NAME_HAS_STD_SPECIAL_PRICE = "hasStdSpecialPrice"; + @SerializedName(SERIALIZED_NAME_HAS_STD_SPECIAL_PRICE) + private Boolean hasStdSpecialPrice; + + public static final String SERIALIZED_NAME_HAS_ACOP_SPECIAL_PRICE = "hasAcopSpecialPrice"; + @SerializedName(SERIALIZED_NAME_HAS_ACOP_SPECIAL_PRICE) + private Boolean hasAcopSpecialPrice; + + public static final String SERIALIZED_NAME_HAS_ACOP_QUANTITY_BREAK = "hasAcopQuantityBreak"; + @SerializedName(SERIALIZED_NAME_HAS_ACOP_QUANTITY_BREAK) + private Boolean hasAcopQuantityBreak; + + public static final String SERIALIZED_NAME_HAS_STD_WEB_DISCOUNT = "hasStdWebDiscount"; + @SerializedName(SERIALIZED_NAME_HAS_STD_WEB_DISCOUNT) + private Boolean hasStdWebDiscount; + + public static final String SERIALIZED_NAME_HAS_SPECIAL_BID = "hasSpecialBid"; + @SerializedName(SERIALIZED_NAME_HAS_SPECIAL_BID) + private Boolean hasSpecialBid; + + public static final String SERIALIZED_NAME_IS_EXPORTABLE_TO_COUNTRY = "isExportableToCountry"; + @SerializedName(SERIALIZED_NAME_IS_EXPORTABLE_TO_COUNTRY) + private Boolean isExportableToCountry; + + public static final String SERIALIZED_NAME_IS_DISCONTINUED_PRODUCT = "isDiscontinuedProduct"; + @SerializedName(SERIALIZED_NAME_IS_DISCONTINUED_PRODUCT) + private Boolean isDiscontinuedProduct; + + public static final String SERIALIZED_NAME_IS_REFURBISHED_PRODUCT = "isRefurbishedProduct"; + @SerializedName(SERIALIZED_NAME_IS_REFURBISHED_PRODUCT) + private Boolean isRefurbishedProduct; + + public static final String SERIALIZED_NAME_IS_RETURNABLE_PRODUCT = "isReturnableProduct"; + @SerializedName(SERIALIZED_NAME_IS_RETURNABLE_PRODUCT) + private Boolean isReturnableProduct; + + public static final String SERIALIZED_NAME_IS_INGRAM_SHIP = "isIngramShip"; + @SerializedName(SERIALIZED_NAME_IS_INGRAM_SHIP) + private Boolean isIngramShip; + + public static final String SERIALIZED_NAME_IS_ENDUSER_REQUIRED = "isEnduserRequired"; + @SerializedName(SERIALIZED_NAME_IS_ENDUSER_REQUIRED) + private Boolean isEnduserRequired; + + public static final String SERIALIZED_NAME_IS_HEAVY_WEIGHT = "isHeavyWeight"; + @SerializedName(SERIALIZED_NAME_IS_HEAVY_WEIGHT) + private Boolean isHeavyWeight; + + public static final String SERIALIZED_NAME_HAS_LTL = "hasLtl"; + @SerializedName(SERIALIZED_NAME_HAS_LTL) + private Boolean hasLtl; + + public static final String SERIALIZED_NAME_IS_CLEARANCE_PRODUCT = "isClearanceProduct"; + @SerializedName(SERIALIZED_NAME_IS_CLEARANCE_PRODUCT) + private Boolean isClearanceProduct; + + public static final String SERIALIZED_NAME_HAS_BUNDLE = "hasBundle"; + @SerializedName(SERIALIZED_NAME_HAS_BUNDLE) + private Boolean hasBundle; + + public static final String SERIALIZED_NAME_IS_OVERSIZE_PRODUCT = "isOversizeProduct"; + @SerializedName(SERIALIZED_NAME_IS_OVERSIZE_PRODUCT) + private Boolean isOversizeProduct; + + public static final String SERIALIZED_NAME_IS_PREORDER_PRODUCT = "isPreorderProduct"; + @SerializedName(SERIALIZED_NAME_IS_PREORDER_PRODUCT) + private Boolean isPreorderProduct; + + public static final String SERIALIZED_NAME_IS_LICENSE_PRODUCT = "isLicenseProduct"; + @SerializedName(SERIALIZED_NAME_IS_LICENSE_PRODUCT) + private Boolean isLicenseProduct; + + public static final String SERIALIZED_NAME_IS_DIRECTSHIP_ORDERABLE = "isDirectshipOrderable"; + @SerializedName(SERIALIZED_NAME_IS_DIRECTSHIP_ORDERABLE) + private Boolean isDirectshipOrderable; + + public static final String SERIALIZED_NAME_IS_SERVICE_SKU = "isServiceSku"; + @SerializedName(SERIALIZED_NAME_IS_SERVICE_SKU) + private Boolean isServiceSku; + + public static final String SERIALIZED_NAME_IS_CONFIGURABLE = "isConfigurable"; + @SerializedName(SERIALIZED_NAME_IS_CONFIGURABLE) + private Boolean isConfigurable; + + public ProductDetailResponseIndicatorsInner() { + } + + public ProductDetailResponseIndicatorsInner hasWarranty(Boolean hasWarranty) { + this.hasWarranty = hasWarranty; + return this; + } + + /** + * Boolean that indicates whether product has a warranty. + * @return hasWarranty + **/ + @javax.annotation.Nullable + public Boolean getHasWarranty() { + return hasWarranty; + } + + public void setHasWarranty(Boolean hasWarranty) { + this.hasWarranty = hasWarranty; + } + + + public ProductDetailResponseIndicatorsInner isNewProduct(Boolean isNewProduct) { + this.isNewProduct = isNewProduct; + return this; + } + + /** + * Boolean that indicates whether it’s a new product. + * @return isNewProduct + **/ + @javax.annotation.Nullable + public Boolean getIsNewProduct() { + return isNewProduct; + } + + public void setIsNewProduct(Boolean isNewProduct) { + this.isNewProduct = isNewProduct; + } + + + public ProductDetailResponseIndicatorsInner hasReturnLimits(Boolean hasReturnLimits) { + this.hasReturnLimits = hasReturnLimits; + return this; + } + + /** + * Boolean that indicates whether there is any limit to return the product. + * @return hasReturnLimits + **/ + @javax.annotation.Nullable + public Boolean getHasReturnLimits() { + return hasReturnLimits; + } + + public void setHasReturnLimits(Boolean hasReturnLimits) { + this.hasReturnLimits = hasReturnLimits; + } + + + public ProductDetailResponseIndicatorsInner isBackOrderAllowed(Boolean isBackOrderAllowed) { + this.isBackOrderAllowed = isBackOrderAllowed; + return this; + } + + /** + * Boolean that indicates whether back order is allowed for the product. + * @return isBackOrderAllowed + **/ + @javax.annotation.Nullable + public Boolean getIsBackOrderAllowed() { + return isBackOrderAllowed; + } + + public void setIsBackOrderAllowed(Boolean isBackOrderAllowed) { + this.isBackOrderAllowed = isBackOrderAllowed; + } + + + public ProductDetailResponseIndicatorsInner isShippedFromPartner(Boolean isShippedFromPartner) { + this.isShippedFromPartner = isShippedFromPartner; + return this; + } + + /** + * Boolean that indicates whether product is shipped from the partner. + * @return isShippedFromPartner + **/ + @javax.annotation.Nullable + public Boolean getIsShippedFromPartner() { + return isShippedFromPartner; + } + + public void setIsShippedFromPartner(Boolean isShippedFromPartner) { + this.isShippedFromPartner = isShippedFromPartner; + } + + + public ProductDetailResponseIndicatorsInner isReplacementProduct(Boolean isReplacementProduct) { + this.isReplacementProduct = isReplacementProduct; + return this; + } + + /** + * Boolean that indicates whether product is a replacement product. + * @return isReplacementProduct + **/ + @javax.annotation.Nullable + public Boolean getIsReplacementProduct() { + return isReplacementProduct; + } + + public void setIsReplacementProduct(Boolean isReplacementProduct) { + this.isReplacementProduct = isReplacementProduct; + } + + + public ProductDetailResponseIndicatorsInner isDirectship(Boolean isDirectship) { + this.isDirectship = isDirectship; + return this; + } + + /** + * Boolean that indicates whether it’s a direct ship product. + * @return isDirectship + **/ + @javax.annotation.Nullable + public Boolean getIsDirectship() { + return isDirectship; + } + + public void setIsDirectship(Boolean isDirectship) { + this.isDirectship = isDirectship; + } + + + public ProductDetailResponseIndicatorsInner isDownloadable(Boolean isDownloadable) { + this.isDownloadable = isDownloadable; + return this; + } + + /** + * Boolean that indicates whether product is downloadable. + * @return isDownloadable + **/ + @javax.annotation.Nullable + public Boolean getIsDownloadable() { + return isDownloadable; + } + + public void setIsDownloadable(Boolean isDownloadable) { + this.isDownloadable = isDownloadable; + } + + + public ProductDetailResponseIndicatorsInner isDigitalType(Boolean isDigitalType) { + this.isDigitalType = isDigitalType; + return this; + } + + /** + * Boolean that indicates whether it’s a digital product. + * @return isDigitalType + **/ + @javax.annotation.Nullable + public Boolean getIsDigitalType() { + return isDigitalType; + } + + public void setIsDigitalType(Boolean isDigitalType) { + this.isDigitalType = isDigitalType; + } + + + public ProductDetailResponseIndicatorsInner skuType(String skuType) { + this.skuType = skuType; + return this; + } + + /** + * skutype + * @return skuType + **/ + @javax.annotation.Nullable + public String getSkuType() { + return skuType; + } + + public void setSkuType(String skuType) { + this.skuType = skuType; + } + + + public ProductDetailResponseIndicatorsInner hasStdSpecialPrice(Boolean hasStdSpecialPrice) { + this.hasStdSpecialPrice = hasStdSpecialPrice; + return this; + } + + /** + * Boolean that indicates whether product has any standard special price. + * @return hasStdSpecialPrice + **/ + @javax.annotation.Nullable + public Boolean getHasStdSpecialPrice() { + return hasStdSpecialPrice; + } + + public void setHasStdSpecialPrice(Boolean hasStdSpecialPrice) { + this.hasStdSpecialPrice = hasStdSpecialPrice; + } + + + public ProductDetailResponseIndicatorsInner hasAcopSpecialPrice(Boolean hasAcopSpecialPrice) { + this.hasAcopSpecialPrice = hasAcopSpecialPrice; + return this; + } + + /** + * Boolean that indicates whether product has any ACOP special price. + * @return hasAcopSpecialPrice + **/ + @javax.annotation.Nullable + public Boolean getHasAcopSpecialPrice() { + return hasAcopSpecialPrice; + } + + public void setHasAcopSpecialPrice(Boolean hasAcopSpecialPrice) { + this.hasAcopSpecialPrice = hasAcopSpecialPrice; + } + + + public ProductDetailResponseIndicatorsInner hasAcopQuantityBreak(Boolean hasAcopQuantityBreak) { + this.hasAcopQuantityBreak = hasAcopQuantityBreak; + return this; + } + + /** + * Boolean that indicates whether product has any ACOP quantity break. + * @return hasAcopQuantityBreak + **/ + @javax.annotation.Nullable + public Boolean getHasAcopQuantityBreak() { + return hasAcopQuantityBreak; + } + + public void setHasAcopQuantityBreak(Boolean hasAcopQuantityBreak) { + this.hasAcopQuantityBreak = hasAcopQuantityBreak; + } + + + public ProductDetailResponseIndicatorsInner hasStdWebDiscount(Boolean hasStdWebDiscount) { + this.hasStdWebDiscount = hasStdWebDiscount; + return this; + } + + /** + * Boolean that indicates whether product has any standard web discount. + * @return hasStdWebDiscount + **/ + @javax.annotation.Nullable + public Boolean getHasStdWebDiscount() { + return hasStdWebDiscount; + } + + public void setHasStdWebDiscount(Boolean hasStdWebDiscount) { + this.hasStdWebDiscount = hasStdWebDiscount; + } + + + public ProductDetailResponseIndicatorsInner hasSpecialBid(Boolean hasSpecialBid) { + this.hasSpecialBid = hasSpecialBid; + return this; + } + + /** + * Boolean that indicates whether product has any special bid. + * @return hasSpecialBid + **/ + @javax.annotation.Nullable + public Boolean getHasSpecialBid() { + return hasSpecialBid; + } + + public void setHasSpecialBid(Boolean hasSpecialBid) { + this.hasSpecialBid = hasSpecialBid; + } + + + public ProductDetailResponseIndicatorsInner isExportableToCountry(Boolean isExportableToCountry) { + this.isExportableToCountry = isExportableToCountry; + return this; + } + + /** + * Boolean that indicates whether product is exportable. + * @return isExportableToCountry + **/ + @javax.annotation.Nullable + public Boolean getIsExportableToCountry() { + return isExportableToCountry; + } + + public void setIsExportableToCountry(Boolean isExportableToCountry) { + this.isExportableToCountry = isExportableToCountry; + } + + + public ProductDetailResponseIndicatorsInner isDiscontinuedProduct(Boolean isDiscontinuedProduct) { + this.isDiscontinuedProduct = isDiscontinuedProduct; + return this; + } + + /** + * Boolean that indicates whether it’s a discontinued product. + * @return isDiscontinuedProduct + **/ + @javax.annotation.Nullable + public Boolean getIsDiscontinuedProduct() { + return isDiscontinuedProduct; + } + + public void setIsDiscontinuedProduct(Boolean isDiscontinuedProduct) { + this.isDiscontinuedProduct = isDiscontinuedProduct; + } + + + public ProductDetailResponseIndicatorsInner isRefurbishedProduct(Boolean isRefurbishedProduct) { + this.isRefurbishedProduct = isRefurbishedProduct; + return this; + } + + /** + * Boolean that indicates whether product is refurbished. + * @return isRefurbishedProduct + **/ + @javax.annotation.Nullable + public Boolean getIsRefurbishedProduct() { + return isRefurbishedProduct; + } + + public void setIsRefurbishedProduct(Boolean isRefurbishedProduct) { + this.isRefurbishedProduct = isRefurbishedProduct; + } + + + public ProductDetailResponseIndicatorsInner isReturnableProduct(Boolean isReturnableProduct) { + this.isReturnableProduct = isReturnableProduct; + return this; + } + + /** + * Boolean that indicates if the product can be returned. + * @return isReturnableProduct + **/ + @javax.annotation.Nullable + public Boolean getIsReturnableProduct() { + return isReturnableProduct; + } + + public void setIsReturnableProduct(Boolean isReturnableProduct) { + this.isReturnableProduct = isReturnableProduct; + } + + + public ProductDetailResponseIndicatorsInner isIngramShip(Boolean isIngramShip) { + this.isIngramShip = isIngramShip; + return this; + } + + /** + * Boolean that indicates whether it’s a Ingram shipped product. + * @return isIngramShip + **/ + @javax.annotation.Nullable + public Boolean getIsIngramShip() { + return isIngramShip; + } + + public void setIsIngramShip(Boolean isIngramShip) { + this.isIngramShip = isIngramShip; + } + + + public ProductDetailResponseIndicatorsInner isEnduserRequired(Boolean isEnduserRequired) { + this.isEnduserRequired = isEnduserRequired; + return this; + } + + /** + * Do vendor requires Enduser name required to create an order. + * @return isEnduserRequired + **/ + @javax.annotation.Nullable + public Boolean getIsEnduserRequired() { + return isEnduserRequired; + } + + public void setIsEnduserRequired(Boolean isEnduserRequired) { + this.isEnduserRequired = isEnduserRequired; + } + + + public ProductDetailResponseIndicatorsInner isHeavyWeight(Boolean isHeavyWeight) { + this.isHeavyWeight = isHeavyWeight; + return this; + } + + /** + * Boolean that indicates whether it’s heavy weight product. + * @return isHeavyWeight + **/ + @javax.annotation.Nullable + public Boolean getIsHeavyWeight() { + return isHeavyWeight; + } + + public void setIsHeavyWeight(Boolean isHeavyWeight) { + this.isHeavyWeight = isHeavyWeight; + } + + + public ProductDetailResponseIndicatorsInner hasLtl(Boolean hasLtl) { + this.hasLtl = hasLtl; + return this; + } + + /** + * Boolean that indicates whether it hasLtl or not. + * @return hasLtl + **/ + @javax.annotation.Nullable + public Boolean getHasLtl() { + return hasLtl; + } + + public void setHasLtl(Boolean hasLtl) { + this.hasLtl = hasLtl; + } + + + public ProductDetailResponseIndicatorsInner isClearanceProduct(Boolean isClearanceProduct) { + this.isClearanceProduct = isClearanceProduct; + return this; + } + + /** + * Boolean that indicates whether it’s clearnce product. + * @return isClearanceProduct + **/ + @javax.annotation.Nullable + public Boolean getIsClearanceProduct() { + return isClearanceProduct; + } + + public void setIsClearanceProduct(Boolean isClearanceProduct) { + this.isClearanceProduct = isClearanceProduct; + } + + + public ProductDetailResponseIndicatorsInner hasBundle(Boolean hasBundle) { + this.hasBundle = hasBundle; + return this; + } + + /** + * Boolean that indicates whether it’s a bundled product. + * @return hasBundle + **/ + @javax.annotation.Nullable + public Boolean getHasBundle() { + return hasBundle; + } + + public void setHasBundle(Boolean hasBundle) { + this.hasBundle = hasBundle; + } + + + public ProductDetailResponseIndicatorsInner isOversizeProduct(Boolean isOversizeProduct) { + this.isOversizeProduct = isOversizeProduct; + return this; + } + + /** + * Boolean that indicates whether it’s oversized product. + * @return isOversizeProduct + **/ + @javax.annotation.Nullable + public Boolean getIsOversizeProduct() { + return isOversizeProduct; + } + + public void setIsOversizeProduct(Boolean isOversizeProduct) { + this.isOversizeProduct = isOversizeProduct; + } + + + public ProductDetailResponseIndicatorsInner isPreorderProduct(Boolean isPreorderProduct) { + this.isPreorderProduct = isPreorderProduct; + return this; + } + + /** + * Boolean that indicates whether it’s a preorder product. + * @return isPreorderProduct + **/ + @javax.annotation.Nullable + public Boolean getIsPreorderProduct() { + return isPreorderProduct; + } + + public void setIsPreorderProduct(Boolean isPreorderProduct) { + this.isPreorderProduct = isPreorderProduct; + } + + + public ProductDetailResponseIndicatorsInner isLicenseProduct(Boolean isLicenseProduct) { + this.isLicenseProduct = isLicenseProduct; + return this; + } + + /** + * Boolean that indicates whether it’s a licened product. + * @return isLicenseProduct + **/ + @javax.annotation.Nullable + public Boolean getIsLicenseProduct() { + return isLicenseProduct; + } + + public void setIsLicenseProduct(Boolean isLicenseProduct) { + this.isLicenseProduct = isLicenseProduct; + } + + + public ProductDetailResponseIndicatorsInner isDirectshipOrderable(Boolean isDirectshipOrderable) { + this.isDirectshipOrderable = isDirectshipOrderable; + return this; + } + + /** + * Boolean that indicates whether product is directship orderable. + * @return isDirectshipOrderable + **/ + @javax.annotation.Nullable + public Boolean getIsDirectshipOrderable() { + return isDirectshipOrderable; + } + + public void setIsDirectshipOrderable(Boolean isDirectshipOrderable) { + this.isDirectshipOrderable = isDirectshipOrderable; + } + + + public ProductDetailResponseIndicatorsInner isServiceSku(Boolean isServiceSku) { + this.isServiceSku = isServiceSku; + return this; + } + + /** + * Boolean that indicates whether product is service SKU. + * @return isServiceSku + **/ + @javax.annotation.Nullable + public Boolean getIsServiceSku() { + return isServiceSku; + } + + public void setIsServiceSku(Boolean isServiceSku) { + this.isServiceSku = isServiceSku; + } + + + public ProductDetailResponseIndicatorsInner isConfigurable(Boolean isConfigurable) { + this.isConfigurable = isConfigurable; + return this; + } + + /** + * Boolean that indicates whether product is configurable. + * @return isConfigurable + **/ + @javax.annotation.Nullable + public Boolean getIsConfigurable() { + return isConfigurable; + } + + public void setIsConfigurable(Boolean isConfigurable) { + this.isConfigurable = isConfigurable; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductDetailResponseIndicatorsInner productDetailResponseIndicatorsInner = (ProductDetailResponseIndicatorsInner) o; + return Objects.equals(this.hasWarranty, productDetailResponseIndicatorsInner.hasWarranty) && + Objects.equals(this.isNewProduct, productDetailResponseIndicatorsInner.isNewProduct) && + Objects.equals(this.hasReturnLimits, productDetailResponseIndicatorsInner.hasReturnLimits) && + Objects.equals(this.isBackOrderAllowed, productDetailResponseIndicatorsInner.isBackOrderAllowed) && + Objects.equals(this.isShippedFromPartner, productDetailResponseIndicatorsInner.isShippedFromPartner) && + Objects.equals(this.isReplacementProduct, productDetailResponseIndicatorsInner.isReplacementProduct) && + Objects.equals(this.isDirectship, productDetailResponseIndicatorsInner.isDirectship) && + Objects.equals(this.isDownloadable, productDetailResponseIndicatorsInner.isDownloadable) && + Objects.equals(this.isDigitalType, productDetailResponseIndicatorsInner.isDigitalType) && + Objects.equals(this.skuType, productDetailResponseIndicatorsInner.skuType) && + Objects.equals(this.hasStdSpecialPrice, productDetailResponseIndicatorsInner.hasStdSpecialPrice) && + Objects.equals(this.hasAcopSpecialPrice, productDetailResponseIndicatorsInner.hasAcopSpecialPrice) && + Objects.equals(this.hasAcopQuantityBreak, productDetailResponseIndicatorsInner.hasAcopQuantityBreak) && + Objects.equals(this.hasStdWebDiscount, productDetailResponseIndicatorsInner.hasStdWebDiscount) && + Objects.equals(this.hasSpecialBid, productDetailResponseIndicatorsInner.hasSpecialBid) && + Objects.equals(this.isExportableToCountry, productDetailResponseIndicatorsInner.isExportableToCountry) && + Objects.equals(this.isDiscontinuedProduct, productDetailResponseIndicatorsInner.isDiscontinuedProduct) && + Objects.equals(this.isRefurbishedProduct, productDetailResponseIndicatorsInner.isRefurbishedProduct) && + Objects.equals(this.isReturnableProduct, productDetailResponseIndicatorsInner.isReturnableProduct) && + Objects.equals(this.isIngramShip, productDetailResponseIndicatorsInner.isIngramShip) && + Objects.equals(this.isEnduserRequired, productDetailResponseIndicatorsInner.isEnduserRequired) && + Objects.equals(this.isHeavyWeight, productDetailResponseIndicatorsInner.isHeavyWeight) && + Objects.equals(this.hasLtl, productDetailResponseIndicatorsInner.hasLtl) && + Objects.equals(this.isClearanceProduct, productDetailResponseIndicatorsInner.isClearanceProduct) && + Objects.equals(this.hasBundle, productDetailResponseIndicatorsInner.hasBundle) && + Objects.equals(this.isOversizeProduct, productDetailResponseIndicatorsInner.isOversizeProduct) && + Objects.equals(this.isPreorderProduct, productDetailResponseIndicatorsInner.isPreorderProduct) && + Objects.equals(this.isLicenseProduct, productDetailResponseIndicatorsInner.isLicenseProduct) && + Objects.equals(this.isDirectshipOrderable, productDetailResponseIndicatorsInner.isDirectshipOrderable) && + Objects.equals(this.isServiceSku, productDetailResponseIndicatorsInner.isServiceSku) && + Objects.equals(this.isConfigurable, productDetailResponseIndicatorsInner.isConfigurable); + } + + @Override + public int hashCode() { + return Objects.hash(hasWarranty, isNewProduct, hasReturnLimits, isBackOrderAllowed, isShippedFromPartner, isReplacementProduct, isDirectship, isDownloadable, isDigitalType, skuType, hasStdSpecialPrice, hasAcopSpecialPrice, hasAcopQuantityBreak, hasStdWebDiscount, hasSpecialBid, isExportableToCountry, isDiscontinuedProduct, isRefurbishedProduct, isReturnableProduct, isIngramShip, isEnduserRequired, isHeavyWeight, hasLtl, isClearanceProduct, hasBundle, isOversizeProduct, isPreorderProduct, isLicenseProduct, isDirectshipOrderable, isServiceSku, isConfigurable); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductDetailResponseIndicatorsInner {\n"); + sb.append(" hasWarranty: ").append(toIndentedString(hasWarranty)).append("\n"); + sb.append(" isNewProduct: ").append(toIndentedString(isNewProduct)).append("\n"); + sb.append(" hasReturnLimits: ").append(toIndentedString(hasReturnLimits)).append("\n"); + sb.append(" isBackOrderAllowed: ").append(toIndentedString(isBackOrderAllowed)).append("\n"); + sb.append(" isShippedFromPartner: ").append(toIndentedString(isShippedFromPartner)).append("\n"); + sb.append(" isReplacementProduct: ").append(toIndentedString(isReplacementProduct)).append("\n"); + sb.append(" isDirectship: ").append(toIndentedString(isDirectship)).append("\n"); + sb.append(" isDownloadable: ").append(toIndentedString(isDownloadable)).append("\n"); + sb.append(" isDigitalType: ").append(toIndentedString(isDigitalType)).append("\n"); + sb.append(" skuType: ").append(toIndentedString(skuType)).append("\n"); + sb.append(" hasStdSpecialPrice: ").append(toIndentedString(hasStdSpecialPrice)).append("\n"); + sb.append(" hasAcopSpecialPrice: ").append(toIndentedString(hasAcopSpecialPrice)).append("\n"); + sb.append(" hasAcopQuantityBreak: ").append(toIndentedString(hasAcopQuantityBreak)).append("\n"); + sb.append(" hasStdWebDiscount: ").append(toIndentedString(hasStdWebDiscount)).append("\n"); + sb.append(" hasSpecialBid: ").append(toIndentedString(hasSpecialBid)).append("\n"); + sb.append(" isExportableToCountry: ").append(toIndentedString(isExportableToCountry)).append("\n"); + sb.append(" isDiscontinuedProduct: ").append(toIndentedString(isDiscontinuedProduct)).append("\n"); + sb.append(" isRefurbishedProduct: ").append(toIndentedString(isRefurbishedProduct)).append("\n"); + sb.append(" isReturnableProduct: ").append(toIndentedString(isReturnableProduct)).append("\n"); + sb.append(" isIngramShip: ").append(toIndentedString(isIngramShip)).append("\n"); + sb.append(" isEnduserRequired: ").append(toIndentedString(isEnduserRequired)).append("\n"); + sb.append(" isHeavyWeight: ").append(toIndentedString(isHeavyWeight)).append("\n"); + sb.append(" hasLtl: ").append(toIndentedString(hasLtl)).append("\n"); + sb.append(" isClearanceProduct: ").append(toIndentedString(isClearanceProduct)).append("\n"); + sb.append(" hasBundle: ").append(toIndentedString(hasBundle)).append("\n"); + sb.append(" isOversizeProduct: ").append(toIndentedString(isOversizeProduct)).append("\n"); + sb.append(" isPreorderProduct: ").append(toIndentedString(isPreorderProduct)).append("\n"); + sb.append(" isLicenseProduct: ").append(toIndentedString(isLicenseProduct)).append("\n"); + sb.append(" isDirectshipOrderable: ").append(toIndentedString(isDirectshipOrderable)).append("\n"); + sb.append(" isServiceSku: ").append(toIndentedString(isServiceSku)).append("\n"); + sb.append(" isConfigurable: ").append(toIndentedString(isConfigurable)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("hasWarranty"); + openapiFields.add("isNewProduct"); + openapiFields.add("HasReturnLimits"); + openapiFields.add("IsBackOrderAllowed"); + openapiFields.add("isShippedFromPartner"); + openapiFields.add("isReplacementProduct"); + openapiFields.add("isDirectship"); + openapiFields.add("isDownloadable"); + openapiFields.add("isDigitalType"); + openapiFields.add("skuType"); + openapiFields.add("hasStdSpecialPrice"); + openapiFields.add("hasAcopSpecialPrice"); + openapiFields.add("hasAcopQuantityBreak"); + openapiFields.add("hasStdWebDiscount"); + openapiFields.add("hasSpecialBid"); + openapiFields.add("isExportableToCountry"); + openapiFields.add("isDiscontinuedProduct"); + openapiFields.add("isRefurbishedProduct"); + openapiFields.add("isReturnableProduct"); + openapiFields.add("isIngramShip"); + openapiFields.add("isEnduserRequired"); + openapiFields.add("isHeavyWeight"); + openapiFields.add("hasLtl"); + openapiFields.add("isClearanceProduct"); + openapiFields.add("hasBundle"); + openapiFields.add("isOversizeProduct"); + openapiFields.add("isPreorderProduct"); + openapiFields.add("isLicenseProduct"); + openapiFields.add("isDirectshipOrderable"); + openapiFields.add("isServiceSku"); + openapiFields.add("isConfigurable"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductDetailResponseIndicatorsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductDetailResponseIndicatorsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProductDetailResponseIndicatorsInner is not found in the empty JSON string", ProductDetailResponseIndicatorsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductDetailResponseIndicatorsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductDetailResponseIndicatorsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("skuType") != null && !jsonObj.get("skuType").isJsonNull()) && !jsonObj.get("skuType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `skuType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("skuType").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductDetailResponseIndicatorsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductDetailResponseIndicatorsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductDetailResponseIndicatorsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductDetailResponseIndicatorsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductDetailResponseIndicatorsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProductDetailResponseIndicatorsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductDetailResponseIndicatorsInner + * @throws IOException if the JSON string is invalid with respect to ProductDetailResponseIndicatorsInner + */ + public static ProductDetailResponseIndicatorsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProductDetailResponseIndicatorsInner.class); + } + + /** + * Convert an instance of ProductDetailResponseIndicatorsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ProductDetailResponseTechnicalSpecificationsInner.java b/src/main/java/xiresellers/client/model/ProductDetailResponseTechnicalSpecificationsInner.java new file mode 100644 index 00000000..67d2ef81 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ProductDetailResponseTechnicalSpecificationsInner.java @@ -0,0 +1,293 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ProductDetailResponseTechnicalSpecificationsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ProductDetailResponseTechnicalSpecificationsInner { + public static final String SERIALIZED_NAME_HEADERNAME = "headername"; + @SerializedName(SERIALIZED_NAME_HEADERNAME) + private String headername; + + public static final String SERIALIZED_NAME_ATTRIBUTEVALUE = "attributevalue"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTEVALUE) + private String attributevalue; + + public static final String SERIALIZED_NAME_ATTRIBUTEDISPLAY = "attributedisplay"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTEDISPLAY) + private String attributedisplay; + + public static final String SERIALIZED_NAME_ATTRIBUTENAME = "attributename"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTENAME) + private String attributename; + + public ProductDetailResponseTechnicalSpecificationsInner() { + } + + public ProductDetailResponseTechnicalSpecificationsInner headername(String headername) { + this.headername = headername; + return this; + } + + /** + * Example : 'Basic' + * @return headername + **/ + @javax.annotation.Nullable + public String getHeadername() { + return headername; + } + + public void setHeadername(String headername) { + this.headername = headername; + } + + + public ProductDetailResponseTechnicalSpecificationsInner attributevalue(String attributevalue) { + this.attributevalue = attributevalue; + return this; + } + + /** + * Example : 'LCD Monitor' + * @return attributevalue + **/ + @javax.annotation.Nullable + public String getAttributevalue() { + return attributevalue; + } + + public void setAttributevalue(String attributevalue) { + this.attributevalue = attributevalue; + } + + + public ProductDetailResponseTechnicalSpecificationsInner attributedisplay(String attributedisplay) { + this.attributedisplay = attributedisplay; + return this; + } + + /** + * Example : 'Basic|Product Type|LCD Monitor' + * @return attributedisplay + **/ + @javax.annotation.Nullable + public String getAttributedisplay() { + return attributedisplay; + } + + public void setAttributedisplay(String attributedisplay) { + this.attributedisplay = attributedisplay; + } + + + public ProductDetailResponseTechnicalSpecificationsInner attributename(String attributename) { + this.attributename = attributename; + return this; + } + + /** + * Example : 'Product Type' + * @return attributename + **/ + @javax.annotation.Nullable + public String getAttributename() { + return attributename; + } + + public void setAttributename(String attributename) { + this.attributename = attributename; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductDetailResponseTechnicalSpecificationsInner productDetailResponseTechnicalSpecificationsInner = (ProductDetailResponseTechnicalSpecificationsInner) o; + return Objects.equals(this.headername, productDetailResponseTechnicalSpecificationsInner.headername) && + Objects.equals(this.attributevalue, productDetailResponseTechnicalSpecificationsInner.attributevalue) && + Objects.equals(this.attributedisplay, productDetailResponseTechnicalSpecificationsInner.attributedisplay) && + Objects.equals(this.attributename, productDetailResponseTechnicalSpecificationsInner.attributename); + } + + @Override + public int hashCode() { + return Objects.hash(headername, attributevalue, attributedisplay, attributename); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductDetailResponseTechnicalSpecificationsInner {\n"); + sb.append(" headername: ").append(toIndentedString(headername)).append("\n"); + sb.append(" attributevalue: ").append(toIndentedString(attributevalue)).append("\n"); + sb.append(" attributedisplay: ").append(toIndentedString(attributedisplay)).append("\n"); + sb.append(" attributename: ").append(toIndentedString(attributename)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("headername"); + openapiFields.add("attributevalue"); + openapiFields.add("attributedisplay"); + openapiFields.add("attributename"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductDetailResponseTechnicalSpecificationsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductDetailResponseTechnicalSpecificationsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProductDetailResponseTechnicalSpecificationsInner is not found in the empty JSON string", ProductDetailResponseTechnicalSpecificationsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductDetailResponseTechnicalSpecificationsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductDetailResponseTechnicalSpecificationsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("headername") != null && !jsonObj.get("headername").isJsonNull()) && !jsonObj.get("headername").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `headername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("headername").toString())); + } + if ((jsonObj.get("attributevalue") != null && !jsonObj.get("attributevalue").isJsonNull()) && !jsonObj.get("attributevalue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributevalue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributevalue").toString())); + } + if ((jsonObj.get("attributedisplay") != null && !jsonObj.get("attributedisplay").isJsonNull()) && !jsonObj.get("attributedisplay").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributedisplay` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributedisplay").toString())); + } + if ((jsonObj.get("attributename") != null && !jsonObj.get("attributename").isJsonNull()) && !jsonObj.get("attributename").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributename` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributename").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductDetailResponseTechnicalSpecificationsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductDetailResponseTechnicalSpecificationsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductDetailResponseTechnicalSpecificationsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductDetailResponseTechnicalSpecificationsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductDetailResponseTechnicalSpecificationsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProductDetailResponseTechnicalSpecificationsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductDetailResponseTechnicalSpecificationsInner + * @throws IOException if the JSON string is invalid with respect to ProductDetailResponseTechnicalSpecificationsInner + */ + public static ProductDetailResponseTechnicalSpecificationsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProductDetailResponseTechnicalSpecificationsInner.class); + } + + /** + * Convert an instance of ProductDetailResponseTechnicalSpecificationsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ProductLineType.java b/src/main/java/xiresellers/client/model/ProductLineType.java new file mode 100644 index 00000000..225f9798 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ProductLineType.java @@ -0,0 +1,817 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner; +import xiresellers.client.model.ProductLineTypeSerialnumberdetailsInner; +import xiresellers.client.model.ProductLineTypeTrackingnumberdetailsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Product line items object under each invoice + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ProductLineType { + public static final String SERIALIZED_NAME_LINENUMBER = "linenumber"; + @SerializedName(SERIALIZED_NAME_LINENUMBER) + private String linenumber; + + public static final String SERIALIZED_NAME_LINETYPE = "linetype"; + @SerializedName(SERIALIZED_NAME_LINETYPE) + private String linetype; + + public static final String SERIALIZED_NAME_PARTNUMBER = "partnumber"; + @SerializedName(SERIALIZED_NAME_PARTNUMBER) + private String partnumber; + + public static final String SERIALIZED_NAME_VENDORPARTNUMBER = "vendorpartnumber"; + @SerializedName(SERIALIZED_NAME_VENDORPARTNUMBER) + private String vendorpartnumber; + + public static final String SERIALIZED_NAME_PARTDESCRIPTION = "partdescription"; + @SerializedName(SERIALIZED_NAME_PARTDESCRIPTION) + private String partdescription; + + public static final String SERIALIZED_NAME_SHIPFROMBRANCH = "shipfrombranch"; + @SerializedName(SERIALIZED_NAME_SHIPFROMBRANCH) + private String shipfrombranch; + + public static final String SERIALIZED_NAME_SHIPPEDQUANTITY = "shippedquantity"; + @SerializedName(SERIALIZED_NAME_SHIPPEDQUANTITY) + private String shippedquantity; + + public static final String SERIALIZED_NAME_ORDEREDQUANTITY = "orderedquantity"; + @SerializedName(SERIALIZED_NAME_ORDEREDQUANTITY) + private String orderedquantity; + + public static final String SERIALIZED_NAME_MARGINPERCENT = "marginpercent"; + @SerializedName(SERIALIZED_NAME_MARGINPERCENT) + private String marginpercent; + + public static final String SERIALIZED_NAME_BACKORDERQUANTITY = "backorderquantity"; + @SerializedName(SERIALIZED_NAME_BACKORDERQUANTITY) + private String backorderquantity; + + public static final String SERIALIZED_NAME_BACKORDERETADATE = "backorderetadate"; + @SerializedName(SERIALIZED_NAME_BACKORDERETADATE) + private LocalDate backorderetadate; + + public static final String SERIALIZED_NAME_EXTENDEDPRICE = "extendedprice"; + @SerializedName(SERIALIZED_NAME_EXTENDEDPRICE) + private String extendedprice; + + public static final String SERIALIZED_NAME_SPECIALBIDNUMBER = "specialbidnumber"; + @SerializedName(SERIALIZED_NAME_SPECIALBIDNUMBER) + private String specialbidnumber; + + public static final String SERIALIZED_NAME_ORDERSUFFIX = "ordersuffix"; + @SerializedName(SERIALIZED_NAME_ORDERSUFFIX) + private String ordersuffix; + + public static final String SERIALIZED_NAME_ISACOPAPPLIED = "isacopapplied"; + @SerializedName(SERIALIZED_NAME_ISACOPAPPLIED) + private String isacopapplied; + + public static final String SERIALIZED_NAME_UNITPRICE = "unitprice"; + @SerializedName(SERIALIZED_NAME_UNITPRICE) + private String unitprice; + + public static final String SERIALIZED_NAME_UNITOFMEASURE = "unitofmeasure"; + @SerializedName(SERIALIZED_NAME_UNITOFMEASURE) + private String unitofmeasure; + + public static final String SERIALIZED_NAME_SERIALNUMBERDETAILS = "serialnumberdetails"; + @SerializedName(SERIALIZED_NAME_SERIALNUMBERDETAILS) + private List serialnumberdetails; + + public static final String SERIALIZED_NAME_TRACKINGNUMBERDETAILS = "trackingnumberdetails"; + @SerializedName(SERIALIZED_NAME_TRACKINGNUMBERDETAILS) + private List trackingnumberdetails; + + public static final String SERIALIZED_NAME_PRODUCTEXTENDEDSPECS = "productextendedspecs"; + @SerializedName(SERIALIZED_NAME_PRODUCTEXTENDEDSPECS) + private List productextendedspecs; + + public ProductLineType() { + } + + public ProductLineType linenumber(String linenumber) { + this.linenumber = linenumber; + return this; + } + + /** + * Get linenumber + * @return linenumber + **/ + @javax.annotation.Nullable + public String getLinenumber() { + return linenumber; + } + + public void setLinenumber(String linenumber) { + this.linenumber = linenumber; + } + + + public ProductLineType linetype(String linetype) { + this.linetype = linetype; + return this; + } + + /** + * Get linetype + * @return linetype + **/ + @javax.annotation.Nullable + public String getLinetype() { + return linetype; + } + + public void setLinetype(String linetype) { + this.linetype = linetype; + } + + + public ProductLineType partnumber(String partnumber) { + this.partnumber = partnumber; + return this; + } + + /** + * Get partnumber + * @return partnumber + **/ + @javax.annotation.Nullable + public String getPartnumber() { + return partnumber; + } + + public void setPartnumber(String partnumber) { + this.partnumber = partnumber; + } + + + public ProductLineType vendorpartnumber(String vendorpartnumber) { + this.vendorpartnumber = vendorpartnumber; + return this; + } + + /** + * Get vendorpartnumber + * @return vendorpartnumber + **/ + @javax.annotation.Nullable + public String getVendorpartnumber() { + return vendorpartnumber; + } + + public void setVendorpartnumber(String vendorpartnumber) { + this.vendorpartnumber = vendorpartnumber; + } + + + public ProductLineType partdescription(String partdescription) { + this.partdescription = partdescription; + return this; + } + + /** + * Get partdescription + * @return partdescription + **/ + @javax.annotation.Nullable + public String getPartdescription() { + return partdescription; + } + + public void setPartdescription(String partdescription) { + this.partdescription = partdescription; + } + + + public ProductLineType shipfrombranch(String shipfrombranch) { + this.shipfrombranch = shipfrombranch; + return this; + } + + /** + * Get shipfrombranch + * @return shipfrombranch + **/ + @javax.annotation.Nullable + public String getShipfrombranch() { + return shipfrombranch; + } + + public void setShipfrombranch(String shipfrombranch) { + this.shipfrombranch = shipfrombranch; + } + + + public ProductLineType shippedquantity(String shippedquantity) { + this.shippedquantity = shippedquantity; + return this; + } + + /** + * Get shippedquantity + * @return shippedquantity + **/ + @javax.annotation.Nullable + public String getShippedquantity() { + return shippedquantity; + } + + public void setShippedquantity(String shippedquantity) { + this.shippedquantity = shippedquantity; + } + + + public ProductLineType orderedquantity(String orderedquantity) { + this.orderedquantity = orderedquantity; + return this; + } + + /** + * Get orderedquantity + * @return orderedquantity + **/ + @javax.annotation.Nullable + public String getOrderedquantity() { + return orderedquantity; + } + + public void setOrderedquantity(String orderedquantity) { + this.orderedquantity = orderedquantity; + } + + + public ProductLineType marginpercent(String marginpercent) { + this.marginpercent = marginpercent; + return this; + } + + /** + * Get marginpercent + * @return marginpercent + **/ + @javax.annotation.Nullable + public String getMarginpercent() { + return marginpercent; + } + + public void setMarginpercent(String marginpercent) { + this.marginpercent = marginpercent; + } + + + public ProductLineType backorderquantity(String backorderquantity) { + this.backorderquantity = backorderquantity; + return this; + } + + /** + * Get backorderquantity + * @return backorderquantity + **/ + @javax.annotation.Nullable + public String getBackorderquantity() { + return backorderquantity; + } + + public void setBackorderquantity(String backorderquantity) { + this.backorderquantity = backorderquantity; + } + + + public ProductLineType backorderetadate(LocalDate backorderetadate) { + this.backorderetadate = backorderetadate; + return this; + } + + /** + * Get backorderetadate + * @return backorderetadate + **/ + @javax.annotation.Nullable + public LocalDate getBackorderetadate() { + return backorderetadate; + } + + public void setBackorderetadate(LocalDate backorderetadate) { + this.backorderetadate = backorderetadate; + } + + + public ProductLineType extendedprice(String extendedprice) { + this.extendedprice = extendedprice; + return this; + } + + /** + * Get extendedprice + * @return extendedprice + **/ + @javax.annotation.Nullable + public String getExtendedprice() { + return extendedprice; + } + + public void setExtendedprice(String extendedprice) { + this.extendedprice = extendedprice; + } + + + public ProductLineType specialbidnumber(String specialbidnumber) { + this.specialbidnumber = specialbidnumber; + return this; + } + + /** + * Get specialbidnumber + * @return specialbidnumber + **/ + @javax.annotation.Nullable + public String getSpecialbidnumber() { + return specialbidnumber; + } + + public void setSpecialbidnumber(String specialbidnumber) { + this.specialbidnumber = specialbidnumber; + } + + + public ProductLineType ordersuffix(String ordersuffix) { + this.ordersuffix = ordersuffix; + return this; + } + + /** + * Get ordersuffix + * @return ordersuffix + **/ + @javax.annotation.Nullable + public String getOrdersuffix() { + return ordersuffix; + } + + public void setOrdersuffix(String ordersuffix) { + this.ordersuffix = ordersuffix; + } + + + public ProductLineType isacopapplied(String isacopapplied) { + this.isacopapplied = isacopapplied; + return this; + } + + /** + * Get isacopapplied + * @return isacopapplied + **/ + @javax.annotation.Nullable + public String getIsacopapplied() { + return isacopapplied; + } + + public void setIsacopapplied(String isacopapplied) { + this.isacopapplied = isacopapplied; + } + + + public ProductLineType unitprice(String unitprice) { + this.unitprice = unitprice; + return this; + } + + /** + * Get unitprice + * @return unitprice + **/ + @javax.annotation.Nullable + public String getUnitprice() { + return unitprice; + } + + public void setUnitprice(String unitprice) { + this.unitprice = unitprice; + } + + + public ProductLineType unitofmeasure(String unitofmeasure) { + this.unitofmeasure = unitofmeasure; + return this; + } + + /** + * Get unitofmeasure + * @return unitofmeasure + **/ + @javax.annotation.Nullable + public String getUnitofmeasure() { + return unitofmeasure; + } + + public void setUnitofmeasure(String unitofmeasure) { + this.unitofmeasure = unitofmeasure; + } + + + public ProductLineType serialnumberdetails(List serialnumberdetails) { + this.serialnumberdetails = serialnumberdetails; + return this; + } + + public ProductLineType addSerialnumberdetailsItem(ProductLineTypeSerialnumberdetailsInner serialnumberdetailsItem) { + if (this.serialnumberdetails == null) { + this.serialnumberdetails = new ArrayList<>(); + } + this.serialnumberdetails.add(serialnumberdetailsItem); + return this; + } + + /** + * Get serialnumberdetails + * @return serialnumberdetails + **/ + @javax.annotation.Nullable + public List getSerialnumberdetails() { + return serialnumberdetails; + } + + public void setSerialnumberdetails(List serialnumberdetails) { + this.serialnumberdetails = serialnumberdetails; + } + + + public ProductLineType trackingnumberdetails(List trackingnumberdetails) { + this.trackingnumberdetails = trackingnumberdetails; + return this; + } + + public ProductLineType addTrackingnumberdetailsItem(ProductLineTypeTrackingnumberdetailsInner trackingnumberdetailsItem) { + if (this.trackingnumberdetails == null) { + this.trackingnumberdetails = new ArrayList<>(); + } + this.trackingnumberdetails.add(trackingnumberdetailsItem); + return this; + } + + /** + * Get trackingnumberdetails + * @return trackingnumberdetails + **/ + @javax.annotation.Nullable + public List getTrackingnumberdetails() { + return trackingnumberdetails; + } + + public void setTrackingnumberdetails(List trackingnumberdetails) { + this.trackingnumberdetails = trackingnumberdetails; + } + + + public ProductLineType productextendedspecs(List productextendedspecs) { + this.productextendedspecs = productextendedspecs; + return this; + } + + public ProductLineType addProductextendedspecsItem(InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner productextendedspecsItem) { + if (this.productextendedspecs == null) { + this.productextendedspecs = new ArrayList<>(); + } + this.productextendedspecs.add(productextendedspecsItem); + return this; + } + + /** + * Get productextendedspecs + * @return productextendedspecs + **/ + @javax.annotation.Nullable + public List getProductextendedspecs() { + return productextendedspecs; + } + + public void setProductextendedspecs(List productextendedspecs) { + this.productextendedspecs = productextendedspecs; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductLineType productLineType = (ProductLineType) o; + return Objects.equals(this.linenumber, productLineType.linenumber) && + Objects.equals(this.linetype, productLineType.linetype) && + Objects.equals(this.partnumber, productLineType.partnumber) && + Objects.equals(this.vendorpartnumber, productLineType.vendorpartnumber) && + Objects.equals(this.partdescription, productLineType.partdescription) && + Objects.equals(this.shipfrombranch, productLineType.shipfrombranch) && + Objects.equals(this.shippedquantity, productLineType.shippedquantity) && + Objects.equals(this.orderedquantity, productLineType.orderedquantity) && + Objects.equals(this.marginpercent, productLineType.marginpercent) && + Objects.equals(this.backorderquantity, productLineType.backorderquantity) && + Objects.equals(this.backorderetadate, productLineType.backorderetadate) && + Objects.equals(this.extendedprice, productLineType.extendedprice) && + Objects.equals(this.specialbidnumber, productLineType.specialbidnumber) && + Objects.equals(this.ordersuffix, productLineType.ordersuffix) && + Objects.equals(this.isacopapplied, productLineType.isacopapplied) && + Objects.equals(this.unitprice, productLineType.unitprice) && + Objects.equals(this.unitofmeasure, productLineType.unitofmeasure) && + Objects.equals(this.serialnumberdetails, productLineType.serialnumberdetails) && + Objects.equals(this.trackingnumberdetails, productLineType.trackingnumberdetails) && + Objects.equals(this.productextendedspecs, productLineType.productextendedspecs); + } + + @Override + public int hashCode() { + return Objects.hash(linenumber, linetype, partnumber, vendorpartnumber, partdescription, shipfrombranch, shippedquantity, orderedquantity, marginpercent, backorderquantity, backorderetadate, extendedprice, specialbidnumber, ordersuffix, isacopapplied, unitprice, unitofmeasure, serialnumberdetails, trackingnumberdetails, productextendedspecs); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductLineType {\n"); + sb.append(" linenumber: ").append(toIndentedString(linenumber)).append("\n"); + sb.append(" linetype: ").append(toIndentedString(linetype)).append("\n"); + sb.append(" partnumber: ").append(toIndentedString(partnumber)).append("\n"); + sb.append(" vendorpartnumber: ").append(toIndentedString(vendorpartnumber)).append("\n"); + sb.append(" partdescription: ").append(toIndentedString(partdescription)).append("\n"); + sb.append(" shipfrombranch: ").append(toIndentedString(shipfrombranch)).append("\n"); + sb.append(" shippedquantity: ").append(toIndentedString(shippedquantity)).append("\n"); + sb.append(" orderedquantity: ").append(toIndentedString(orderedquantity)).append("\n"); + sb.append(" marginpercent: ").append(toIndentedString(marginpercent)).append("\n"); + sb.append(" backorderquantity: ").append(toIndentedString(backorderquantity)).append("\n"); + sb.append(" backorderetadate: ").append(toIndentedString(backorderetadate)).append("\n"); + sb.append(" extendedprice: ").append(toIndentedString(extendedprice)).append("\n"); + sb.append(" specialbidnumber: ").append(toIndentedString(specialbidnumber)).append("\n"); + sb.append(" ordersuffix: ").append(toIndentedString(ordersuffix)).append("\n"); + sb.append(" isacopapplied: ").append(toIndentedString(isacopapplied)).append("\n"); + sb.append(" unitprice: ").append(toIndentedString(unitprice)).append("\n"); + sb.append(" unitofmeasure: ").append(toIndentedString(unitofmeasure)).append("\n"); + sb.append(" serialnumberdetails: ").append(toIndentedString(serialnumberdetails)).append("\n"); + sb.append(" trackingnumberdetails: ").append(toIndentedString(trackingnumberdetails)).append("\n"); + sb.append(" productextendedspecs: ").append(toIndentedString(productextendedspecs)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("linenumber"); + openapiFields.add("linetype"); + openapiFields.add("partnumber"); + openapiFields.add("vendorpartnumber"); + openapiFields.add("partdescription"); + openapiFields.add("shipfrombranch"); + openapiFields.add("shippedquantity"); + openapiFields.add("orderedquantity"); + openapiFields.add("marginpercent"); + openapiFields.add("backorderquantity"); + openapiFields.add("backorderetadate"); + openapiFields.add("extendedprice"); + openapiFields.add("specialbidnumber"); + openapiFields.add("ordersuffix"); + openapiFields.add("isacopapplied"); + openapiFields.add("unitprice"); + openapiFields.add("unitofmeasure"); + openapiFields.add("serialnumberdetails"); + openapiFields.add("trackingnumberdetails"); + openapiFields.add("productextendedspecs"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductLineType + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductLineType.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProductLineType is not found in the empty JSON string", ProductLineType.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductLineType.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductLineType` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("linenumber") != null && !jsonObj.get("linenumber").isJsonNull()) && !jsonObj.get("linenumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `linenumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("linenumber").toString())); + } + if ((jsonObj.get("linetype") != null && !jsonObj.get("linetype").isJsonNull()) && !jsonObj.get("linetype").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `linetype` to be a primitive type in the JSON string but got `%s`", jsonObj.get("linetype").toString())); + } + if ((jsonObj.get("partnumber") != null && !jsonObj.get("partnumber").isJsonNull()) && !jsonObj.get("partnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `partnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("partnumber").toString())); + } + if ((jsonObj.get("vendorpartnumber") != null && !jsonObj.get("vendorpartnumber").isJsonNull()) && !jsonObj.get("vendorpartnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorpartnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorpartnumber").toString())); + } + if ((jsonObj.get("partdescription") != null && !jsonObj.get("partdescription").isJsonNull()) && !jsonObj.get("partdescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `partdescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("partdescription").toString())); + } + if ((jsonObj.get("shipfrombranch") != null && !jsonObj.get("shipfrombranch").isJsonNull()) && !jsonObj.get("shipfrombranch").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shipfrombranch` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shipfrombranch").toString())); + } + if ((jsonObj.get("shippedquantity") != null && !jsonObj.get("shippedquantity").isJsonNull()) && !jsonObj.get("shippedquantity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shippedquantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shippedquantity").toString())); + } + if ((jsonObj.get("orderedquantity") != null && !jsonObj.get("orderedquantity").isJsonNull()) && !jsonObj.get("orderedquantity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `orderedquantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orderedquantity").toString())); + } + if ((jsonObj.get("marginpercent") != null && !jsonObj.get("marginpercent").isJsonNull()) && !jsonObj.get("marginpercent").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `marginpercent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("marginpercent").toString())); + } + if ((jsonObj.get("backorderquantity") != null && !jsonObj.get("backorderquantity").isJsonNull()) && !jsonObj.get("backorderquantity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `backorderquantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("backorderquantity").toString())); + } + if ((jsonObj.get("extendedprice") != null && !jsonObj.get("extendedprice").isJsonNull()) && !jsonObj.get("extendedprice").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `extendedprice` to be a primitive type in the JSON string but got `%s`", jsonObj.get("extendedprice").toString())); + } + if ((jsonObj.get("specialbidnumber") != null && !jsonObj.get("specialbidnumber").isJsonNull()) && !jsonObj.get("specialbidnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `specialbidnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("specialbidnumber").toString())); + } + if ((jsonObj.get("ordersuffix") != null && !jsonObj.get("ordersuffix").isJsonNull()) && !jsonObj.get("ordersuffix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ordersuffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ordersuffix").toString())); + } + if ((jsonObj.get("isacopapplied") != null && !jsonObj.get("isacopapplied").isJsonNull()) && !jsonObj.get("isacopapplied").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `isacopapplied` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isacopapplied").toString())); + } + if ((jsonObj.get("unitprice") != null && !jsonObj.get("unitprice").isJsonNull()) && !jsonObj.get("unitprice").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `unitprice` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unitprice").toString())); + } + if ((jsonObj.get("unitofmeasure") != null && !jsonObj.get("unitofmeasure").isJsonNull()) && !jsonObj.get("unitofmeasure").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `unitofmeasure` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unitofmeasure").toString())); + } + if (jsonObj.get("serialnumberdetails") != null && !jsonObj.get("serialnumberdetails").isJsonNull()) { + JsonArray jsonArrayserialnumberdetails = jsonObj.getAsJsonArray("serialnumberdetails"); + if (jsonArrayserialnumberdetails != null) { + // ensure the json data is an array + if (!jsonObj.get("serialnumberdetails").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `serialnumberdetails` to be an array in the JSON string but got `%s`", jsonObj.get("serialnumberdetails").toString())); + } + + // validate the optional field `serialnumberdetails` (array) + for (int i = 0; i < jsonArrayserialnumberdetails.size(); i++) { + ProductLineTypeSerialnumberdetailsInner.validateJsonElement(jsonArrayserialnumberdetails.get(i)); + }; + } + } + if (jsonObj.get("trackingnumberdetails") != null && !jsonObj.get("trackingnumberdetails").isJsonNull()) { + JsonArray jsonArraytrackingnumberdetails = jsonObj.getAsJsonArray("trackingnumberdetails"); + if (jsonArraytrackingnumberdetails != null) { + // ensure the json data is an array + if (!jsonObj.get("trackingnumberdetails").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `trackingnumberdetails` to be an array in the JSON string but got `%s`", jsonObj.get("trackingnumberdetails").toString())); + } + + // validate the optional field `trackingnumberdetails` (array) + for (int i = 0; i < jsonArraytrackingnumberdetails.size(); i++) { + ProductLineTypeTrackingnumberdetailsInner.validateJsonElement(jsonArraytrackingnumberdetails.get(i)); + }; + } + } + if (jsonObj.get("productextendedspecs") != null && !jsonObj.get("productextendedspecs").isJsonNull()) { + JsonArray jsonArrayproductextendedspecs = jsonObj.getAsJsonArray("productextendedspecs"); + if (jsonArrayproductextendedspecs != null) { + // ensure the json data is an array + if (!jsonObj.get("productextendedspecs").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `productextendedspecs` to be an array in the JSON string but got `%s`", jsonObj.get("productextendedspecs").toString())); + } + + // validate the optional field `productextendedspecs` (array) + for (int i = 0; i < jsonArrayproductextendedspecs.size(); i++) { + InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner.validateJsonElement(jsonArrayproductextendedspecs.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductLineType.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductLineType' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductLineType.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductLineType value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductLineType read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProductLineType given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductLineType + * @throws IOException if the JSON string is invalid with respect to ProductLineType + */ + public static ProductLineType fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProductLineType.class); + } + + /** + * Convert an instance of ProductLineType to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ProductLineTypeSerialnumberdetailsInner.java b/src/main/java/xiresellers/client/model/ProductLineTypeSerialnumberdetailsInner.java new file mode 100644 index 00000000..0e957f4c --- /dev/null +++ b/src/main/java/xiresellers/client/model/ProductLineTypeSerialnumberdetailsInner.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ProductLineTypeSerialnumberdetailsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ProductLineTypeSerialnumberdetailsInner { + public static final String SERIALIZED_NAME_SERIALNUMBER = "serialnumber"; + @SerializedName(SERIALIZED_NAME_SERIALNUMBER) + private String serialnumber; + + public static final String SERIALIZED_NAME_DELIVERYNUMBER = "deliverynumber"; + @SerializedName(SERIALIZED_NAME_DELIVERYNUMBER) + private String deliverynumber; + + public ProductLineTypeSerialnumberdetailsInner() { + } + + public ProductLineTypeSerialnumberdetailsInner serialnumber(String serialnumber) { + this.serialnumber = serialnumber; + return this; + } + + /** + * Get serialnumber + * @return serialnumber + **/ + @javax.annotation.Nullable + public String getSerialnumber() { + return serialnumber; + } + + public void setSerialnumber(String serialnumber) { + this.serialnumber = serialnumber; + } + + + public ProductLineTypeSerialnumberdetailsInner deliverynumber(String deliverynumber) { + this.deliverynumber = deliverynumber; + return this; + } + + /** + * Get deliverynumber + * @return deliverynumber + **/ + @javax.annotation.Nullable + public String getDeliverynumber() { + return deliverynumber; + } + + public void setDeliverynumber(String deliverynumber) { + this.deliverynumber = deliverynumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductLineTypeSerialnumberdetailsInner productLineTypeSerialnumberdetailsInner = (ProductLineTypeSerialnumberdetailsInner) o; + return Objects.equals(this.serialnumber, productLineTypeSerialnumberdetailsInner.serialnumber) && + Objects.equals(this.deliverynumber, productLineTypeSerialnumberdetailsInner.deliverynumber); + } + + @Override + public int hashCode() { + return Objects.hash(serialnumber, deliverynumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductLineTypeSerialnumberdetailsInner {\n"); + sb.append(" serialnumber: ").append(toIndentedString(serialnumber)).append("\n"); + sb.append(" deliverynumber: ").append(toIndentedString(deliverynumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("serialnumber"); + openapiFields.add("deliverynumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductLineTypeSerialnumberdetailsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductLineTypeSerialnumberdetailsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProductLineTypeSerialnumberdetailsInner is not found in the empty JSON string", ProductLineTypeSerialnumberdetailsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductLineTypeSerialnumberdetailsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductLineTypeSerialnumberdetailsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("serialnumber") != null && !jsonObj.get("serialnumber").isJsonNull()) && !jsonObj.get("serialnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `serialnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("serialnumber").toString())); + } + if ((jsonObj.get("deliverynumber") != null && !jsonObj.get("deliverynumber").isJsonNull()) && !jsonObj.get("deliverynumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `deliverynumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deliverynumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductLineTypeSerialnumberdetailsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductLineTypeSerialnumberdetailsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductLineTypeSerialnumberdetailsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductLineTypeSerialnumberdetailsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductLineTypeSerialnumberdetailsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProductLineTypeSerialnumberdetailsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductLineTypeSerialnumberdetailsInner + * @throws IOException if the JSON string is invalid with respect to ProductLineTypeSerialnumberdetailsInner + */ + public static ProductLineTypeSerialnumberdetailsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProductLineTypeSerialnumberdetailsInner.class); + } + + /** + * Convert an instance of ProductLineTypeSerialnumberdetailsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ProductLineTypeTrackingnumberdetailsInner.java b/src/main/java/xiresellers/client/model/ProductLineTypeTrackingnumberdetailsInner.java new file mode 100644 index 00000000..923c3e61 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ProductLineTypeTrackingnumberdetailsInner.java @@ -0,0 +1,206 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ProductLineTypeTrackingnumberdetailsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ProductLineTypeTrackingnumberdetailsInner { + public static final String SERIALIZED_NAME_TRACKINGNUMBER = "trackingnumber"; + @SerializedName(SERIALIZED_NAME_TRACKINGNUMBER) + private String trackingnumber; + + public ProductLineTypeTrackingnumberdetailsInner() { + } + + public ProductLineTypeTrackingnumberdetailsInner trackingnumber(String trackingnumber) { + this.trackingnumber = trackingnumber; + return this; + } + + /** + * Get trackingnumber + * @return trackingnumber + **/ + @javax.annotation.Nullable + public String getTrackingnumber() { + return trackingnumber; + } + + public void setTrackingnumber(String trackingnumber) { + this.trackingnumber = trackingnumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductLineTypeTrackingnumberdetailsInner productLineTypeTrackingnumberdetailsInner = (ProductLineTypeTrackingnumberdetailsInner) o; + return Objects.equals(this.trackingnumber, productLineTypeTrackingnumberdetailsInner.trackingnumber); + } + + @Override + public int hashCode() { + return Objects.hash(trackingnumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductLineTypeTrackingnumberdetailsInner {\n"); + sb.append(" trackingnumber: ").append(toIndentedString(trackingnumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("trackingnumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductLineTypeTrackingnumberdetailsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductLineTypeTrackingnumberdetailsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProductLineTypeTrackingnumberdetailsInner is not found in the empty JSON string", ProductLineTypeTrackingnumberdetailsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductLineTypeTrackingnumberdetailsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductLineTypeTrackingnumberdetailsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("trackingnumber") != null && !jsonObj.get("trackingnumber").isJsonNull()) && !jsonObj.get("trackingnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `trackingnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("trackingnumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductLineTypeTrackingnumberdetailsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductLineTypeTrackingnumberdetailsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductLineTypeTrackingnumberdetailsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductLineTypeTrackingnumberdetailsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductLineTypeTrackingnumberdetailsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProductLineTypeTrackingnumberdetailsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductLineTypeTrackingnumberdetailsInner + * @throws IOException if the JSON string is invalid with respect to ProductLineTypeTrackingnumberdetailsInner + */ + public static ProductLineTypeTrackingnumberdetailsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProductLineTypeTrackingnumberdetailsInner.class); + } + + /** + * Convert an instance of ProductLineTypeTrackingnumberdetailsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ProductSearchRequest.java b/src/main/java/xiresellers/client/model/ProductSearchRequest.java new file mode 100644 index 00000000..b618a051 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ProductSearchRequest.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.ProductSearchRequestServicerequest; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Request object model for the product search endpoint + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ProductSearchRequest { + public static final String SERIALIZED_NAME_SERVICEREQUEST = "servicerequest"; + @SerializedName(SERIALIZED_NAME_SERVICEREQUEST) + private ProductSearchRequestServicerequest servicerequest; + + public ProductSearchRequest() { + } + + public ProductSearchRequest servicerequest(ProductSearchRequestServicerequest servicerequest) { + this.servicerequest = servicerequest; + return this; + } + + /** + * Get servicerequest + * @return servicerequest + **/ + @javax.annotation.Nullable + public ProductSearchRequestServicerequest getServicerequest() { + return servicerequest; + } + + public void setServicerequest(ProductSearchRequestServicerequest servicerequest) { + this.servicerequest = servicerequest; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductSearchRequest productSearchRequest = (ProductSearchRequest) o; + return Objects.equals(this.servicerequest, productSearchRequest.servicerequest); + } + + @Override + public int hashCode() { + return Objects.hash(servicerequest); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductSearchRequest {\n"); + sb.append(" servicerequest: ").append(toIndentedString(servicerequest)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("servicerequest"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductSearchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductSearchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProductSearchRequest is not found in the empty JSON string", ProductSearchRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductSearchRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductSearchRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `servicerequest` + if (jsonObj.get("servicerequest") != null && !jsonObj.get("servicerequest").isJsonNull()) { + ProductSearchRequestServicerequest.validateJsonElement(jsonObj.get("servicerequest")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductSearchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductSearchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductSearchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductSearchRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductSearchRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProductSearchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductSearchRequest + * @throws IOException if the JSON string is invalid with respect to ProductSearchRequest + */ + public static ProductSearchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProductSearchRequest.class); + } + + /** + * Convert an instance of ProductSearchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ProductSearchRequestServicerequest.java b/src/main/java/xiresellers/client/model/ProductSearchRequestServicerequest.java new file mode 100644 index 00000000..73f26a5e --- /dev/null +++ b/src/main/java/xiresellers/client/model/ProductSearchRequestServicerequest.java @@ -0,0 +1,239 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.ProductSearchRequestServicerequestProductsearchrequest; +import xiresellers.client.model.ProductSearchRequestServicerequestRequestpreamble; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ProductSearchRequestServicerequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ProductSearchRequestServicerequest { + public static final String SERIALIZED_NAME_REQUESTPREAMBLE = "requestpreamble"; + @SerializedName(SERIALIZED_NAME_REQUESTPREAMBLE) + private ProductSearchRequestServicerequestRequestpreamble requestpreamble; + + public static final String SERIALIZED_NAME_PRODUCTSEARCHREQUEST = "productsearchrequest"; + @SerializedName(SERIALIZED_NAME_PRODUCTSEARCHREQUEST) + private ProductSearchRequestServicerequestProductsearchrequest productsearchrequest; + + public ProductSearchRequestServicerequest() { + } + + public ProductSearchRequestServicerequest requestpreamble(ProductSearchRequestServicerequestRequestpreamble requestpreamble) { + this.requestpreamble = requestpreamble; + return this; + } + + /** + * Get requestpreamble + * @return requestpreamble + **/ + @javax.annotation.Nullable + public ProductSearchRequestServicerequestRequestpreamble getRequestpreamble() { + return requestpreamble; + } + + public void setRequestpreamble(ProductSearchRequestServicerequestRequestpreamble requestpreamble) { + this.requestpreamble = requestpreamble; + } + + + public ProductSearchRequestServicerequest productsearchrequest(ProductSearchRequestServicerequestProductsearchrequest productsearchrequest) { + this.productsearchrequest = productsearchrequest; + return this; + } + + /** + * Get productsearchrequest + * @return productsearchrequest + **/ + @javax.annotation.Nullable + public ProductSearchRequestServicerequestProductsearchrequest getProductsearchrequest() { + return productsearchrequest; + } + + public void setProductsearchrequest(ProductSearchRequestServicerequestProductsearchrequest productsearchrequest) { + this.productsearchrequest = productsearchrequest; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductSearchRequestServicerequest productSearchRequestServicerequest = (ProductSearchRequestServicerequest) o; + return Objects.equals(this.requestpreamble, productSearchRequestServicerequest.requestpreamble) && + Objects.equals(this.productsearchrequest, productSearchRequestServicerequest.productsearchrequest); + } + + @Override + public int hashCode() { + return Objects.hash(requestpreamble, productsearchrequest); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductSearchRequestServicerequest {\n"); + sb.append(" requestpreamble: ").append(toIndentedString(requestpreamble)).append("\n"); + sb.append(" productsearchrequest: ").append(toIndentedString(productsearchrequest)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("requestpreamble"); + openapiFields.add("productsearchrequest"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductSearchRequestServicerequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductSearchRequestServicerequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProductSearchRequestServicerequest is not found in the empty JSON string", ProductSearchRequestServicerequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductSearchRequestServicerequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductSearchRequestServicerequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `requestpreamble` + if (jsonObj.get("requestpreamble") != null && !jsonObj.get("requestpreamble").isJsonNull()) { + ProductSearchRequestServicerequestRequestpreamble.validateJsonElement(jsonObj.get("requestpreamble")); + } + // validate the optional field `productsearchrequest` + if (jsonObj.get("productsearchrequest") != null && !jsonObj.get("productsearchrequest").isJsonNull()) { + ProductSearchRequestServicerequestProductsearchrequest.validateJsonElement(jsonObj.get("productsearchrequest")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductSearchRequestServicerequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductSearchRequestServicerequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductSearchRequestServicerequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductSearchRequestServicerequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductSearchRequestServicerequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProductSearchRequestServicerequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductSearchRequestServicerequest + * @throws IOException if the JSON string is invalid with respect to ProductSearchRequestServicerequest + */ + public static ProductSearchRequestServicerequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProductSearchRequestServicerequest.class); + } + + /** + * Convert an instance of ProductSearchRequestServicerequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ProductSearchRequestServicerequestProductsearchrequest.java b/src/main/java/xiresellers/client/model/ProductSearchRequestServicerequestProductsearchrequest.java new file mode 100644 index 00000000..280d1123 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ProductSearchRequestServicerequestProductsearchrequest.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.ProductSearchRequestServicerequestProductsearchrequestSearchcriteria; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ProductSearchRequestServicerequestProductsearchrequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ProductSearchRequestServicerequestProductsearchrequest { + public static final String SERIALIZED_NAME_SEARCHCRITERIA = "searchcriteria"; + @SerializedName(SERIALIZED_NAME_SEARCHCRITERIA) + private ProductSearchRequestServicerequestProductsearchrequestSearchcriteria searchcriteria; + + public ProductSearchRequestServicerequestProductsearchrequest() { + } + + public ProductSearchRequestServicerequestProductsearchrequest searchcriteria(ProductSearchRequestServicerequestProductsearchrequestSearchcriteria searchcriteria) { + this.searchcriteria = searchcriteria; + return this; + } + + /** + * Get searchcriteria + * @return searchcriteria + **/ + @javax.annotation.Nullable + public ProductSearchRequestServicerequestProductsearchrequestSearchcriteria getSearchcriteria() { + return searchcriteria; + } + + public void setSearchcriteria(ProductSearchRequestServicerequestProductsearchrequestSearchcriteria searchcriteria) { + this.searchcriteria = searchcriteria; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductSearchRequestServicerequestProductsearchrequest productSearchRequestServicerequestProductsearchrequest = (ProductSearchRequestServicerequestProductsearchrequest) o; + return Objects.equals(this.searchcriteria, productSearchRequestServicerequestProductsearchrequest.searchcriteria); + } + + @Override + public int hashCode() { + return Objects.hash(searchcriteria); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductSearchRequestServicerequestProductsearchrequest {\n"); + sb.append(" searchcriteria: ").append(toIndentedString(searchcriteria)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("searchcriteria"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductSearchRequestServicerequestProductsearchrequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductSearchRequestServicerequestProductsearchrequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProductSearchRequestServicerequestProductsearchrequest is not found in the empty JSON string", ProductSearchRequestServicerequestProductsearchrequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductSearchRequestServicerequestProductsearchrequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductSearchRequestServicerequestProductsearchrequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `searchcriteria` + if (jsonObj.get("searchcriteria") != null && !jsonObj.get("searchcriteria").isJsonNull()) { + ProductSearchRequestServicerequestProductsearchrequestSearchcriteria.validateJsonElement(jsonObj.get("searchcriteria")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductSearchRequestServicerequestProductsearchrequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductSearchRequestServicerequestProductsearchrequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductSearchRequestServicerequestProductsearchrequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductSearchRequestServicerequestProductsearchrequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductSearchRequestServicerequestProductsearchrequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProductSearchRequestServicerequestProductsearchrequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductSearchRequestServicerequestProductsearchrequest + * @throws IOException if the JSON string is invalid with respect to ProductSearchRequestServicerequestProductsearchrequest + */ + public static ProductSearchRequestServicerequestProductsearchrequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProductSearchRequestServicerequestProductsearchrequest.class); + } + + /** + * Convert an instance of ProductSearchRequestServicerequestProductsearchrequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ProductSearchRequestServicerequestProductsearchrequestSearchcriteria.java b/src/main/java/xiresellers/client/model/ProductSearchRequestServicerequestProductsearchrequestSearchcriteria.java new file mode 100644 index 00000000..3480cbea --- /dev/null +++ b/src/main/java/xiresellers/client/model/ProductSearchRequestServicerequestProductsearchrequestSearchcriteria.java @@ -0,0 +1,322 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ProductSearchRequestServicerequestProductsearchrequestSearchcriteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ProductSearchRequestServicerequestProductsearchrequestSearchcriteria { + public static final String SERIALIZED_NAME_VENDOR = "vendor"; + @SerializedName(SERIALIZED_NAME_VENDOR) + private String vendor; + + public static final String SERIALIZED_NAME_VENDORPARTNUMBER = "vendorpartnumber"; + @SerializedName(SERIALIZED_NAME_VENDORPARTNUMBER) + private String vendorpartnumber; + + public static final String SERIALIZED_NAME_PARTDESCRIPTION = "partdescription"; + @SerializedName(SERIALIZED_NAME_PARTDESCRIPTION) + private String partdescription; + + public static final String SERIALIZED_NAME_U_P_C = "UPC"; + @SerializedName(SERIALIZED_NAME_U_P_C) + private String UPC; + + public static final String SERIALIZED_NAME_CUSTOMERPARTNUMBER = "customerpartnumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMERPARTNUMBER) + private String customerpartnumber; + + public ProductSearchRequestServicerequestProductsearchrequestSearchcriteria() { + } + + public ProductSearchRequestServicerequestProductsearchrequestSearchcriteria vendor(String vendor) { + this.vendor = vendor; + return this; + } + + /** + * Name of the vendor or manufacturer or brand of the product + * @return vendor + **/ + @javax.annotation.Nullable + public String getVendor() { + return vendor; + } + + public void setVendor(String vendor) { + this.vendor = vendor; + } + + + public ProductSearchRequestServicerequestProductsearchrequestSearchcriteria vendorpartnumber(String vendorpartnumber) { + this.vendorpartnumber = vendorpartnumber; + return this; + } + + /** + * Vendor provided part number + * @return vendorpartnumber + **/ + @javax.annotation.Nullable + public String getVendorpartnumber() { + return vendorpartnumber; + } + + public void setVendorpartnumber(String vendorpartnumber) { + this.vendorpartnumber = vendorpartnumber; + } + + + public ProductSearchRequestServicerequestProductsearchrequestSearchcriteria partdescription(String partdescription) { + this.partdescription = partdescription; + return this; + } + + /** + * This field seraches the decriptioon of the product. + * @return partdescription + **/ + @javax.annotation.Nullable + public String getPartdescription() { + return partdescription; + } + + public void setPartdescription(String partdescription) { + this.partdescription = partdescription; + } + + + public ProductSearchRequestServicerequestProductsearchrequestSearchcriteria UPC(String UPC) { + this.UPC = UPC; + return this; + } + + /** + * Universal Product Code + * @return UPC + **/ + @javax.annotation.Nullable + public String getUPC() { + return UPC; + } + + public void setUPC(String UPC) { + this.UPC = UPC; + } + + + public ProductSearchRequestServicerequestProductsearchrequestSearchcriteria customerpartnumber(String customerpartnumber) { + this.customerpartnumber = customerpartnumber; + return this; + } + + /** + * Customer’s designated part number + * @return customerpartnumber + **/ + @javax.annotation.Nullable + public String getCustomerpartnumber() { + return customerpartnumber; + } + + public void setCustomerpartnumber(String customerpartnumber) { + this.customerpartnumber = customerpartnumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductSearchRequestServicerequestProductsearchrequestSearchcriteria productSearchRequestServicerequestProductsearchrequestSearchcriteria = (ProductSearchRequestServicerequestProductsearchrequestSearchcriteria) o; + return Objects.equals(this.vendor, productSearchRequestServicerequestProductsearchrequestSearchcriteria.vendor) && + Objects.equals(this.vendorpartnumber, productSearchRequestServicerequestProductsearchrequestSearchcriteria.vendorpartnumber) && + Objects.equals(this.partdescription, productSearchRequestServicerequestProductsearchrequestSearchcriteria.partdescription) && + Objects.equals(this.UPC, productSearchRequestServicerequestProductsearchrequestSearchcriteria.UPC) && + Objects.equals(this.customerpartnumber, productSearchRequestServicerequestProductsearchrequestSearchcriteria.customerpartnumber); + } + + @Override + public int hashCode() { + return Objects.hash(vendor, vendorpartnumber, partdescription, UPC, customerpartnumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductSearchRequestServicerequestProductsearchrequestSearchcriteria {\n"); + sb.append(" vendor: ").append(toIndentedString(vendor)).append("\n"); + sb.append(" vendorpartnumber: ").append(toIndentedString(vendorpartnumber)).append("\n"); + sb.append(" partdescription: ").append(toIndentedString(partdescription)).append("\n"); + sb.append(" UPC: ").append(toIndentedString(UPC)).append("\n"); + sb.append(" customerpartnumber: ").append(toIndentedString(customerpartnumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("vendor"); + openapiFields.add("vendorpartnumber"); + openapiFields.add("partdescription"); + openapiFields.add("UPC"); + openapiFields.add("customerpartnumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductSearchRequestServicerequestProductsearchrequestSearchcriteria + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductSearchRequestServicerequestProductsearchrequestSearchcriteria.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProductSearchRequestServicerequestProductsearchrequestSearchcriteria is not found in the empty JSON string", ProductSearchRequestServicerequestProductsearchrequestSearchcriteria.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductSearchRequestServicerequestProductsearchrequestSearchcriteria.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductSearchRequestServicerequestProductsearchrequestSearchcriteria` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("vendor") != null && !jsonObj.get("vendor").isJsonNull()) && !jsonObj.get("vendor").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendor").toString())); + } + if ((jsonObj.get("vendorpartnumber") != null && !jsonObj.get("vendorpartnumber").isJsonNull()) && !jsonObj.get("vendorpartnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorpartnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorpartnumber").toString())); + } + if ((jsonObj.get("partdescription") != null && !jsonObj.get("partdescription").isJsonNull()) && !jsonObj.get("partdescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `partdescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("partdescription").toString())); + } + if ((jsonObj.get("UPC") != null && !jsonObj.get("UPC").isJsonNull()) && !jsonObj.get("UPC").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `UPC` to be a primitive type in the JSON string but got `%s`", jsonObj.get("UPC").toString())); + } + if ((jsonObj.get("customerpartnumber") != null && !jsonObj.get("customerpartnumber").isJsonNull()) && !jsonObj.get("customerpartnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerpartnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerpartnumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductSearchRequestServicerequestProductsearchrequestSearchcriteria.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductSearchRequestServicerequestProductsearchrequestSearchcriteria' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductSearchRequestServicerequestProductsearchrequestSearchcriteria.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductSearchRequestServicerequestProductsearchrequestSearchcriteria value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductSearchRequestServicerequestProductsearchrequestSearchcriteria read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProductSearchRequestServicerequestProductsearchrequestSearchcriteria given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductSearchRequestServicerequestProductsearchrequestSearchcriteria + * @throws IOException if the JSON string is invalid with respect to ProductSearchRequestServicerequestProductsearchrequestSearchcriteria + */ + public static ProductSearchRequestServicerequestProductsearchrequestSearchcriteria fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProductSearchRequestServicerequestProductsearchrequestSearchcriteria.class); + } + + /** + * Convert an instance of ProductSearchRequestServicerequestProductsearchrequestSearchcriteria to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ProductSearchRequestServicerequestRequestpreamble.java b/src/main/java/xiresellers/client/model/ProductSearchRequestServicerequestRequestpreamble.java new file mode 100644 index 00000000..bdf7e2c7 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ProductSearchRequestServicerequestRequestpreamble.java @@ -0,0 +1,273 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ProductSearchRequestServicerequestRequestpreamble + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ProductSearchRequestServicerequestRequestpreamble { + public static final String SERIALIZED_NAME_ISOCOUNTRYCODE = "isocountrycode"; + @SerializedName(SERIALIZED_NAME_ISOCOUNTRYCODE) + private String isocountrycode; + + public static final String SERIALIZED_NAME_CUSTOMERNUMBER = "customernumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMERNUMBER) + private String customernumber; + + public static final String SERIALIZED_NAME_VENDORNUMBER = "vendornumber"; + @SerializedName(SERIALIZED_NAME_VENDORNUMBER) + private String vendornumber; + + public ProductSearchRequestServicerequestRequestpreamble() { + } + + public ProductSearchRequestServicerequestRequestpreamble isocountrycode(String isocountrycode) { + this.isocountrycode = isocountrycode; + return this; + } + + /** + * Get isocountrycode + * @return isocountrycode + **/ + @javax.annotation.Nonnull + public String getIsocountrycode() { + return isocountrycode; + } + + public void setIsocountrycode(String isocountrycode) { + this.isocountrycode = isocountrycode; + } + + + public ProductSearchRequestServicerequestRequestpreamble customernumber(String customernumber) { + this.customernumber = customernumber; + return this; + } + + /** + * Get customernumber + * @return customernumber + **/ + @javax.annotation.Nonnull + public String getCustomernumber() { + return customernumber; + } + + public void setCustomernumber(String customernumber) { + this.customernumber = customernumber; + } + + + public ProductSearchRequestServicerequestRequestpreamble vendornumber(String vendornumber) { + this.vendornumber = vendornumber; + return this; + } + + /** + * Get vendornumber + * @return vendornumber + **/ + @javax.annotation.Nullable + public String getVendornumber() { + return vendornumber; + } + + public void setVendornumber(String vendornumber) { + this.vendornumber = vendornumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductSearchRequestServicerequestRequestpreamble productSearchRequestServicerequestRequestpreamble = (ProductSearchRequestServicerequestRequestpreamble) o; + return Objects.equals(this.isocountrycode, productSearchRequestServicerequestRequestpreamble.isocountrycode) && + Objects.equals(this.customernumber, productSearchRequestServicerequestRequestpreamble.customernumber) && + Objects.equals(this.vendornumber, productSearchRequestServicerequestRequestpreamble.vendornumber); + } + + @Override + public int hashCode() { + return Objects.hash(isocountrycode, customernumber, vendornumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductSearchRequestServicerequestRequestpreamble {\n"); + sb.append(" isocountrycode: ").append(toIndentedString(isocountrycode)).append("\n"); + sb.append(" customernumber: ").append(toIndentedString(customernumber)).append("\n"); + sb.append(" vendornumber: ").append(toIndentedString(vendornumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("isocountrycode"); + openapiFields.add("customernumber"); + openapiFields.add("vendornumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("isocountrycode"); + openapiRequiredFields.add("customernumber"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductSearchRequestServicerequestRequestpreamble + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductSearchRequestServicerequestRequestpreamble.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProductSearchRequestServicerequestRequestpreamble is not found in the empty JSON string", ProductSearchRequestServicerequestRequestpreamble.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductSearchRequestServicerequestRequestpreamble.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductSearchRequestServicerequestRequestpreamble` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ProductSearchRequestServicerequestRequestpreamble.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("isocountrycode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `isocountrycode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isocountrycode").toString())); + } + if (!jsonObj.get("customernumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customernumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customernumber").toString())); + } + if ((jsonObj.get("vendornumber") != null && !jsonObj.get("vendornumber").isJsonNull()) && !jsonObj.get("vendornumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendornumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendornumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductSearchRequestServicerequestRequestpreamble.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductSearchRequestServicerequestRequestpreamble' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductSearchRequestServicerequestRequestpreamble.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductSearchRequestServicerequestRequestpreamble value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductSearchRequestServicerequestRequestpreamble read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProductSearchRequestServicerequestRequestpreamble given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductSearchRequestServicerequestRequestpreamble + * @throws IOException if the JSON string is invalid with respect to ProductSearchRequestServicerequestRequestpreamble + */ + public static ProductSearchRequestServicerequestRequestpreamble fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProductSearchRequestServicerequestRequestpreamble.class); + } + + /** + * Convert an instance of ProductSearchRequestServicerequestRequestpreamble to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ProductSearchResponse.java b/src/main/java/xiresellers/client/model/ProductSearchResponse.java new file mode 100644 index 00000000..43dccd66 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ProductSearchResponse.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.ProductSearchResponseServiceresponse; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Response object model for the product search endpoint + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ProductSearchResponse { + public static final String SERIALIZED_NAME_SERVICERESPONSE = "serviceresponse"; + @SerializedName(SERIALIZED_NAME_SERVICERESPONSE) + private ProductSearchResponseServiceresponse serviceresponse; + + public ProductSearchResponse() { + } + + public ProductSearchResponse serviceresponse(ProductSearchResponseServiceresponse serviceresponse) { + this.serviceresponse = serviceresponse; + return this; + } + + /** + * Get serviceresponse + * @return serviceresponse + **/ + @javax.annotation.Nullable + public ProductSearchResponseServiceresponse getServiceresponse() { + return serviceresponse; + } + + public void setServiceresponse(ProductSearchResponseServiceresponse serviceresponse) { + this.serviceresponse = serviceresponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductSearchResponse productSearchResponse = (ProductSearchResponse) o; + return Objects.equals(this.serviceresponse, productSearchResponse.serviceresponse); + } + + @Override + public int hashCode() { + return Objects.hash(serviceresponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductSearchResponse {\n"); + sb.append(" serviceresponse: ").append(toIndentedString(serviceresponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("serviceresponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductSearchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProductSearchResponse is not found in the empty JSON string", ProductSearchResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductSearchResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductSearchResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `serviceresponse` + if (jsonObj.get("serviceresponse") != null && !jsonObj.get("serviceresponse").isJsonNull()) { + ProductSearchResponseServiceresponse.validateJsonElement(jsonObj.get("serviceresponse")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductSearchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductSearchResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductSearchResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProductSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductSearchResponse + * @throws IOException if the JSON string is invalid with respect to ProductSearchResponse + */ + public static ProductSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProductSearchResponse.class); + } + + /** + * Convert an instance of ProductSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ProductSearchResponseCatalogInner.java b/src/main/java/xiresellers/client/model/ProductSearchResponseCatalogInner.java new file mode 100644 index 00000000..ae7193bf --- /dev/null +++ b/src/main/java/xiresellers/client/model/ProductSearchResponseCatalogInner.java @@ -0,0 +1,750 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ProductSearchResponseCatalogInnerLinksInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ProductSearchResponseCatalogInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ProductSearchResponseCatalogInner { + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_CATEGORY = "category"; + @SerializedName(SERIALIZED_NAME_CATEGORY) + private String category; + + public static final String SERIALIZED_NAME_SUB_CATEGORY = "subCategory"; + @SerializedName(SERIALIZED_NAME_SUB_CATEGORY) + private String subCategory; + + public static final String SERIALIZED_NAME_PRODUCT_TYPE = "productType"; + @SerializedName(SERIALIZED_NAME_PRODUCT_TYPE) + private String productType; + + public static final String SERIALIZED_NAME_INGRAM_PART_NUMBER = "ingramPartNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PART_NUMBER) + private String ingramPartNumber; + + public static final String SERIALIZED_NAME_VENDOR_PART_NUMBER = "vendorPartNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_PART_NUMBER) + private String vendorPartNumber; + + public static final String SERIALIZED_NAME_UPC_CODE = "upcCode"; + @SerializedName(SERIALIZED_NAME_UPC_CODE) + private String upcCode; + + public static final String SERIALIZED_NAME_VENDOR_NAME = "vendorName"; + @SerializedName(SERIALIZED_NAME_VENDOR_NAME) + private String vendorName; + + public static final String SERIALIZED_NAME_END_USER_REQUIRED = "endUserRequired"; + @SerializedName(SERIALIZED_NAME_END_USER_REQUIRED) + private String endUserRequired; + + public static final String SERIALIZED_NAME_HAS_DISCOUNTS = "hasDiscounts"; + @SerializedName(SERIALIZED_NAME_HAS_DISCOUNTS) + private String hasDiscounts; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_DISCONTINUED = "discontinued"; + @SerializedName(SERIALIZED_NAME_DISCONTINUED) + private String discontinued; + + public static final String SERIALIZED_NAME_NEW_PRODUCT = "newProduct"; + @SerializedName(SERIALIZED_NAME_NEW_PRODUCT) + private String newProduct; + + public static final String SERIALIZED_NAME_DIRECT_SHIP = "directShip"; + @SerializedName(SERIALIZED_NAME_DIRECT_SHIP) + private String directShip; + + public static final String SERIALIZED_NAME_HAS_WARRANTY = "hasWarranty"; + @SerializedName(SERIALIZED_NAME_HAS_WARRANTY) + private String hasWarranty; + + public static final String SERIALIZED_NAME_LINKS = "links"; + @SerializedName(SERIALIZED_NAME_LINKS) + private List links; + + public static final String SERIALIZED_NAME_EXTRA_DESCRIPTION = "extraDescription"; + @SerializedName(SERIALIZED_NAME_EXTRA_DESCRIPTION) + private String extraDescription; + + public static final String SERIALIZED_NAME_REPLACEMENT_SKU = "replacementSku"; + @SerializedName(SERIALIZED_NAME_REPLACEMENT_SKU) + private String replacementSku; + + public static final String SERIALIZED_NAME_AUTHORIZED_TO_PURCHASE = "authorizedToPurchase"; + @SerializedName(SERIALIZED_NAME_AUTHORIZED_TO_PURCHASE) + private String authorizedToPurchase; + + public ProductSearchResponseCatalogInner() { + } + + public ProductSearchResponseCatalogInner description(String description) { + this.description = description; + return this; + } + + /** + * The description of the product. + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + + public ProductSearchResponseCatalogInner category(String category) { + this.category = category; + return this; + } + + /** + * The category of the product. Example: Displays. + * @return category + **/ + @javax.annotation.Nullable + public String getCategory() { + return category; + } + + public void setCategory(String category) { + this.category = category; + } + + + public ProductSearchResponseCatalogInner subCategory(String subCategory) { + this.subCategory = subCategory; + return this; + } + + /** + * The sub category for the product. Example: ComputernMonitors. + * @return subCategory + **/ + @javax.annotation.Nullable + public String getSubCategory() { + return subCategory; + } + + public void setSubCategory(String subCategory) { + this.subCategory = subCategory; + } + + + public ProductSearchResponseCatalogInner productType(String productType) { + this.productType = productType; + return this; + } + + /** + * The product type of the product. Example: LCD Monitors. + * @return productType + **/ + @javax.annotation.Nullable + public String getProductType() { + return productType; + } + + public void setProductType(String productType) { + this.productType = productType; + } + + + public ProductSearchResponseCatalogInner ingramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + return this; + } + + /** + * The Unique IngramMicro part number for the product. + * @return ingramPartNumber + **/ + @javax.annotation.Nullable + public String getIngramPartNumber() { + return ingramPartNumber; + } + + public void setIngramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + } + + + public ProductSearchResponseCatalogInner vendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + return this; + } + + /** + * The vendor part number for the product. + * @return vendorPartNumber + **/ + @javax.annotation.Nullable + public String getVendorPartNumber() { + return vendorPartNumber; + } + + public void setVendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + } + + + public ProductSearchResponseCatalogInner upcCode(String upcCode) { + this.upcCode = upcCode; + return this; + } + + /** + * The UPC code for the product. Consists of 12 numeric digits that are uniquly assigned to each trade item. + * @return upcCode + **/ + @javax.annotation.Nullable + public String getUpcCode() { + return upcCode; + } + + public void setUpcCode(String upcCode) { + this.upcCode = upcCode; + } + + + public ProductSearchResponseCatalogInner vendorName(String vendorName) { + this.vendorName = vendorName; + return this; + } + + /** + * The name of the vendor/manufacturer of the product. + * @return vendorName + **/ + @javax.annotation.Nullable + public String getVendorName() { + return vendorName; + } + + public void setVendorName(String vendorName) { + this.vendorName = vendorName; + } + + + public ProductSearchResponseCatalogInner endUserRequired(String endUserRequired) { + this.endUserRequired = endUserRequired; + return this; + } + + /** + * Indicates whether the contact information for the end user/customer is required, which determines pricing and discounts. + * @return endUserRequired + **/ + @javax.annotation.Nullable + public String getEndUserRequired() { + return endUserRequired; + } + + public void setEndUserRequired(String endUserRequired) { + this.endUserRequired = endUserRequired; + } + + + public ProductSearchResponseCatalogInner hasDiscounts(String hasDiscounts) { + this.hasDiscounts = hasDiscounts; + return this; + } + + /** + * Specifies if there are discounts available for the product. + * @return hasDiscounts + **/ + @javax.annotation.Nullable + public String getHasDiscounts() { + return hasDiscounts; + } + + public void setHasDiscounts(String hasDiscounts) { + this.hasDiscounts = hasDiscounts; + } + + + public ProductSearchResponseCatalogInner type(String type) { + this.type = type; + return this; + } + + /** + * The SKU type of product. One of Physical, Digital, or Any. + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + + public ProductSearchResponseCatalogInner discontinued(String discontinued) { + this.discontinued = discontinued; + return this; + } + + /** + * Indicates if the product has been discontinued. + * @return discontinued + **/ + @javax.annotation.Nullable + public String getDiscontinued() { + return discontinued; + } + + public void setDiscontinued(String discontinued) { + this.discontinued = discontinued; + } + + + public ProductSearchResponseCatalogInner newProduct(String newProduct) { + this.newProduct = newProduct; + return this; + } + + /** + * Indicates if the product is new. For digital products, newer than 10 days. For physical products, newer than 150 days. + * @return newProduct + **/ + @javax.annotation.Nullable + public String getNewProduct() { + return newProduct; + } + + public void setNewProduct(String newProduct) { + this.newProduct = newProduct; + } + + + public ProductSearchResponseCatalogInner directShip(String directShip) { + this.directShip = directShip; + return this; + } + + /** + * Indicates if the product will be shipped directly to the reseller or end user from the vendor/manufacturer. + * @return directShip + **/ + @javax.annotation.Nullable + public String getDirectShip() { + return directShip; + } + + public void setDirectShip(String directShip) { + this.directShip = directShip; + } + + + public ProductSearchResponseCatalogInner hasWarranty(String hasWarranty) { + this.hasWarranty = hasWarranty; + return this; + } + + /** + * Indicates if the product has a warranty. + * @return hasWarranty + **/ + @javax.annotation.Nullable + public String getHasWarranty() { + return hasWarranty; + } + + public void setHasWarranty(String hasWarranty) { + this.hasWarranty = hasWarranty; + } + + + public ProductSearchResponseCatalogInner links(List links) { + this.links = links; + return this; + } + + public ProductSearchResponseCatalogInner addLinksItem(ProductSearchResponseCatalogInnerLinksInner linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * Get links + * @return links + **/ + @javax.annotation.Nullable + public List getLinks() { + return links; + } + + public void setLinks(List links) { + this.links = links; + } + + + public ProductSearchResponseCatalogInner extraDescription(String extraDescription) { + this.extraDescription = extraDescription; + return this; + } + + /** + * The extended description of the product. + * @return extraDescription + **/ + @javax.annotation.Nullable + public String getExtraDescription() { + return extraDescription; + } + + public void setExtraDescription(String extraDescription) { + this.extraDescription = extraDescription; + } + + + public ProductSearchResponseCatalogInner replacementSku(String replacementSku) { + this.replacementSku = replacementSku; + return this; + } + + /** + * Identifies a SKU that is a comparable subsititution of the current SKU if available. + * @return replacementSku + **/ + @javax.annotation.Nullable + public String getReplacementSku() { + return replacementSku; + } + + public void setReplacementSku(String replacementSku) { + this.replacementSku = replacementSku; + } + + + public ProductSearchResponseCatalogInner authorizedToPurchase(String authorizedToPurchase) { + this.authorizedToPurchase = authorizedToPurchase; + return this; + } + + /** + * It is true when it exists in matched queries field of ealstic search API. + * @return authorizedToPurchase + **/ + @javax.annotation.Nullable + public String getAuthorizedToPurchase() { + return authorizedToPurchase; + } + + public void setAuthorizedToPurchase(String authorizedToPurchase) { + this.authorizedToPurchase = authorizedToPurchase; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductSearchResponseCatalogInner productSearchResponseCatalogInner = (ProductSearchResponseCatalogInner) o; + return Objects.equals(this.description, productSearchResponseCatalogInner.description) && + Objects.equals(this.category, productSearchResponseCatalogInner.category) && + Objects.equals(this.subCategory, productSearchResponseCatalogInner.subCategory) && + Objects.equals(this.productType, productSearchResponseCatalogInner.productType) && + Objects.equals(this.ingramPartNumber, productSearchResponseCatalogInner.ingramPartNumber) && + Objects.equals(this.vendorPartNumber, productSearchResponseCatalogInner.vendorPartNumber) && + Objects.equals(this.upcCode, productSearchResponseCatalogInner.upcCode) && + Objects.equals(this.vendorName, productSearchResponseCatalogInner.vendorName) && + Objects.equals(this.endUserRequired, productSearchResponseCatalogInner.endUserRequired) && + Objects.equals(this.hasDiscounts, productSearchResponseCatalogInner.hasDiscounts) && + Objects.equals(this.type, productSearchResponseCatalogInner.type) && + Objects.equals(this.discontinued, productSearchResponseCatalogInner.discontinued) && + Objects.equals(this.newProduct, productSearchResponseCatalogInner.newProduct) && + Objects.equals(this.directShip, productSearchResponseCatalogInner.directShip) && + Objects.equals(this.hasWarranty, productSearchResponseCatalogInner.hasWarranty) && + Objects.equals(this.links, productSearchResponseCatalogInner.links) && + Objects.equals(this.extraDescription, productSearchResponseCatalogInner.extraDescription) && + Objects.equals(this.replacementSku, productSearchResponseCatalogInner.replacementSku) && + Objects.equals(this.authorizedToPurchase, productSearchResponseCatalogInner.authorizedToPurchase); + } + + @Override + public int hashCode() { + return Objects.hash(description, category, subCategory, productType, ingramPartNumber, vendorPartNumber, upcCode, vendorName, endUserRequired, hasDiscounts, type, discontinued, newProduct, directShip, hasWarranty, links, extraDescription, replacementSku, authorizedToPurchase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductSearchResponseCatalogInner {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" subCategory: ").append(toIndentedString(subCategory)).append("\n"); + sb.append(" productType: ").append(toIndentedString(productType)).append("\n"); + sb.append(" ingramPartNumber: ").append(toIndentedString(ingramPartNumber)).append("\n"); + sb.append(" vendorPartNumber: ").append(toIndentedString(vendorPartNumber)).append("\n"); + sb.append(" upcCode: ").append(toIndentedString(upcCode)).append("\n"); + sb.append(" vendorName: ").append(toIndentedString(vendorName)).append("\n"); + sb.append(" endUserRequired: ").append(toIndentedString(endUserRequired)).append("\n"); + sb.append(" hasDiscounts: ").append(toIndentedString(hasDiscounts)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" discontinued: ").append(toIndentedString(discontinued)).append("\n"); + sb.append(" newProduct: ").append(toIndentedString(newProduct)).append("\n"); + sb.append(" directShip: ").append(toIndentedString(directShip)).append("\n"); + sb.append(" hasWarranty: ").append(toIndentedString(hasWarranty)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" extraDescription: ").append(toIndentedString(extraDescription)).append("\n"); + sb.append(" replacementSku: ").append(toIndentedString(replacementSku)).append("\n"); + sb.append(" authorizedToPurchase: ").append(toIndentedString(authorizedToPurchase)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("description"); + openapiFields.add("category"); + openapiFields.add("subCategory"); + openapiFields.add("productType"); + openapiFields.add("ingramPartNumber"); + openapiFields.add("vendorPartNumber"); + openapiFields.add("upcCode"); + openapiFields.add("vendorName"); + openapiFields.add("endUserRequired"); + openapiFields.add("hasDiscounts"); + openapiFields.add("type"); + openapiFields.add("discontinued"); + openapiFields.add("newProduct"); + openapiFields.add("directShip"); + openapiFields.add("hasWarranty"); + openapiFields.add("links"); + openapiFields.add("extraDescription"); + openapiFields.add("replacementSku"); + openapiFields.add("authorizedToPurchase"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductSearchResponseCatalogInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductSearchResponseCatalogInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProductSearchResponseCatalogInner is not found in the empty JSON string", ProductSearchResponseCatalogInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductSearchResponseCatalogInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductSearchResponseCatalogInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("category") != null && !jsonObj.get("category").isJsonNull()) && !jsonObj.get("category").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category").toString())); + } + if ((jsonObj.get("subCategory") != null && !jsonObj.get("subCategory").isJsonNull()) && !jsonObj.get("subCategory").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subCategory` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subCategory").toString())); + } + if ((jsonObj.get("productType") != null && !jsonObj.get("productType").isJsonNull()) && !jsonObj.get("productType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `productType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productType").toString())); + } + if ((jsonObj.get("ingramPartNumber") != null && !jsonObj.get("ingramPartNumber").isJsonNull()) && !jsonObj.get("ingramPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPartNumber").toString())); + } + if ((jsonObj.get("vendorPartNumber") != null && !jsonObj.get("vendorPartNumber").isJsonNull()) && !jsonObj.get("vendorPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorPartNumber").toString())); + } + if ((jsonObj.get("upcCode") != null && !jsonObj.get("upcCode").isJsonNull()) && !jsonObj.get("upcCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `upcCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("upcCode").toString())); + } + if ((jsonObj.get("vendorName") != null && !jsonObj.get("vendorName").isJsonNull()) && !jsonObj.get("vendorName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorName").toString())); + } + if ((jsonObj.get("endUserRequired") != null && !jsonObj.get("endUserRequired").isJsonNull()) && !jsonObj.get("endUserRequired").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endUserRequired` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endUserRequired").toString())); + } + if ((jsonObj.get("hasDiscounts") != null && !jsonObj.get("hasDiscounts").isJsonNull()) && !jsonObj.get("hasDiscounts").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `hasDiscounts` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hasDiscounts").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("discontinued") != null && !jsonObj.get("discontinued").isJsonNull()) && !jsonObj.get("discontinued").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `discontinued` to be a primitive type in the JSON string but got `%s`", jsonObj.get("discontinued").toString())); + } + if ((jsonObj.get("newProduct") != null && !jsonObj.get("newProduct").isJsonNull()) && !jsonObj.get("newProduct").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `newProduct` to be a primitive type in the JSON string but got `%s`", jsonObj.get("newProduct").toString())); + } + if ((jsonObj.get("directShip") != null && !jsonObj.get("directShip").isJsonNull()) && !jsonObj.get("directShip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `directShip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("directShip").toString())); + } + if ((jsonObj.get("hasWarranty") != null && !jsonObj.get("hasWarranty").isJsonNull()) && !jsonObj.get("hasWarranty").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `hasWarranty` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hasWarranty").toString())); + } + if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull()) { + JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); + if (jsonArraylinks != null) { + // ensure the json data is an array + if (!jsonObj.get("links").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + } + + // validate the optional field `links` (array) + for (int i = 0; i < jsonArraylinks.size(); i++) { + ProductSearchResponseCatalogInnerLinksInner.validateJsonElement(jsonArraylinks.get(i)); + }; + } + } + if ((jsonObj.get("extraDescription") != null && !jsonObj.get("extraDescription").isJsonNull()) && !jsonObj.get("extraDescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `extraDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("extraDescription").toString())); + } + if ((jsonObj.get("replacementSku") != null && !jsonObj.get("replacementSku").isJsonNull()) && !jsonObj.get("replacementSku").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `replacementSku` to be a primitive type in the JSON string but got `%s`", jsonObj.get("replacementSku").toString())); + } + if ((jsonObj.get("authorizedToPurchase") != null && !jsonObj.get("authorizedToPurchase").isJsonNull()) && !jsonObj.get("authorizedToPurchase").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `authorizedToPurchase` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorizedToPurchase").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductSearchResponseCatalogInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductSearchResponseCatalogInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductSearchResponseCatalogInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductSearchResponseCatalogInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductSearchResponseCatalogInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProductSearchResponseCatalogInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductSearchResponseCatalogInner + * @throws IOException if the JSON string is invalid with respect to ProductSearchResponseCatalogInner + */ + public static ProductSearchResponseCatalogInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProductSearchResponseCatalogInner.class); + } + + /** + * Convert an instance of ProductSearchResponseCatalogInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ProductSearchResponseCatalogInnerLinksInner.java b/src/main/java/xiresellers/client/model/ProductSearchResponseCatalogInnerLinksInner.java new file mode 100644 index 00000000..3965ed20 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ProductSearchResponseCatalogInnerLinksInner.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * HATEOAS links for the price and availability of the sku. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ProductSearchResponseCatalogInnerLinksInner { + public static final String SERIALIZED_NAME_TOPIC = "topic"; + @SerializedName(SERIALIZED_NAME_TOPIC) + private String topic; + + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + private String href; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public ProductSearchResponseCatalogInnerLinksInner() { + } + + public ProductSearchResponseCatalogInnerLinksInner topic(String topic) { + this.topic = topic; + return this; + } + + /** + * Provides the details of the product. + * @return topic + **/ + @javax.annotation.Nullable + public String getTopic() { + return topic; + } + + public void setTopic(String topic) { + this.topic = topic; + } + + + public ProductSearchResponseCatalogInnerLinksInner href(String href) { + this.href = href; + return this; + } + + /** + * The URL endpoint for accessing the relevant data.. + * @return href + **/ + @javax.annotation.Nullable + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + + public ProductSearchResponseCatalogInnerLinksInner type(String type) { + this.type = type; + return this; + } + + /** + * The type of call that can be made to the href link(GET) + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductSearchResponseCatalogInnerLinksInner productSearchResponseCatalogInnerLinksInner = (ProductSearchResponseCatalogInnerLinksInner) o; + return Objects.equals(this.topic, productSearchResponseCatalogInnerLinksInner.topic) && + Objects.equals(this.href, productSearchResponseCatalogInnerLinksInner.href) && + Objects.equals(this.type, productSearchResponseCatalogInnerLinksInner.type); + } + + @Override + public int hashCode() { + return Objects.hash(topic, href, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductSearchResponseCatalogInnerLinksInner {\n"); + sb.append(" topic: ").append(toIndentedString(topic)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("topic"); + openapiFields.add("href"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductSearchResponseCatalogInnerLinksInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductSearchResponseCatalogInnerLinksInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProductSearchResponseCatalogInnerLinksInner is not found in the empty JSON string", ProductSearchResponseCatalogInnerLinksInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductSearchResponseCatalogInnerLinksInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductSearchResponseCatalogInnerLinksInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("topic") != null && !jsonObj.get("topic").isJsonNull()) && !jsonObj.get("topic").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `topic` to be a primitive type in the JSON string but got `%s`", jsonObj.get("topic").toString())); + } + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductSearchResponseCatalogInnerLinksInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductSearchResponseCatalogInnerLinksInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductSearchResponseCatalogInnerLinksInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductSearchResponseCatalogInnerLinksInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductSearchResponseCatalogInnerLinksInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProductSearchResponseCatalogInnerLinksInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductSearchResponseCatalogInnerLinksInner + * @throws IOException if the JSON string is invalid with respect to ProductSearchResponseCatalogInnerLinksInner + */ + public static ProductSearchResponseCatalogInnerLinksInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProductSearchResponseCatalogInnerLinksInner.class); + } + + /** + * Convert an instance of ProductSearchResponseCatalogInnerLinksInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ProductSearchResponseServiceresponse.java b/src/main/java/xiresellers/client/model/ProductSearchResponseServiceresponse.java new file mode 100644 index 00000000..a31aa3fc --- /dev/null +++ b/src/main/java/xiresellers/client/model/ProductSearchResponseServiceresponse.java @@ -0,0 +1,259 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ProductSearchResponseServiceresponseProductsearchresponseInner; +import xiresellers.client.model.ProductSearchResponseServiceresponseResponsepreamble; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ProductSearchResponseServiceresponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ProductSearchResponseServiceresponse { + public static final String SERIALIZED_NAME_RESPONSEPREAMBLE = "responsepreamble"; + @SerializedName(SERIALIZED_NAME_RESPONSEPREAMBLE) + private ProductSearchResponseServiceresponseResponsepreamble responsepreamble; + + public static final String SERIALIZED_NAME_PRODUCTSEARCHRESPONSE = "productsearchresponse"; + @SerializedName(SERIALIZED_NAME_PRODUCTSEARCHRESPONSE) + private List productsearchresponse; + + public ProductSearchResponseServiceresponse() { + } + + public ProductSearchResponseServiceresponse responsepreamble(ProductSearchResponseServiceresponseResponsepreamble responsepreamble) { + this.responsepreamble = responsepreamble; + return this; + } + + /** + * Get responsepreamble + * @return responsepreamble + **/ + @javax.annotation.Nullable + public ProductSearchResponseServiceresponseResponsepreamble getResponsepreamble() { + return responsepreamble; + } + + public void setResponsepreamble(ProductSearchResponseServiceresponseResponsepreamble responsepreamble) { + this.responsepreamble = responsepreamble; + } + + + public ProductSearchResponseServiceresponse productsearchresponse(List productsearchresponse) { + this.productsearchresponse = productsearchresponse; + return this; + } + + public ProductSearchResponseServiceresponse addProductsearchresponseItem(ProductSearchResponseServiceresponseProductsearchresponseInner productsearchresponseItem) { + if (this.productsearchresponse == null) { + this.productsearchresponse = new ArrayList<>(); + } + this.productsearchresponse.add(productsearchresponseItem); + return this; + } + + /** + * Get productsearchresponse + * @return productsearchresponse + **/ + @javax.annotation.Nullable + public List getProductsearchresponse() { + return productsearchresponse; + } + + public void setProductsearchresponse(List productsearchresponse) { + this.productsearchresponse = productsearchresponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductSearchResponseServiceresponse productSearchResponseServiceresponse = (ProductSearchResponseServiceresponse) o; + return Objects.equals(this.responsepreamble, productSearchResponseServiceresponse.responsepreamble) && + Objects.equals(this.productsearchresponse, productSearchResponseServiceresponse.productsearchresponse); + } + + @Override + public int hashCode() { + return Objects.hash(responsepreamble, productsearchresponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductSearchResponseServiceresponse {\n"); + sb.append(" responsepreamble: ").append(toIndentedString(responsepreamble)).append("\n"); + sb.append(" productsearchresponse: ").append(toIndentedString(productsearchresponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("responsepreamble"); + openapiFields.add("productsearchresponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductSearchResponseServiceresponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductSearchResponseServiceresponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProductSearchResponseServiceresponse is not found in the empty JSON string", ProductSearchResponseServiceresponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductSearchResponseServiceresponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductSearchResponseServiceresponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `responsepreamble` + if (jsonObj.get("responsepreamble") != null && !jsonObj.get("responsepreamble").isJsonNull()) { + ProductSearchResponseServiceresponseResponsepreamble.validateJsonElement(jsonObj.get("responsepreamble")); + } + if (jsonObj.get("productsearchresponse") != null && !jsonObj.get("productsearchresponse").isJsonNull()) { + JsonArray jsonArrayproductsearchresponse = jsonObj.getAsJsonArray("productsearchresponse"); + if (jsonArrayproductsearchresponse != null) { + // ensure the json data is an array + if (!jsonObj.get("productsearchresponse").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `productsearchresponse` to be an array in the JSON string but got `%s`", jsonObj.get("productsearchresponse").toString())); + } + + // validate the optional field `productsearchresponse` (array) + for (int i = 0; i < jsonArrayproductsearchresponse.size(); i++) { + ProductSearchResponseServiceresponseProductsearchresponseInner.validateJsonElement(jsonArrayproductsearchresponse.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductSearchResponseServiceresponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductSearchResponseServiceresponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductSearchResponseServiceresponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductSearchResponseServiceresponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductSearchResponseServiceresponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProductSearchResponseServiceresponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductSearchResponseServiceresponse + * @throws IOException if the JSON string is invalid with respect to ProductSearchResponseServiceresponse + */ + public static ProductSearchResponseServiceresponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProductSearchResponseServiceresponse.class); + } + + /** + * Convert an instance of ProductSearchResponseServiceresponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ProductSearchResponseServiceresponseProductsearchresponseInner.java b/src/main/java/xiresellers/client/model/ProductSearchResponseServiceresponseProductsearchresponseInner.java new file mode 100644 index 00000000..4e5442f5 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ProductSearchResponseServiceresponseProductsearchresponseInner.java @@ -0,0 +1,257 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ProductSearchResponseServiceresponseProductsearchresponseInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ProductSearchResponseServiceresponseProductsearchresponseInner { + public static final String SERIALIZED_NAME_RESPONSEFLAG = "responseflag"; + @SerializedName(SERIALIZED_NAME_RESPONSEFLAG) + private String responseflag; + + public static final String SERIALIZED_NAME_PARTNUMBERS = "partnumbers"; + @SerializedName(SERIALIZED_NAME_PARTNUMBERS) + private List partnumbers; + + public ProductSearchResponseServiceresponseProductsearchresponseInner() { + } + + public ProductSearchResponseServiceresponseProductsearchresponseInner responseflag(String responseflag) { + this.responseflag = responseflag; + return this; + } + + /** + * Number of records in the search result. + * @return responseflag + **/ + @javax.annotation.Nullable + public String getResponseflag() { + return responseflag; + } + + public void setResponseflag(String responseflag) { + this.responseflag = responseflag; + } + + + public ProductSearchResponseServiceresponseProductsearchresponseInner partnumbers(List partnumbers) { + this.partnumbers = partnumbers; + return this; + } + + public ProductSearchResponseServiceresponseProductsearchresponseInner addPartnumbersItem(ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner partnumbersItem) { + if (this.partnumbers == null) { + this.partnumbers = new ArrayList<>(); + } + this.partnumbers.add(partnumbersItem); + return this; + } + + /** + * Get partnumbers + * @return partnumbers + **/ + @javax.annotation.Nullable + public List getPartnumbers() { + return partnumbers; + } + + public void setPartnumbers(List partnumbers) { + this.partnumbers = partnumbers; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductSearchResponseServiceresponseProductsearchresponseInner productSearchResponseServiceresponseProductsearchresponseInner = (ProductSearchResponseServiceresponseProductsearchresponseInner) o; + return Objects.equals(this.responseflag, productSearchResponseServiceresponseProductsearchresponseInner.responseflag) && + Objects.equals(this.partnumbers, productSearchResponseServiceresponseProductsearchresponseInner.partnumbers); + } + + @Override + public int hashCode() { + return Objects.hash(responseflag, partnumbers); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductSearchResponseServiceresponseProductsearchresponseInner {\n"); + sb.append(" responseflag: ").append(toIndentedString(responseflag)).append("\n"); + sb.append(" partnumbers: ").append(toIndentedString(partnumbers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("responseflag"); + openapiFields.add("partnumbers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductSearchResponseServiceresponseProductsearchresponseInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductSearchResponseServiceresponseProductsearchresponseInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProductSearchResponseServiceresponseProductsearchresponseInner is not found in the empty JSON string", ProductSearchResponseServiceresponseProductsearchresponseInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductSearchResponseServiceresponseProductsearchresponseInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductSearchResponseServiceresponseProductsearchresponseInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("responseflag") != null && !jsonObj.get("responseflag").isJsonNull()) && !jsonObj.get("responseflag").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `responseflag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("responseflag").toString())); + } + if (jsonObj.get("partnumbers") != null && !jsonObj.get("partnumbers").isJsonNull()) { + JsonArray jsonArraypartnumbers = jsonObj.getAsJsonArray("partnumbers"); + if (jsonArraypartnumbers != null) { + // ensure the json data is an array + if (!jsonObj.get("partnumbers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `partnumbers` to be an array in the JSON string but got `%s`", jsonObj.get("partnumbers").toString())); + } + + // validate the optional field `partnumbers` (array) + for (int i = 0; i < jsonArraypartnumbers.size(); i++) { + ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner.validateJsonElement(jsonArraypartnumbers.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductSearchResponseServiceresponseProductsearchresponseInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductSearchResponseServiceresponseProductsearchresponseInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductSearchResponseServiceresponseProductsearchresponseInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductSearchResponseServiceresponseProductsearchresponseInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductSearchResponseServiceresponseProductsearchresponseInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProductSearchResponseServiceresponseProductsearchresponseInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductSearchResponseServiceresponseProductsearchresponseInner + * @throws IOException if the JSON string is invalid with respect to ProductSearchResponseServiceresponseProductsearchresponseInner + */ + public static ProductSearchResponseServiceresponseProductsearchresponseInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProductSearchResponseServiceresponseProductsearchresponseInner.class); + } + + /** + * Convert an instance of ProductSearchResponseServiceresponseProductsearchresponseInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner.java b/src/main/java/xiresellers/client/model/ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner.java new file mode 100644 index 00000000..56cb1598 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner.java @@ -0,0 +1,351 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner { + public static final String SERIALIZED_NAME_INGRAMPARTNUMBER = "ingrampartnumber"; + @SerializedName(SERIALIZED_NAME_INGRAMPARTNUMBER) + private String ingrampartnumber; + + public static final String SERIALIZED_NAME_MANUFACTURERPARTNUMBER = "manufacturerpartnumber"; + @SerializedName(SERIALIZED_NAME_MANUFACTURERPARTNUMBER) + private String manufacturerpartnumber; + + public static final String SERIALIZED_NAME_UPCCODE = "upccode"; + @SerializedName(SERIALIZED_NAME_UPCCODE) + private String upccode; + + public static final String SERIALIZED_NAME_PRODUCTDESCRIPTION = "productdescription"; + @SerializedName(SERIALIZED_NAME_PRODUCTDESCRIPTION) + private String productdescription; + + public static final String SERIALIZED_NAME_CURRENCY = "currency"; + @SerializedName(SERIALIZED_NAME_CURRENCY) + private String currency; + + public static final String SERIALIZED_NAME_HASWARRANTY = "haswarranty"; + @SerializedName(SERIALIZED_NAME_HASWARRANTY) + private String haswarranty; + + public ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner() { + } + + public ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner ingrampartnumber(String ingrampartnumber) { + this.ingrampartnumber = ingrampartnumber; + return this; + } + + /** + * Ingram Part Number + * @return ingrampartnumber + **/ + @javax.annotation.Nullable + public String getIngrampartnumber() { + return ingrampartnumber; + } + + public void setIngrampartnumber(String ingrampartnumber) { + this.ingrampartnumber = ingrampartnumber; + } + + + public ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner manufacturerpartnumber(String manufacturerpartnumber) { + this.manufacturerpartnumber = manufacturerpartnumber; + return this; + } + + /** + * Vendor or Manufacturer Part Number + * @return manufacturerpartnumber + **/ + @javax.annotation.Nullable + public String getManufacturerpartnumber() { + return manufacturerpartnumber; + } + + public void setManufacturerpartnumber(String manufacturerpartnumber) { + this.manufacturerpartnumber = manufacturerpartnumber; + } + + + public ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner upccode(String upccode) { + this.upccode = upccode; + return this; + } + + /** + * UPC + * @return upccode + **/ + @javax.annotation.Nullable + public String getUpccode() { + return upccode; + } + + public void setUpccode(String upccode) { + this.upccode = upccode; + } + + + public ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner productdescription(String productdescription) { + this.productdescription = productdescription; + return this; + } + + /** + * Product description + * @return productdescription + **/ + @javax.annotation.Nullable + public String getProductdescription() { + return productdescription; + } + + public void setProductdescription(String productdescription) { + this.productdescription = productdescription; + } + + + public ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner currency(String currency) { + this.currency = currency; + return this; + } + + /** + * Get currency + * @return currency + **/ + @javax.annotation.Nullable + public String getCurrency() { + return currency; + } + + public void setCurrency(String currency) { + this.currency = currency; + } + + + public ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner haswarranty(String haswarranty) { + this.haswarranty = haswarranty; + return this; + } + + /** + * Get haswarranty + * @return haswarranty + **/ + @javax.annotation.Nullable + public String getHaswarranty() { + return haswarranty; + } + + public void setHaswarranty(String haswarranty) { + this.haswarranty = haswarranty; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner productSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner = (ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner) o; + return Objects.equals(this.ingrampartnumber, productSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner.ingrampartnumber) && + Objects.equals(this.manufacturerpartnumber, productSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner.manufacturerpartnumber) && + Objects.equals(this.upccode, productSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner.upccode) && + Objects.equals(this.productdescription, productSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner.productdescription) && + Objects.equals(this.currency, productSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner.currency) && + Objects.equals(this.haswarranty, productSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner.haswarranty); + } + + @Override + public int hashCode() { + return Objects.hash(ingrampartnumber, manufacturerpartnumber, upccode, productdescription, currency, haswarranty); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner {\n"); + sb.append(" ingrampartnumber: ").append(toIndentedString(ingrampartnumber)).append("\n"); + sb.append(" manufacturerpartnumber: ").append(toIndentedString(manufacturerpartnumber)).append("\n"); + sb.append(" upccode: ").append(toIndentedString(upccode)).append("\n"); + sb.append(" productdescription: ").append(toIndentedString(productdescription)).append("\n"); + sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); + sb.append(" haswarranty: ").append(toIndentedString(haswarranty)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("ingrampartnumber"); + openapiFields.add("manufacturerpartnumber"); + openapiFields.add("upccode"); + openapiFields.add("productdescription"); + openapiFields.add("currency"); + openapiFields.add("haswarranty"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner is not found in the empty JSON string", ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("ingrampartnumber") != null && !jsonObj.get("ingrampartnumber").isJsonNull()) && !jsonObj.get("ingrampartnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingrampartnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingrampartnumber").toString())); + } + if ((jsonObj.get("manufacturerpartnumber") != null && !jsonObj.get("manufacturerpartnumber").isJsonNull()) && !jsonObj.get("manufacturerpartnumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `manufacturerpartnumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("manufacturerpartnumber").toString())); + } + if ((jsonObj.get("upccode") != null && !jsonObj.get("upccode").isJsonNull()) && !jsonObj.get("upccode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `upccode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("upccode").toString())); + } + if ((jsonObj.get("productdescription") != null && !jsonObj.get("productdescription").isJsonNull()) && !jsonObj.get("productdescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `productdescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productdescription").toString())); + } + if ((jsonObj.get("currency") != null && !jsonObj.get("currency").isJsonNull()) && !jsonObj.get("currency").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `currency` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currency").toString())); + } + if ((jsonObj.get("haswarranty") != null && !jsonObj.get("haswarranty").isJsonNull()) && !jsonObj.get("haswarranty").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `haswarranty` to be a primitive type in the JSON string but got `%s`", jsonObj.get("haswarranty").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner + * @throws IOException if the JSON string is invalid with respect to ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner + */ + public static ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner.class); + } + + /** + * Convert an instance of ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ProductSearchResponseServiceresponseResponsepreamble.java b/src/main/java/xiresellers/client/model/ProductSearchResponseServiceresponseResponsepreamble.java new file mode 100644 index 00000000..d76515e7 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ProductSearchResponseServiceresponseResponsepreamble.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ProductSearchResponseServiceresponseResponsepreamble + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ProductSearchResponseServiceresponseResponsepreamble { + public static final String SERIALIZED_NAME_REQUESTSTATUS = "requeststatus"; + @SerializedName(SERIALIZED_NAME_REQUESTSTATUS) + private String requeststatus; + + public static final String SERIALIZED_NAME_RETURNCODE = "returncode"; + @SerializedName(SERIALIZED_NAME_RETURNCODE) + private String returncode; + + public static final String SERIALIZED_NAME_RETURNMESSAGE = "returnmessage"; + @SerializedName(SERIALIZED_NAME_RETURNMESSAGE) + private String returnmessage; + + public ProductSearchResponseServiceresponseResponsepreamble() { + } + + public ProductSearchResponseServiceresponseResponsepreamble requeststatus(String requeststatus) { + this.requeststatus = requeststatus; + return this; + } + + /** + * Get requeststatus + * @return requeststatus + **/ + @javax.annotation.Nullable + public String getRequeststatus() { + return requeststatus; + } + + public void setRequeststatus(String requeststatus) { + this.requeststatus = requeststatus; + } + + + public ProductSearchResponseServiceresponseResponsepreamble returncode(String returncode) { + this.returncode = returncode; + return this; + } + + /** + * Get returncode + * @return returncode + **/ + @javax.annotation.Nullable + public String getReturncode() { + return returncode; + } + + public void setReturncode(String returncode) { + this.returncode = returncode; + } + + + public ProductSearchResponseServiceresponseResponsepreamble returnmessage(String returnmessage) { + this.returnmessage = returnmessage; + return this; + } + + /** + * Get returnmessage + * @return returnmessage + **/ + @javax.annotation.Nullable + public String getReturnmessage() { + return returnmessage; + } + + public void setReturnmessage(String returnmessage) { + this.returnmessage = returnmessage; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductSearchResponseServiceresponseResponsepreamble productSearchResponseServiceresponseResponsepreamble = (ProductSearchResponseServiceresponseResponsepreamble) o; + return Objects.equals(this.requeststatus, productSearchResponseServiceresponseResponsepreamble.requeststatus) && + Objects.equals(this.returncode, productSearchResponseServiceresponseResponsepreamble.returncode) && + Objects.equals(this.returnmessage, productSearchResponseServiceresponseResponsepreamble.returnmessage); + } + + @Override + public int hashCode() { + return Objects.hash(requeststatus, returncode, returnmessage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductSearchResponseServiceresponseResponsepreamble {\n"); + sb.append(" requeststatus: ").append(toIndentedString(requeststatus)).append("\n"); + sb.append(" returncode: ").append(toIndentedString(returncode)).append("\n"); + sb.append(" returnmessage: ").append(toIndentedString(returnmessage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("requeststatus"); + openapiFields.add("returncode"); + openapiFields.add("returnmessage"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductSearchResponseServiceresponseResponsepreamble + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductSearchResponseServiceresponseResponsepreamble.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProductSearchResponseServiceresponseResponsepreamble is not found in the empty JSON string", ProductSearchResponseServiceresponseResponsepreamble.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductSearchResponseServiceresponseResponsepreamble.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductSearchResponseServiceresponseResponsepreamble` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("requeststatus") != null && !jsonObj.get("requeststatus").isJsonNull()) && !jsonObj.get("requeststatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `requeststatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requeststatus").toString())); + } + if ((jsonObj.get("returncode") != null && !jsonObj.get("returncode").isJsonNull()) && !jsonObj.get("returncode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `returncode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("returncode").toString())); + } + if ((jsonObj.get("returnmessage") != null && !jsonObj.get("returnmessage").isJsonNull()) && !jsonObj.get("returnmessage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `returnmessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("returnmessage").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductSearchResponseServiceresponseResponsepreamble.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductSearchResponseServiceresponseResponsepreamble' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductSearchResponseServiceresponseResponsepreamble.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductSearchResponseServiceresponseResponsepreamble value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductSearchResponseServiceresponseResponsepreamble read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProductSearchResponseServiceresponseResponsepreamble given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductSearchResponseServiceresponseResponsepreamble + * @throws IOException if the JSON string is invalid with respect to ProductSearchResponseServiceresponseResponsepreamble + */ + public static ProductSearchResponseServiceresponseResponsepreamble fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProductSearchResponseServiceresponseResponsepreamble.class); + } + + /** + * Convert an instance of ProductSearchResponseServiceresponseResponsepreamble to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteDetails.java b/src/main/java/xiresellers/client/model/QuoteDetails.java new file mode 100644 index 00000000..1e1feed7 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteDetails.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.QuoteDetailsQuoteDetailResponse; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Response schema for quote details + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteDetails { + public static final String SERIALIZED_NAME_QUOTE_DETAIL_RESPONSE = "quoteDetailResponse"; + @SerializedName(SERIALIZED_NAME_QUOTE_DETAIL_RESPONSE) + private QuoteDetailsQuoteDetailResponse quoteDetailResponse; + + public QuoteDetails() { + } + + public QuoteDetails quoteDetailResponse(QuoteDetailsQuoteDetailResponse quoteDetailResponse) { + this.quoteDetailResponse = quoteDetailResponse; + return this; + } + + /** + * Get quoteDetailResponse + * @return quoteDetailResponse + **/ + @javax.annotation.Nullable + public QuoteDetailsQuoteDetailResponse getQuoteDetailResponse() { + return quoteDetailResponse; + } + + public void setQuoteDetailResponse(QuoteDetailsQuoteDetailResponse quoteDetailResponse) { + this.quoteDetailResponse = quoteDetailResponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteDetails quoteDetails = (QuoteDetails) o; + return Objects.equals(this.quoteDetailResponse, quoteDetails.quoteDetailResponse); + } + + @Override + public int hashCode() { + return Objects.hash(quoteDetailResponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteDetails {\n"); + sb.append(" quoteDetailResponse: ").append(toIndentedString(quoteDetailResponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("quoteDetailResponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteDetails + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteDetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteDetails is not found in the empty JSON string", QuoteDetails.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteDetails.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteDetails` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `quoteDetailResponse` + if (jsonObj.get("quoteDetailResponse") != null && !jsonObj.get("quoteDetailResponse").isJsonNull()) { + QuoteDetailsQuoteDetailResponse.validateJsonElement(jsonObj.get("quoteDetailResponse")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteDetails.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteDetails' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteDetails.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteDetails value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteDetails read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteDetails + * @throws IOException if the JSON string is invalid with respect to QuoteDetails + */ + public static QuoteDetails fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteDetails.class); + } + + /** + * Convert an instance of QuoteDetails to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponse.java b/src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponse.java new file mode 100644 index 00000000..edd37e7c --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponse.java @@ -0,0 +1,403 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.QuoteDetailsQuoteDetailResponseResponsePreamble; +import xiresellers.client.model.QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse; +import xiresellers.client.model.QuoteProductList; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteDetailsQuoteDetailResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteDetailsQuoteDetailResponse { + public static final String SERIALIZED_NAME_RESPONSE_PREAMBLE = "responsePreamble"; + @SerializedName(SERIALIZED_NAME_RESPONSE_PREAMBLE) + private QuoteDetailsQuoteDetailResponseResponsePreamble responsePreamble; + + public static final String SERIALIZED_NAME_RETRIEVE_QUOTE_RESPONSE = "retrieveQuoteResponse"; + @SerializedName(SERIALIZED_NAME_RETRIEVE_QUOTE_RESPONSE) + private QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse retrieveQuoteResponse; + + public static final String SERIALIZED_NAME_QUOTE_PRODUCT_LIST = "quoteProductList"; + @SerializedName(SERIALIZED_NAME_QUOTE_PRODUCT_LIST) + private List quoteProductList; + + public static final String SERIALIZED_NAME_TOTAL_QUOTE_PRODUCT_COUNT = "totalQuoteProductCount"; + @SerializedName(SERIALIZED_NAME_TOTAL_QUOTE_PRODUCT_COUNT) + private String totalQuoteProductCount; + + public static final String SERIALIZED_NAME_TOTAL_EXTENDED_MSRP = "totalExtendedMsrp"; + @SerializedName(SERIALIZED_NAME_TOTAL_EXTENDED_MSRP) + private String totalExtendedMsrp; + + public static final String SERIALIZED_NAME_TOTAL_QUANTITY = "totalQuantity"; + @SerializedName(SERIALIZED_NAME_TOTAL_QUANTITY) + private Integer totalQuantity; + + public static final String SERIALIZED_NAME_TOTAL_EXTENDED_QUOTE_PRICE = "totalExtendedQuotePrice"; + @SerializedName(SERIALIZED_NAME_TOTAL_EXTENDED_QUOTE_PRICE) + private String totalExtendedQuotePrice; + + public QuoteDetailsQuoteDetailResponse() { + } + + public QuoteDetailsQuoteDetailResponse responsePreamble(QuoteDetailsQuoteDetailResponseResponsePreamble responsePreamble) { + this.responsePreamble = responsePreamble; + return this; + } + + /** + * Get responsePreamble + * @return responsePreamble + **/ + @javax.annotation.Nullable + public QuoteDetailsQuoteDetailResponseResponsePreamble getResponsePreamble() { + return responsePreamble; + } + + public void setResponsePreamble(QuoteDetailsQuoteDetailResponseResponsePreamble responsePreamble) { + this.responsePreamble = responsePreamble; + } + + + public QuoteDetailsQuoteDetailResponse retrieveQuoteResponse(QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse retrieveQuoteResponse) { + this.retrieveQuoteResponse = retrieveQuoteResponse; + return this; + } + + /** + * Get retrieveQuoteResponse + * @return retrieveQuoteResponse + **/ + @javax.annotation.Nullable + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse getRetrieveQuoteResponse() { + return retrieveQuoteResponse; + } + + public void setRetrieveQuoteResponse(QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse retrieveQuoteResponse) { + this.retrieveQuoteResponse = retrieveQuoteResponse; + } + + + public QuoteDetailsQuoteDetailResponse quoteProductList(List quoteProductList) { + this.quoteProductList = quoteProductList; + return this; + } + + public QuoteDetailsQuoteDetailResponse addQuoteProductListItem(QuoteProductList quoteProductListItem) { + if (this.quoteProductList == null) { + this.quoteProductList = new ArrayList<>(); + } + this.quoteProductList.add(quoteProductListItem); + return this; + } + + /** + * Get quoteProductList + * @return quoteProductList + **/ + @javax.annotation.Nullable + public List getQuoteProductList() { + return quoteProductList; + } + + public void setQuoteProductList(List quoteProductList) { + this.quoteProductList = quoteProductList; + } + + + public QuoteDetailsQuoteDetailResponse totalQuoteProductCount(String totalQuoteProductCount) { + this.totalQuoteProductCount = totalQuoteProductCount; + return this; + } + + /** + * Get totalQuoteProductCount + * @return totalQuoteProductCount + **/ + @javax.annotation.Nullable + public String getTotalQuoteProductCount() { + return totalQuoteProductCount; + } + + public void setTotalQuoteProductCount(String totalQuoteProductCount) { + this.totalQuoteProductCount = totalQuoteProductCount; + } + + + public QuoteDetailsQuoteDetailResponse totalExtendedMsrp(String totalExtendedMsrp) { + this.totalExtendedMsrp = totalExtendedMsrp; + return this; + } + + /** + * Get totalExtendedMsrp + * @return totalExtendedMsrp + **/ + @javax.annotation.Nullable + public String getTotalExtendedMsrp() { + return totalExtendedMsrp; + } + + public void setTotalExtendedMsrp(String totalExtendedMsrp) { + this.totalExtendedMsrp = totalExtendedMsrp; + } + + + public QuoteDetailsQuoteDetailResponse totalQuantity(Integer totalQuantity) { + this.totalQuantity = totalQuantity; + return this; + } + + /** + * Get totalQuantity + * @return totalQuantity + **/ + @javax.annotation.Nullable + public Integer getTotalQuantity() { + return totalQuantity; + } + + public void setTotalQuantity(Integer totalQuantity) { + this.totalQuantity = totalQuantity; + } + + + public QuoteDetailsQuoteDetailResponse totalExtendedQuotePrice(String totalExtendedQuotePrice) { + this.totalExtendedQuotePrice = totalExtendedQuotePrice; + return this; + } + + /** + * Get totalExtendedQuotePrice + * @return totalExtendedQuotePrice + **/ + @javax.annotation.Nullable + public String getTotalExtendedQuotePrice() { + return totalExtendedQuotePrice; + } + + public void setTotalExtendedQuotePrice(String totalExtendedQuotePrice) { + this.totalExtendedQuotePrice = totalExtendedQuotePrice; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteDetailsQuoteDetailResponse quoteDetailsQuoteDetailResponse = (QuoteDetailsQuoteDetailResponse) o; + return Objects.equals(this.responsePreamble, quoteDetailsQuoteDetailResponse.responsePreamble) && + Objects.equals(this.retrieveQuoteResponse, quoteDetailsQuoteDetailResponse.retrieveQuoteResponse) && + Objects.equals(this.quoteProductList, quoteDetailsQuoteDetailResponse.quoteProductList) && + Objects.equals(this.totalQuoteProductCount, quoteDetailsQuoteDetailResponse.totalQuoteProductCount) && + Objects.equals(this.totalExtendedMsrp, quoteDetailsQuoteDetailResponse.totalExtendedMsrp) && + Objects.equals(this.totalQuantity, quoteDetailsQuoteDetailResponse.totalQuantity) && + Objects.equals(this.totalExtendedQuotePrice, quoteDetailsQuoteDetailResponse.totalExtendedQuotePrice); + } + + @Override + public int hashCode() { + return Objects.hash(responsePreamble, retrieveQuoteResponse, quoteProductList, totalQuoteProductCount, totalExtendedMsrp, totalQuantity, totalExtendedQuotePrice); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteDetailsQuoteDetailResponse {\n"); + sb.append(" responsePreamble: ").append(toIndentedString(responsePreamble)).append("\n"); + sb.append(" retrieveQuoteResponse: ").append(toIndentedString(retrieveQuoteResponse)).append("\n"); + sb.append(" quoteProductList: ").append(toIndentedString(quoteProductList)).append("\n"); + sb.append(" totalQuoteProductCount: ").append(toIndentedString(totalQuoteProductCount)).append("\n"); + sb.append(" totalExtendedMsrp: ").append(toIndentedString(totalExtendedMsrp)).append("\n"); + sb.append(" totalQuantity: ").append(toIndentedString(totalQuantity)).append("\n"); + sb.append(" totalExtendedQuotePrice: ").append(toIndentedString(totalExtendedQuotePrice)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("responsePreamble"); + openapiFields.add("retrieveQuoteResponse"); + openapiFields.add("quoteProductList"); + openapiFields.add("totalQuoteProductCount"); + openapiFields.add("totalExtendedMsrp"); + openapiFields.add("totalQuantity"); + openapiFields.add("totalExtendedQuotePrice"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteDetailsQuoteDetailResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteDetailsQuoteDetailResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteDetailsQuoteDetailResponse is not found in the empty JSON string", QuoteDetailsQuoteDetailResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteDetailsQuoteDetailResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteDetailsQuoteDetailResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `responsePreamble` + if (jsonObj.get("responsePreamble") != null && !jsonObj.get("responsePreamble").isJsonNull()) { + QuoteDetailsQuoteDetailResponseResponsePreamble.validateJsonElement(jsonObj.get("responsePreamble")); + } + // validate the optional field `retrieveQuoteResponse` + if (jsonObj.get("retrieveQuoteResponse") != null && !jsonObj.get("retrieveQuoteResponse").isJsonNull()) { + QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse.validateJsonElement(jsonObj.get("retrieveQuoteResponse")); + } + if (jsonObj.get("quoteProductList") != null && !jsonObj.get("quoteProductList").isJsonNull()) { + JsonArray jsonArrayquoteProductList = jsonObj.getAsJsonArray("quoteProductList"); + if (jsonArrayquoteProductList != null) { + // ensure the json data is an array + if (!jsonObj.get("quoteProductList").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteProductList` to be an array in the JSON string but got `%s`", jsonObj.get("quoteProductList").toString())); + } + + // validate the optional field `quoteProductList` (array) + for (int i = 0; i < jsonArrayquoteProductList.size(); i++) { + QuoteProductList.validateJsonElement(jsonArrayquoteProductList.get(i)); + }; + } + } + if ((jsonObj.get("totalQuoteProductCount") != null && !jsonObj.get("totalQuoteProductCount").isJsonNull()) && !jsonObj.get("totalQuoteProductCount").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `totalQuoteProductCount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("totalQuoteProductCount").toString())); + } + if ((jsonObj.get("totalExtendedMsrp") != null && !jsonObj.get("totalExtendedMsrp").isJsonNull()) && !jsonObj.get("totalExtendedMsrp").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `totalExtendedMsrp` to be a primitive type in the JSON string but got `%s`", jsonObj.get("totalExtendedMsrp").toString())); + } + if ((jsonObj.get("totalExtendedQuotePrice") != null && !jsonObj.get("totalExtendedQuotePrice").isJsonNull()) && !jsonObj.get("totalExtendedQuotePrice").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `totalExtendedQuotePrice` to be a primitive type in the JSON string but got `%s`", jsonObj.get("totalExtendedQuotePrice").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteDetailsQuoteDetailResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteDetailsQuoteDetailResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteDetailsQuoteDetailResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteDetailsQuoteDetailResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteDetailsQuoteDetailResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteDetailsQuoteDetailResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteDetailsQuoteDetailResponse + * @throws IOException if the JSON string is invalid with respect to QuoteDetailsQuoteDetailResponse + */ + public static QuoteDetailsQuoteDetailResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteDetailsQuoteDetailResponse.class); + } + + /** + * Convert an instance of QuoteDetailsQuoteDetailResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseResponsePreamble.java b/src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseResponsePreamble.java new file mode 100644 index 00000000..0da5e959 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseResponsePreamble.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteDetailsQuoteDetailResponseResponsePreamble + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteDetailsQuoteDetailResponseResponsePreamble { + public static final String SERIALIZED_NAME_RESPONSE_STATUS = "responseStatus"; + @SerializedName(SERIALIZED_NAME_RESPONSE_STATUS) + private String responseStatus; + + public static final String SERIALIZED_NAME_STATUS_CODE = "statusCode"; + @SerializedName(SERIALIZED_NAME_STATUS_CODE) + private String statusCode; + + public static final String SERIALIZED_NAME_RESPONSE_MESSAGE = "responseMessage"; + @SerializedName(SERIALIZED_NAME_RESPONSE_MESSAGE) + private String responseMessage; + + public QuoteDetailsQuoteDetailResponseResponsePreamble() { + } + + public QuoteDetailsQuoteDetailResponseResponsePreamble responseStatus(String responseStatus) { + this.responseStatus = responseStatus; + return this; + } + + /** + * Get responseStatus + * @return responseStatus + **/ + @javax.annotation.Nullable + public String getResponseStatus() { + return responseStatus; + } + + public void setResponseStatus(String responseStatus) { + this.responseStatus = responseStatus; + } + + + public QuoteDetailsQuoteDetailResponseResponsePreamble statusCode(String statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Get statusCode + * @return statusCode + **/ + @javax.annotation.Nullable + public String getStatusCode() { + return statusCode; + } + + public void setStatusCode(String statusCode) { + this.statusCode = statusCode; + } + + + public QuoteDetailsQuoteDetailResponseResponsePreamble responseMessage(String responseMessage) { + this.responseMessage = responseMessage; + return this; + } + + /** + * Get responseMessage + * @return responseMessage + **/ + @javax.annotation.Nullable + public String getResponseMessage() { + return responseMessage; + } + + public void setResponseMessage(String responseMessage) { + this.responseMessage = responseMessage; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteDetailsQuoteDetailResponseResponsePreamble quoteDetailsQuoteDetailResponseResponsePreamble = (QuoteDetailsQuoteDetailResponseResponsePreamble) o; + return Objects.equals(this.responseStatus, quoteDetailsQuoteDetailResponseResponsePreamble.responseStatus) && + Objects.equals(this.statusCode, quoteDetailsQuoteDetailResponseResponsePreamble.statusCode) && + Objects.equals(this.responseMessage, quoteDetailsQuoteDetailResponseResponsePreamble.responseMessage); + } + + @Override + public int hashCode() { + return Objects.hash(responseStatus, statusCode, responseMessage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteDetailsQuoteDetailResponseResponsePreamble {\n"); + sb.append(" responseStatus: ").append(toIndentedString(responseStatus)).append("\n"); + sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); + sb.append(" responseMessage: ").append(toIndentedString(responseMessage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("responseStatus"); + openapiFields.add("statusCode"); + openapiFields.add("responseMessage"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteDetailsQuoteDetailResponseResponsePreamble + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteDetailsQuoteDetailResponseResponsePreamble.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteDetailsQuoteDetailResponseResponsePreamble is not found in the empty JSON string", QuoteDetailsQuoteDetailResponseResponsePreamble.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteDetailsQuoteDetailResponseResponsePreamble.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteDetailsQuoteDetailResponseResponsePreamble` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("responseStatus") != null && !jsonObj.get("responseStatus").isJsonNull()) && !jsonObj.get("responseStatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `responseStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("responseStatus").toString())); + } + if ((jsonObj.get("statusCode") != null && !jsonObj.get("statusCode").isJsonNull()) && !jsonObj.get("statusCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `statusCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("statusCode").toString())); + } + if ((jsonObj.get("responseMessage") != null && !jsonObj.get("responseMessage").isJsonNull()) && !jsonObj.get("responseMessage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `responseMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("responseMessage").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteDetailsQuoteDetailResponseResponsePreamble.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteDetailsQuoteDetailResponseResponsePreamble' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteDetailsQuoteDetailResponseResponsePreamble.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteDetailsQuoteDetailResponseResponsePreamble value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteDetailsQuoteDetailResponseResponsePreamble read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteDetailsQuoteDetailResponseResponsePreamble given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteDetailsQuoteDetailResponseResponsePreamble + * @throws IOException if the JSON string is invalid with respect to QuoteDetailsQuoteDetailResponseResponsePreamble + */ + public static QuoteDetailsQuoteDetailResponseResponsePreamble fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteDetailsQuoteDetailResponseResponsePreamble.class); + } + + /** + * Convert an instance of QuoteDetailsQuoteDetailResponseResponsePreamble to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse.java b/src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse.java new file mode 100644 index 00000000..40913242 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse.java @@ -0,0 +1,838 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.Arrays; +import xiresellers.client.model.QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo; +import xiresellers.client.model.QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo; +import xiresellers.client.model.QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser; +import xiresellers.client.model.QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse { + public static final String SERIALIZED_NAME_QUOTE_GUID = "quoteGuid"; + @SerializedName(SERIALIZED_NAME_QUOTE_GUID) + private String quoteGuid; + + public static final String SERIALIZED_NAME_QUOTE_NAME = "quoteName"; + @SerializedName(SERIALIZED_NAME_QUOTE_NAME) + private String quoteName; + + public static final String SERIALIZED_NAME_QUOTE_NUMBER = "quoteNumber"; + @SerializedName(SERIALIZED_NAME_QUOTE_NUMBER) + private String quoteNumber; + + public static final String SERIALIZED_NAME_QUOTE_EXPIRY_DATE = "quoteExpiryDate"; + @SerializedName(SERIALIZED_NAME_QUOTE_EXPIRY_DATE) + private LocalDate quoteExpiryDate; + + public static final String SERIALIZED_NAME_REVISION_NUMBER = "revisionNumber"; + @SerializedName(SERIALIZED_NAME_REVISION_NUMBER) + private String revisionNumber; + + public static final String SERIALIZED_NAME_INTRO_PREAMBLE = "introPreamble"; + @SerializedName(SERIALIZED_NAME_INTRO_PREAMBLE) + private String introPreamble; + + public static final String SERIALIZED_NAME_PURCHASE_INSTRUCTIONS = "purchaseInstructions"; + @SerializedName(SERIALIZED_NAME_PURCHASE_INSTRUCTIONS) + private String purchaseInstructions; + + public static final String SERIALIZED_NAME_LEGAL_TERMS = "legalTerms"; + @SerializedName(SERIALIZED_NAME_LEGAL_TERMS) + private String legalTerms; + + public static final String SERIALIZED_NAME_CURRENCY_CODE = "currencyCode"; + @SerializedName(SERIALIZED_NAME_CURRENCY_CODE) + private String currencyCode; + + public static final String SERIALIZED_NAME_PRICE_DEVIATION_ID = "priceDeviationId"; + @SerializedName(SERIALIZED_NAME_PRICE_DEVIATION_ID) + private String priceDeviationId; + + public static final String SERIALIZED_NAME_PRICE_DEVIATION_START_DATE = "priceDeviationStartDate"; + @SerializedName(SERIALIZED_NAME_PRICE_DEVIATION_START_DATE) + private LocalDate priceDeviationStartDate; + + public static final String SERIALIZED_NAME_PRICE_DEVIATION_EXPIRY_DATE = "priceDeviationExpiryDate"; + @SerializedName(SERIALIZED_NAME_PRICE_DEVIATION_EXPIRY_DATE) + private LocalDate priceDeviationExpiryDate; + + public static final String SERIALIZED_NAME_CUSTOMER_NEED = "customerNeed"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_NEED) + private String customerNeed; + + public static final String SERIALIZED_NAME_SOLUTION_PROPOSED = "solutionProposed"; + @SerializedName(SERIALIZED_NAME_SOLUTION_PROPOSED) + private String solutionProposed; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_CREATED = "created"; + @SerializedName(SERIALIZED_NAME_CREATED) + private LocalDate created; + + public static final String SERIALIZED_NAME_MODIFIED = "modified"; + @SerializedName(SERIALIZED_NAME_MODIFIED) + private LocalDate modified; + + public static final String SERIALIZED_NAME_LEASING_CALCULATIONS = "leasingCalculations"; + @SerializedName(SERIALIZED_NAME_LEASING_CALCULATIONS) + private String leasingCalculations; + + public static final String SERIALIZED_NAME_LEASING_INSTRUCTIONS = "leasingInstructions"; + @SerializedName(SERIALIZED_NAME_LEASING_INSTRUCTIONS) + private String leasingInstructions; + + public static final String SERIALIZED_NAME_ACCOUNT_INFO = "accountInfo"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_INFO) + private QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo accountInfo; + + public static final String SERIALIZED_NAME_CONTACT_INFO = "contactInfo"; + @SerializedName(SERIALIZED_NAME_CONTACT_INFO) + private QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo contactInfo; + + public static final String SERIALIZED_NAME_VENDOR_ATTRIBUTES = "vendorAttributes"; + @SerializedName(SERIALIZED_NAME_VENDOR_ATTRIBUTES) + private QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes vendorAttributes; + + public static final String SERIALIZED_NAME_END_USER = "endUser"; + @SerializedName(SERIALIZED_NAME_END_USER) + private QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser endUser; + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse() { + } + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse quoteGuid(String quoteGuid) { + this.quoteGuid = quoteGuid; + return this; + } + + /** + * Get quoteGuid + * @return quoteGuid + **/ + @javax.annotation.Nullable + public String getQuoteGuid() { + return quoteGuid; + } + + public void setQuoteGuid(String quoteGuid) { + this.quoteGuid = quoteGuid; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse quoteName(String quoteName) { + this.quoteName = quoteName; + return this; + } + + /** + * Get quoteName + * @return quoteName + **/ + @javax.annotation.Nullable + public String getQuoteName() { + return quoteName; + } + + public void setQuoteName(String quoteName) { + this.quoteName = quoteName; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse quoteNumber(String quoteNumber) { + this.quoteNumber = quoteNumber; + return this; + } + + /** + * Get quoteNumber + * @return quoteNumber + **/ + @javax.annotation.Nullable + public String getQuoteNumber() { + return quoteNumber; + } + + public void setQuoteNumber(String quoteNumber) { + this.quoteNumber = quoteNumber; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse quoteExpiryDate(LocalDate quoteExpiryDate) { + this.quoteExpiryDate = quoteExpiryDate; + return this; + } + + /** + * Get quoteExpiryDate + * @return quoteExpiryDate + **/ + @javax.annotation.Nullable + public LocalDate getQuoteExpiryDate() { + return quoteExpiryDate; + } + + public void setQuoteExpiryDate(LocalDate quoteExpiryDate) { + this.quoteExpiryDate = quoteExpiryDate; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse revisionNumber(String revisionNumber) { + this.revisionNumber = revisionNumber; + return this; + } + + /** + * Get revisionNumber + * @return revisionNumber + **/ + @javax.annotation.Nullable + public String getRevisionNumber() { + return revisionNumber; + } + + public void setRevisionNumber(String revisionNumber) { + this.revisionNumber = revisionNumber; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse introPreamble(String introPreamble) { + this.introPreamble = introPreamble; + return this; + } + + /** + * Get introPreamble + * @return introPreamble + **/ + @javax.annotation.Nullable + public String getIntroPreamble() { + return introPreamble; + } + + public void setIntroPreamble(String introPreamble) { + this.introPreamble = introPreamble; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse purchaseInstructions(String purchaseInstructions) { + this.purchaseInstructions = purchaseInstructions; + return this; + } + + /** + * Get purchaseInstructions + * @return purchaseInstructions + **/ + @javax.annotation.Nullable + public String getPurchaseInstructions() { + return purchaseInstructions; + } + + public void setPurchaseInstructions(String purchaseInstructions) { + this.purchaseInstructions = purchaseInstructions; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse legalTerms(String legalTerms) { + this.legalTerms = legalTerms; + return this; + } + + /** + * Get legalTerms + * @return legalTerms + **/ + @javax.annotation.Nullable + public String getLegalTerms() { + return legalTerms; + } + + public void setLegalTerms(String legalTerms) { + this.legalTerms = legalTerms; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse currencyCode(String currencyCode) { + this.currencyCode = currencyCode; + return this; + } + + /** + * Get currencyCode + * @return currencyCode + **/ + @javax.annotation.Nullable + public String getCurrencyCode() { + return currencyCode; + } + + public void setCurrencyCode(String currencyCode) { + this.currencyCode = currencyCode; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse priceDeviationId(String priceDeviationId) { + this.priceDeviationId = priceDeviationId; + return this; + } + + /** + * Get priceDeviationId + * @return priceDeviationId + **/ + @javax.annotation.Nullable + public String getPriceDeviationId() { + return priceDeviationId; + } + + public void setPriceDeviationId(String priceDeviationId) { + this.priceDeviationId = priceDeviationId; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse priceDeviationStartDate(LocalDate priceDeviationStartDate) { + this.priceDeviationStartDate = priceDeviationStartDate; + return this; + } + + /** + * Get priceDeviationStartDate + * @return priceDeviationStartDate + **/ + @javax.annotation.Nullable + public LocalDate getPriceDeviationStartDate() { + return priceDeviationStartDate; + } + + public void setPriceDeviationStartDate(LocalDate priceDeviationStartDate) { + this.priceDeviationStartDate = priceDeviationStartDate; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse priceDeviationExpiryDate(LocalDate priceDeviationExpiryDate) { + this.priceDeviationExpiryDate = priceDeviationExpiryDate; + return this; + } + + /** + * Get priceDeviationExpiryDate + * @return priceDeviationExpiryDate + **/ + @javax.annotation.Nullable + public LocalDate getPriceDeviationExpiryDate() { + return priceDeviationExpiryDate; + } + + public void setPriceDeviationExpiryDate(LocalDate priceDeviationExpiryDate) { + this.priceDeviationExpiryDate = priceDeviationExpiryDate; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse customerNeed(String customerNeed) { + this.customerNeed = customerNeed; + return this; + } + + /** + * Get customerNeed + * @return customerNeed + **/ + @javax.annotation.Nullable + public String getCustomerNeed() { + return customerNeed; + } + + public void setCustomerNeed(String customerNeed) { + this.customerNeed = customerNeed; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse solutionProposed(String solutionProposed) { + this.solutionProposed = solutionProposed; + return this; + } + + /** + * Get solutionProposed + * @return solutionProposed + **/ + @javax.annotation.Nullable + public String getSolutionProposed() { + return solutionProposed; + } + + public void setSolutionProposed(String solutionProposed) { + this.solutionProposed = solutionProposed; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse status(String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse created(LocalDate created) { + this.created = created; + return this; + } + + /** + * Get created + * @return created + **/ + @javax.annotation.Nullable + public LocalDate getCreated() { + return created; + } + + public void setCreated(LocalDate created) { + this.created = created; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse modified(LocalDate modified) { + this.modified = modified; + return this; + } + + /** + * Get modified + * @return modified + **/ + @javax.annotation.Nullable + public LocalDate getModified() { + return modified; + } + + public void setModified(LocalDate modified) { + this.modified = modified; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse leasingCalculations(String leasingCalculations) { + this.leasingCalculations = leasingCalculations; + return this; + } + + /** + * Get leasingCalculations + * @return leasingCalculations + **/ + @javax.annotation.Nullable + public String getLeasingCalculations() { + return leasingCalculations; + } + + public void setLeasingCalculations(String leasingCalculations) { + this.leasingCalculations = leasingCalculations; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse leasingInstructions(String leasingInstructions) { + this.leasingInstructions = leasingInstructions; + return this; + } + + /** + * Get leasingInstructions + * @return leasingInstructions + **/ + @javax.annotation.Nullable + public String getLeasingInstructions() { + return leasingInstructions; + } + + public void setLeasingInstructions(String leasingInstructions) { + this.leasingInstructions = leasingInstructions; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse accountInfo(QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo accountInfo) { + this.accountInfo = accountInfo; + return this; + } + + /** + * Get accountInfo + * @return accountInfo + **/ + @javax.annotation.Nullable + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo getAccountInfo() { + return accountInfo; + } + + public void setAccountInfo(QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo accountInfo) { + this.accountInfo = accountInfo; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse contactInfo(QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo contactInfo) { + this.contactInfo = contactInfo; + return this; + } + + /** + * Get contactInfo + * @return contactInfo + **/ + @javax.annotation.Nullable + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo getContactInfo() { + return contactInfo; + } + + public void setContactInfo(QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo contactInfo) { + this.contactInfo = contactInfo; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse vendorAttributes(QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes vendorAttributes) { + this.vendorAttributes = vendorAttributes; + return this; + } + + /** + * Get vendorAttributes + * @return vendorAttributes + **/ + @javax.annotation.Nullable + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes getVendorAttributes() { + return vendorAttributes; + } + + public void setVendorAttributes(QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes vendorAttributes) { + this.vendorAttributes = vendorAttributes; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse endUser(QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser endUser) { + this.endUser = endUser; + return this; + } + + /** + * Get endUser + * @return endUser + **/ + @javax.annotation.Nullable + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser getEndUser() { + return endUser; + } + + public void setEndUser(QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser endUser) { + this.endUser = endUser; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse quoteDetailsQuoteDetailResponseRetrieveQuoteResponse = (QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse) o; + return Objects.equals(this.quoteGuid, quoteDetailsQuoteDetailResponseRetrieveQuoteResponse.quoteGuid) && + Objects.equals(this.quoteName, quoteDetailsQuoteDetailResponseRetrieveQuoteResponse.quoteName) && + Objects.equals(this.quoteNumber, quoteDetailsQuoteDetailResponseRetrieveQuoteResponse.quoteNumber) && + Objects.equals(this.quoteExpiryDate, quoteDetailsQuoteDetailResponseRetrieveQuoteResponse.quoteExpiryDate) && + Objects.equals(this.revisionNumber, quoteDetailsQuoteDetailResponseRetrieveQuoteResponse.revisionNumber) && + Objects.equals(this.introPreamble, quoteDetailsQuoteDetailResponseRetrieveQuoteResponse.introPreamble) && + Objects.equals(this.purchaseInstructions, quoteDetailsQuoteDetailResponseRetrieveQuoteResponse.purchaseInstructions) && + Objects.equals(this.legalTerms, quoteDetailsQuoteDetailResponseRetrieveQuoteResponse.legalTerms) && + Objects.equals(this.currencyCode, quoteDetailsQuoteDetailResponseRetrieveQuoteResponse.currencyCode) && + Objects.equals(this.priceDeviationId, quoteDetailsQuoteDetailResponseRetrieveQuoteResponse.priceDeviationId) && + Objects.equals(this.priceDeviationStartDate, quoteDetailsQuoteDetailResponseRetrieveQuoteResponse.priceDeviationStartDate) && + Objects.equals(this.priceDeviationExpiryDate, quoteDetailsQuoteDetailResponseRetrieveQuoteResponse.priceDeviationExpiryDate) && + Objects.equals(this.customerNeed, quoteDetailsQuoteDetailResponseRetrieveQuoteResponse.customerNeed) && + Objects.equals(this.solutionProposed, quoteDetailsQuoteDetailResponseRetrieveQuoteResponse.solutionProposed) && + Objects.equals(this.status, quoteDetailsQuoteDetailResponseRetrieveQuoteResponse.status) && + Objects.equals(this.created, quoteDetailsQuoteDetailResponseRetrieveQuoteResponse.created) && + Objects.equals(this.modified, quoteDetailsQuoteDetailResponseRetrieveQuoteResponse.modified) && + Objects.equals(this.leasingCalculations, quoteDetailsQuoteDetailResponseRetrieveQuoteResponse.leasingCalculations) && + Objects.equals(this.leasingInstructions, quoteDetailsQuoteDetailResponseRetrieveQuoteResponse.leasingInstructions) && + Objects.equals(this.accountInfo, quoteDetailsQuoteDetailResponseRetrieveQuoteResponse.accountInfo) && + Objects.equals(this.contactInfo, quoteDetailsQuoteDetailResponseRetrieveQuoteResponse.contactInfo) && + Objects.equals(this.vendorAttributes, quoteDetailsQuoteDetailResponseRetrieveQuoteResponse.vendorAttributes) && + Objects.equals(this.endUser, quoteDetailsQuoteDetailResponseRetrieveQuoteResponse.endUser); + } + + @Override + public int hashCode() { + return Objects.hash(quoteGuid, quoteName, quoteNumber, quoteExpiryDate, revisionNumber, introPreamble, purchaseInstructions, legalTerms, currencyCode, priceDeviationId, priceDeviationStartDate, priceDeviationExpiryDate, customerNeed, solutionProposed, status, created, modified, leasingCalculations, leasingInstructions, accountInfo, contactInfo, vendorAttributes, endUser); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse {\n"); + sb.append(" quoteGuid: ").append(toIndentedString(quoteGuid)).append("\n"); + sb.append(" quoteName: ").append(toIndentedString(quoteName)).append("\n"); + sb.append(" quoteNumber: ").append(toIndentedString(quoteNumber)).append("\n"); + sb.append(" quoteExpiryDate: ").append(toIndentedString(quoteExpiryDate)).append("\n"); + sb.append(" revisionNumber: ").append(toIndentedString(revisionNumber)).append("\n"); + sb.append(" introPreamble: ").append(toIndentedString(introPreamble)).append("\n"); + sb.append(" purchaseInstructions: ").append(toIndentedString(purchaseInstructions)).append("\n"); + sb.append(" legalTerms: ").append(toIndentedString(legalTerms)).append("\n"); + sb.append(" currencyCode: ").append(toIndentedString(currencyCode)).append("\n"); + sb.append(" priceDeviationId: ").append(toIndentedString(priceDeviationId)).append("\n"); + sb.append(" priceDeviationStartDate: ").append(toIndentedString(priceDeviationStartDate)).append("\n"); + sb.append(" priceDeviationExpiryDate: ").append(toIndentedString(priceDeviationExpiryDate)).append("\n"); + sb.append(" customerNeed: ").append(toIndentedString(customerNeed)).append("\n"); + sb.append(" solutionProposed: ").append(toIndentedString(solutionProposed)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" modified: ").append(toIndentedString(modified)).append("\n"); + sb.append(" leasingCalculations: ").append(toIndentedString(leasingCalculations)).append("\n"); + sb.append(" leasingInstructions: ").append(toIndentedString(leasingInstructions)).append("\n"); + sb.append(" accountInfo: ").append(toIndentedString(accountInfo)).append("\n"); + sb.append(" contactInfo: ").append(toIndentedString(contactInfo)).append("\n"); + sb.append(" vendorAttributes: ").append(toIndentedString(vendorAttributes)).append("\n"); + sb.append(" endUser: ").append(toIndentedString(endUser)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("quoteGuid"); + openapiFields.add("quoteName"); + openapiFields.add("quoteNumber"); + openapiFields.add("quoteExpiryDate"); + openapiFields.add("revisionNumber"); + openapiFields.add("introPreamble"); + openapiFields.add("purchaseInstructions"); + openapiFields.add("legalTerms"); + openapiFields.add("currencyCode"); + openapiFields.add("priceDeviationId"); + openapiFields.add("priceDeviationStartDate"); + openapiFields.add("priceDeviationExpiryDate"); + openapiFields.add("customerNeed"); + openapiFields.add("solutionProposed"); + openapiFields.add("status"); + openapiFields.add("created"); + openapiFields.add("modified"); + openapiFields.add("leasingCalculations"); + openapiFields.add("leasingInstructions"); + openapiFields.add("accountInfo"); + openapiFields.add("contactInfo"); + openapiFields.add("vendorAttributes"); + openapiFields.add("endUser"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse is not found in the empty JSON string", QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("quoteGuid") != null && !jsonObj.get("quoteGuid").isJsonNull()) && !jsonObj.get("quoteGuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteGuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quoteGuid").toString())); + } + if ((jsonObj.get("quoteName") != null && !jsonObj.get("quoteName").isJsonNull()) && !jsonObj.get("quoteName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quoteName").toString())); + } + if ((jsonObj.get("quoteNumber") != null && !jsonObj.get("quoteNumber").isJsonNull()) && !jsonObj.get("quoteNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quoteNumber").toString())); + } + if ((jsonObj.get("revisionNumber") != null && !jsonObj.get("revisionNumber").isJsonNull()) && !jsonObj.get("revisionNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `revisionNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("revisionNumber").toString())); + } + if ((jsonObj.get("introPreamble") != null && !jsonObj.get("introPreamble").isJsonNull()) && !jsonObj.get("introPreamble").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `introPreamble` to be a primitive type in the JSON string but got `%s`", jsonObj.get("introPreamble").toString())); + } + if ((jsonObj.get("purchaseInstructions") != null && !jsonObj.get("purchaseInstructions").isJsonNull()) && !jsonObj.get("purchaseInstructions").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `purchaseInstructions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("purchaseInstructions").toString())); + } + if ((jsonObj.get("legalTerms") != null && !jsonObj.get("legalTerms").isJsonNull()) && !jsonObj.get("legalTerms").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `legalTerms` to be a primitive type in the JSON string but got `%s`", jsonObj.get("legalTerms").toString())); + } + if ((jsonObj.get("currencyCode") != null && !jsonObj.get("currencyCode").isJsonNull()) && !jsonObj.get("currencyCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `currencyCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currencyCode").toString())); + } + if ((jsonObj.get("priceDeviationId") != null && !jsonObj.get("priceDeviationId").isJsonNull()) && !jsonObj.get("priceDeviationId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `priceDeviationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("priceDeviationId").toString())); + } + if ((jsonObj.get("customerNeed") != null && !jsonObj.get("customerNeed").isJsonNull()) && !jsonObj.get("customerNeed").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerNeed` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerNeed").toString())); + } + if ((jsonObj.get("solutionProposed") != null && !jsonObj.get("solutionProposed").isJsonNull()) && !jsonObj.get("solutionProposed").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `solutionProposed` to be a primitive type in the JSON string but got `%s`", jsonObj.get("solutionProposed").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if ((jsonObj.get("leasingCalculations") != null && !jsonObj.get("leasingCalculations").isJsonNull()) && !jsonObj.get("leasingCalculations").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `leasingCalculations` to be a primitive type in the JSON string but got `%s`", jsonObj.get("leasingCalculations").toString())); + } + if ((jsonObj.get("leasingInstructions") != null && !jsonObj.get("leasingInstructions").isJsonNull()) && !jsonObj.get("leasingInstructions").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `leasingInstructions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("leasingInstructions").toString())); + } + // validate the optional field `accountInfo` + if (jsonObj.get("accountInfo") != null && !jsonObj.get("accountInfo").isJsonNull()) { + QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo.validateJsonElement(jsonObj.get("accountInfo")); + } + // validate the optional field `contactInfo` + if (jsonObj.get("contactInfo") != null && !jsonObj.get("contactInfo").isJsonNull()) { + QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo.validateJsonElement(jsonObj.get("contactInfo")); + } + // validate the optional field `vendorAttributes` + if (jsonObj.get("vendorAttributes") != null && !jsonObj.get("vendorAttributes").isJsonNull()) { + QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes.validateJsonElement(jsonObj.get("vendorAttributes")); + } + // validate the optional field `endUser` + if (jsonObj.get("endUser") != null && !jsonObj.get("endUser").isJsonNull()) { + QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.validateJsonElement(jsonObj.get("endUser")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse + * @throws IOException if the JSON string is invalid with respect to QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse + */ + public static QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse.class); + } + + /** + * Convert an instance of QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo.java b/src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo.java new file mode 100644 index 00000000..6f08d628 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo { + public static final String SERIALIZED_NAME_ACCOUNT_NAME = "accountName"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_NAME) + private String accountName; + + public static final String SERIALIZED_NAME_BCN = "bcn"; + @SerializedName(SERIALIZED_NAME_BCN) + private String bcn; + + public static final String SERIALIZED_NAME_PHONE = "phone"; + @SerializedName(SERIALIZED_NAME_PHONE) + private String phone; + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo() { + } + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo accountName(String accountName) { + this.accountName = accountName; + return this; + } + + /** + * Get accountName + * @return accountName + **/ + @javax.annotation.Nullable + public String getAccountName() { + return accountName; + } + + public void setAccountName(String accountName) { + this.accountName = accountName; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo bcn(String bcn) { + this.bcn = bcn; + return this; + } + + /** + * Get bcn + * @return bcn + **/ + @javax.annotation.Nullable + public String getBcn() { + return bcn; + } + + public void setBcn(String bcn) { + this.bcn = bcn; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo phone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @javax.annotation.Nullable + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo quoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo = (QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo) o; + return Objects.equals(this.accountName, quoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo.accountName) && + Objects.equals(this.bcn, quoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo.bcn) && + Objects.equals(this.phone, quoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo.phone); + } + + @Override + public int hashCode() { + return Objects.hash(accountName, bcn, phone); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo {\n"); + sb.append(" accountName: ").append(toIndentedString(accountName)).append("\n"); + sb.append(" bcn: ").append(toIndentedString(bcn)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("accountName"); + openapiFields.add("bcn"); + openapiFields.add("phone"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo is not found in the empty JSON string", QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("accountName") != null && !jsonObj.get("accountName").isJsonNull()) && !jsonObj.get("accountName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountName").toString())); + } + if ((jsonObj.get("bcn") != null && !jsonObj.get("bcn").isJsonNull()) && !jsonObj.get("bcn").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `bcn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bcn").toString())); + } + if ((jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) && !jsonObj.get("phone").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phone").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo + * @throws IOException if the JSON string is invalid with respect to QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo + */ + public static QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo.class); + } + + /** + * Convert an instance of QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo.java b/src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo.java new file mode 100644 index 00000000..dacaadbc --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo { + public static final String SERIALIZED_NAME_CONTACT_EMAIL = "contactEmail"; + @SerializedName(SERIALIZED_NAME_CONTACT_EMAIL) + private String contactEmail; + + public static final String SERIALIZED_NAME_CONTACT_NAME = "contactName"; + @SerializedName(SERIALIZED_NAME_CONTACT_NAME) + private String contactName; + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo() { + } + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo contactEmail(String contactEmail) { + this.contactEmail = contactEmail; + return this; + } + + /** + * Get contactEmail + * @return contactEmail + **/ + @javax.annotation.Nullable + public String getContactEmail() { + return contactEmail; + } + + public void setContactEmail(String contactEmail) { + this.contactEmail = contactEmail; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo contactName(String contactName) { + this.contactName = contactName; + return this; + } + + /** + * Get contactName + * @return contactName + **/ + @javax.annotation.Nullable + public String getContactName() { + return contactName; + } + + public void setContactName(String contactName) { + this.contactName = contactName; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo quoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo = (QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo) o; + return Objects.equals(this.contactEmail, quoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo.contactEmail) && + Objects.equals(this.contactName, quoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo.contactName); + } + + @Override + public int hashCode() { + return Objects.hash(contactEmail, contactName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo {\n"); + sb.append(" contactEmail: ").append(toIndentedString(contactEmail)).append("\n"); + sb.append(" contactName: ").append(toIndentedString(contactName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("contactEmail"); + openapiFields.add("contactName"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo is not found in the empty JSON string", QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("contactEmail") != null && !jsonObj.get("contactEmail").isJsonNull()) && !jsonObj.get("contactEmail").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contactEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contactEmail").toString())); + } + if ((jsonObj.get("contactName") != null && !jsonObj.get("contactName").isJsonNull()) && !jsonObj.get("contactName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contactName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contactName").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo + * @throws IOException if the JSON string is invalid with respect to QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo + */ + public static QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo.class); + } + + /** + * Convert an instance of QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.java b/src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.java new file mode 100644 index 00000000..2fc76836 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.java @@ -0,0 +1,496 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser { + public static final String SERIALIZED_NAME_END_USER_NAME = "endUserName"; + @SerializedName(SERIALIZED_NAME_END_USER_NAME) + private String endUserName; + + public static final String SERIALIZED_NAME_END_USER_ADDRESS = "endUserAddress"; + @SerializedName(SERIALIZED_NAME_END_USER_ADDRESS) + private String endUserAddress; + + public static final String SERIALIZED_NAME_END_USER_ADDRESS2 = "endUserAddress2"; + @SerializedName(SERIALIZED_NAME_END_USER_ADDRESS2) + private String endUserAddress2; + + public static final String SERIALIZED_NAME_END_USER_ADDRESS3 = "endUserAddress3"; + @SerializedName(SERIALIZED_NAME_END_USER_ADDRESS3) + private String endUserAddress3; + + public static final String SERIALIZED_NAME_END_USER_CITY = "endUserCity"; + @SerializedName(SERIALIZED_NAME_END_USER_CITY) + private String endUserCity; + + public static final String SERIALIZED_NAME_END_USER_STATE = "endUserState"; + @SerializedName(SERIALIZED_NAME_END_USER_STATE) + private String endUserState; + + public static final String SERIALIZED_NAME_END_USER_EMAIL = "endUserEmail"; + @SerializedName(SERIALIZED_NAME_END_USER_EMAIL) + private String endUserEmail; + + public static final String SERIALIZED_NAME_END_USER_PHONE = "endUserPhone"; + @SerializedName(SERIALIZED_NAME_END_USER_PHONE) + private String endUserPhone; + + public static final String SERIALIZED_NAME_END_USER_ZIP_CODE = "endUserZipCode"; + @SerializedName(SERIALIZED_NAME_END_USER_ZIP_CODE) + private String endUserZipCode; + + public static final String SERIALIZED_NAME_END_USER_CONTACT_NAME = "endUserContactName"; + @SerializedName(SERIALIZED_NAME_END_USER_CONTACT_NAME) + private String endUserContactName; + + public static final String SERIALIZED_NAME_END_USER_MARKET_SEGMENT = "endUserMarketSegment"; + @SerializedName(SERIALIZED_NAME_END_USER_MARKET_SEGMENT) + private String endUserMarketSegment; + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser() { + } + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser endUserName(String endUserName) { + this.endUserName = endUserName; + return this; + } + + /** + * Get endUserName + * @return endUserName + **/ + @javax.annotation.Nullable + public String getEndUserName() { + return endUserName; + } + + public void setEndUserName(String endUserName) { + this.endUserName = endUserName; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser endUserAddress(String endUserAddress) { + this.endUserAddress = endUserAddress; + return this; + } + + /** + * Get endUserAddress + * @return endUserAddress + **/ + @javax.annotation.Nullable + public String getEndUserAddress() { + return endUserAddress; + } + + public void setEndUserAddress(String endUserAddress) { + this.endUserAddress = endUserAddress; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser endUserAddress2(String endUserAddress2) { + this.endUserAddress2 = endUserAddress2; + return this; + } + + /** + * Get endUserAddress2 + * @return endUserAddress2 + **/ + @javax.annotation.Nullable + public String getEndUserAddress2() { + return endUserAddress2; + } + + public void setEndUserAddress2(String endUserAddress2) { + this.endUserAddress2 = endUserAddress2; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser endUserAddress3(String endUserAddress3) { + this.endUserAddress3 = endUserAddress3; + return this; + } + + /** + * Get endUserAddress3 + * @return endUserAddress3 + **/ + @javax.annotation.Nullable + public String getEndUserAddress3() { + return endUserAddress3; + } + + public void setEndUserAddress3(String endUserAddress3) { + this.endUserAddress3 = endUserAddress3; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser endUserCity(String endUserCity) { + this.endUserCity = endUserCity; + return this; + } + + /** + * Get endUserCity + * @return endUserCity + **/ + @javax.annotation.Nullable + public String getEndUserCity() { + return endUserCity; + } + + public void setEndUserCity(String endUserCity) { + this.endUserCity = endUserCity; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser endUserState(String endUserState) { + this.endUserState = endUserState; + return this; + } + + /** + * Get endUserState + * @return endUserState + **/ + @javax.annotation.Nullable + public String getEndUserState() { + return endUserState; + } + + public void setEndUserState(String endUserState) { + this.endUserState = endUserState; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser endUserEmail(String endUserEmail) { + this.endUserEmail = endUserEmail; + return this; + } + + /** + * Get endUserEmail + * @return endUserEmail + **/ + @javax.annotation.Nullable + public String getEndUserEmail() { + return endUserEmail; + } + + public void setEndUserEmail(String endUserEmail) { + this.endUserEmail = endUserEmail; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser endUserPhone(String endUserPhone) { + this.endUserPhone = endUserPhone; + return this; + } + + /** + * Get endUserPhone + * @return endUserPhone + **/ + @javax.annotation.Nullable + public String getEndUserPhone() { + return endUserPhone; + } + + public void setEndUserPhone(String endUserPhone) { + this.endUserPhone = endUserPhone; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser endUserZipCode(String endUserZipCode) { + this.endUserZipCode = endUserZipCode; + return this; + } + + /** + * Get endUserZipCode + * @return endUserZipCode + **/ + @javax.annotation.Nullable + public String getEndUserZipCode() { + return endUserZipCode; + } + + public void setEndUserZipCode(String endUserZipCode) { + this.endUserZipCode = endUserZipCode; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser endUserContactName(String endUserContactName) { + this.endUserContactName = endUserContactName; + return this; + } + + /** + * Get endUserContactName + * @return endUserContactName + **/ + @javax.annotation.Nullable + public String getEndUserContactName() { + return endUserContactName; + } + + public void setEndUserContactName(String endUserContactName) { + this.endUserContactName = endUserContactName; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser endUserMarketSegment(String endUserMarketSegment) { + this.endUserMarketSegment = endUserMarketSegment; + return this; + } + + /** + * Get endUserMarketSegment + * @return endUserMarketSegment + **/ + @javax.annotation.Nullable + public String getEndUserMarketSegment() { + return endUserMarketSegment; + } + + public void setEndUserMarketSegment(String endUserMarketSegment) { + this.endUserMarketSegment = endUserMarketSegment; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser quoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser = (QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser) o; + return Objects.equals(this.endUserName, quoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.endUserName) && + Objects.equals(this.endUserAddress, quoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.endUserAddress) && + Objects.equals(this.endUserAddress2, quoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.endUserAddress2) && + Objects.equals(this.endUserAddress3, quoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.endUserAddress3) && + Objects.equals(this.endUserCity, quoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.endUserCity) && + Objects.equals(this.endUserState, quoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.endUserState) && + Objects.equals(this.endUserEmail, quoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.endUserEmail) && + Objects.equals(this.endUserPhone, quoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.endUserPhone) && + Objects.equals(this.endUserZipCode, quoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.endUserZipCode) && + Objects.equals(this.endUserContactName, quoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.endUserContactName) && + Objects.equals(this.endUserMarketSegment, quoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.endUserMarketSegment); + } + + @Override + public int hashCode() { + return Objects.hash(endUserName, endUserAddress, endUserAddress2, endUserAddress3, endUserCity, endUserState, endUserEmail, endUserPhone, endUserZipCode, endUserContactName, endUserMarketSegment); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser {\n"); + sb.append(" endUserName: ").append(toIndentedString(endUserName)).append("\n"); + sb.append(" endUserAddress: ").append(toIndentedString(endUserAddress)).append("\n"); + sb.append(" endUserAddress2: ").append(toIndentedString(endUserAddress2)).append("\n"); + sb.append(" endUserAddress3: ").append(toIndentedString(endUserAddress3)).append("\n"); + sb.append(" endUserCity: ").append(toIndentedString(endUserCity)).append("\n"); + sb.append(" endUserState: ").append(toIndentedString(endUserState)).append("\n"); + sb.append(" endUserEmail: ").append(toIndentedString(endUserEmail)).append("\n"); + sb.append(" endUserPhone: ").append(toIndentedString(endUserPhone)).append("\n"); + sb.append(" endUserZipCode: ").append(toIndentedString(endUserZipCode)).append("\n"); + sb.append(" endUserContactName: ").append(toIndentedString(endUserContactName)).append("\n"); + sb.append(" endUserMarketSegment: ").append(toIndentedString(endUserMarketSegment)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("endUserName"); + openapiFields.add("endUserAddress"); + openapiFields.add("endUserAddress2"); + openapiFields.add("endUserAddress3"); + openapiFields.add("endUserCity"); + openapiFields.add("endUserState"); + openapiFields.add("endUserEmail"); + openapiFields.add("endUserPhone"); + openapiFields.add("endUserZipCode"); + openapiFields.add("endUserContactName"); + openapiFields.add("endUserMarketSegment"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser is not found in the empty JSON string", QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("endUserName") != null && !jsonObj.get("endUserName").isJsonNull()) && !jsonObj.get("endUserName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endUserName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endUserName").toString())); + } + if ((jsonObj.get("endUserAddress") != null && !jsonObj.get("endUserAddress").isJsonNull()) && !jsonObj.get("endUserAddress").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endUserAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endUserAddress").toString())); + } + if ((jsonObj.get("endUserAddress2") != null && !jsonObj.get("endUserAddress2").isJsonNull()) && !jsonObj.get("endUserAddress2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endUserAddress2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endUserAddress2").toString())); + } + if ((jsonObj.get("endUserAddress3") != null && !jsonObj.get("endUserAddress3").isJsonNull()) && !jsonObj.get("endUserAddress3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endUserAddress3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endUserAddress3").toString())); + } + if ((jsonObj.get("endUserCity") != null && !jsonObj.get("endUserCity").isJsonNull()) && !jsonObj.get("endUserCity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endUserCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endUserCity").toString())); + } + if ((jsonObj.get("endUserState") != null && !jsonObj.get("endUserState").isJsonNull()) && !jsonObj.get("endUserState").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endUserState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endUserState").toString())); + } + if ((jsonObj.get("endUserEmail") != null && !jsonObj.get("endUserEmail").isJsonNull()) && !jsonObj.get("endUserEmail").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endUserEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endUserEmail").toString())); + } + if ((jsonObj.get("endUserPhone") != null && !jsonObj.get("endUserPhone").isJsonNull()) && !jsonObj.get("endUserPhone").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endUserPhone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endUserPhone").toString())); + } + if ((jsonObj.get("endUserZipCode") != null && !jsonObj.get("endUserZipCode").isJsonNull()) && !jsonObj.get("endUserZipCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endUserZipCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endUserZipCode").toString())); + } + if ((jsonObj.get("endUserContactName") != null && !jsonObj.get("endUserContactName").isJsonNull()) && !jsonObj.get("endUserContactName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endUserContactName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endUserContactName").toString())); + } + if ((jsonObj.get("endUserMarketSegment") != null && !jsonObj.get("endUserMarketSegment").isJsonNull()) && !jsonObj.get("endUserMarketSegment").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endUserMarketSegment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endUserMarketSegment").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser + * @throws IOException if the JSON string is invalid with respect to QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser + */ + public static QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.class); + } + + /** + * Convert an instance of QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes.java b/src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes.java new file mode 100644 index 00000000..8dc87093 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes.java @@ -0,0 +1,293 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes { + public static final String SERIALIZED_NAME_ESTIMATE_ID = "estimateId"; + @SerializedName(SERIALIZED_NAME_ESTIMATE_ID) + private String estimateId; + + public static final String SERIALIZED_NAME_DEAL_ID = "dealId"; + @SerializedName(SERIALIZED_NAME_DEAL_ID) + private String dealId; + + public static final String SERIALIZED_NAME_VENDOR_NAME = "vendorName"; + @SerializedName(SERIALIZED_NAME_VENDOR_NAME) + private String vendorName; + + public static final String SERIALIZED_NAME_VENDOR_SETTING_MESSAGE = "vendorSettingMessage"; + @SerializedName(SERIALIZED_NAME_VENDOR_SETTING_MESSAGE) + private String vendorSettingMessage; + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes() { + } + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes estimateId(String estimateId) { + this.estimateId = estimateId; + return this; + } + + /** + * Get estimateId + * @return estimateId + **/ + @javax.annotation.Nullable + public String getEstimateId() { + return estimateId; + } + + public void setEstimateId(String estimateId) { + this.estimateId = estimateId; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes dealId(String dealId) { + this.dealId = dealId; + return this; + } + + /** + * Get dealId + * @return dealId + **/ + @javax.annotation.Nullable + public String getDealId() { + return dealId; + } + + public void setDealId(String dealId) { + this.dealId = dealId; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes vendorName(String vendorName) { + this.vendorName = vendorName; + return this; + } + + /** + * Get vendorName + * @return vendorName + **/ + @javax.annotation.Nullable + public String getVendorName() { + return vendorName; + } + + public void setVendorName(String vendorName) { + this.vendorName = vendorName; + } + + + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes vendorSettingMessage(String vendorSettingMessage) { + this.vendorSettingMessage = vendorSettingMessage; + return this; + } + + /** + * Get vendorSettingMessage + * @return vendorSettingMessage + **/ + @javax.annotation.Nullable + public String getVendorSettingMessage() { + return vendorSettingMessage; + } + + public void setVendorSettingMessage(String vendorSettingMessage) { + this.vendorSettingMessage = vendorSettingMessage; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes quoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes = (QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes) o; + return Objects.equals(this.estimateId, quoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes.estimateId) && + Objects.equals(this.dealId, quoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes.dealId) && + Objects.equals(this.vendorName, quoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes.vendorName) && + Objects.equals(this.vendorSettingMessage, quoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes.vendorSettingMessage); + } + + @Override + public int hashCode() { + return Objects.hash(estimateId, dealId, vendorName, vendorSettingMessage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes {\n"); + sb.append(" estimateId: ").append(toIndentedString(estimateId)).append("\n"); + sb.append(" dealId: ").append(toIndentedString(dealId)).append("\n"); + sb.append(" vendorName: ").append(toIndentedString(vendorName)).append("\n"); + sb.append(" vendorSettingMessage: ").append(toIndentedString(vendorSettingMessage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("estimateId"); + openapiFields.add("dealId"); + openapiFields.add("vendorName"); + openapiFields.add("vendorSettingMessage"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes is not found in the empty JSON string", QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("estimateId") != null && !jsonObj.get("estimateId").isJsonNull()) && !jsonObj.get("estimateId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `estimateId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("estimateId").toString())); + } + if ((jsonObj.get("dealId") != null && !jsonObj.get("dealId").isJsonNull()) && !jsonObj.get("dealId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `dealId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dealId").toString())); + } + if ((jsonObj.get("vendorName") != null && !jsonObj.get("vendorName").isJsonNull()) && !jsonObj.get("vendorName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorName").toString())); + } + if ((jsonObj.get("vendorSettingMessage") != null && !jsonObj.get("vendorSettingMessage").isJsonNull()) && !jsonObj.get("vendorSettingMessage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorSettingMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorSettingMessage").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes + * @throws IOException if the JSON string is invalid with respect to QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes + */ + public static QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes.class); + } + + /** + * Convert an instance of QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteDetailsRequest.java b/src/main/java/xiresellers/client/model/QuoteDetailsRequest.java new file mode 100644 index 00000000..8c7ee2e6 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteDetailsRequest.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.QuoteDetailsRequestQuoteProductsRequest; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Request schema for get quote details endpoint + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteDetailsRequest { + public static final String SERIALIZED_NAME_QUOTE_PRODUCTS_REQUEST = "quoteProductsRequest"; + @SerializedName(SERIALIZED_NAME_QUOTE_PRODUCTS_REQUEST) + private QuoteDetailsRequestQuoteProductsRequest quoteProductsRequest; + + public QuoteDetailsRequest() { + } + + public QuoteDetailsRequest quoteProductsRequest(QuoteDetailsRequestQuoteProductsRequest quoteProductsRequest) { + this.quoteProductsRequest = quoteProductsRequest; + return this; + } + + /** + * Get quoteProductsRequest + * @return quoteProductsRequest + **/ + @javax.annotation.Nullable + public QuoteDetailsRequestQuoteProductsRequest getQuoteProductsRequest() { + return quoteProductsRequest; + } + + public void setQuoteProductsRequest(QuoteDetailsRequestQuoteProductsRequest quoteProductsRequest) { + this.quoteProductsRequest = quoteProductsRequest; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteDetailsRequest quoteDetailsRequest = (QuoteDetailsRequest) o; + return Objects.equals(this.quoteProductsRequest, quoteDetailsRequest.quoteProductsRequest); + } + + @Override + public int hashCode() { + return Objects.hash(quoteProductsRequest); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteDetailsRequest {\n"); + sb.append(" quoteProductsRequest: ").append(toIndentedString(quoteProductsRequest)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("quoteProductsRequest"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteDetailsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteDetailsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteDetailsRequest is not found in the empty JSON string", QuoteDetailsRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteDetailsRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteDetailsRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `quoteProductsRequest` + if (jsonObj.get("quoteProductsRequest") != null && !jsonObj.get("quoteProductsRequest").isJsonNull()) { + QuoteDetailsRequestQuoteProductsRequest.validateJsonElement(jsonObj.get("quoteProductsRequest")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteDetailsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteDetailsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteDetailsRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteDetailsRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteDetailsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteDetailsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteDetailsRequest + * @throws IOException if the JSON string is invalid with respect to QuoteDetailsRequest + */ + public static QuoteDetailsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteDetailsRequest.class); + } + + /** + * Convert an instance of QuoteDetailsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteDetailsRequestQuoteProductsRequest.java b/src/main/java/xiresellers/client/model/QuoteDetailsRequestQuoteProductsRequest.java new file mode 100644 index 00000000..7fd9e607 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteDetailsRequestQuoteProductsRequest.java @@ -0,0 +1,239 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.QuoteDetailsRequestQuoteProductsRequestRequestpreamble; +import xiresellers.client.model.QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteDetailsRequestQuoteProductsRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteDetailsRequestQuoteProductsRequest { + public static final String SERIALIZED_NAME_REQUESTPREAMBLE = "requestpreamble"; + @SerializedName(SERIALIZED_NAME_REQUESTPREAMBLE) + private QuoteDetailsRequestQuoteProductsRequestRequestpreamble requestpreamble; + + public static final String SERIALIZED_NAME_RETRIEVE_QUOTE_PRODUCTS_REQUEST = "retrieveQuoteProductsRequest"; + @SerializedName(SERIALIZED_NAME_RETRIEVE_QUOTE_PRODUCTS_REQUEST) + private QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest retrieveQuoteProductsRequest; + + public QuoteDetailsRequestQuoteProductsRequest() { + } + + public QuoteDetailsRequestQuoteProductsRequest requestpreamble(QuoteDetailsRequestQuoteProductsRequestRequestpreamble requestpreamble) { + this.requestpreamble = requestpreamble; + return this; + } + + /** + * Get requestpreamble + * @return requestpreamble + **/ + @javax.annotation.Nullable + public QuoteDetailsRequestQuoteProductsRequestRequestpreamble getRequestpreamble() { + return requestpreamble; + } + + public void setRequestpreamble(QuoteDetailsRequestQuoteProductsRequestRequestpreamble requestpreamble) { + this.requestpreamble = requestpreamble; + } + + + public QuoteDetailsRequestQuoteProductsRequest retrieveQuoteProductsRequest(QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest retrieveQuoteProductsRequest) { + this.retrieveQuoteProductsRequest = retrieveQuoteProductsRequest; + return this; + } + + /** + * Get retrieveQuoteProductsRequest + * @return retrieveQuoteProductsRequest + **/ + @javax.annotation.Nullable + public QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest getRetrieveQuoteProductsRequest() { + return retrieveQuoteProductsRequest; + } + + public void setRetrieveQuoteProductsRequest(QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest retrieveQuoteProductsRequest) { + this.retrieveQuoteProductsRequest = retrieveQuoteProductsRequest; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteDetailsRequestQuoteProductsRequest quoteDetailsRequestQuoteProductsRequest = (QuoteDetailsRequestQuoteProductsRequest) o; + return Objects.equals(this.requestpreamble, quoteDetailsRequestQuoteProductsRequest.requestpreamble) && + Objects.equals(this.retrieveQuoteProductsRequest, quoteDetailsRequestQuoteProductsRequest.retrieveQuoteProductsRequest); + } + + @Override + public int hashCode() { + return Objects.hash(requestpreamble, retrieveQuoteProductsRequest); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteDetailsRequestQuoteProductsRequest {\n"); + sb.append(" requestpreamble: ").append(toIndentedString(requestpreamble)).append("\n"); + sb.append(" retrieveQuoteProductsRequest: ").append(toIndentedString(retrieveQuoteProductsRequest)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("requestpreamble"); + openapiFields.add("retrieveQuoteProductsRequest"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteDetailsRequestQuoteProductsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteDetailsRequestQuoteProductsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteDetailsRequestQuoteProductsRequest is not found in the empty JSON string", QuoteDetailsRequestQuoteProductsRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteDetailsRequestQuoteProductsRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteDetailsRequestQuoteProductsRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `requestpreamble` + if (jsonObj.get("requestpreamble") != null && !jsonObj.get("requestpreamble").isJsonNull()) { + QuoteDetailsRequestQuoteProductsRequestRequestpreamble.validateJsonElement(jsonObj.get("requestpreamble")); + } + // validate the optional field `retrieveQuoteProductsRequest` + if (jsonObj.get("retrieveQuoteProductsRequest") != null && !jsonObj.get("retrieveQuoteProductsRequest").isJsonNull()) { + QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest.validateJsonElement(jsonObj.get("retrieveQuoteProductsRequest")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteDetailsRequestQuoteProductsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteDetailsRequestQuoteProductsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteDetailsRequestQuoteProductsRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteDetailsRequestQuoteProductsRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteDetailsRequestQuoteProductsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteDetailsRequestQuoteProductsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteDetailsRequestQuoteProductsRequest + * @throws IOException if the JSON string is invalid with respect to QuoteDetailsRequestQuoteProductsRequest + */ + public static QuoteDetailsRequestQuoteProductsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteDetailsRequestQuoteProductsRequest.class); + } + + /** + * Convert an instance of QuoteDetailsRequestQuoteProductsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteDetailsRequestQuoteProductsRequestRequestpreamble.java b/src/main/java/xiresellers/client/model/QuoteDetailsRequestQuoteProductsRequestRequestpreamble.java new file mode 100644 index 00000000..acecb00c --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteDetailsRequestQuoteProductsRequestRequestpreamble.java @@ -0,0 +1,244 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteDetailsRequestQuoteProductsRequestRequestpreamble + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteDetailsRequestQuoteProductsRequestRequestpreamble { + public static final String SERIALIZED_NAME_CUSTOMER_NUMBER = "customerNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_NUMBER) + private String customerNumber; + + public static final String SERIALIZED_NAME_ISO_COUNTRY_CODE = "isoCountryCode"; + @SerializedName(SERIALIZED_NAME_ISO_COUNTRY_CODE) + private String isoCountryCode; + + public QuoteDetailsRequestQuoteProductsRequestRequestpreamble() { + } + + public QuoteDetailsRequestQuoteProductsRequestRequestpreamble customerNumber(String customerNumber) { + this.customerNumber = customerNumber; + return this; + } + + /** + * Reseller Number (referred to as the account BCN) is the unique identifier for an Ingram Micro customer account. + * @return customerNumber + **/ + @javax.annotation.Nonnull + public String getCustomerNumber() { + return customerNumber; + } + + public void setCustomerNumber(String customerNumber) { + this.customerNumber = customerNumber; + } + + + public QuoteDetailsRequestQuoteProductsRequestRequestpreamble isoCountryCode(String isoCountryCode) { + this.isoCountryCode = isoCountryCode; + return this; + } + + /** + * The ISO country codes are internationally recognized codes designated for each country represented by a two-letter combination (alpha-2). + * @return isoCountryCode + **/ + @javax.annotation.Nonnull + public String getIsoCountryCode() { + return isoCountryCode; + } + + public void setIsoCountryCode(String isoCountryCode) { + this.isoCountryCode = isoCountryCode; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteDetailsRequestQuoteProductsRequestRequestpreamble quoteDetailsRequestQuoteProductsRequestRequestpreamble = (QuoteDetailsRequestQuoteProductsRequestRequestpreamble) o; + return Objects.equals(this.customerNumber, quoteDetailsRequestQuoteProductsRequestRequestpreamble.customerNumber) && + Objects.equals(this.isoCountryCode, quoteDetailsRequestQuoteProductsRequestRequestpreamble.isoCountryCode); + } + + @Override + public int hashCode() { + return Objects.hash(customerNumber, isoCountryCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteDetailsRequestQuoteProductsRequestRequestpreamble {\n"); + sb.append(" customerNumber: ").append(toIndentedString(customerNumber)).append("\n"); + sb.append(" isoCountryCode: ").append(toIndentedString(isoCountryCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("customerNumber"); + openapiFields.add("isoCountryCode"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("customerNumber"); + openapiRequiredFields.add("isoCountryCode"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteDetailsRequestQuoteProductsRequestRequestpreamble + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteDetailsRequestQuoteProductsRequestRequestpreamble.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteDetailsRequestQuoteProductsRequestRequestpreamble is not found in the empty JSON string", QuoteDetailsRequestQuoteProductsRequestRequestpreamble.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteDetailsRequestQuoteProductsRequestRequestpreamble.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteDetailsRequestQuoteProductsRequestRequestpreamble` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : QuoteDetailsRequestQuoteProductsRequestRequestpreamble.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("customerNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerNumber").toString())); + } + if (!jsonObj.get("isoCountryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `isoCountryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isoCountryCode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteDetailsRequestQuoteProductsRequestRequestpreamble.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteDetailsRequestQuoteProductsRequestRequestpreamble' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteDetailsRequestQuoteProductsRequestRequestpreamble.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteDetailsRequestQuoteProductsRequestRequestpreamble value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteDetailsRequestQuoteProductsRequestRequestpreamble read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteDetailsRequestQuoteProductsRequestRequestpreamble given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteDetailsRequestQuoteProductsRequestRequestpreamble + * @throws IOException if the JSON string is invalid with respect to QuoteDetailsRequestQuoteProductsRequestRequestpreamble + */ + public static QuoteDetailsRequestQuoteProductsRequestRequestpreamble fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteDetailsRequestQuoteProductsRequestRequestpreamble.class); + } + + /** + * Convert an instance of QuoteDetailsRequestQuoteProductsRequestRequestpreamble to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest.java b/src/main/java/xiresellers/client/model/QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest.java new file mode 100644 index 00000000..2c551be7 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest { + public static final String SERIALIZED_NAME_QUOTE_NUMBER = "quoteNumber"; + @SerializedName(SERIALIZED_NAME_QUOTE_NUMBER) + private String quoteNumber; + + public static final String SERIALIZED_NAME_THIRD_PARTY_SOURCE = "thirdPartySource"; + @SerializedName(SERIALIZED_NAME_THIRD_PARTY_SOURCE) + private String thirdPartySource; + + public QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest() { + } + + public QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest quoteNumber(String quoteNumber) { + this.quoteNumber = quoteNumber; + return this; + } + + /** + * Unique identifier generated by Ingram Micro's CRM specific to each quote. When applying a filter to the quoteNumber and including a partial quote number in the filter, all quotes containing any information included in the filter can be retrieved as a subset of all available customer quotes. + * @return quoteNumber + **/ + @javax.annotation.Nullable + public String getQuoteNumber() { + return quoteNumber; + } + + public void setQuoteNumber(String quoteNumber) { + this.quoteNumber = quoteNumber; + } + + + public QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest thirdPartySource(String thirdPartySource) { + this.thirdPartySource = thirdPartySource; + return this; + } + + /** + * Unique identifier used to identify the third party source accessing the services. + * @return thirdPartySource + **/ + @javax.annotation.Nullable + public String getThirdPartySource() { + return thirdPartySource; + } + + public void setThirdPartySource(String thirdPartySource) { + this.thirdPartySource = thirdPartySource; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest quoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest = (QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest) o; + return Objects.equals(this.quoteNumber, quoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest.quoteNumber) && + Objects.equals(this.thirdPartySource, quoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest.thirdPartySource); + } + + @Override + public int hashCode() { + return Objects.hash(quoteNumber, thirdPartySource); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest {\n"); + sb.append(" quoteNumber: ").append(toIndentedString(quoteNumber)).append("\n"); + sb.append(" thirdPartySource: ").append(toIndentedString(thirdPartySource)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("quoteNumber"); + openapiFields.add("thirdPartySource"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest is not found in the empty JSON string", QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("quoteNumber") != null && !jsonObj.get("quoteNumber").isJsonNull()) && !jsonObj.get("quoteNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quoteNumber").toString())); + } + if ((jsonObj.get("thirdPartySource") != null && !jsonObj.get("thirdPartySource").isJsonNull()) && !jsonObj.get("thirdPartySource").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `thirdPartySource` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thirdPartySource").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest + * @throws IOException if the JSON string is invalid with respect to QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest + */ + public static QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest.class); + } + + /** + * Convert an instance of QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteDetailsResponse.java b/src/main/java/xiresellers/client/model/QuoteDetailsResponse.java new file mode 100644 index 00000000..cab58eea --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteDetailsResponse.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.QuoteDetailsResponseQuoteDetailResponse; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteDetailsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteDetailsResponse { + public static final String SERIALIZED_NAME_QUOTE_DETAIL_RESPONSE = "quoteDetailResponse"; + @SerializedName(SERIALIZED_NAME_QUOTE_DETAIL_RESPONSE) + private QuoteDetailsResponseQuoteDetailResponse quoteDetailResponse; + + public QuoteDetailsResponse() { + } + + public QuoteDetailsResponse quoteDetailResponse(QuoteDetailsResponseQuoteDetailResponse quoteDetailResponse) { + this.quoteDetailResponse = quoteDetailResponse; + return this; + } + + /** + * Get quoteDetailResponse + * @return quoteDetailResponse + **/ + @javax.annotation.Nullable + public QuoteDetailsResponseQuoteDetailResponse getQuoteDetailResponse() { + return quoteDetailResponse; + } + + public void setQuoteDetailResponse(QuoteDetailsResponseQuoteDetailResponse quoteDetailResponse) { + this.quoteDetailResponse = quoteDetailResponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteDetailsResponse quoteDetailsResponse = (QuoteDetailsResponse) o; + return Objects.equals(this.quoteDetailResponse, quoteDetailsResponse.quoteDetailResponse); + } + + @Override + public int hashCode() { + return Objects.hash(quoteDetailResponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteDetailsResponse {\n"); + sb.append(" quoteDetailResponse: ").append(toIndentedString(quoteDetailResponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("quoteDetailResponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteDetailsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteDetailsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteDetailsResponse is not found in the empty JSON string", QuoteDetailsResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteDetailsResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteDetailsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `quoteDetailResponse` + if (jsonObj.get("quoteDetailResponse") != null && !jsonObj.get("quoteDetailResponse").isJsonNull()) { + QuoteDetailsResponseQuoteDetailResponse.validateJsonElement(jsonObj.get("quoteDetailResponse")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteDetailsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteDetailsResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteDetailsResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteDetailsResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteDetailsResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteDetailsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteDetailsResponse + * @throws IOException if the JSON string is invalid with respect to QuoteDetailsResponse + */ + public static QuoteDetailsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteDetailsResponse.class); + } + + /** + * Convert an instance of QuoteDetailsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteDetailsResponseAdditionalAttributesInner.java b/src/main/java/xiresellers/client/model/QuoteDetailsResponseAdditionalAttributesInner.java new file mode 100644 index 00000000..ff5aac7c --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteDetailsResponseAdditionalAttributesInner.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteDetailsResponseAdditionalAttributesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteDetailsResponseAdditionalAttributesInner { + public static final String SERIALIZED_NAME_ATTRIBUTE_NAME = "attributeName"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_NAME) + private String attributeName; + + public static final String SERIALIZED_NAME_ATTRIBUTE_VALUE = "attributeValue"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_VALUE) + private String attributeValue; + + public QuoteDetailsResponseAdditionalAttributesInner() { + } + + public QuoteDetailsResponseAdditionalAttributesInner attributeName(String attributeName) { + this.attributeName = attributeName; + return this; + } + + /** + * estimateId - is the identification number for an estimate provided by Cisco for a quote. dealId - is the identification number for the specific deal pricing related to a Cisco quote vendorName - Name of Vendor associated with the quote. vendorMessage - Vendor Message is associated with primary vendor in the quote. In cases where a vendor requires a message be presented in the quote, the vendor name and message will be retreived and must be included in the quote vendor message fields. + * @return attributeName + **/ + @javax.annotation.Nullable + public String getAttributeName() { + return attributeName; + } + + public void setAttributeName(String attributeName) { + this.attributeName = attributeName; + } + + + public QuoteDetailsResponseAdditionalAttributesInner attributeValue(String attributeValue) { + this.attributeValue = attributeValue; + return this; + } + + /** + * The attribute field data. + * @return attributeValue + **/ + @javax.annotation.Nullable + public String getAttributeValue() { + return attributeValue; + } + + public void setAttributeValue(String attributeValue) { + this.attributeValue = attributeValue; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteDetailsResponseAdditionalAttributesInner quoteDetailsResponseAdditionalAttributesInner = (QuoteDetailsResponseAdditionalAttributesInner) o; + return Objects.equals(this.attributeName, quoteDetailsResponseAdditionalAttributesInner.attributeName) && + Objects.equals(this.attributeValue, quoteDetailsResponseAdditionalAttributesInner.attributeValue); + } + + @Override + public int hashCode() { + return Objects.hash(attributeName, attributeValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteDetailsResponseAdditionalAttributesInner {\n"); + sb.append(" attributeName: ").append(toIndentedString(attributeName)).append("\n"); + sb.append(" attributeValue: ").append(toIndentedString(attributeValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributeName"); + openapiFields.add("attributeValue"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteDetailsResponseAdditionalAttributesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteDetailsResponseAdditionalAttributesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteDetailsResponseAdditionalAttributesInner is not found in the empty JSON string", QuoteDetailsResponseAdditionalAttributesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteDetailsResponseAdditionalAttributesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteDetailsResponseAdditionalAttributesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("attributeName") != null && !jsonObj.get("attributeName").isJsonNull()) && !jsonObj.get("attributeName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeName").toString())); + } + if ((jsonObj.get("attributeValue") != null && !jsonObj.get("attributeValue").isJsonNull()) && !jsonObj.get("attributeValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeValue").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteDetailsResponseAdditionalAttributesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteDetailsResponseAdditionalAttributesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteDetailsResponseAdditionalAttributesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteDetailsResponseAdditionalAttributesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteDetailsResponseAdditionalAttributesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteDetailsResponseAdditionalAttributesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteDetailsResponseAdditionalAttributesInner + * @throws IOException if the JSON string is invalid with respect to QuoteDetailsResponseAdditionalAttributesInner + */ + public static QuoteDetailsResponseAdditionalAttributesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteDetailsResponseAdditionalAttributesInner.class); + } + + /** + * Convert an instance of QuoteDetailsResponseAdditionalAttributesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteDetailsResponseEndUserInfo.java b/src/main/java/xiresellers/client/model/QuoteDetailsResponseEndUserInfo.java new file mode 100644 index 00000000..f87968fe --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteDetailsResponseEndUserInfo.java @@ -0,0 +1,496 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteDetailsResponseEndUserInfo + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteDetailsResponseEndUserInfo { + public static final String SERIALIZED_NAME_CONTACT = "contact"; + @SerializedName(SERIALIZED_NAME_CONTACT) + private String contact; + + public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; + @SerializedName(SERIALIZED_NAME_COMPANY_NAME) + private String companyName; + + public static final String SERIALIZED_NAME_ADDRESS_LINE1 = "addressLine1"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE1) + private String addressLine1; + + public static final String SERIALIZED_NAME_ADDRESS_LINE2 = "addressLine2"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE2) + private String addressLine2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE3 = "addressLine3"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE3) + private String addressLine3; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) + private String phoneNumber; + + public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; + @SerializedName(SERIALIZED_NAME_POSTAL_CODE) + private String postalCode; + + public static final String SERIALIZED_NAME_MARKET_SEGMENT = "marketSegment"; + @SerializedName(SERIALIZED_NAME_MARKET_SEGMENT) + private String marketSegment; + + public QuoteDetailsResponseEndUserInfo() { + } + + public QuoteDetailsResponseEndUserInfo contact(String contact) { + this.contact = contact; + return this; + } + + /** + * End User Name + * @return contact + **/ + @javax.annotation.Nullable + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + + public QuoteDetailsResponseEndUserInfo companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * Contact name of end user associated with the quote. + * @return companyName + **/ + @javax.annotation.Nullable + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public QuoteDetailsResponseEndUserInfo addressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + return this; + } + + /** + * Address line 1 for end user associated with the quote + * @return addressLine1 + **/ + @javax.annotation.Nullable + public String getAddressLine1() { + return addressLine1; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + + public QuoteDetailsResponseEndUserInfo addressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + return this; + } + + /** + * Address line 2 for end user associated with the quote. + * @return addressLine2 + **/ + @javax.annotation.Nullable + public String getAddressLine2() { + return addressLine2; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + + public QuoteDetailsResponseEndUserInfo addressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + return this; + } + + /** + * Address line 3 for end user associated with the quote. + * @return addressLine3 + **/ + @javax.annotation.Nullable + public String getAddressLine3() { + return addressLine3; + } + + public void setAddressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + } + + + public QuoteDetailsResponseEndUserInfo city(String city) { + this.city = city; + return this; + } + + /** + * City for end user associated with the quote + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public QuoteDetailsResponseEndUserInfo state(String state) { + this.state = state; + return this; + } + + /** + * Two letter state abreviation for end user associated with the quote + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public QuoteDetailsResponseEndUserInfo email(String email) { + this.email = email; + return this; + } + + /** + * Email of end user the quote associated with the quote. + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + public QuoteDetailsResponseEndUserInfo phoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * Phone number of end user associated with the quote. + * @return phoneNumber + **/ + @javax.annotation.Nullable + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public QuoteDetailsResponseEndUserInfo postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * Zip code of end user associated with the quote. + * @return postalCode + **/ + @javax.annotation.Nullable + public String getPostalCode() { + return postalCode; + } + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public QuoteDetailsResponseEndUserInfo marketSegment(String marketSegment) { + this.marketSegment = marketSegment; + return this; + } + + /** + * Market Segment of end user associated with the quote. End user market segment is included when end user is included in specific market segments like Educational, Government, Military, Medical - that may receive special pricing due to their segmentation. + * @return marketSegment + **/ + @javax.annotation.Nullable + public String getMarketSegment() { + return marketSegment; + } + + public void setMarketSegment(String marketSegment) { + this.marketSegment = marketSegment; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteDetailsResponseEndUserInfo quoteDetailsResponseEndUserInfo = (QuoteDetailsResponseEndUserInfo) o; + return Objects.equals(this.contact, quoteDetailsResponseEndUserInfo.contact) && + Objects.equals(this.companyName, quoteDetailsResponseEndUserInfo.companyName) && + Objects.equals(this.addressLine1, quoteDetailsResponseEndUserInfo.addressLine1) && + Objects.equals(this.addressLine2, quoteDetailsResponseEndUserInfo.addressLine2) && + Objects.equals(this.addressLine3, quoteDetailsResponseEndUserInfo.addressLine3) && + Objects.equals(this.city, quoteDetailsResponseEndUserInfo.city) && + Objects.equals(this.state, quoteDetailsResponseEndUserInfo.state) && + Objects.equals(this.email, quoteDetailsResponseEndUserInfo.email) && + Objects.equals(this.phoneNumber, quoteDetailsResponseEndUserInfo.phoneNumber) && + Objects.equals(this.postalCode, quoteDetailsResponseEndUserInfo.postalCode) && + Objects.equals(this.marketSegment, quoteDetailsResponseEndUserInfo.marketSegment); + } + + @Override + public int hashCode() { + return Objects.hash(contact, companyName, addressLine1, addressLine2, addressLine3, city, state, email, phoneNumber, postalCode, marketSegment); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteDetailsResponseEndUserInfo {\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); + sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); + sb.append(" addressLine3: ").append(toIndentedString(addressLine3)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" marketSegment: ").append(toIndentedString(marketSegment)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("contact"); + openapiFields.add("companyName"); + openapiFields.add("addressLine1"); + openapiFields.add("addressLine2"); + openapiFields.add("addressLine3"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("email"); + openapiFields.add("phoneNumber"); + openapiFields.add("postalCode"); + openapiFields.add("marketSegment"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteDetailsResponseEndUserInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteDetailsResponseEndUserInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteDetailsResponseEndUserInfo is not found in the empty JSON string", QuoteDetailsResponseEndUserInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteDetailsResponseEndUserInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteDetailsResponseEndUserInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("contact") != null && !jsonObj.get("contact").isJsonNull()) && !jsonObj.get("contact").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contact` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact").toString())); + } + if ((jsonObj.get("companyName") != null && !jsonObj.get("companyName").isJsonNull()) && !jsonObj.get("companyName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); + } + if ((jsonObj.get("addressLine1") != null && !jsonObj.get("addressLine1").isJsonNull()) && !jsonObj.get("addressLine1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine1").toString())); + } + if ((jsonObj.get("addressLine2") != null && !jsonObj.get("addressLine2").isJsonNull()) && !jsonObj.get("addressLine2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine2").toString())); + } + if ((jsonObj.get("addressLine3") != null && !jsonObj.get("addressLine3").isJsonNull()) && !jsonObj.get("addressLine3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine3").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + } + if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); + } + if ((jsonObj.get("marketSegment") != null && !jsonObj.get("marketSegment").isJsonNull()) && !jsonObj.get("marketSegment").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `marketSegment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("marketSegment").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteDetailsResponseEndUserInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteDetailsResponseEndUserInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteDetailsResponseEndUserInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteDetailsResponseEndUserInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteDetailsResponseEndUserInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteDetailsResponseEndUserInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteDetailsResponseEndUserInfo + * @throws IOException if the JSON string is invalid with respect to QuoteDetailsResponseEndUserInfo + */ + public static QuoteDetailsResponseEndUserInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteDetailsResponseEndUserInfo.class); + } + + /** + * Convert an instance of QuoteDetailsResponseEndUserInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteDetailsResponseProductsInner.java b/src/main/java/xiresellers/client/model/QuoteDetailsResponseProductsInner.java new file mode 100644 index 00000000..75f52fe4 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteDetailsResponseProductsInner.java @@ -0,0 +1,663 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.QuoteDetailsResponseProductsInnerPrice; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteDetailsResponseProductsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteDetailsResponseProductsInner { + public static final String SERIALIZED_NAME_QUOTE_PRODUCT_GUID = "quoteProductGuid"; + @SerializedName(SERIALIZED_NAME_QUOTE_PRODUCT_GUID) + private String quoteProductGuid; + + public static final String SERIALIZED_NAME_LINE_NUMBER = "lineNumber"; + @SerializedName(SERIALIZED_NAME_LINE_NUMBER) + private String lineNumber; + + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + @SerializedName(SERIALIZED_NAME_QUANTITY) + private Integer quantity; + + public static final String SERIALIZED_NAME_NOTES = "notes"; + @SerializedName(SERIALIZED_NAME_NOTES) + private String notes; + + public static final String SERIALIZED_NAME_E_A_N = "EAN"; + @SerializedName(SERIALIZED_NAME_E_A_N) + private String EAN; + + public static final String SERIALIZED_NAME_CO_O = "CoO"; + @SerializedName(SERIALIZED_NAME_CO_O) + private String coO; + + public static final String SERIALIZED_NAME_INGRAM_PART_NUMBER = "ingramPartNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PART_NUMBER) + private String ingramPartNumber; + + public static final String SERIALIZED_NAME_VENDOR_PART_NUMBER = "vendorPartNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_PART_NUMBER) + private String vendorPartNumber; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_WEIGHT = "weight"; + @SerializedName(SERIALIZED_NAME_WEIGHT) + private Integer weight; + + public static final String SERIALIZED_NAME_WEIGHT_UOM = "weightUom"; + @SerializedName(SERIALIZED_NAME_WEIGHT_UOM) + private String weightUom; + + public static final String SERIALIZED_NAME_IS_SUGGESTION_PRODUCT = "isSuggestionProduct"; + @SerializedName(SERIALIZED_NAME_IS_SUGGESTION_PRODUCT) + private Boolean isSuggestionProduct; + + public static final String SERIALIZED_NAME_VPN_CATEGORY = "vpnCategory"; + @SerializedName(SERIALIZED_NAME_VPN_CATEGORY) + private String vpnCategory; + + public static final String SERIALIZED_NAME_QUOTE_PRODUCTS_SUPPLIER_PART_AUXILIARY_ID = "quoteProductsSupplierPartAuxiliaryId"; + @SerializedName(SERIALIZED_NAME_QUOTE_PRODUCTS_SUPPLIER_PART_AUXILIARY_ID) + private String quoteProductsSupplierPartAuxiliaryId; + + public static final String SERIALIZED_NAME_VENDOR_NAME = "vendorName"; + @SerializedName(SERIALIZED_NAME_VENDOR_NAME) + private String vendorName; + + public static final String SERIALIZED_NAME_TERMS = "terms"; + @SerializedName(SERIALIZED_NAME_TERMS) + private String terms; + + public static final String SERIALIZED_NAME_PRICE = "price"; + @SerializedName(SERIALIZED_NAME_PRICE) + private QuoteDetailsResponseProductsInnerPrice price; + + public QuoteDetailsResponseProductsInner() { + } + + public QuoteDetailsResponseProductsInner quoteProductGuid(String quoteProductGuid) { + this.quoteProductGuid = quoteProductGuid; + return this; + } + + /** + * Quote Product GUID is the primary quote key in Ingram Micro's CRM - needed to retrieve quote details. + * @return quoteProductGuid + **/ + @javax.annotation.Nullable + public String getQuoteProductGuid() { + return quoteProductGuid; + } + + public void setQuoteProductGuid(String quoteProductGuid) { + this.quoteProductGuid = quoteProductGuid; + } + + + public QuoteDetailsResponseProductsInner lineNumber(String lineNumber) { + this.lineNumber = lineNumber; + return this; + } + + /** + * Line number which the product will appear in the quote. Line number is manditory when unique configurations are included in a quote and mainting the item line order is required. + * @return lineNumber + **/ + @javax.annotation.Nullable + public String getLineNumber() { + return lineNumber; + } + + public void setLineNumber(String lineNumber) { + this.lineNumber = lineNumber; + } + + + public QuoteDetailsResponseProductsInner quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Quantity of product line item quoted. + * @return quantity + **/ + @javax.annotation.Nullable + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + + public QuoteDetailsResponseProductsInner notes(String notes) { + this.notes = notes; + return this; + } + + /** + * Product line item comments. + * @return notes + **/ + @javax.annotation.Nullable + public String getNotes() { + return notes; + } + + public void setNotes(String notes) { + this.notes = notes; + } + + + public QuoteDetailsResponseProductsInner EAN(String EAN) { + this.EAN = EAN; + return this; + } + + /** + * EANUPC + * @return EAN + **/ + @javax.annotation.Nullable + public String getEAN() { + return EAN; + } + + public void setEAN(String EAN) { + this.EAN = EAN; + } + + + public QuoteDetailsResponseProductsInner coO(String coO) { + this.coO = coO; + return this; + } + + /** + * Country of Origin. + * @return coO + **/ + @javax.annotation.Nullable + public String getCoO() { + return coO; + } + + public void setCoO(String coO) { + this.coO = coO; + } + + + public QuoteDetailsResponseProductsInner ingramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + return this; + } + + /** + * Ingram Micro SKU (stock keeping unit). An identification, usually alphanumeric, of a particular product that allows it to be tracked for inventory purposes + * @return ingramPartNumber + **/ + @javax.annotation.Nullable + public String getIngramPartNumber() { + return ingramPartNumber; + } + + public void setIngramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + } + + + public QuoteDetailsResponseProductsInner vendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + return this; + } + + /** + * Vendor Part Number + * @return vendorPartNumber + **/ + @javax.annotation.Nullable + public String getVendorPartNumber() { + return vendorPartNumber; + } + + public void setVendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + } + + + public QuoteDetailsResponseProductsInner description(String description) { + this.description = description; + return this; + } + + /** + * Product description. Note - The quote view api returns only the product short description as maintained in Ingram Micro's crm system. For long descriptions, please refer to alternative information sources. + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + + public QuoteDetailsResponseProductsInner weight(Integer weight) { + this.weight = weight; + return this; + } + + /** + * Weight is provided based on country standard. For countries following Imperial standards - weight is presented as pounds with decimal. In countries following metric standards, weight is provided as kilograms with decimal. + * @return weight + **/ + @javax.annotation.Nullable + public Integer getWeight() { + return weight; + } + + public void setWeight(Integer weight) { + this.weight = weight; + } + + + public QuoteDetailsResponseProductsInner weightUom(String weightUom) { + this.weightUom = weightUom; + return this; + } + + /** + * Unit of measure + * @return weightUom + **/ + @javax.annotation.Nullable + public String getWeightUom() { + return weightUom; + } + + public void setWeightUom(String weightUom) { + this.weightUom = weightUom; + } + + + public QuoteDetailsResponseProductsInner isSuggestionProduct(Boolean isSuggestionProduct) { + this.isSuggestionProduct = isSuggestionProduct; + return this; + } + + /** + * Flag to indicate if a product line item is a suggested product. The suggested product is provided in addition to the requested quoted products and a suggested option. Suggested products are grouped together for subtotal and total calculations. + * @return isSuggestionProduct + **/ + @javax.annotation.Nullable + public Boolean getIsSuggestionProduct() { + return isSuggestionProduct; + } + + public void setIsSuggestionProduct(Boolean isSuggestionProduct) { + this.isSuggestionProduct = isSuggestionProduct; + } + + + public QuoteDetailsResponseProductsInner vpnCategory(String vpnCategory) { + this.vpnCategory = vpnCategory; + return this; + } + + /** + * Vendor product category specific to Cisco. HWDW (hardware) or service. + * @return vpnCategory + **/ + @javax.annotation.Nullable + public String getVpnCategory() { + return vpnCategory; + } + + public void setVpnCategory(String vpnCategory) { + this.vpnCategory = vpnCategory; + } + + + public QuoteDetailsResponseProductsInner quoteProductsSupplierPartAuxiliaryId(String quoteProductsSupplierPartAuxiliaryId) { + this.quoteProductsSupplierPartAuxiliaryId = quoteProductsSupplierPartAuxiliaryId; + return this; + } + + /** + * Vendor product configuration ID specific to Cisco. + * @return quoteProductsSupplierPartAuxiliaryId + **/ + @javax.annotation.Nullable + public String getQuoteProductsSupplierPartAuxiliaryId() { + return quoteProductsSupplierPartAuxiliaryId; + } + + public void setQuoteProductsSupplierPartAuxiliaryId(String quoteProductsSupplierPartAuxiliaryId) { + this.quoteProductsSupplierPartAuxiliaryId = quoteProductsSupplierPartAuxiliaryId; + } + + + public QuoteDetailsResponseProductsInner vendorName(String vendorName) { + this.vendorName = vendorName; + return this; + } + + /** + * Vendor name of the product + * @return vendorName + **/ + @javax.annotation.Nullable + public String getVendorName() { + return vendorName; + } + + public void setVendorName(String vendorName) { + this.vendorName = vendorName; + } + + + public QuoteDetailsResponseProductsInner terms(String terms) { + this.terms = terms; + return this; + } + + /** + * Terms of the quote + * @return terms + **/ + @javax.annotation.Nullable + public String getTerms() { + return terms; + } + + public void setTerms(String terms) { + this.terms = terms; + } + + + public QuoteDetailsResponseProductsInner price(QuoteDetailsResponseProductsInnerPrice price) { + this.price = price; + return this; + } + + /** + * Get price + * @return price + **/ + @javax.annotation.Nullable + public QuoteDetailsResponseProductsInnerPrice getPrice() { + return price; + } + + public void setPrice(QuoteDetailsResponseProductsInnerPrice price) { + this.price = price; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteDetailsResponseProductsInner quoteDetailsResponseProductsInner = (QuoteDetailsResponseProductsInner) o; + return Objects.equals(this.quoteProductGuid, quoteDetailsResponseProductsInner.quoteProductGuid) && + Objects.equals(this.lineNumber, quoteDetailsResponseProductsInner.lineNumber) && + Objects.equals(this.quantity, quoteDetailsResponseProductsInner.quantity) && + Objects.equals(this.notes, quoteDetailsResponseProductsInner.notes) && + Objects.equals(this.EAN, quoteDetailsResponseProductsInner.EAN) && + Objects.equals(this.coO, quoteDetailsResponseProductsInner.coO) && + Objects.equals(this.ingramPartNumber, quoteDetailsResponseProductsInner.ingramPartNumber) && + Objects.equals(this.vendorPartNumber, quoteDetailsResponseProductsInner.vendorPartNumber) && + Objects.equals(this.description, quoteDetailsResponseProductsInner.description) && + Objects.equals(this.weight, quoteDetailsResponseProductsInner.weight) && + Objects.equals(this.weightUom, quoteDetailsResponseProductsInner.weightUom) && + Objects.equals(this.isSuggestionProduct, quoteDetailsResponseProductsInner.isSuggestionProduct) && + Objects.equals(this.vpnCategory, quoteDetailsResponseProductsInner.vpnCategory) && + Objects.equals(this.quoteProductsSupplierPartAuxiliaryId, quoteDetailsResponseProductsInner.quoteProductsSupplierPartAuxiliaryId) && + Objects.equals(this.vendorName, quoteDetailsResponseProductsInner.vendorName) && + Objects.equals(this.terms, quoteDetailsResponseProductsInner.terms) && + Objects.equals(this.price, quoteDetailsResponseProductsInner.price); + } + + @Override + public int hashCode() { + return Objects.hash(quoteProductGuid, lineNumber, quantity, notes, EAN, coO, ingramPartNumber, vendorPartNumber, description, weight, weightUom, isSuggestionProduct, vpnCategory, quoteProductsSupplierPartAuxiliaryId, vendorName, terms, price); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteDetailsResponseProductsInner {\n"); + sb.append(" quoteProductGuid: ").append(toIndentedString(quoteProductGuid)).append("\n"); + sb.append(" lineNumber: ").append(toIndentedString(lineNumber)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); + sb.append(" EAN: ").append(toIndentedString(EAN)).append("\n"); + sb.append(" coO: ").append(toIndentedString(coO)).append("\n"); + sb.append(" ingramPartNumber: ").append(toIndentedString(ingramPartNumber)).append("\n"); + sb.append(" vendorPartNumber: ").append(toIndentedString(vendorPartNumber)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" weight: ").append(toIndentedString(weight)).append("\n"); + sb.append(" weightUom: ").append(toIndentedString(weightUom)).append("\n"); + sb.append(" isSuggestionProduct: ").append(toIndentedString(isSuggestionProduct)).append("\n"); + sb.append(" vpnCategory: ").append(toIndentedString(vpnCategory)).append("\n"); + sb.append(" quoteProductsSupplierPartAuxiliaryId: ").append(toIndentedString(quoteProductsSupplierPartAuxiliaryId)).append("\n"); + sb.append(" vendorName: ").append(toIndentedString(vendorName)).append("\n"); + sb.append(" terms: ").append(toIndentedString(terms)).append("\n"); + sb.append(" price: ").append(toIndentedString(price)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("quoteProductGuid"); + openapiFields.add("lineNumber"); + openapiFields.add("quantity"); + openapiFields.add("notes"); + openapiFields.add("EAN"); + openapiFields.add("CoO"); + openapiFields.add("ingramPartNumber"); + openapiFields.add("vendorPartNumber"); + openapiFields.add("description"); + openapiFields.add("weight"); + openapiFields.add("weightUom"); + openapiFields.add("isSuggestionProduct"); + openapiFields.add("vpnCategory"); + openapiFields.add("quoteProductsSupplierPartAuxiliaryId"); + openapiFields.add("vendorName"); + openapiFields.add("terms"); + openapiFields.add("price"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteDetailsResponseProductsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteDetailsResponseProductsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteDetailsResponseProductsInner is not found in the empty JSON string", QuoteDetailsResponseProductsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteDetailsResponseProductsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteDetailsResponseProductsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("quoteProductGuid") != null && !jsonObj.get("quoteProductGuid").isJsonNull()) && !jsonObj.get("quoteProductGuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteProductGuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quoteProductGuid").toString())); + } + if ((jsonObj.get("lineNumber") != null && !jsonObj.get("lineNumber").isJsonNull()) && !jsonObj.get("lineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lineNumber").toString())); + } + if ((jsonObj.get("notes") != null && !jsonObj.get("notes").isJsonNull()) && !jsonObj.get("notes").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `notes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("notes").toString())); + } + if ((jsonObj.get("EAN") != null && !jsonObj.get("EAN").isJsonNull()) && !jsonObj.get("EAN").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `EAN` to be a primitive type in the JSON string but got `%s`", jsonObj.get("EAN").toString())); + } + if ((jsonObj.get("CoO") != null && !jsonObj.get("CoO").isJsonNull()) && !jsonObj.get("CoO").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `CoO` to be a primitive type in the JSON string but got `%s`", jsonObj.get("CoO").toString())); + } + if ((jsonObj.get("ingramPartNumber") != null && !jsonObj.get("ingramPartNumber").isJsonNull()) && !jsonObj.get("ingramPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPartNumber").toString())); + } + if ((jsonObj.get("vendorPartNumber") != null && !jsonObj.get("vendorPartNumber").isJsonNull()) && !jsonObj.get("vendorPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorPartNumber").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("weightUom") != null && !jsonObj.get("weightUom").isJsonNull()) && !jsonObj.get("weightUom").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `weightUom` to be a primitive type in the JSON string but got `%s`", jsonObj.get("weightUom").toString())); + } + if ((jsonObj.get("vpnCategory") != null && !jsonObj.get("vpnCategory").isJsonNull()) && !jsonObj.get("vpnCategory").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vpnCategory` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vpnCategory").toString())); + } + if ((jsonObj.get("quoteProductsSupplierPartAuxiliaryId") != null && !jsonObj.get("quoteProductsSupplierPartAuxiliaryId").isJsonNull()) && !jsonObj.get("quoteProductsSupplierPartAuxiliaryId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteProductsSupplierPartAuxiliaryId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quoteProductsSupplierPartAuxiliaryId").toString())); + } + if ((jsonObj.get("vendorName") != null && !jsonObj.get("vendorName").isJsonNull()) && !jsonObj.get("vendorName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorName").toString())); + } + if ((jsonObj.get("terms") != null && !jsonObj.get("terms").isJsonNull()) && !jsonObj.get("terms").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `terms` to be a primitive type in the JSON string but got `%s`", jsonObj.get("terms").toString())); + } + // validate the optional field `price` + if (jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) { + QuoteDetailsResponseProductsInnerPrice.validateJsonElement(jsonObj.get("price")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteDetailsResponseProductsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteDetailsResponseProductsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteDetailsResponseProductsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteDetailsResponseProductsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteDetailsResponseProductsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteDetailsResponseProductsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteDetailsResponseProductsInner + * @throws IOException if the JSON string is invalid with respect to QuoteDetailsResponseProductsInner + */ + public static QuoteDetailsResponseProductsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteDetailsResponseProductsInner.class); + } + + /** + * Convert an instance of QuoteDetailsResponseProductsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteDetailsResponseProductsInnerPrice.java b/src/main/java/xiresellers/client/model/QuoteDetailsResponseProductsInnerPrice.java new file mode 100644 index 00000000..57e1d0f4 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteDetailsResponseProductsInnerPrice.java @@ -0,0 +1,308 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteDetailsResponseProductsInnerPrice + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteDetailsResponseProductsInnerPrice { + public static final String SERIALIZED_NAME_QUOTE_PRICE = "quotePrice"; + @SerializedName(SERIALIZED_NAME_QUOTE_PRICE) + private Integer quotePrice; + + public static final String SERIALIZED_NAME_MSRP = "msrp"; + @SerializedName(SERIALIZED_NAME_MSRP) + private Integer msrp; + + public static final String SERIALIZED_NAME_EXTENDED_MSRP = "extendedMsrp"; + @SerializedName(SERIALIZED_NAME_EXTENDED_MSRP) + private Integer extendedMsrp; + + public static final String SERIALIZED_NAME_EXTENDED_QUOTE_PRICE = "extendedQuotePrice"; + @SerializedName(SERIALIZED_NAME_EXTENDED_QUOTE_PRICE) + private Integer extendedQuotePrice; + + public static final String SERIALIZED_NAME_DISCOUNT_OFF_LIST = "discountOffList"; + @SerializedName(SERIALIZED_NAME_DISCOUNT_OFF_LIST) + private BigDecimal discountOffList; + + public QuoteDetailsResponseProductsInnerPrice() { + } + + public QuoteDetailsResponseProductsInnerPrice quotePrice(Integer quotePrice) { + this.quotePrice = quotePrice; + return this; + } + + /** + * Ingram Micro quoted price specific to the reseller and quote. + * @return quotePrice + **/ + @javax.annotation.Nullable + public Integer getQuotePrice() { + return quotePrice; + } + + public void setQuotePrice(Integer quotePrice) { + this.quotePrice = quotePrice; + } + + + public QuoteDetailsResponseProductsInnerPrice msrp(Integer msrp) { + this.msrp = msrp; + return this; + } + + /** + * Manufacturer Suggested Retail Price + * @return msrp + **/ + @javax.annotation.Nullable + public Integer getMsrp() { + return msrp; + } + + public void setMsrp(Integer msrp) { + this.msrp = msrp; + } + + + public QuoteDetailsResponseProductsInnerPrice extendedMsrp(Integer extendedMsrp) { + this.extendedMsrp = extendedMsrp; + return this; + } + + /** + * Extended MSRP - Manufacturer Suggested Retail Price X Quantity + * @return extendedMsrp + **/ + @javax.annotation.Nullable + public Integer getExtendedMsrp() { + return extendedMsrp; + } + + public void setExtendedMsrp(Integer extendedMsrp) { + this.extendedMsrp = extendedMsrp; + } + + + public QuoteDetailsResponseProductsInnerPrice extendedQuotePrice(Integer extendedQuotePrice) { + this.extendedQuotePrice = extendedQuotePrice; + return this; + } + + /** + * Extended reseller quoted price (cost to reseller) X Quantity + * @return extendedQuotePrice + **/ + @javax.annotation.Nullable + public Integer getExtendedQuotePrice() { + return extendedQuotePrice; + } + + public void setExtendedQuotePrice(Integer extendedQuotePrice) { + this.extendedQuotePrice = extendedQuotePrice; + } + + + public QuoteDetailsResponseProductsInnerPrice discountOffList(BigDecimal discountOffList) { + this.discountOffList = discountOffList; + return this; + } + + /** + * Discount off list percentage + * @return discountOffList + **/ + @javax.annotation.Nullable + public BigDecimal getDiscountOffList() { + return discountOffList; + } + + public void setDiscountOffList(BigDecimal discountOffList) { + this.discountOffList = discountOffList; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteDetailsResponseProductsInnerPrice quoteDetailsResponseProductsInnerPrice = (QuoteDetailsResponseProductsInnerPrice) o; + return Objects.equals(this.quotePrice, quoteDetailsResponseProductsInnerPrice.quotePrice) && + Objects.equals(this.msrp, quoteDetailsResponseProductsInnerPrice.msrp) && + Objects.equals(this.extendedMsrp, quoteDetailsResponseProductsInnerPrice.extendedMsrp) && + Objects.equals(this.extendedQuotePrice, quoteDetailsResponseProductsInnerPrice.extendedQuotePrice) && + Objects.equals(this.discountOffList, quoteDetailsResponseProductsInnerPrice.discountOffList); + } + + @Override + public int hashCode() { + return Objects.hash(quotePrice, msrp, extendedMsrp, extendedQuotePrice, discountOffList); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteDetailsResponseProductsInnerPrice {\n"); + sb.append(" quotePrice: ").append(toIndentedString(quotePrice)).append("\n"); + sb.append(" msrp: ").append(toIndentedString(msrp)).append("\n"); + sb.append(" extendedMsrp: ").append(toIndentedString(extendedMsrp)).append("\n"); + sb.append(" extendedQuotePrice: ").append(toIndentedString(extendedQuotePrice)).append("\n"); + sb.append(" discountOffList: ").append(toIndentedString(discountOffList)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("quotePrice"); + openapiFields.add("msrp"); + openapiFields.add("extendedMsrp"); + openapiFields.add("extendedQuotePrice"); + openapiFields.add("discountOffList"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteDetailsResponseProductsInnerPrice + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteDetailsResponseProductsInnerPrice.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteDetailsResponseProductsInnerPrice is not found in the empty JSON string", QuoteDetailsResponseProductsInnerPrice.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteDetailsResponseProductsInnerPrice.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteDetailsResponseProductsInnerPrice` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteDetailsResponseProductsInnerPrice.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteDetailsResponseProductsInnerPrice' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteDetailsResponseProductsInnerPrice.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteDetailsResponseProductsInnerPrice value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteDetailsResponseProductsInnerPrice read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteDetailsResponseProductsInnerPrice given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteDetailsResponseProductsInnerPrice + * @throws IOException if the JSON string is invalid with respect to QuoteDetailsResponseProductsInnerPrice + */ + public static QuoteDetailsResponseProductsInnerPrice fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteDetailsResponseProductsInnerPrice.class); + } + + /** + * Convert an instance of QuoteDetailsResponseProductsInnerPrice to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteDetailsResponseQuoteDetailResponse.java b/src/main/java/xiresellers/client/model/QuoteDetailsResponseQuoteDetailResponse.java new file mode 100644 index 00000000..64013c10 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteDetailsResponseQuoteDetailResponse.java @@ -0,0 +1,239 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.QuoteDetailsQuoteDetailResponseResponsePreamble; +import xiresellers.client.model.QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteDetailsResponseQuoteDetailResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteDetailsResponseQuoteDetailResponse { + public static final String SERIALIZED_NAME_RESPONSE_PREAMBLE = "responsePreamble"; + @SerializedName(SERIALIZED_NAME_RESPONSE_PREAMBLE) + private QuoteDetailsQuoteDetailResponseResponsePreamble responsePreamble; + + public static final String SERIALIZED_NAME_RETRIEVE_QUOTE_RESPONSE = "retrieveQuoteResponse"; + @SerializedName(SERIALIZED_NAME_RETRIEVE_QUOTE_RESPONSE) + private QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse retrieveQuoteResponse; + + public QuoteDetailsResponseQuoteDetailResponse() { + } + + public QuoteDetailsResponseQuoteDetailResponse responsePreamble(QuoteDetailsQuoteDetailResponseResponsePreamble responsePreamble) { + this.responsePreamble = responsePreamble; + return this; + } + + /** + * Get responsePreamble + * @return responsePreamble + **/ + @javax.annotation.Nullable + public QuoteDetailsQuoteDetailResponseResponsePreamble getResponsePreamble() { + return responsePreamble; + } + + public void setResponsePreamble(QuoteDetailsQuoteDetailResponseResponsePreamble responsePreamble) { + this.responsePreamble = responsePreamble; + } + + + public QuoteDetailsResponseQuoteDetailResponse retrieveQuoteResponse(QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse retrieveQuoteResponse) { + this.retrieveQuoteResponse = retrieveQuoteResponse; + return this; + } + + /** + * Get retrieveQuoteResponse + * @return retrieveQuoteResponse + **/ + @javax.annotation.Nullable + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse getRetrieveQuoteResponse() { + return retrieveQuoteResponse; + } + + public void setRetrieveQuoteResponse(QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse retrieveQuoteResponse) { + this.retrieveQuoteResponse = retrieveQuoteResponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteDetailsResponseQuoteDetailResponse quoteDetailsResponseQuoteDetailResponse = (QuoteDetailsResponseQuoteDetailResponse) o; + return Objects.equals(this.responsePreamble, quoteDetailsResponseQuoteDetailResponse.responsePreamble) && + Objects.equals(this.retrieveQuoteResponse, quoteDetailsResponseQuoteDetailResponse.retrieveQuoteResponse); + } + + @Override + public int hashCode() { + return Objects.hash(responsePreamble, retrieveQuoteResponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteDetailsResponseQuoteDetailResponse {\n"); + sb.append(" responsePreamble: ").append(toIndentedString(responsePreamble)).append("\n"); + sb.append(" retrieveQuoteResponse: ").append(toIndentedString(retrieveQuoteResponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("responsePreamble"); + openapiFields.add("retrieveQuoteResponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteDetailsResponseQuoteDetailResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteDetailsResponseQuoteDetailResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteDetailsResponseQuoteDetailResponse is not found in the empty JSON string", QuoteDetailsResponseQuoteDetailResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteDetailsResponseQuoteDetailResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteDetailsResponseQuoteDetailResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `responsePreamble` + if (jsonObj.get("responsePreamble") != null && !jsonObj.get("responsePreamble").isJsonNull()) { + QuoteDetailsQuoteDetailResponseResponsePreamble.validateJsonElement(jsonObj.get("responsePreamble")); + } + // validate the optional field `retrieveQuoteResponse` + if (jsonObj.get("retrieveQuoteResponse") != null && !jsonObj.get("retrieveQuoteResponse").isJsonNull()) { + QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.validateJsonElement(jsonObj.get("retrieveQuoteResponse")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteDetailsResponseQuoteDetailResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteDetailsResponseQuoteDetailResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteDetailsResponseQuoteDetailResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteDetailsResponseQuoteDetailResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteDetailsResponseQuoteDetailResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteDetailsResponseQuoteDetailResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteDetailsResponseQuoteDetailResponse + * @throws IOException if the JSON string is invalid with respect to QuoteDetailsResponseQuoteDetailResponse + */ + public static QuoteDetailsResponseQuoteDetailResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteDetailsResponseQuoteDetailResponse.class); + } + + /** + * Convert an instance of QuoteDetailsResponseQuoteDetailResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.java b/src/main/java/xiresellers/client/model/QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.java new file mode 100644 index 00000000..8fcf409f --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.java @@ -0,0 +1,1019 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo; +import xiresellers.client.model.QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo; +import xiresellers.client.model.QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser; +import xiresellers.client.model.QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes; +import xiresellers.client.model.QuoteProductList; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse { + public static final String SERIALIZED_NAME_QUOTE_GUID = "quoteGuid"; + @SerializedName(SERIALIZED_NAME_QUOTE_GUID) + private String quoteGuid; + + public static final String SERIALIZED_NAME_QUOTE_NAME = "quoteName"; + @SerializedName(SERIALIZED_NAME_QUOTE_NAME) + private String quoteName; + + public static final String SERIALIZED_NAME_QUOTE_NUMBER = "quoteNumber"; + @SerializedName(SERIALIZED_NAME_QUOTE_NUMBER) + private String quoteNumber; + + public static final String SERIALIZED_NAME_QUOTE_EXPIRY_DATE = "quoteExpiryDate"; + @SerializedName(SERIALIZED_NAME_QUOTE_EXPIRY_DATE) + private String quoteExpiryDate; + + public static final String SERIALIZED_NAME_REVISION_NUMBER = "revisionNumber"; + @SerializedName(SERIALIZED_NAME_REVISION_NUMBER) + private String revisionNumber; + + public static final String SERIALIZED_NAME_INTRO_PREAMBLE = "introPreamble"; + @SerializedName(SERIALIZED_NAME_INTRO_PREAMBLE) + private String introPreamble; + + public static final String SERIALIZED_NAME_PURCHASE_INSTRUCTIONS = "purchaseInstructions"; + @SerializedName(SERIALIZED_NAME_PURCHASE_INSTRUCTIONS) + private String purchaseInstructions; + + public static final String SERIALIZED_NAME_LEGAL_TERMS = "legalTerms"; + @SerializedName(SERIALIZED_NAME_LEGAL_TERMS) + private String legalTerms; + + public static final String SERIALIZED_NAME_CURRENCY_CODE = "currencyCode"; + @SerializedName(SERIALIZED_NAME_CURRENCY_CODE) + private String currencyCode; + + public static final String SERIALIZED_NAME_PRICE_DEVIATION_ID = "priceDeviationId"; + @SerializedName(SERIALIZED_NAME_PRICE_DEVIATION_ID) + private String priceDeviationId; + + public static final String SERIALIZED_NAME_PRICE_DEVIATION_START_DATE = "priceDeviationStartDate"; + @SerializedName(SERIALIZED_NAME_PRICE_DEVIATION_START_DATE) + private String priceDeviationStartDate; + + public static final String SERIALIZED_NAME_PRICE_DEVIATION_EXPIRY_DATE = "priceDeviationExpiryDate"; + @SerializedName(SERIALIZED_NAME_PRICE_DEVIATION_EXPIRY_DATE) + private String priceDeviationExpiryDate; + + public static final String SERIALIZED_NAME_CUSTOMER_NEED = "customerNeed"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_NEED) + private String customerNeed; + + public static final String SERIALIZED_NAME_SOLUTION_PROPOSED = "solutionProposed"; + @SerializedName(SERIALIZED_NAME_SOLUTION_PROPOSED) + private String solutionProposed; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_CREATED = "created"; + @SerializedName(SERIALIZED_NAME_CREATED) + private String created; + + public static final String SERIALIZED_NAME_MODIFIED = "modified"; + @SerializedName(SERIALIZED_NAME_MODIFIED) + private String modified; + + public static final String SERIALIZED_NAME_LEASING_CALCULATIONS = "leasingCalculations"; + @SerializedName(SERIALIZED_NAME_LEASING_CALCULATIONS) + private String leasingCalculations; + + public static final String SERIALIZED_NAME_LEASING_INSTRUCTIONS = "leasingInstructions"; + @SerializedName(SERIALIZED_NAME_LEASING_INSTRUCTIONS) + private String leasingInstructions; + + public static final String SERIALIZED_NAME_ACCOUNT_INFO = "accountInfo"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_INFO) + private QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo accountInfo; + + public static final String SERIALIZED_NAME_CONTACT_INFO = "contactInfo"; + @SerializedName(SERIALIZED_NAME_CONTACT_INFO) + private QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo contactInfo; + + public static final String SERIALIZED_NAME_VENDOR_ATTRIBUTES = "vendorAttributes"; + @SerializedName(SERIALIZED_NAME_VENDOR_ATTRIBUTES) + private QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes vendorAttributes; + + public static final String SERIALIZED_NAME_END_USER = "endUser"; + @SerializedName(SERIALIZED_NAME_END_USER) + private QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser endUser; + + public static final String SERIALIZED_NAME_QUOTE_PRODUCT_LIST = "quoteProductList"; + @SerializedName(SERIALIZED_NAME_QUOTE_PRODUCT_LIST) + private List quoteProductList; + + public static final String SERIALIZED_NAME_TOTAL_QUOTE_PRODUCT_COUNT = "totalQuoteProductCount"; + @SerializedName(SERIALIZED_NAME_TOTAL_QUOTE_PRODUCT_COUNT) + private String totalQuoteProductCount; + + public static final String SERIALIZED_NAME_TOTAL_EXTENDED_MSRP = "totalExtendedMsrp"; + @SerializedName(SERIALIZED_NAME_TOTAL_EXTENDED_MSRP) + private String totalExtendedMsrp; + + public static final String SERIALIZED_NAME_TOTAL_QUANTITY = "totalQuantity"; + @SerializedName(SERIALIZED_NAME_TOTAL_QUANTITY) + private String totalQuantity; + + public static final String SERIALIZED_NAME_TOTAL_EXTENDED_QUOTE_PRICE = "totalExtendedQuotePrice"; + @SerializedName(SERIALIZED_NAME_TOTAL_EXTENDED_QUOTE_PRICE) + private String totalExtendedQuotePrice; + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse() { + } + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse quoteGuid(String quoteGuid) { + this.quoteGuid = quoteGuid; + return this; + } + + /** + * Get quoteGuid + * @return quoteGuid + **/ + @javax.annotation.Nullable + public String getQuoteGuid() { + return quoteGuid; + } + + public void setQuoteGuid(String quoteGuid) { + this.quoteGuid = quoteGuid; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse quoteName(String quoteName) { + this.quoteName = quoteName; + return this; + } + + /** + * Get quoteName + * @return quoteName + **/ + @javax.annotation.Nullable + public String getQuoteName() { + return quoteName; + } + + public void setQuoteName(String quoteName) { + this.quoteName = quoteName; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse quoteNumber(String quoteNumber) { + this.quoteNumber = quoteNumber; + return this; + } + + /** + * Get quoteNumber + * @return quoteNumber + **/ + @javax.annotation.Nullable + public String getQuoteNumber() { + return quoteNumber; + } + + public void setQuoteNumber(String quoteNumber) { + this.quoteNumber = quoteNumber; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse quoteExpiryDate(String quoteExpiryDate) { + this.quoteExpiryDate = quoteExpiryDate; + return this; + } + + /** + * Get quoteExpiryDate + * @return quoteExpiryDate + **/ + @javax.annotation.Nullable + public String getQuoteExpiryDate() { + return quoteExpiryDate; + } + + public void setQuoteExpiryDate(String quoteExpiryDate) { + this.quoteExpiryDate = quoteExpiryDate; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse revisionNumber(String revisionNumber) { + this.revisionNumber = revisionNumber; + return this; + } + + /** + * Get revisionNumber + * @return revisionNumber + **/ + @javax.annotation.Nullable + public String getRevisionNumber() { + return revisionNumber; + } + + public void setRevisionNumber(String revisionNumber) { + this.revisionNumber = revisionNumber; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse introPreamble(String introPreamble) { + this.introPreamble = introPreamble; + return this; + } + + /** + * Get introPreamble + * @return introPreamble + **/ + @javax.annotation.Nullable + public String getIntroPreamble() { + return introPreamble; + } + + public void setIntroPreamble(String introPreamble) { + this.introPreamble = introPreamble; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse purchaseInstructions(String purchaseInstructions) { + this.purchaseInstructions = purchaseInstructions; + return this; + } + + /** + * Get purchaseInstructions + * @return purchaseInstructions + **/ + @javax.annotation.Nullable + public String getPurchaseInstructions() { + return purchaseInstructions; + } + + public void setPurchaseInstructions(String purchaseInstructions) { + this.purchaseInstructions = purchaseInstructions; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse legalTerms(String legalTerms) { + this.legalTerms = legalTerms; + return this; + } + + /** + * Get legalTerms + * @return legalTerms + **/ + @javax.annotation.Nullable + public String getLegalTerms() { + return legalTerms; + } + + public void setLegalTerms(String legalTerms) { + this.legalTerms = legalTerms; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse currencyCode(String currencyCode) { + this.currencyCode = currencyCode; + return this; + } + + /** + * Get currencyCode + * @return currencyCode + **/ + @javax.annotation.Nullable + public String getCurrencyCode() { + return currencyCode; + } + + public void setCurrencyCode(String currencyCode) { + this.currencyCode = currencyCode; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse priceDeviationId(String priceDeviationId) { + this.priceDeviationId = priceDeviationId; + return this; + } + + /** + * Get priceDeviationId + * @return priceDeviationId + **/ + @javax.annotation.Nullable + public String getPriceDeviationId() { + return priceDeviationId; + } + + public void setPriceDeviationId(String priceDeviationId) { + this.priceDeviationId = priceDeviationId; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse priceDeviationStartDate(String priceDeviationStartDate) { + this.priceDeviationStartDate = priceDeviationStartDate; + return this; + } + + /** + * Get priceDeviationStartDate + * @return priceDeviationStartDate + **/ + @javax.annotation.Nullable + public String getPriceDeviationStartDate() { + return priceDeviationStartDate; + } + + public void setPriceDeviationStartDate(String priceDeviationStartDate) { + this.priceDeviationStartDate = priceDeviationStartDate; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse priceDeviationExpiryDate(String priceDeviationExpiryDate) { + this.priceDeviationExpiryDate = priceDeviationExpiryDate; + return this; + } + + /** + * Get priceDeviationExpiryDate + * @return priceDeviationExpiryDate + **/ + @javax.annotation.Nullable + public String getPriceDeviationExpiryDate() { + return priceDeviationExpiryDate; + } + + public void setPriceDeviationExpiryDate(String priceDeviationExpiryDate) { + this.priceDeviationExpiryDate = priceDeviationExpiryDate; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse customerNeed(String customerNeed) { + this.customerNeed = customerNeed; + return this; + } + + /** + * Get customerNeed + * @return customerNeed + **/ + @javax.annotation.Nullable + public String getCustomerNeed() { + return customerNeed; + } + + public void setCustomerNeed(String customerNeed) { + this.customerNeed = customerNeed; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse solutionProposed(String solutionProposed) { + this.solutionProposed = solutionProposed; + return this; + } + + /** + * Get solutionProposed + * @return solutionProposed + **/ + @javax.annotation.Nullable + public String getSolutionProposed() { + return solutionProposed; + } + + public void setSolutionProposed(String solutionProposed) { + this.solutionProposed = solutionProposed; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse status(String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse created(String created) { + this.created = created; + return this; + } + + /** + * Get created + * @return created + **/ + @javax.annotation.Nullable + public String getCreated() { + return created; + } + + public void setCreated(String created) { + this.created = created; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse modified(String modified) { + this.modified = modified; + return this; + } + + /** + * Get modified + * @return modified + **/ + @javax.annotation.Nullable + public String getModified() { + return modified; + } + + public void setModified(String modified) { + this.modified = modified; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse leasingCalculations(String leasingCalculations) { + this.leasingCalculations = leasingCalculations; + return this; + } + + /** + * Get leasingCalculations + * @return leasingCalculations + **/ + @javax.annotation.Nullable + public String getLeasingCalculations() { + return leasingCalculations; + } + + public void setLeasingCalculations(String leasingCalculations) { + this.leasingCalculations = leasingCalculations; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse leasingInstructions(String leasingInstructions) { + this.leasingInstructions = leasingInstructions; + return this; + } + + /** + * Get leasingInstructions + * @return leasingInstructions + **/ + @javax.annotation.Nullable + public String getLeasingInstructions() { + return leasingInstructions; + } + + public void setLeasingInstructions(String leasingInstructions) { + this.leasingInstructions = leasingInstructions; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse accountInfo(QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo accountInfo) { + this.accountInfo = accountInfo; + return this; + } + + /** + * Get accountInfo + * @return accountInfo + **/ + @javax.annotation.Nullable + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo getAccountInfo() { + return accountInfo; + } + + public void setAccountInfo(QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo accountInfo) { + this.accountInfo = accountInfo; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse contactInfo(QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo contactInfo) { + this.contactInfo = contactInfo; + return this; + } + + /** + * Get contactInfo + * @return contactInfo + **/ + @javax.annotation.Nullable + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo getContactInfo() { + return contactInfo; + } + + public void setContactInfo(QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo contactInfo) { + this.contactInfo = contactInfo; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse vendorAttributes(QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes vendorAttributes) { + this.vendorAttributes = vendorAttributes; + return this; + } + + /** + * Get vendorAttributes + * @return vendorAttributes + **/ + @javax.annotation.Nullable + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes getVendorAttributes() { + return vendorAttributes; + } + + public void setVendorAttributes(QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes vendorAttributes) { + this.vendorAttributes = vendorAttributes; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse endUser(QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser endUser) { + this.endUser = endUser; + return this; + } + + /** + * Get endUser + * @return endUser + **/ + @javax.annotation.Nullable + public QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser getEndUser() { + return endUser; + } + + public void setEndUser(QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser endUser) { + this.endUser = endUser; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse quoteProductList(List quoteProductList) { + this.quoteProductList = quoteProductList; + return this; + } + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse addQuoteProductListItem(QuoteProductList quoteProductListItem) { + if (this.quoteProductList == null) { + this.quoteProductList = new ArrayList<>(); + } + this.quoteProductList.add(quoteProductListItem); + return this; + } + + /** + * Get quoteProductList + * @return quoteProductList + **/ + @javax.annotation.Nullable + public List getQuoteProductList() { + return quoteProductList; + } + + public void setQuoteProductList(List quoteProductList) { + this.quoteProductList = quoteProductList; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse totalQuoteProductCount(String totalQuoteProductCount) { + this.totalQuoteProductCount = totalQuoteProductCount; + return this; + } + + /** + * Get totalQuoteProductCount + * @return totalQuoteProductCount + **/ + @javax.annotation.Nullable + public String getTotalQuoteProductCount() { + return totalQuoteProductCount; + } + + public void setTotalQuoteProductCount(String totalQuoteProductCount) { + this.totalQuoteProductCount = totalQuoteProductCount; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse totalExtendedMsrp(String totalExtendedMsrp) { + this.totalExtendedMsrp = totalExtendedMsrp; + return this; + } + + /** + * Get totalExtendedMsrp + * @return totalExtendedMsrp + **/ + @javax.annotation.Nullable + public String getTotalExtendedMsrp() { + return totalExtendedMsrp; + } + + public void setTotalExtendedMsrp(String totalExtendedMsrp) { + this.totalExtendedMsrp = totalExtendedMsrp; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse totalQuantity(String totalQuantity) { + this.totalQuantity = totalQuantity; + return this; + } + + /** + * Get totalQuantity + * @return totalQuantity + **/ + @javax.annotation.Nullable + public String getTotalQuantity() { + return totalQuantity; + } + + public void setTotalQuantity(String totalQuantity) { + this.totalQuantity = totalQuantity; + } + + + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse totalExtendedQuotePrice(String totalExtendedQuotePrice) { + this.totalExtendedQuotePrice = totalExtendedQuotePrice; + return this; + } + + /** + * Get totalExtendedQuotePrice + * @return totalExtendedQuotePrice + **/ + @javax.annotation.Nullable + public String getTotalExtendedQuotePrice() { + return totalExtendedQuotePrice; + } + + public void setTotalExtendedQuotePrice(String totalExtendedQuotePrice) { + this.totalExtendedQuotePrice = totalExtendedQuotePrice; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse = (QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse) o; + return Objects.equals(this.quoteGuid, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.quoteGuid) && + Objects.equals(this.quoteName, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.quoteName) && + Objects.equals(this.quoteNumber, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.quoteNumber) && + Objects.equals(this.quoteExpiryDate, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.quoteExpiryDate) && + Objects.equals(this.revisionNumber, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.revisionNumber) && + Objects.equals(this.introPreamble, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.introPreamble) && + Objects.equals(this.purchaseInstructions, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.purchaseInstructions) && + Objects.equals(this.legalTerms, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.legalTerms) && + Objects.equals(this.currencyCode, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.currencyCode) && + Objects.equals(this.priceDeviationId, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.priceDeviationId) && + Objects.equals(this.priceDeviationStartDate, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.priceDeviationStartDate) && + Objects.equals(this.priceDeviationExpiryDate, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.priceDeviationExpiryDate) && + Objects.equals(this.customerNeed, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.customerNeed) && + Objects.equals(this.solutionProposed, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.solutionProposed) && + Objects.equals(this.status, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.status) && + Objects.equals(this.created, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.created) && + Objects.equals(this.modified, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.modified) && + Objects.equals(this.leasingCalculations, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.leasingCalculations) && + Objects.equals(this.leasingInstructions, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.leasingInstructions) && + Objects.equals(this.accountInfo, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.accountInfo) && + Objects.equals(this.contactInfo, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.contactInfo) && + Objects.equals(this.vendorAttributes, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.vendorAttributes) && + Objects.equals(this.endUser, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.endUser) && + Objects.equals(this.quoteProductList, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.quoteProductList) && + Objects.equals(this.totalQuoteProductCount, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.totalQuoteProductCount) && + Objects.equals(this.totalExtendedMsrp, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.totalExtendedMsrp) && + Objects.equals(this.totalQuantity, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.totalQuantity) && + Objects.equals(this.totalExtendedQuotePrice, quoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.totalExtendedQuotePrice); + } + + @Override + public int hashCode() { + return Objects.hash(quoteGuid, quoteName, quoteNumber, quoteExpiryDate, revisionNumber, introPreamble, purchaseInstructions, legalTerms, currencyCode, priceDeviationId, priceDeviationStartDate, priceDeviationExpiryDate, customerNeed, solutionProposed, status, created, modified, leasingCalculations, leasingInstructions, accountInfo, contactInfo, vendorAttributes, endUser, quoteProductList, totalQuoteProductCount, totalExtendedMsrp, totalQuantity, totalExtendedQuotePrice); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse {\n"); + sb.append(" quoteGuid: ").append(toIndentedString(quoteGuid)).append("\n"); + sb.append(" quoteName: ").append(toIndentedString(quoteName)).append("\n"); + sb.append(" quoteNumber: ").append(toIndentedString(quoteNumber)).append("\n"); + sb.append(" quoteExpiryDate: ").append(toIndentedString(quoteExpiryDate)).append("\n"); + sb.append(" revisionNumber: ").append(toIndentedString(revisionNumber)).append("\n"); + sb.append(" introPreamble: ").append(toIndentedString(introPreamble)).append("\n"); + sb.append(" purchaseInstructions: ").append(toIndentedString(purchaseInstructions)).append("\n"); + sb.append(" legalTerms: ").append(toIndentedString(legalTerms)).append("\n"); + sb.append(" currencyCode: ").append(toIndentedString(currencyCode)).append("\n"); + sb.append(" priceDeviationId: ").append(toIndentedString(priceDeviationId)).append("\n"); + sb.append(" priceDeviationStartDate: ").append(toIndentedString(priceDeviationStartDate)).append("\n"); + sb.append(" priceDeviationExpiryDate: ").append(toIndentedString(priceDeviationExpiryDate)).append("\n"); + sb.append(" customerNeed: ").append(toIndentedString(customerNeed)).append("\n"); + sb.append(" solutionProposed: ").append(toIndentedString(solutionProposed)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" modified: ").append(toIndentedString(modified)).append("\n"); + sb.append(" leasingCalculations: ").append(toIndentedString(leasingCalculations)).append("\n"); + sb.append(" leasingInstructions: ").append(toIndentedString(leasingInstructions)).append("\n"); + sb.append(" accountInfo: ").append(toIndentedString(accountInfo)).append("\n"); + sb.append(" contactInfo: ").append(toIndentedString(contactInfo)).append("\n"); + sb.append(" vendorAttributes: ").append(toIndentedString(vendorAttributes)).append("\n"); + sb.append(" endUser: ").append(toIndentedString(endUser)).append("\n"); + sb.append(" quoteProductList: ").append(toIndentedString(quoteProductList)).append("\n"); + sb.append(" totalQuoteProductCount: ").append(toIndentedString(totalQuoteProductCount)).append("\n"); + sb.append(" totalExtendedMsrp: ").append(toIndentedString(totalExtendedMsrp)).append("\n"); + sb.append(" totalQuantity: ").append(toIndentedString(totalQuantity)).append("\n"); + sb.append(" totalExtendedQuotePrice: ").append(toIndentedString(totalExtendedQuotePrice)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("quoteGuid"); + openapiFields.add("quoteName"); + openapiFields.add("quoteNumber"); + openapiFields.add("quoteExpiryDate"); + openapiFields.add("revisionNumber"); + openapiFields.add("introPreamble"); + openapiFields.add("purchaseInstructions"); + openapiFields.add("legalTerms"); + openapiFields.add("currencyCode"); + openapiFields.add("priceDeviationId"); + openapiFields.add("priceDeviationStartDate"); + openapiFields.add("priceDeviationExpiryDate"); + openapiFields.add("customerNeed"); + openapiFields.add("solutionProposed"); + openapiFields.add("status"); + openapiFields.add("created"); + openapiFields.add("modified"); + openapiFields.add("leasingCalculations"); + openapiFields.add("leasingInstructions"); + openapiFields.add("accountInfo"); + openapiFields.add("contactInfo"); + openapiFields.add("vendorAttributes"); + openapiFields.add("endUser"); + openapiFields.add("quoteProductList"); + openapiFields.add("totalQuoteProductCount"); + openapiFields.add("totalExtendedMsrp"); + openapiFields.add("totalQuantity"); + openapiFields.add("totalExtendedQuotePrice"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse is not found in the empty JSON string", QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("quoteGuid") != null && !jsonObj.get("quoteGuid").isJsonNull()) && !jsonObj.get("quoteGuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteGuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quoteGuid").toString())); + } + if ((jsonObj.get("quoteName") != null && !jsonObj.get("quoteName").isJsonNull()) && !jsonObj.get("quoteName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quoteName").toString())); + } + if ((jsonObj.get("quoteNumber") != null && !jsonObj.get("quoteNumber").isJsonNull()) && !jsonObj.get("quoteNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quoteNumber").toString())); + } + if ((jsonObj.get("quoteExpiryDate") != null && !jsonObj.get("quoteExpiryDate").isJsonNull()) && !jsonObj.get("quoteExpiryDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteExpiryDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quoteExpiryDate").toString())); + } + if ((jsonObj.get("revisionNumber") != null && !jsonObj.get("revisionNumber").isJsonNull()) && !jsonObj.get("revisionNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `revisionNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("revisionNumber").toString())); + } + if ((jsonObj.get("introPreamble") != null && !jsonObj.get("introPreamble").isJsonNull()) && !jsonObj.get("introPreamble").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `introPreamble` to be a primitive type in the JSON string but got `%s`", jsonObj.get("introPreamble").toString())); + } + if ((jsonObj.get("purchaseInstructions") != null && !jsonObj.get("purchaseInstructions").isJsonNull()) && !jsonObj.get("purchaseInstructions").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `purchaseInstructions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("purchaseInstructions").toString())); + } + if ((jsonObj.get("legalTerms") != null && !jsonObj.get("legalTerms").isJsonNull()) && !jsonObj.get("legalTerms").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `legalTerms` to be a primitive type in the JSON string but got `%s`", jsonObj.get("legalTerms").toString())); + } + if ((jsonObj.get("currencyCode") != null && !jsonObj.get("currencyCode").isJsonNull()) && !jsonObj.get("currencyCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `currencyCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currencyCode").toString())); + } + if ((jsonObj.get("priceDeviationId") != null && !jsonObj.get("priceDeviationId").isJsonNull()) && !jsonObj.get("priceDeviationId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `priceDeviationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("priceDeviationId").toString())); + } + if ((jsonObj.get("priceDeviationStartDate") != null && !jsonObj.get("priceDeviationStartDate").isJsonNull()) && !jsonObj.get("priceDeviationStartDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `priceDeviationStartDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("priceDeviationStartDate").toString())); + } + if ((jsonObj.get("priceDeviationExpiryDate") != null && !jsonObj.get("priceDeviationExpiryDate").isJsonNull()) && !jsonObj.get("priceDeviationExpiryDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `priceDeviationExpiryDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("priceDeviationExpiryDate").toString())); + } + if ((jsonObj.get("customerNeed") != null && !jsonObj.get("customerNeed").isJsonNull()) && !jsonObj.get("customerNeed").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerNeed` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerNeed").toString())); + } + if ((jsonObj.get("solutionProposed") != null && !jsonObj.get("solutionProposed").isJsonNull()) && !jsonObj.get("solutionProposed").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `solutionProposed` to be a primitive type in the JSON string but got `%s`", jsonObj.get("solutionProposed").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if ((jsonObj.get("created") != null && !jsonObj.get("created").isJsonNull()) && !jsonObj.get("created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("created").toString())); + } + if ((jsonObj.get("modified") != null && !jsonObj.get("modified").isJsonNull()) && !jsonObj.get("modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("modified").toString())); + } + if ((jsonObj.get("leasingCalculations") != null && !jsonObj.get("leasingCalculations").isJsonNull()) && !jsonObj.get("leasingCalculations").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `leasingCalculations` to be a primitive type in the JSON string but got `%s`", jsonObj.get("leasingCalculations").toString())); + } + if ((jsonObj.get("leasingInstructions") != null && !jsonObj.get("leasingInstructions").isJsonNull()) && !jsonObj.get("leasingInstructions").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `leasingInstructions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("leasingInstructions").toString())); + } + // validate the optional field `accountInfo` + if (jsonObj.get("accountInfo") != null && !jsonObj.get("accountInfo").isJsonNull()) { + QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo.validateJsonElement(jsonObj.get("accountInfo")); + } + // validate the optional field `contactInfo` + if (jsonObj.get("contactInfo") != null && !jsonObj.get("contactInfo").isJsonNull()) { + QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo.validateJsonElement(jsonObj.get("contactInfo")); + } + // validate the optional field `vendorAttributes` + if (jsonObj.get("vendorAttributes") != null && !jsonObj.get("vendorAttributes").isJsonNull()) { + QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes.validateJsonElement(jsonObj.get("vendorAttributes")); + } + // validate the optional field `endUser` + if (jsonObj.get("endUser") != null && !jsonObj.get("endUser").isJsonNull()) { + QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser.validateJsonElement(jsonObj.get("endUser")); + } + if (jsonObj.get("quoteProductList") != null && !jsonObj.get("quoteProductList").isJsonNull()) { + JsonArray jsonArrayquoteProductList = jsonObj.getAsJsonArray("quoteProductList"); + if (jsonArrayquoteProductList != null) { + // ensure the json data is an array + if (!jsonObj.get("quoteProductList").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteProductList` to be an array in the JSON string but got `%s`", jsonObj.get("quoteProductList").toString())); + } + + // validate the optional field `quoteProductList` (array) + for (int i = 0; i < jsonArrayquoteProductList.size(); i++) { + QuoteProductList.validateJsonElement(jsonArrayquoteProductList.get(i)); + }; + } + } + if ((jsonObj.get("totalQuoteProductCount") != null && !jsonObj.get("totalQuoteProductCount").isJsonNull()) && !jsonObj.get("totalQuoteProductCount").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `totalQuoteProductCount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("totalQuoteProductCount").toString())); + } + if ((jsonObj.get("totalExtendedMsrp") != null && !jsonObj.get("totalExtendedMsrp").isJsonNull()) && !jsonObj.get("totalExtendedMsrp").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `totalExtendedMsrp` to be a primitive type in the JSON string but got `%s`", jsonObj.get("totalExtendedMsrp").toString())); + } + if ((jsonObj.get("totalQuantity") != null && !jsonObj.get("totalQuantity").isJsonNull()) && !jsonObj.get("totalQuantity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `totalQuantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("totalQuantity").toString())); + } + if ((jsonObj.get("totalExtendedQuotePrice") != null && !jsonObj.get("totalExtendedQuotePrice").isJsonNull()) && !jsonObj.get("totalExtendedQuotePrice").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `totalExtendedQuotePrice` to be a primitive type in the JSON string but got `%s`", jsonObj.get("totalExtendedQuotePrice").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse + * @throws IOException if the JSON string is invalid with respect to QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse + */ + public static QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse.class); + } + + /** + * Convert an instance of QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteDetailsResponseResellerInfo.java b/src/main/java/xiresellers/client/model/QuoteDetailsResponseResellerInfo.java new file mode 100644 index 00000000..16d4c795 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteDetailsResponseResellerInfo.java @@ -0,0 +1,322 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteDetailsResponseResellerInfo + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteDetailsResponseResellerInfo { + public static final String SERIALIZED_NAME_CONTACT = "contact"; + @SerializedName(SERIALIZED_NAME_CONTACT) + private String contact; + + public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; + @SerializedName(SERIALIZED_NAME_COMPANY_NAME) + private String companyName; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) + private String phoneNumber; + + public static final String SERIALIZED_NAME_CUSTOMER_NUMBER = "customerNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_NUMBER) + private String customerNumber; + + public QuoteDetailsResponseResellerInfo() { + } + + public QuoteDetailsResponseResellerInfo contact(String contact) { + this.contact = contact; + return this; + } + + /** + * Contact Name + * @return contact + **/ + @javax.annotation.Nullable + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + + public QuoteDetailsResponseResellerInfo companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * Ingram Micro Customer's Account Name + * @return companyName + **/ + @javax.annotation.Nullable + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public QuoteDetailsResponseResellerInfo email(String email) { + this.email = email; + return this; + } + + /** + * Account Contact Email Address + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + public QuoteDetailsResponseResellerInfo phoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * Account Phone Number + * @return phoneNumber + **/ + @javax.annotation.Nullable + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public QuoteDetailsResponseResellerInfo customerNumber(String customerNumber) { + this.customerNumber = customerNumber; + return this; + } + + /** + * Reseller account number + * @return customerNumber + **/ + @javax.annotation.Nullable + public String getCustomerNumber() { + return customerNumber; + } + + public void setCustomerNumber(String customerNumber) { + this.customerNumber = customerNumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteDetailsResponseResellerInfo quoteDetailsResponseResellerInfo = (QuoteDetailsResponseResellerInfo) o; + return Objects.equals(this.contact, quoteDetailsResponseResellerInfo.contact) && + Objects.equals(this.companyName, quoteDetailsResponseResellerInfo.companyName) && + Objects.equals(this.email, quoteDetailsResponseResellerInfo.email) && + Objects.equals(this.phoneNumber, quoteDetailsResponseResellerInfo.phoneNumber) && + Objects.equals(this.customerNumber, quoteDetailsResponseResellerInfo.customerNumber); + } + + @Override + public int hashCode() { + return Objects.hash(contact, companyName, email, phoneNumber, customerNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteDetailsResponseResellerInfo {\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" customerNumber: ").append(toIndentedString(customerNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("contact"); + openapiFields.add("companyName"); + openapiFields.add("email"); + openapiFields.add("phoneNumber"); + openapiFields.add("customerNumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteDetailsResponseResellerInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteDetailsResponseResellerInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteDetailsResponseResellerInfo is not found in the empty JSON string", QuoteDetailsResponseResellerInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteDetailsResponseResellerInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteDetailsResponseResellerInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("contact") != null && !jsonObj.get("contact").isJsonNull()) && !jsonObj.get("contact").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contact` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact").toString())); + } + if ((jsonObj.get("companyName") != null && !jsonObj.get("companyName").isJsonNull()) && !jsonObj.get("companyName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + } + if ((jsonObj.get("customerNumber") != null && !jsonObj.get("customerNumber").isJsonNull()) && !jsonObj.get("customerNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerNumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteDetailsResponseResellerInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteDetailsResponseResellerInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteDetailsResponseResellerInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteDetailsResponseResellerInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteDetailsResponseResellerInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteDetailsResponseResellerInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteDetailsResponseResellerInfo + * @throws IOException if the JSON string is invalid with respect to QuoteDetailsResponseResellerInfo + */ + public static QuoteDetailsResponseResellerInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteDetailsResponseResellerInfo.class); + } + + /** + * Convert an instance of QuoteDetailsResponseResellerInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteListRequest.java b/src/main/java/xiresellers/client/model/QuoteListRequest.java new file mode 100644 index 00000000..e8801607 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteListRequest.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.QuoteListRequestQuoteSearchRequest; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Request schema for get quote list endpoint + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteListRequest { + public static final String SERIALIZED_NAME_QUOTE_SEARCH_REQUEST = "quoteSearchRequest"; + @SerializedName(SERIALIZED_NAME_QUOTE_SEARCH_REQUEST) + private QuoteListRequestQuoteSearchRequest quoteSearchRequest; + + public QuoteListRequest() { + } + + public QuoteListRequest quoteSearchRequest(QuoteListRequestQuoteSearchRequest quoteSearchRequest) { + this.quoteSearchRequest = quoteSearchRequest; + return this; + } + + /** + * Get quoteSearchRequest + * @return quoteSearchRequest + **/ + @javax.annotation.Nullable + public QuoteListRequestQuoteSearchRequest getQuoteSearchRequest() { + return quoteSearchRequest; + } + + public void setQuoteSearchRequest(QuoteListRequestQuoteSearchRequest quoteSearchRequest) { + this.quoteSearchRequest = quoteSearchRequest; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteListRequest quoteListRequest = (QuoteListRequest) o; + return Objects.equals(this.quoteSearchRequest, quoteListRequest.quoteSearchRequest); + } + + @Override + public int hashCode() { + return Objects.hash(quoteSearchRequest); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteListRequest {\n"); + sb.append(" quoteSearchRequest: ").append(toIndentedString(quoteSearchRequest)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("quoteSearchRequest"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteListRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteListRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteListRequest is not found in the empty JSON string", QuoteListRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteListRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteListRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `quoteSearchRequest` + if (jsonObj.get("quoteSearchRequest") != null && !jsonObj.get("quoteSearchRequest").isJsonNull()) { + QuoteListRequestQuoteSearchRequest.validateJsonElement(jsonObj.get("quoteSearchRequest")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteListRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteListRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteListRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteListRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteListRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteListRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteListRequest + * @throws IOException if the JSON string is invalid with respect to QuoteListRequest + */ + public static QuoteListRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteListRequest.class); + } + + /** + * Convert an instance of QuoteListRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteListRequestQuoteSearchRequest.java b/src/main/java/xiresellers/client/model/QuoteListRequestQuoteSearchRequest.java new file mode 100644 index 00000000..a190e258 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteListRequestQuoteSearchRequest.java @@ -0,0 +1,239 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.QuoteListRequestQuoteSearchRequestRequestPreamble; +import xiresellers.client.model.QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteListRequestQuoteSearchRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteListRequestQuoteSearchRequest { + public static final String SERIALIZED_NAME_REQUEST_PREAMBLE = "requestPreamble"; + @SerializedName(SERIALIZED_NAME_REQUEST_PREAMBLE) + private QuoteListRequestQuoteSearchRequestRequestPreamble requestPreamble; + + public static final String SERIALIZED_NAME_RETRIEVE_QUOTE_REQUEST = "retrieveQuoteRequest"; + @SerializedName(SERIALIZED_NAME_RETRIEVE_QUOTE_REQUEST) + private QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest retrieveQuoteRequest; + + public QuoteListRequestQuoteSearchRequest() { + } + + public QuoteListRequestQuoteSearchRequest requestPreamble(QuoteListRequestQuoteSearchRequestRequestPreamble requestPreamble) { + this.requestPreamble = requestPreamble; + return this; + } + + /** + * Get requestPreamble + * @return requestPreamble + **/ + @javax.annotation.Nullable + public QuoteListRequestQuoteSearchRequestRequestPreamble getRequestPreamble() { + return requestPreamble; + } + + public void setRequestPreamble(QuoteListRequestQuoteSearchRequestRequestPreamble requestPreamble) { + this.requestPreamble = requestPreamble; + } + + + public QuoteListRequestQuoteSearchRequest retrieveQuoteRequest(QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest retrieveQuoteRequest) { + this.retrieveQuoteRequest = retrieveQuoteRequest; + return this; + } + + /** + * Get retrieveQuoteRequest + * @return retrieveQuoteRequest + **/ + @javax.annotation.Nullable + public QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest getRetrieveQuoteRequest() { + return retrieveQuoteRequest; + } + + public void setRetrieveQuoteRequest(QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest retrieveQuoteRequest) { + this.retrieveQuoteRequest = retrieveQuoteRequest; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteListRequestQuoteSearchRequest quoteListRequestQuoteSearchRequest = (QuoteListRequestQuoteSearchRequest) o; + return Objects.equals(this.requestPreamble, quoteListRequestQuoteSearchRequest.requestPreamble) && + Objects.equals(this.retrieveQuoteRequest, quoteListRequestQuoteSearchRequest.retrieveQuoteRequest); + } + + @Override + public int hashCode() { + return Objects.hash(requestPreamble, retrieveQuoteRequest); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteListRequestQuoteSearchRequest {\n"); + sb.append(" requestPreamble: ").append(toIndentedString(requestPreamble)).append("\n"); + sb.append(" retrieveQuoteRequest: ").append(toIndentedString(retrieveQuoteRequest)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("requestPreamble"); + openapiFields.add("retrieveQuoteRequest"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteListRequestQuoteSearchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteListRequestQuoteSearchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteListRequestQuoteSearchRequest is not found in the empty JSON string", QuoteListRequestQuoteSearchRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteListRequestQuoteSearchRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteListRequestQuoteSearchRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `requestPreamble` + if (jsonObj.get("requestPreamble") != null && !jsonObj.get("requestPreamble").isJsonNull()) { + QuoteListRequestQuoteSearchRequestRequestPreamble.validateJsonElement(jsonObj.get("requestPreamble")); + } + // validate the optional field `retrieveQuoteRequest` + if (jsonObj.get("retrieveQuoteRequest") != null && !jsonObj.get("retrieveQuoteRequest").isJsonNull()) { + QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest.validateJsonElement(jsonObj.get("retrieveQuoteRequest")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteListRequestQuoteSearchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteListRequestQuoteSearchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteListRequestQuoteSearchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteListRequestQuoteSearchRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteListRequestQuoteSearchRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteListRequestQuoteSearchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteListRequestQuoteSearchRequest + * @throws IOException if the JSON string is invalid with respect to QuoteListRequestQuoteSearchRequest + */ + public static QuoteListRequestQuoteSearchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteListRequestQuoteSearchRequest.class); + } + + /** + * Convert an instance of QuoteListRequestQuoteSearchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteListRequestQuoteSearchRequestRequestPreamble.java b/src/main/java/xiresellers/client/model/QuoteListRequestQuoteSearchRequestRequestPreamble.java new file mode 100644 index 00000000..61071257 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteListRequestQuoteSearchRequestRequestPreamble.java @@ -0,0 +1,273 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteListRequestQuoteSearchRequestRequestPreamble + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteListRequestQuoteSearchRequestRequestPreamble { + public static final String SERIALIZED_NAME_CUSTOMER_NUMBER = "customerNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_NUMBER) + private String customerNumber; + + public static final String SERIALIZED_NAME_CUSTOMER_CONTACT = "customerContact"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_CONTACT) + private String customerContact; + + public static final String SERIALIZED_NAME_ISO_COUNTRY_CODE = "isoCountryCode"; + @SerializedName(SERIALIZED_NAME_ISO_COUNTRY_CODE) + private String isoCountryCode; + + public QuoteListRequestQuoteSearchRequestRequestPreamble() { + } + + public QuoteListRequestQuoteSearchRequestRequestPreamble customerNumber(String customerNumber) { + this.customerNumber = customerNumber; + return this; + } + + /** + * Reseller Number (referred to as the account BCN) is the unique identifier for an Ingram Micro customer account. + * @return customerNumber + **/ + @javax.annotation.Nonnull + public String getCustomerNumber() { + return customerNumber; + } + + public void setCustomerNumber(String customerNumber) { + this.customerNumber = customerNumber; + } + + + public QuoteListRequestQuoteSearchRequestRequestPreamble customerContact(String customerContact) { + this.customerContact = customerContact; + return this; + } + + /** + * Logged in User's email address. + * @return customerContact + **/ + @javax.annotation.Nullable + public String getCustomerContact() { + return customerContact; + } + + public void setCustomerContact(String customerContact) { + this.customerContact = customerContact; + } + + + public QuoteListRequestQuoteSearchRequestRequestPreamble isoCountryCode(String isoCountryCode) { + this.isoCountryCode = isoCountryCode; + return this; + } + + /** + * The ISO country codes are internationally recognized codes designated for each country represented by a two-letter combination (alpha-2). + * @return isoCountryCode + **/ + @javax.annotation.Nonnull + public String getIsoCountryCode() { + return isoCountryCode; + } + + public void setIsoCountryCode(String isoCountryCode) { + this.isoCountryCode = isoCountryCode; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteListRequestQuoteSearchRequestRequestPreamble quoteListRequestQuoteSearchRequestRequestPreamble = (QuoteListRequestQuoteSearchRequestRequestPreamble) o; + return Objects.equals(this.customerNumber, quoteListRequestQuoteSearchRequestRequestPreamble.customerNumber) && + Objects.equals(this.customerContact, quoteListRequestQuoteSearchRequestRequestPreamble.customerContact) && + Objects.equals(this.isoCountryCode, quoteListRequestQuoteSearchRequestRequestPreamble.isoCountryCode); + } + + @Override + public int hashCode() { + return Objects.hash(customerNumber, customerContact, isoCountryCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteListRequestQuoteSearchRequestRequestPreamble {\n"); + sb.append(" customerNumber: ").append(toIndentedString(customerNumber)).append("\n"); + sb.append(" customerContact: ").append(toIndentedString(customerContact)).append("\n"); + sb.append(" isoCountryCode: ").append(toIndentedString(isoCountryCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("customerNumber"); + openapiFields.add("customerContact"); + openapiFields.add("isoCountryCode"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("customerNumber"); + openapiRequiredFields.add("isoCountryCode"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteListRequestQuoteSearchRequestRequestPreamble + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteListRequestQuoteSearchRequestRequestPreamble.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteListRequestQuoteSearchRequestRequestPreamble is not found in the empty JSON string", QuoteListRequestQuoteSearchRequestRequestPreamble.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteListRequestQuoteSearchRequestRequestPreamble.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteListRequestQuoteSearchRequestRequestPreamble` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : QuoteListRequestQuoteSearchRequestRequestPreamble.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("customerNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerNumber").toString())); + } + if ((jsonObj.get("customerContact") != null && !jsonObj.get("customerContact").isJsonNull()) && !jsonObj.get("customerContact").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerContact` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerContact").toString())); + } + if (!jsonObj.get("isoCountryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `isoCountryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isoCountryCode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteListRequestQuoteSearchRequestRequestPreamble.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteListRequestQuoteSearchRequestRequestPreamble' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteListRequestQuoteSearchRequestRequestPreamble.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteListRequestQuoteSearchRequestRequestPreamble value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteListRequestQuoteSearchRequestRequestPreamble read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteListRequestQuoteSearchRequestRequestPreamble given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteListRequestQuoteSearchRequestRequestPreamble + * @throws IOException if the JSON string is invalid with respect to QuoteListRequestQuoteSearchRequestRequestPreamble + */ + public static QuoteListRequestQuoteSearchRequestRequestPreamble fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteListRequestQuoteSearchRequestRequestPreamble.class); + } + + /** + * Convert an instance of QuoteListRequestQuoteSearchRequestRequestPreamble to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest.java b/src/main/java/xiresellers/client/model/QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest.java new file mode 100644 index 00000000..ee585ae6 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest.java @@ -0,0 +1,518 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest { + public static final String SERIALIZED_NAME_QUOTE_NUMBER = "quoteNumber"; + @SerializedName(SERIALIZED_NAME_QUOTE_NUMBER) + private String quoteNumber; + + public static final String SERIALIZED_NAME_BID_NUMBER = "bidNumber"; + @SerializedName(SERIALIZED_NAME_BID_NUMBER) + private String bidNumber; + + public static final String SERIALIZED_NAME_END_USER_NAME = "endUserName"; + @SerializedName(SERIALIZED_NAME_END_USER_NAME) + private String endUserName; + + public static final String SERIALIZED_NAME_FROM_DATE = "fromDate"; + @SerializedName(SERIALIZED_NAME_FROM_DATE) + private LocalDate fromDate; + + public static final String SERIALIZED_NAME_TO_DATE = "toDate"; + @SerializedName(SERIALIZED_NAME_TO_DATE) + private LocalDate toDate; + + public static final String SERIALIZED_NAME_PAGE_INDEX = "pageIndex"; + @SerializedName(SERIALIZED_NAME_PAGE_INDEX) + private String pageIndex; + + public static final String SERIALIZED_NAME_RECORDS_PER_PAGE = "recordsPerPage"; + @SerializedName(SERIALIZED_NAME_RECORDS_PER_PAGE) + private String recordsPerPage; + + /** + * Sort applies to the selected column (sortingColumnName) and may be specified in Ascending (asc) or Descending (desc) order. The default sort is Descending (desc) - most recent first. + */ + @JsonAdapter(SortingEnum.Adapter.class) + public enum SortingEnum { + ASC("asc"), + + DESC("desc"); + + private String value; + + SortingEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SortingEnum fromValue(String value) { + for (SortingEnum b : SortingEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SortingEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SortingEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SortingEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + SortingEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_SORTING = "sorting"; + @SerializedName(SERIALIZED_NAME_SORTING) + private SortingEnum sorting; + + public static final String SERIALIZED_NAME_SORTING_COLUMN_NAME = "sortingColumnName"; + @SerializedName(SERIALIZED_NAME_SORTING_COLUMN_NAME) + private String sortingColumnName; + + public static final String SERIALIZED_NAME_THIRD_PARTY_SOURCE = "thirdPartySource"; + @SerializedName(SERIALIZED_NAME_THIRD_PARTY_SOURCE) + private String thirdPartySource; + + public QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest() { + } + + public QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest quoteNumber(String quoteNumber) { + this.quoteNumber = quoteNumber; + return this; + } + + /** + * Unique identifier generated by Ingram Micro's CRM specific to each quote. When applying a filter to the quoteNumber and including a partial quote number in the filter, all quotes containing any information included in the filter can be retrieved as a subset of all available customer quotes. + * @return quoteNumber + **/ + @javax.annotation.Nullable + public String getQuoteNumber() { + return quoteNumber; + } + + public void setQuoteNumber(String quoteNumber) { + this.quoteNumber = quoteNumber; + } + + + public QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest bidNumber(String bidNumber) { + this.bidNumber = bidNumber; + return this; + } + + /** + * Special Pricing Bid Number, also referred to as a Dart Number by some vendors, is a unique identifier associated with vendor specific products and discounts. + * @return bidNumber + **/ + @javax.annotation.Nullable + public String getBidNumber() { + return bidNumber; + } + + public void setBidNumber(String bidNumber) { + this.bidNumber = bidNumber; + } + + + public QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest endUserName(String endUserName) { + this.endUserName = endUserName; + return this; + } + + /** + * End User Name is the end customer name that is associated with a quote in Ingram Micro's CRM + * @return endUserName + **/ + @javax.annotation.Nullable + public String getEndUserName() { + return endUserName; + } + + public void setEndUserName(String endUserName) { + this.endUserName = endUserName; + } + + + public QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest fromDate(LocalDate fromDate) { + this.fromDate = fromDate; + return this; + } + + /** + * Filter to select the beginning date of a desired date range. The default filter is set to the date the user is logged-in to request quotes. Date format: YYYY-MM-DD - An incorrect date input will result in a message \"Date must be entered as YYYY-MM-DD\" + * @return fromDate + **/ + @javax.annotation.Nullable + public LocalDate getFromDate() { + return fromDate; + } + + public void setFromDate(LocalDate fromDate) { + this.fromDate = fromDate; + } + + + public QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest toDate(LocalDate toDate) { + this.toDate = toDate; + return this; + } + + /** + * Filter to select the end date of a desired date range. The default number of days to request is the previous 30 days from the date user has logged in. Date format: YYYY-MM-DD - An incorrect date input will result in a message \"Date must be entered as YYYY-MM-DD\" + * @return toDate + **/ + @javax.annotation.Nullable + public LocalDate getToDate() { + return toDate; + } + + public void setToDate(LocalDate toDate) { + this.toDate = toDate; + } + + + public QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest pageIndex(String pageIndex) { + this.pageIndex = pageIndex; + return this; + } + + /** + * Page index or page number for the list of quotes being returned. When less than 25 quotes are returned, the page number will be \"1\". In cases where more than 25 quotes are returned, and the default quotes per page are 25 (see recordPerPage), then the list will continue on subsequent pages. + * @return pageIndex + **/ + @javax.annotation.Nullable + public String getPageIndex() { + return pageIndex; + } + + public void setPageIndex(String pageIndex) { + this.pageIndex = pageIndex; + } + + + public QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest recordsPerPage(String recordsPerPage) { + this.recordsPerPage = recordsPerPage; + return this; + } + + /** + * Number of records (quotes) to display per page in the quote list. The default is 25, but may be increased using the filter by up to 100 records per page. If more than 100 records are requested a message will be returned \"The number of records requested exceeds the 100 record limit.\" + * @return recordsPerPage + **/ + @javax.annotation.Nullable + public String getRecordsPerPage() { + return recordsPerPage; + } + + public void setRecordsPerPage(String recordsPerPage) { + this.recordsPerPage = recordsPerPage; + } + + + public QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest sorting(SortingEnum sorting) { + this.sorting = sorting; + return this; + } + + /** + * Sort applies to the selected column (sortingColumnName) and may be specified in Ascending (asc) or Descending (desc) order. The default sort is Descending (desc) - most recent first. + * @return sorting + **/ + @javax.annotation.Nullable + public SortingEnum getSorting() { + return sorting; + } + + public void setSorting(SortingEnum sorting) { + this.sorting = sorting; + } + + + public QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest sortingColumnName(String sortingColumnName) { + this.sortingColumnName = sortingColumnName; + return this; + } + + /** + * Refers to the column selected to apply the sorting criteria. The default column is dateCreated and will sort by the most recently created quote first with the following in descending order. The default filter retrieves quotes created within the last 30 days. Filtering allows user to select a specific column to sort: quoteNumber, createdDate, lastModifiedDate, expiryDate, and endUserName. + * @return sortingColumnName + **/ + @javax.annotation.Nullable + public String getSortingColumnName() { + return sortingColumnName; + } + + public void setSortingColumnName(String sortingColumnName) { + this.sortingColumnName = sortingColumnName; + } + + + public QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest thirdPartySource(String thirdPartySource) { + this.thirdPartySource = thirdPartySource; + return this; + } + + /** + * Unique identifier used to identify the third party source accessing the services. + * @return thirdPartySource + **/ + @javax.annotation.Nullable + public String getThirdPartySource() { + return thirdPartySource; + } + + public void setThirdPartySource(String thirdPartySource) { + this.thirdPartySource = thirdPartySource; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest quoteListRequestQuoteSearchRequestRetrieveQuoteRequest = (QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest) o; + return Objects.equals(this.quoteNumber, quoteListRequestQuoteSearchRequestRetrieveQuoteRequest.quoteNumber) && + Objects.equals(this.bidNumber, quoteListRequestQuoteSearchRequestRetrieveQuoteRequest.bidNumber) && + Objects.equals(this.endUserName, quoteListRequestQuoteSearchRequestRetrieveQuoteRequest.endUserName) && + Objects.equals(this.fromDate, quoteListRequestQuoteSearchRequestRetrieveQuoteRequest.fromDate) && + Objects.equals(this.toDate, quoteListRequestQuoteSearchRequestRetrieveQuoteRequest.toDate) && + Objects.equals(this.pageIndex, quoteListRequestQuoteSearchRequestRetrieveQuoteRequest.pageIndex) && + Objects.equals(this.recordsPerPage, quoteListRequestQuoteSearchRequestRetrieveQuoteRequest.recordsPerPage) && + Objects.equals(this.sorting, quoteListRequestQuoteSearchRequestRetrieveQuoteRequest.sorting) && + Objects.equals(this.sortingColumnName, quoteListRequestQuoteSearchRequestRetrieveQuoteRequest.sortingColumnName) && + Objects.equals(this.thirdPartySource, quoteListRequestQuoteSearchRequestRetrieveQuoteRequest.thirdPartySource); + } + + @Override + public int hashCode() { + return Objects.hash(quoteNumber, bidNumber, endUserName, fromDate, toDate, pageIndex, recordsPerPage, sorting, sortingColumnName, thirdPartySource); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest {\n"); + sb.append(" quoteNumber: ").append(toIndentedString(quoteNumber)).append("\n"); + sb.append(" bidNumber: ").append(toIndentedString(bidNumber)).append("\n"); + sb.append(" endUserName: ").append(toIndentedString(endUserName)).append("\n"); + sb.append(" fromDate: ").append(toIndentedString(fromDate)).append("\n"); + sb.append(" toDate: ").append(toIndentedString(toDate)).append("\n"); + sb.append(" pageIndex: ").append(toIndentedString(pageIndex)).append("\n"); + sb.append(" recordsPerPage: ").append(toIndentedString(recordsPerPage)).append("\n"); + sb.append(" sorting: ").append(toIndentedString(sorting)).append("\n"); + sb.append(" sortingColumnName: ").append(toIndentedString(sortingColumnName)).append("\n"); + sb.append(" thirdPartySource: ").append(toIndentedString(thirdPartySource)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("quoteNumber"); + openapiFields.add("bidNumber"); + openapiFields.add("endUserName"); + openapiFields.add("fromDate"); + openapiFields.add("toDate"); + openapiFields.add("pageIndex"); + openapiFields.add("recordsPerPage"); + openapiFields.add("sorting"); + openapiFields.add("sortingColumnName"); + openapiFields.add("thirdPartySource"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest is not found in the empty JSON string", QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("quoteNumber") != null && !jsonObj.get("quoteNumber").isJsonNull()) && !jsonObj.get("quoteNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quoteNumber").toString())); + } + if ((jsonObj.get("bidNumber") != null && !jsonObj.get("bidNumber").isJsonNull()) && !jsonObj.get("bidNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `bidNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bidNumber").toString())); + } + if ((jsonObj.get("endUserName") != null && !jsonObj.get("endUserName").isJsonNull()) && !jsonObj.get("endUserName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endUserName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endUserName").toString())); + } + if ((jsonObj.get("pageIndex") != null && !jsonObj.get("pageIndex").isJsonNull()) && !jsonObj.get("pageIndex").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `pageIndex` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pageIndex").toString())); + } + if ((jsonObj.get("recordsPerPage") != null && !jsonObj.get("recordsPerPage").isJsonNull()) && !jsonObj.get("recordsPerPage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recordsPerPage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordsPerPage").toString())); + } + if ((jsonObj.get("sorting") != null && !jsonObj.get("sorting").isJsonNull()) && !jsonObj.get("sorting").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sorting` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sorting").toString())); + } + // validate the optional field `sorting` + if (jsonObj.get("sorting") != null && !jsonObj.get("sorting").isJsonNull()) { + SortingEnum.validateJsonElement(jsonObj.get("sorting")); + } + if ((jsonObj.get("sortingColumnName") != null && !jsonObj.get("sortingColumnName").isJsonNull()) && !jsonObj.get("sortingColumnName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sortingColumnName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sortingColumnName").toString())); + } + if ((jsonObj.get("thirdPartySource") != null && !jsonObj.get("thirdPartySource").isJsonNull()) && !jsonObj.get("thirdPartySource").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `thirdPartySource` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thirdPartySource").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest + * @throws IOException if the JSON string is invalid with respect to QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest + */ + public static QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest.class); + } + + /** + * Convert an instance of QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteListResponse.java b/src/main/java/xiresellers/client/model/QuoteListResponse.java new file mode 100644 index 00000000..72fbb513 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteListResponse.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.QuoteListResponseQuoteSearchResponse; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * Response schema for get quote list endpoint + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteListResponse { + public static final String SERIALIZED_NAME_QUOTE_SEARCH_RESPONSE = "quoteSearchResponse"; + @SerializedName(SERIALIZED_NAME_QUOTE_SEARCH_RESPONSE) + private QuoteListResponseQuoteSearchResponse quoteSearchResponse; + + public QuoteListResponse() { + } + + public QuoteListResponse quoteSearchResponse(QuoteListResponseQuoteSearchResponse quoteSearchResponse) { + this.quoteSearchResponse = quoteSearchResponse; + return this; + } + + /** + * Get quoteSearchResponse + * @return quoteSearchResponse + **/ + @javax.annotation.Nullable + public QuoteListResponseQuoteSearchResponse getQuoteSearchResponse() { + return quoteSearchResponse; + } + + public void setQuoteSearchResponse(QuoteListResponseQuoteSearchResponse quoteSearchResponse) { + this.quoteSearchResponse = quoteSearchResponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteListResponse quoteListResponse = (QuoteListResponse) o; + return Objects.equals(this.quoteSearchResponse, quoteListResponse.quoteSearchResponse); + } + + @Override + public int hashCode() { + return Objects.hash(quoteSearchResponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteListResponse {\n"); + sb.append(" quoteSearchResponse: ").append(toIndentedString(quoteSearchResponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("quoteSearchResponse"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteListResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteListResponse is not found in the empty JSON string", QuoteListResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteListResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteListResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `quoteSearchResponse` + if (jsonObj.get("quoteSearchResponse") != null && !jsonObj.get("quoteSearchResponse").isJsonNull()) { + QuoteListResponseQuoteSearchResponse.validateJsonElement(jsonObj.get("quoteSearchResponse")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteListResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteListResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteListResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteListResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteListResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteListResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteListResponse + * @throws IOException if the JSON string is invalid with respect to QuoteListResponse + */ + public static QuoteListResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteListResponse.class); + } + + /** + * Convert an instance of QuoteListResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteListResponseQuoteSearchResponse.java b/src/main/java/xiresellers/client/model/QuoteListResponseQuoteSearchResponse.java new file mode 100644 index 00000000..886205f4 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteListResponseQuoteSearchResponse.java @@ -0,0 +1,285 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.QuoteListResponseQuoteSearchResponseQuoteListInner; +import xiresellers.client.model.QuoteListResponseQuoteSearchResponseResponsePreamble; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteListResponseQuoteSearchResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteListResponseQuoteSearchResponse { + public static final String SERIALIZED_NAME_RESPONSE_PREAMBLE = "responsePreamble"; + @SerializedName(SERIALIZED_NAME_RESPONSE_PREAMBLE) + private QuoteListResponseQuoteSearchResponseResponsePreamble responsePreamble; + + public static final String SERIALIZED_NAME_QUOTE_LIST = "quoteList"; + @SerializedName(SERIALIZED_NAME_QUOTE_LIST) + private List quoteList; + + public static final String SERIALIZED_NAME_TOTAL_COUNT = "totalCount"; + @SerializedName(SERIALIZED_NAME_TOTAL_COUNT) + private Integer totalCount; + + public QuoteListResponseQuoteSearchResponse() { + } + + public QuoteListResponseQuoteSearchResponse responsePreamble(QuoteListResponseQuoteSearchResponseResponsePreamble responsePreamble) { + this.responsePreamble = responsePreamble; + return this; + } + + /** + * Get responsePreamble + * @return responsePreamble + **/ + @javax.annotation.Nullable + public QuoteListResponseQuoteSearchResponseResponsePreamble getResponsePreamble() { + return responsePreamble; + } + + public void setResponsePreamble(QuoteListResponseQuoteSearchResponseResponsePreamble responsePreamble) { + this.responsePreamble = responsePreamble; + } + + + public QuoteListResponseQuoteSearchResponse quoteList(List quoteList) { + this.quoteList = quoteList; + return this; + } + + public QuoteListResponseQuoteSearchResponse addQuoteListItem(QuoteListResponseQuoteSearchResponseQuoteListInner quoteListItem) { + if (this.quoteList == null) { + this.quoteList = new ArrayList<>(); + } + this.quoteList.add(quoteListItem); + return this; + } + + /** + * Get quoteList + * @return quoteList + **/ + @javax.annotation.Nullable + public List getQuoteList() { + return quoteList; + } + + public void setQuoteList(List quoteList) { + this.quoteList = quoteList; + } + + + public QuoteListResponseQuoteSearchResponse totalCount(Integer totalCount) { + this.totalCount = totalCount; + return this; + } + + /** + * Total count of quotes retrieved in the request response. + * @return totalCount + **/ + @javax.annotation.Nullable + public Integer getTotalCount() { + return totalCount; + } + + public void setTotalCount(Integer totalCount) { + this.totalCount = totalCount; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteListResponseQuoteSearchResponse quoteListResponseQuoteSearchResponse = (QuoteListResponseQuoteSearchResponse) o; + return Objects.equals(this.responsePreamble, quoteListResponseQuoteSearchResponse.responsePreamble) && + Objects.equals(this.quoteList, quoteListResponseQuoteSearchResponse.quoteList) && + Objects.equals(this.totalCount, quoteListResponseQuoteSearchResponse.totalCount); + } + + @Override + public int hashCode() { + return Objects.hash(responsePreamble, quoteList, totalCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteListResponseQuoteSearchResponse {\n"); + sb.append(" responsePreamble: ").append(toIndentedString(responsePreamble)).append("\n"); + sb.append(" quoteList: ").append(toIndentedString(quoteList)).append("\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("responsePreamble"); + openapiFields.add("quoteList"); + openapiFields.add("totalCount"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteListResponseQuoteSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteListResponseQuoteSearchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteListResponseQuoteSearchResponse is not found in the empty JSON string", QuoteListResponseQuoteSearchResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteListResponseQuoteSearchResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteListResponseQuoteSearchResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `responsePreamble` + if (jsonObj.get("responsePreamble") != null && !jsonObj.get("responsePreamble").isJsonNull()) { + QuoteListResponseQuoteSearchResponseResponsePreamble.validateJsonElement(jsonObj.get("responsePreamble")); + } + if (jsonObj.get("quoteList") != null && !jsonObj.get("quoteList").isJsonNull()) { + JsonArray jsonArrayquoteList = jsonObj.getAsJsonArray("quoteList"); + if (jsonArrayquoteList != null) { + // ensure the json data is an array + if (!jsonObj.get("quoteList").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteList` to be an array in the JSON string but got `%s`", jsonObj.get("quoteList").toString())); + } + + // validate the optional field `quoteList` (array) + for (int i = 0; i < jsonArrayquoteList.size(); i++) { + QuoteListResponseQuoteSearchResponseQuoteListInner.validateJsonElement(jsonArrayquoteList.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteListResponseQuoteSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteListResponseQuoteSearchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteListResponseQuoteSearchResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteListResponseQuoteSearchResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteListResponseQuoteSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteListResponseQuoteSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteListResponseQuoteSearchResponse + * @throws IOException if the JSON string is invalid with respect to QuoteListResponseQuoteSearchResponse + */ + public static QuoteListResponseQuoteSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteListResponseQuoteSearchResponse.class); + } + + /** + * Convert an instance of QuoteListResponseQuoteSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteListResponseQuoteSearchResponseQuoteListInner.java b/src/main/java/xiresellers/client/model/QuoteListResponseQuoteSearchResponseQuoteListInner.java new file mode 100644 index 00000000..13c5fa84 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteListResponseQuoteSearchResponseQuoteListInner.java @@ -0,0 +1,456 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteListResponseQuoteSearchResponseQuoteListInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteListResponseQuoteSearchResponseQuoteListInner { + public static final String SERIALIZED_NAME_QUOTE_NAME = "quoteName"; + @SerializedName(SERIALIZED_NAME_QUOTE_NAME) + private String quoteName; + + public static final String SERIALIZED_NAME_QUOTE_NUMBER = "quoteNumber"; + @SerializedName(SERIALIZED_NAME_QUOTE_NUMBER) + private String quoteNumber; + + public static final String SERIALIZED_NAME_REVISION_NUMBER = "revisionNumber"; + @SerializedName(SERIALIZED_NAME_REVISION_NUMBER) + private Integer revisionNumber; + + public static final String SERIALIZED_NAME_END_USER_NAME = "endUserName"; + @SerializedName(SERIALIZED_NAME_END_USER_NAME) + private String endUserName; + + public static final String SERIALIZED_NAME_BID_NUMBER = "bidNumber"; + @SerializedName(SERIALIZED_NAME_BID_NUMBER) + private String bidNumber; + + public static final String SERIALIZED_NAME_TOTAL_AMOUNT = "totalAmount"; + @SerializedName(SERIALIZED_NAME_TOTAL_AMOUNT) + private String totalAmount; + + public static final String SERIALIZED_NAME_QUOTE_STATUS = "quoteStatus"; + @SerializedName(SERIALIZED_NAME_QUOTE_STATUS) + private String quoteStatus; + + public static final String SERIALIZED_NAME_CREATED_DATE = "createdDate"; + @SerializedName(SERIALIZED_NAME_CREATED_DATE) + private LocalDate createdDate; + + public static final String SERIALIZED_NAME_LAST_MODIFIED_DATE = "lastModifiedDate"; + @SerializedName(SERIALIZED_NAME_LAST_MODIFIED_DATE) + private LocalDate lastModifiedDate; + + public static final String SERIALIZED_NAME_QUOTE_EXPIRY_DATE = "quoteExpiryDate"; + @SerializedName(SERIALIZED_NAME_QUOTE_EXPIRY_DATE) + private LocalDate quoteExpiryDate; + + public QuoteListResponseQuoteSearchResponseQuoteListInner() { + } + + public QuoteListResponseQuoteSearchResponseQuoteListInner quoteName(String quoteName) { + this.quoteName = quoteName; + return this; + } + + /** + * Quote Name given to quote by sales team or system generated. Generally used as a reference to identify the quote. + * @return quoteName + **/ + @javax.annotation.Nullable + public String getQuoteName() { + return quoteName; + } + + public void setQuoteName(String quoteName) { + this.quoteName = quoteName; + } + + + public QuoteListResponseQuoteSearchResponseQuoteListInner quoteNumber(String quoteNumber) { + this.quoteNumber = quoteNumber; + return this; + } + + /** + * Unique identifier generated by Ingram Micro's CRM specific to each quote. When applying a filter to the quoteNumber and including a partial quote number in the filter, all quotes containing any information included in the filter can be retrieved as a subset of all available customer quotes. + * @return quoteNumber + **/ + @javax.annotation.Nullable + public String getQuoteNumber() { + return quoteNumber; + } + + public void setQuoteNumber(String quoteNumber) { + this.quoteNumber = quoteNumber; + } + + + public QuoteListResponseQuoteSearchResponseQuoteListInner revisionNumber(Integer revisionNumber) { + this.revisionNumber = revisionNumber; + return this; + } + + /** + * When a quote has been revised and updated, the quote number remains the same throughout the lifecycle of the quote, however, a Revision number is updated for each revision of the quote. The revision numbers is associated with the Unique Quote Number. + * @return revisionNumber + **/ + @javax.annotation.Nullable + public Integer getRevisionNumber() { + return revisionNumber; + } + + public void setRevisionNumber(Integer revisionNumber) { + this.revisionNumber = revisionNumber; + } + + + public QuoteListResponseQuoteSearchResponseQuoteListInner endUserName(String endUserName) { + this.endUserName = endUserName; + return this; + } + + /** + * End User Name is the end customer name that is associated with a quote in Ingram Micro's CRM + * @return endUserName + **/ + @javax.annotation.Nullable + public String getEndUserName() { + return endUserName; + } + + public void setEndUserName(String endUserName) { + this.endUserName = endUserName; + } + + + public QuoteListResponseQuoteSearchResponseQuoteListInner bidNumber(String bidNumber) { + this.bidNumber = bidNumber; + return this; + } + + /** + * Special Pricing Bid Number, also refers to as Dart Number relates to a unique pricing deal associated with a vendor for the quote. + * @return bidNumber + **/ + @javax.annotation.Nullable + public String getBidNumber() { + return bidNumber; + } + + public void setBidNumber(String bidNumber) { + this.bidNumber = bidNumber; + } + + + public QuoteListResponseQuoteSearchResponseQuoteListInner totalAmount(String totalAmount) { + this.totalAmount = totalAmount; + return this; + } + + /** + * Total amount of quoted price for all products in the quote. + * @return totalAmount + **/ + @javax.annotation.Nullable + public String getTotalAmount() { + return totalAmount; + } + + public void setTotalAmount(String totalAmount) { + this.totalAmount = totalAmount; + } + + + public QuoteListResponseQuoteSearchResponseQuoteListInner quoteStatus(String quoteStatus) { + this.quoteStatus = quoteStatus; + return this; + } + + /** + * This refers to the primary status of the quote. API responses will return: Active + * @return quoteStatus + **/ + @javax.annotation.Nullable + public String getQuoteStatus() { + return quoteStatus; + } + + public void setQuoteStatus(String quoteStatus) { + this.quoteStatus = quoteStatus; + } + + + public QuoteListResponseQuoteSearchResponseQuoteListInner createdDate(LocalDate createdDate) { + this.createdDate = createdDate; + return this; + } + + /** + * Date the Quote was initially Created + * @return createdDate + **/ + @javax.annotation.Nullable + public LocalDate getCreatedDate() { + return createdDate; + } + + public void setCreatedDate(LocalDate createdDate) { + this.createdDate = createdDate; + } + + + public QuoteListResponseQuoteSearchResponseQuoteListInner lastModifiedDate(LocalDate lastModifiedDate) { + this.lastModifiedDate = lastModifiedDate; + return this; + } + + /** + * Date the Quote was last updated or modified. + * @return lastModifiedDate + **/ + @javax.annotation.Nullable + public LocalDate getLastModifiedDate() { + return lastModifiedDate; + } + + public void setLastModifiedDate(LocalDate lastModifiedDate) { + this.lastModifiedDate = lastModifiedDate; + } + + + public QuoteListResponseQuoteSearchResponseQuoteListInner quoteExpiryDate(LocalDate quoteExpiryDate) { + this.quoteExpiryDate = quoteExpiryDate; + return this; + } + + /** + * Date the Quote Expires + * @return quoteExpiryDate + **/ + @javax.annotation.Nullable + public LocalDate getQuoteExpiryDate() { + return quoteExpiryDate; + } + + public void setQuoteExpiryDate(LocalDate quoteExpiryDate) { + this.quoteExpiryDate = quoteExpiryDate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteListResponseQuoteSearchResponseQuoteListInner quoteListResponseQuoteSearchResponseQuoteListInner = (QuoteListResponseQuoteSearchResponseQuoteListInner) o; + return Objects.equals(this.quoteName, quoteListResponseQuoteSearchResponseQuoteListInner.quoteName) && + Objects.equals(this.quoteNumber, quoteListResponseQuoteSearchResponseQuoteListInner.quoteNumber) && + Objects.equals(this.revisionNumber, quoteListResponseQuoteSearchResponseQuoteListInner.revisionNumber) && + Objects.equals(this.endUserName, quoteListResponseQuoteSearchResponseQuoteListInner.endUserName) && + Objects.equals(this.bidNumber, quoteListResponseQuoteSearchResponseQuoteListInner.bidNumber) && + Objects.equals(this.totalAmount, quoteListResponseQuoteSearchResponseQuoteListInner.totalAmount) && + Objects.equals(this.quoteStatus, quoteListResponseQuoteSearchResponseQuoteListInner.quoteStatus) && + Objects.equals(this.createdDate, quoteListResponseQuoteSearchResponseQuoteListInner.createdDate) && + Objects.equals(this.lastModifiedDate, quoteListResponseQuoteSearchResponseQuoteListInner.lastModifiedDate) && + Objects.equals(this.quoteExpiryDate, quoteListResponseQuoteSearchResponseQuoteListInner.quoteExpiryDate); + } + + @Override + public int hashCode() { + return Objects.hash(quoteName, quoteNumber, revisionNumber, endUserName, bidNumber, totalAmount, quoteStatus, createdDate, lastModifiedDate, quoteExpiryDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteListResponseQuoteSearchResponseQuoteListInner {\n"); + sb.append(" quoteName: ").append(toIndentedString(quoteName)).append("\n"); + sb.append(" quoteNumber: ").append(toIndentedString(quoteNumber)).append("\n"); + sb.append(" revisionNumber: ").append(toIndentedString(revisionNumber)).append("\n"); + sb.append(" endUserName: ").append(toIndentedString(endUserName)).append("\n"); + sb.append(" bidNumber: ").append(toIndentedString(bidNumber)).append("\n"); + sb.append(" totalAmount: ").append(toIndentedString(totalAmount)).append("\n"); + sb.append(" quoteStatus: ").append(toIndentedString(quoteStatus)).append("\n"); + sb.append(" createdDate: ").append(toIndentedString(createdDate)).append("\n"); + sb.append(" lastModifiedDate: ").append(toIndentedString(lastModifiedDate)).append("\n"); + sb.append(" quoteExpiryDate: ").append(toIndentedString(quoteExpiryDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("quoteName"); + openapiFields.add("quoteNumber"); + openapiFields.add("revisionNumber"); + openapiFields.add("endUserName"); + openapiFields.add("bidNumber"); + openapiFields.add("totalAmount"); + openapiFields.add("quoteStatus"); + openapiFields.add("createdDate"); + openapiFields.add("lastModifiedDate"); + openapiFields.add("quoteExpiryDate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteListResponseQuoteSearchResponseQuoteListInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteListResponseQuoteSearchResponseQuoteListInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteListResponseQuoteSearchResponseQuoteListInner is not found in the empty JSON string", QuoteListResponseQuoteSearchResponseQuoteListInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteListResponseQuoteSearchResponseQuoteListInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteListResponseQuoteSearchResponseQuoteListInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("quoteName") != null && !jsonObj.get("quoteName").isJsonNull()) && !jsonObj.get("quoteName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quoteName").toString())); + } + if ((jsonObj.get("quoteNumber") != null && !jsonObj.get("quoteNumber").isJsonNull()) && !jsonObj.get("quoteNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quoteNumber").toString())); + } + if ((jsonObj.get("endUserName") != null && !jsonObj.get("endUserName").isJsonNull()) && !jsonObj.get("endUserName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endUserName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endUserName").toString())); + } + if ((jsonObj.get("bidNumber") != null && !jsonObj.get("bidNumber").isJsonNull()) && !jsonObj.get("bidNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `bidNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bidNumber").toString())); + } + if ((jsonObj.get("totalAmount") != null && !jsonObj.get("totalAmount").isJsonNull()) && !jsonObj.get("totalAmount").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `totalAmount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("totalAmount").toString())); + } + if ((jsonObj.get("quoteStatus") != null && !jsonObj.get("quoteStatus").isJsonNull()) && !jsonObj.get("quoteStatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quoteStatus").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteListResponseQuoteSearchResponseQuoteListInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteListResponseQuoteSearchResponseQuoteListInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteListResponseQuoteSearchResponseQuoteListInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteListResponseQuoteSearchResponseQuoteListInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteListResponseQuoteSearchResponseQuoteListInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteListResponseQuoteSearchResponseQuoteListInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteListResponseQuoteSearchResponseQuoteListInner + * @throws IOException if the JSON string is invalid with respect to QuoteListResponseQuoteSearchResponseQuoteListInner + */ + public static QuoteListResponseQuoteSearchResponseQuoteListInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteListResponseQuoteSearchResponseQuoteListInner.class); + } + + /** + * Convert an instance of QuoteListResponseQuoteSearchResponseQuoteListInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteListResponseQuoteSearchResponseResponsePreamble.java b/src/main/java/xiresellers/client/model/QuoteListResponseQuoteSearchResponseResponsePreamble.java new file mode 100644 index 00000000..231ffd32 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteListResponseQuoteSearchResponseResponsePreamble.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteListResponseQuoteSearchResponseResponsePreamble + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteListResponseQuoteSearchResponseResponsePreamble { + public static final String SERIALIZED_NAME_RESPONSE_STATUS = "responseStatus"; + @SerializedName(SERIALIZED_NAME_RESPONSE_STATUS) + private String responseStatus; + + public static final String SERIALIZED_NAME_RESPONSE_STATUS_CODE = "responseStatusCode"; + @SerializedName(SERIALIZED_NAME_RESPONSE_STATUS_CODE) + private String responseStatusCode; + + public static final String SERIALIZED_NAME_RESPONSE_MESSAGE = "responseMessage"; + @SerializedName(SERIALIZED_NAME_RESPONSE_MESSAGE) + private String responseMessage; + + public QuoteListResponseQuoteSearchResponseResponsePreamble() { + } + + public QuoteListResponseQuoteSearchResponseResponsePreamble responseStatus(String responseStatus) { + this.responseStatus = responseStatus; + return this; + } + + /** + * Status of the Request - \"Passed\", \"Failed\" + * @return responseStatus + **/ + @javax.annotation.Nullable + public String getResponseStatus() { + return responseStatus; + } + + public void setResponseStatus(String responseStatus) { + this.responseStatus = responseStatus; + } + + + public QuoteListResponseQuoteSearchResponseResponsePreamble responseStatusCode(String responseStatusCode) { + this.responseStatusCode = responseStatusCode; + return this; + } + + /** + * responseStatusCode is the code returned in response to a request. The following Codes are returned: 200 400 500 + * @return responseStatusCode + **/ + @javax.annotation.Nullable + public String getResponseStatusCode() { + return responseStatusCode; + } + + public void setResponseStatusCode(String responseStatusCode) { + this.responseStatusCode = responseStatusCode; + } + + + public QuoteListResponseQuoteSearchResponseResponsePreamble responseMessage(String responseMessage) { + this.responseMessage = responseMessage; + return this; + } + + /** + * 200 = Action was successfully received, understood and accepted. 400 = The request contains bad syntax or can not be fullfilled. This means there is a problem with the request. 500 = The server failed to fulfill an apparently valid request. This is a temporary problem, the request should be resubmitted. + * @return responseMessage + **/ + @javax.annotation.Nullable + public String getResponseMessage() { + return responseMessage; + } + + public void setResponseMessage(String responseMessage) { + this.responseMessage = responseMessage; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteListResponseQuoteSearchResponseResponsePreamble quoteListResponseQuoteSearchResponseResponsePreamble = (QuoteListResponseQuoteSearchResponseResponsePreamble) o; + return Objects.equals(this.responseStatus, quoteListResponseQuoteSearchResponseResponsePreamble.responseStatus) && + Objects.equals(this.responseStatusCode, quoteListResponseQuoteSearchResponseResponsePreamble.responseStatusCode) && + Objects.equals(this.responseMessage, quoteListResponseQuoteSearchResponseResponsePreamble.responseMessage); + } + + @Override + public int hashCode() { + return Objects.hash(responseStatus, responseStatusCode, responseMessage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteListResponseQuoteSearchResponseResponsePreamble {\n"); + sb.append(" responseStatus: ").append(toIndentedString(responseStatus)).append("\n"); + sb.append(" responseStatusCode: ").append(toIndentedString(responseStatusCode)).append("\n"); + sb.append(" responseMessage: ").append(toIndentedString(responseMessage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("responseStatus"); + openapiFields.add("responseStatusCode"); + openapiFields.add("responseMessage"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteListResponseQuoteSearchResponseResponsePreamble + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteListResponseQuoteSearchResponseResponsePreamble.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteListResponseQuoteSearchResponseResponsePreamble is not found in the empty JSON string", QuoteListResponseQuoteSearchResponseResponsePreamble.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteListResponseQuoteSearchResponseResponsePreamble.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteListResponseQuoteSearchResponseResponsePreamble` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("responseStatus") != null && !jsonObj.get("responseStatus").isJsonNull()) && !jsonObj.get("responseStatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `responseStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("responseStatus").toString())); + } + if ((jsonObj.get("responseStatusCode") != null && !jsonObj.get("responseStatusCode").isJsonNull()) && !jsonObj.get("responseStatusCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `responseStatusCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("responseStatusCode").toString())); + } + if ((jsonObj.get("responseMessage") != null && !jsonObj.get("responseMessage").isJsonNull()) && !jsonObj.get("responseMessage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `responseMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("responseMessage").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteListResponseQuoteSearchResponseResponsePreamble.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteListResponseQuoteSearchResponseResponsePreamble' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteListResponseQuoteSearchResponseResponsePreamble.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteListResponseQuoteSearchResponseResponsePreamble value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteListResponseQuoteSearchResponseResponsePreamble read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteListResponseQuoteSearchResponseResponsePreamble given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteListResponseQuoteSearchResponseResponsePreamble + * @throws IOException if the JSON string is invalid with respect to QuoteListResponseQuoteSearchResponseResponsePreamble + */ + public static QuoteListResponseQuoteSearchResponseResponsePreamble fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteListResponseQuoteSearchResponseResponsePreamble.class); + } + + /** + * Convert an instance of QuoteListResponseQuoteSearchResponseResponsePreamble to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteProductList.java b/src/main/java/xiresellers/client/model/QuoteProductList.java new file mode 100644 index 00000000..a63282a5 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteProductList.java @@ -0,0 +1,614 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.QuoteProductListPrice; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteProductList { + public static final String SERIALIZED_NAME_QUOTE_PRODUCT_GUID = "quoteProductGuid"; + @SerializedName(SERIALIZED_NAME_QUOTE_PRODUCT_GUID) + private String quoteProductGuid; + + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + @SerializedName(SERIALIZED_NAME_QUANTITY) + private String quantity; + + public static final String SERIALIZED_NAME_COMMENTS = "comments"; + @SerializedName(SERIALIZED_NAME_COMMENTS) + private String comments; + + public static final String SERIALIZED_NAME_BID_START_DATE = "bidStartDate"; + @SerializedName(SERIALIZED_NAME_BID_START_DATE) + private String bidStartDate; + + public static final String SERIALIZED_NAME_BID_EXPIRY_DATE = "bidExpiryDate"; + @SerializedName(SERIALIZED_NAME_BID_EXPIRY_DATE) + private String bidExpiryDate; + + public static final String SERIALIZED_NAME_SKU = "sku"; + @SerializedName(SERIALIZED_NAME_SKU) + private String sku; + + public static final String SERIALIZED_NAME_LINE_NUMBER = "lineNumber"; + @SerializedName(SERIALIZED_NAME_LINE_NUMBER) + private String lineNumber; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_VENDOR_PART_NUMBER = "vendorPartNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_PART_NUMBER) + private String vendorPartNumber; + + public static final String SERIALIZED_NAME_WEIGHT = "weight"; + @SerializedName(SERIALIZED_NAME_WEIGHT) + private String weight; + + public static final String SERIALIZED_NAME_IS_SUGGESTION_PRODUCT = "isSuggestionProduct"; + @SerializedName(SERIALIZED_NAME_IS_SUGGESTION_PRODUCT) + private String isSuggestionProduct; + + public static final String SERIALIZED_NAME_VPN_CATEGORY = "vpnCategory"; + @SerializedName(SERIALIZED_NAME_VPN_CATEGORY) + private String vpnCategory; + + public static final String SERIALIZED_NAME_QUOTE_PRODUCTS_SUPPLIER_PART_AUXILIARY_ID = "quoteProductsSupplierPartAuxiliaryId"; + @SerializedName(SERIALIZED_NAME_QUOTE_PRODUCTS_SUPPLIER_PART_AUXILIARY_ID) + private String quoteProductsSupplierPartAuxiliaryId; + + public static final String SERIALIZED_NAME_QUOTE_PRODUCTS_VENDOR = "quoteProductsVendor"; + @SerializedName(SERIALIZED_NAME_QUOTE_PRODUCTS_VENDOR) + private String quoteProductsVendor; + + public static final String SERIALIZED_NAME_PRICE = "price"; + @SerializedName(SERIALIZED_NAME_PRICE) + private QuoteProductListPrice price; + + public QuoteProductList() { + } + + public QuoteProductList quoteProductGuid(String quoteProductGuid) { + this.quoteProductGuid = quoteProductGuid; + return this; + } + + /** + * Get quoteProductGuid + * @return quoteProductGuid + **/ + @javax.annotation.Nullable + public String getQuoteProductGuid() { + return quoteProductGuid; + } + + public void setQuoteProductGuid(String quoteProductGuid) { + this.quoteProductGuid = quoteProductGuid; + } + + + public QuoteProductList quantity(String quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + **/ + @javax.annotation.Nullable + public String getQuantity() { + return quantity; + } + + public void setQuantity(String quantity) { + this.quantity = quantity; + } + + + public QuoteProductList comments(String comments) { + this.comments = comments; + return this; + } + + /** + * Get comments + * @return comments + **/ + @javax.annotation.Nullable + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + + public QuoteProductList bidStartDate(String bidStartDate) { + this.bidStartDate = bidStartDate; + return this; + } + + /** + * Get bidStartDate + * @return bidStartDate + **/ + @javax.annotation.Nullable + public String getBidStartDate() { + return bidStartDate; + } + + public void setBidStartDate(String bidStartDate) { + this.bidStartDate = bidStartDate; + } + + + public QuoteProductList bidExpiryDate(String bidExpiryDate) { + this.bidExpiryDate = bidExpiryDate; + return this; + } + + /** + * Get bidExpiryDate + * @return bidExpiryDate + **/ + @javax.annotation.Nullable + public String getBidExpiryDate() { + return bidExpiryDate; + } + + public void setBidExpiryDate(String bidExpiryDate) { + this.bidExpiryDate = bidExpiryDate; + } + + + public QuoteProductList sku(String sku) { + this.sku = sku; + return this; + } + + /** + * Get sku + * @return sku + **/ + @javax.annotation.Nullable + public String getSku() { + return sku; + } + + public void setSku(String sku) { + this.sku = sku; + } + + + public QuoteProductList lineNumber(String lineNumber) { + this.lineNumber = lineNumber; + return this; + } + + /** + * Get lineNumber + * @return lineNumber + **/ + @javax.annotation.Nullable + public String getLineNumber() { + return lineNumber; + } + + public void setLineNumber(String lineNumber) { + this.lineNumber = lineNumber; + } + + + public QuoteProductList description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + + public QuoteProductList vendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + return this; + } + + /** + * Get vendorPartNumber + * @return vendorPartNumber + **/ + @javax.annotation.Nullable + public String getVendorPartNumber() { + return vendorPartNumber; + } + + public void setVendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + } + + + public QuoteProductList weight(String weight) { + this.weight = weight; + return this; + } + + /** + * Get weight + * @return weight + **/ + @javax.annotation.Nullable + public String getWeight() { + return weight; + } + + public void setWeight(String weight) { + this.weight = weight; + } + + + public QuoteProductList isSuggestionProduct(String isSuggestionProduct) { + this.isSuggestionProduct = isSuggestionProduct; + return this; + } + + /** + * Get isSuggestionProduct + * @return isSuggestionProduct + **/ + @javax.annotation.Nullable + public String getIsSuggestionProduct() { + return isSuggestionProduct; + } + + public void setIsSuggestionProduct(String isSuggestionProduct) { + this.isSuggestionProduct = isSuggestionProduct; + } + + + public QuoteProductList vpnCategory(String vpnCategory) { + this.vpnCategory = vpnCategory; + return this; + } + + /** + * Get vpnCategory + * @return vpnCategory + **/ + @javax.annotation.Nullable + public String getVpnCategory() { + return vpnCategory; + } + + public void setVpnCategory(String vpnCategory) { + this.vpnCategory = vpnCategory; + } + + + public QuoteProductList quoteProductsSupplierPartAuxiliaryId(String quoteProductsSupplierPartAuxiliaryId) { + this.quoteProductsSupplierPartAuxiliaryId = quoteProductsSupplierPartAuxiliaryId; + return this; + } + + /** + * Get quoteProductsSupplierPartAuxiliaryId + * @return quoteProductsSupplierPartAuxiliaryId + **/ + @javax.annotation.Nullable + public String getQuoteProductsSupplierPartAuxiliaryId() { + return quoteProductsSupplierPartAuxiliaryId; + } + + public void setQuoteProductsSupplierPartAuxiliaryId(String quoteProductsSupplierPartAuxiliaryId) { + this.quoteProductsSupplierPartAuxiliaryId = quoteProductsSupplierPartAuxiliaryId; + } + + + public QuoteProductList quoteProductsVendor(String quoteProductsVendor) { + this.quoteProductsVendor = quoteProductsVendor; + return this; + } + + /** + * Get quoteProductsVendor + * @return quoteProductsVendor + **/ + @javax.annotation.Nullable + public String getQuoteProductsVendor() { + return quoteProductsVendor; + } + + public void setQuoteProductsVendor(String quoteProductsVendor) { + this.quoteProductsVendor = quoteProductsVendor; + } + + + public QuoteProductList price(QuoteProductListPrice price) { + this.price = price; + return this; + } + + /** + * Get price + * @return price + **/ + @javax.annotation.Nullable + public QuoteProductListPrice getPrice() { + return price; + } + + public void setPrice(QuoteProductListPrice price) { + this.price = price; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteProductList quoteProductList = (QuoteProductList) o; + return Objects.equals(this.quoteProductGuid, quoteProductList.quoteProductGuid) && + Objects.equals(this.quantity, quoteProductList.quantity) && + Objects.equals(this.comments, quoteProductList.comments) && + Objects.equals(this.bidStartDate, quoteProductList.bidStartDate) && + Objects.equals(this.bidExpiryDate, quoteProductList.bidExpiryDate) && + Objects.equals(this.sku, quoteProductList.sku) && + Objects.equals(this.lineNumber, quoteProductList.lineNumber) && + Objects.equals(this.description, quoteProductList.description) && + Objects.equals(this.vendorPartNumber, quoteProductList.vendorPartNumber) && + Objects.equals(this.weight, quoteProductList.weight) && + Objects.equals(this.isSuggestionProduct, quoteProductList.isSuggestionProduct) && + Objects.equals(this.vpnCategory, quoteProductList.vpnCategory) && + Objects.equals(this.quoteProductsSupplierPartAuxiliaryId, quoteProductList.quoteProductsSupplierPartAuxiliaryId) && + Objects.equals(this.quoteProductsVendor, quoteProductList.quoteProductsVendor) && + Objects.equals(this.price, quoteProductList.price); + } + + @Override + public int hashCode() { + return Objects.hash(quoteProductGuid, quantity, comments, bidStartDate, bidExpiryDate, sku, lineNumber, description, vendorPartNumber, weight, isSuggestionProduct, vpnCategory, quoteProductsSupplierPartAuxiliaryId, quoteProductsVendor, price); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteProductList {\n"); + sb.append(" quoteProductGuid: ").append(toIndentedString(quoteProductGuid)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" comments: ").append(toIndentedString(comments)).append("\n"); + sb.append(" bidStartDate: ").append(toIndentedString(bidStartDate)).append("\n"); + sb.append(" bidExpiryDate: ").append(toIndentedString(bidExpiryDate)).append("\n"); + sb.append(" sku: ").append(toIndentedString(sku)).append("\n"); + sb.append(" lineNumber: ").append(toIndentedString(lineNumber)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" vendorPartNumber: ").append(toIndentedString(vendorPartNumber)).append("\n"); + sb.append(" weight: ").append(toIndentedString(weight)).append("\n"); + sb.append(" isSuggestionProduct: ").append(toIndentedString(isSuggestionProduct)).append("\n"); + sb.append(" vpnCategory: ").append(toIndentedString(vpnCategory)).append("\n"); + sb.append(" quoteProductsSupplierPartAuxiliaryId: ").append(toIndentedString(quoteProductsSupplierPartAuxiliaryId)).append("\n"); + sb.append(" quoteProductsVendor: ").append(toIndentedString(quoteProductsVendor)).append("\n"); + sb.append(" price: ").append(toIndentedString(price)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("quoteProductGuid"); + openapiFields.add("quantity"); + openapiFields.add("comments"); + openapiFields.add("bidStartDate"); + openapiFields.add("bidExpiryDate"); + openapiFields.add("sku"); + openapiFields.add("lineNumber"); + openapiFields.add("description"); + openapiFields.add("vendorPartNumber"); + openapiFields.add("weight"); + openapiFields.add("isSuggestionProduct"); + openapiFields.add("vpnCategory"); + openapiFields.add("quoteProductsSupplierPartAuxiliaryId"); + openapiFields.add("quoteProductsVendor"); + openapiFields.add("price"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteProductList + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteProductList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteProductList is not found in the empty JSON string", QuoteProductList.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteProductList.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteProductList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("quoteProductGuid") != null && !jsonObj.get("quoteProductGuid").isJsonNull()) && !jsonObj.get("quoteProductGuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteProductGuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quoteProductGuid").toString())); + } + if ((jsonObj.get("quantity") != null && !jsonObj.get("quantity").isJsonNull()) && !jsonObj.get("quantity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quantity").toString())); + } + if ((jsonObj.get("comments") != null && !jsonObj.get("comments").isJsonNull()) && !jsonObj.get("comments").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `comments` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comments").toString())); + } + if ((jsonObj.get("bidStartDate") != null && !jsonObj.get("bidStartDate").isJsonNull()) && !jsonObj.get("bidStartDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `bidStartDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bidStartDate").toString())); + } + if ((jsonObj.get("bidExpiryDate") != null && !jsonObj.get("bidExpiryDate").isJsonNull()) && !jsonObj.get("bidExpiryDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `bidExpiryDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bidExpiryDate").toString())); + } + if ((jsonObj.get("sku") != null && !jsonObj.get("sku").isJsonNull()) && !jsonObj.get("sku").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sku` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sku").toString())); + } + if ((jsonObj.get("lineNumber") != null && !jsonObj.get("lineNumber").isJsonNull()) && !jsonObj.get("lineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lineNumber").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("vendorPartNumber") != null && !jsonObj.get("vendorPartNumber").isJsonNull()) && !jsonObj.get("vendorPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorPartNumber").toString())); + } + if ((jsonObj.get("weight") != null && !jsonObj.get("weight").isJsonNull()) && !jsonObj.get("weight").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `weight` to be a primitive type in the JSON string but got `%s`", jsonObj.get("weight").toString())); + } + if ((jsonObj.get("isSuggestionProduct") != null && !jsonObj.get("isSuggestionProduct").isJsonNull()) && !jsonObj.get("isSuggestionProduct").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `isSuggestionProduct` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isSuggestionProduct").toString())); + } + if ((jsonObj.get("vpnCategory") != null && !jsonObj.get("vpnCategory").isJsonNull()) && !jsonObj.get("vpnCategory").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vpnCategory` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vpnCategory").toString())); + } + if ((jsonObj.get("quoteProductsSupplierPartAuxiliaryId") != null && !jsonObj.get("quoteProductsSupplierPartAuxiliaryId").isJsonNull()) && !jsonObj.get("quoteProductsSupplierPartAuxiliaryId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteProductsSupplierPartAuxiliaryId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quoteProductsSupplierPartAuxiliaryId").toString())); + } + if ((jsonObj.get("quoteProductsVendor") != null && !jsonObj.get("quoteProductsVendor").isJsonNull()) && !jsonObj.get("quoteProductsVendor").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteProductsVendor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quoteProductsVendor").toString())); + } + // validate the optional field `price` + if (jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) { + QuoteProductListPrice.validateJsonElement(jsonObj.get("price")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteProductList.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteProductList' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteProductList.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteProductList value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteProductList read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteProductList given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteProductList + * @throws IOException if the JSON string is invalid with respect to QuoteProductList + */ + public static QuoteProductList fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteProductList.class); + } + + /** + * Convert an instance of QuoteProductList to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteProductListPrice.java b/src/main/java/xiresellers/client/model/QuoteProductListPrice.java new file mode 100644 index 00000000..26c495db --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteProductListPrice.java @@ -0,0 +1,282 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteProductListPrice + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteProductListPrice { + public static final String SERIALIZED_NAME_QUOTE_PRICE = "quotePrice"; + @SerializedName(SERIALIZED_NAME_QUOTE_PRICE) + private BigDecimal quotePrice; + + public static final String SERIALIZED_NAME_MSRP = "msrp"; + @SerializedName(SERIALIZED_NAME_MSRP) + private BigDecimal msrp; + + public static final String SERIALIZED_NAME_EXTENDED_MSRP = "extendedMsrp"; + @SerializedName(SERIALIZED_NAME_EXTENDED_MSRP) + private BigDecimal extendedMsrp; + + public static final String SERIALIZED_NAME_EXTENDED_QUOTE_PRICE = "extendedQuotePrice"; + @SerializedName(SERIALIZED_NAME_EXTENDED_QUOTE_PRICE) + private BigDecimal extendedQuotePrice; + + public QuoteProductListPrice() { + } + + public QuoteProductListPrice quotePrice(BigDecimal quotePrice) { + this.quotePrice = quotePrice; + return this; + } + + /** + * Get quotePrice + * @return quotePrice + **/ + @javax.annotation.Nullable + public BigDecimal getQuotePrice() { + return quotePrice; + } + + public void setQuotePrice(BigDecimal quotePrice) { + this.quotePrice = quotePrice; + } + + + public QuoteProductListPrice msrp(BigDecimal msrp) { + this.msrp = msrp; + return this; + } + + /** + * Get msrp + * @return msrp + **/ + @javax.annotation.Nullable + public BigDecimal getMsrp() { + return msrp; + } + + public void setMsrp(BigDecimal msrp) { + this.msrp = msrp; + } + + + public QuoteProductListPrice extendedMsrp(BigDecimal extendedMsrp) { + this.extendedMsrp = extendedMsrp; + return this; + } + + /** + * Get extendedMsrp + * @return extendedMsrp + **/ + @javax.annotation.Nullable + public BigDecimal getExtendedMsrp() { + return extendedMsrp; + } + + public void setExtendedMsrp(BigDecimal extendedMsrp) { + this.extendedMsrp = extendedMsrp; + } + + + public QuoteProductListPrice extendedQuotePrice(BigDecimal extendedQuotePrice) { + this.extendedQuotePrice = extendedQuotePrice; + return this; + } + + /** + * Get extendedQuotePrice + * @return extendedQuotePrice + **/ + @javax.annotation.Nullable + public BigDecimal getExtendedQuotePrice() { + return extendedQuotePrice; + } + + public void setExtendedQuotePrice(BigDecimal extendedQuotePrice) { + this.extendedQuotePrice = extendedQuotePrice; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteProductListPrice quoteProductListPrice = (QuoteProductListPrice) o; + return Objects.equals(this.quotePrice, quoteProductListPrice.quotePrice) && + Objects.equals(this.msrp, quoteProductListPrice.msrp) && + Objects.equals(this.extendedMsrp, quoteProductListPrice.extendedMsrp) && + Objects.equals(this.extendedQuotePrice, quoteProductListPrice.extendedQuotePrice); + } + + @Override + public int hashCode() { + return Objects.hash(quotePrice, msrp, extendedMsrp, extendedQuotePrice); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteProductListPrice {\n"); + sb.append(" quotePrice: ").append(toIndentedString(quotePrice)).append("\n"); + sb.append(" msrp: ").append(toIndentedString(msrp)).append("\n"); + sb.append(" extendedMsrp: ").append(toIndentedString(extendedMsrp)).append("\n"); + sb.append(" extendedQuotePrice: ").append(toIndentedString(extendedQuotePrice)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("quotePrice"); + openapiFields.add("msrp"); + openapiFields.add("extendedMsrp"); + openapiFields.add("extendedQuotePrice"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteProductListPrice + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteProductListPrice.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteProductListPrice is not found in the empty JSON string", QuoteProductListPrice.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteProductListPrice.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteProductListPrice` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteProductListPrice.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteProductListPrice' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteProductListPrice.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteProductListPrice value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteProductListPrice read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteProductListPrice given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteProductListPrice + * @throws IOException if the JSON string is invalid with respect to QuoteProductListPrice + */ + public static QuoteProductListPrice fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteProductListPrice.class); + } + + /** + * Convert an instance of QuoteProductListPrice to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteSearchResponse.java b/src/main/java/xiresellers/client/model/QuoteSearchResponse.java new file mode 100644 index 00000000..31d249d7 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteSearchResponse.java @@ -0,0 +1,306 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.QuoteSearchResponseQuotesInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteSearchResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteSearchResponse { + public static final String SERIALIZED_NAME_RECORDS_FOUND = "recordsFound"; + @SerializedName(SERIALIZED_NAME_RECORDS_FOUND) + private Integer recordsFound; + + public static final String SERIALIZED_NAME_PAGE_SIZE = "pageSize"; + @SerializedName(SERIALIZED_NAME_PAGE_SIZE) + private Integer pageSize; + + public static final String SERIALIZED_NAME_PAGE_NUMBER = "pageNumber"; + @SerializedName(SERIALIZED_NAME_PAGE_NUMBER) + private Integer pageNumber; + + public static final String SERIALIZED_NAME_QUOTES = "quotes"; + @SerializedName(SERIALIZED_NAME_QUOTES) + private List quotes; + + public QuoteSearchResponse() { + } + + public QuoteSearchResponse recordsFound(Integer recordsFound) { + this.recordsFound = recordsFound; + return this; + } + + /** + * Total count of quotes retrieved in the request response. + * @return recordsFound + **/ + @javax.annotation.Nullable + public Integer getRecordsFound() { + return recordsFound; + } + + public void setRecordsFound(Integer recordsFound) { + this.recordsFound = recordsFound; + } + + + public QuoteSearchResponse pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Number of records (quotes) displayed per page in the quote list. + * @return pageSize + **/ + @javax.annotation.Nullable + public Integer getPageSize() { + return pageSize; + } + + public void setPageSize(Integer pageSize) { + this.pageSize = pageSize; + } + + + public QuoteSearchResponse pageNumber(Integer pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Page index or page number for the list of quotes being returned. + * @return pageNumber + **/ + @javax.annotation.Nullable + public Integer getPageNumber() { + return pageNumber; + } + + public void setPageNumber(Integer pageNumber) { + this.pageNumber = pageNumber; + } + + + public QuoteSearchResponse quotes(List quotes) { + this.quotes = quotes; + return this; + } + + public QuoteSearchResponse addQuotesItem(QuoteSearchResponseQuotesInner quotesItem) { + if (this.quotes == null) { + this.quotes = new ArrayList<>(); + } + this.quotes.add(quotesItem); + return this; + } + + /** + * The quote details for the requested criteria. + * @return quotes + **/ + @javax.annotation.Nullable + public List getQuotes() { + return quotes; + } + + public void setQuotes(List quotes) { + this.quotes = quotes; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteSearchResponse quoteSearchResponse = (QuoteSearchResponse) o; + return Objects.equals(this.recordsFound, quoteSearchResponse.recordsFound) && + Objects.equals(this.pageSize, quoteSearchResponse.pageSize) && + Objects.equals(this.pageNumber, quoteSearchResponse.pageNumber) && + Objects.equals(this.quotes, quoteSearchResponse.quotes); + } + + @Override + public int hashCode() { + return Objects.hash(recordsFound, pageSize, pageNumber, quotes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteSearchResponse {\n"); + sb.append(" recordsFound: ").append(toIndentedString(recordsFound)).append("\n"); + sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); + sb.append(" pageNumber: ").append(toIndentedString(pageNumber)).append("\n"); + sb.append(" quotes: ").append(toIndentedString(quotes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("recordsFound"); + openapiFields.add("pageSize"); + openapiFields.add("pageNumber"); + openapiFields.add("quotes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteSearchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteSearchResponse is not found in the empty JSON string", QuoteSearchResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteSearchResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteSearchResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("quotes") != null && !jsonObj.get("quotes").isJsonNull()) { + JsonArray jsonArrayquotes = jsonObj.getAsJsonArray("quotes"); + if (jsonArrayquotes != null) { + // ensure the json data is an array + if (!jsonObj.get("quotes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `quotes` to be an array in the JSON string but got `%s`", jsonObj.get("quotes").toString())); + } + + // validate the optional field `quotes` (array) + for (int i = 0; i < jsonArrayquotes.size(); i++) { + QuoteSearchResponseQuotesInner.validateJsonElement(jsonArrayquotes.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteSearchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteSearchResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteSearchResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteSearchResponse + * @throws IOException if the JSON string is invalid with respect to QuoteSearchResponse + */ + public static QuoteSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteSearchResponse.class); + } + + /** + * Convert an instance of QuoteSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteSearchResponseQuotesInner.java b/src/main/java/xiresellers/client/model/QuoteSearchResponseQuotesInner.java new file mode 100644 index 00000000..57064909 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteSearchResponseQuotesInner.java @@ -0,0 +1,523 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteSearchResponseQuotesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteSearchResponseQuotesInner { + public static final String SERIALIZED_NAME_QUOTE_NAME = "quoteName"; + @SerializedName(SERIALIZED_NAME_QUOTE_NAME) + private String quoteName; + + public static final String SERIALIZED_NAME_QUOTE_NUMBER = "quoteNumber"; + @SerializedName(SERIALIZED_NAME_QUOTE_NUMBER) + private String quoteNumber; + + public static final String SERIALIZED_NAME_REVISION = "revision"; + @SerializedName(SERIALIZED_NAME_REVISION) + private String revision; + + public static final String SERIALIZED_NAME_END_USER_CONTACT = "endUserContact"; + @SerializedName(SERIALIZED_NAME_END_USER_CONTACT) + private String endUserContact; + + public static final String SERIALIZED_NAME_SPECIAL_BID_NUMBER = "specialBidNumber"; + @SerializedName(SERIALIZED_NAME_SPECIAL_BID_NUMBER) + private String specialBidNumber; + + public static final String SERIALIZED_NAME_QUOTE_TOTAL = "quoteTotal"; + @SerializedName(SERIALIZED_NAME_QUOTE_TOTAL) + private BigDecimal quoteTotal; + + public static final String SERIALIZED_NAME_QUOTE_STATUS = "quoteStatus"; + @SerializedName(SERIALIZED_NAME_QUOTE_STATUS) + private String quoteStatus; + + public static final String SERIALIZED_NAME_INGRAM_QUOTE_DATE = "ingramQuoteDate"; + @SerializedName(SERIALIZED_NAME_INGRAM_QUOTE_DATE) + private String ingramQuoteDate; + + public static final String SERIALIZED_NAME_LAST_MODIFIED_DATE = "lastModifiedDate"; + @SerializedName(SERIALIZED_NAME_LAST_MODIFIED_DATE) + private String lastModifiedDate; + + public static final String SERIALIZED_NAME_INGRAM_QUOTE_EXPIRY_DATE = "ingramQuoteExpiryDate"; + @SerializedName(SERIALIZED_NAME_INGRAM_QUOTE_EXPIRY_DATE) + private String ingramQuoteExpiryDate; + + public static final String SERIALIZED_NAME_VENDOR = "vendor"; + @SerializedName(SERIALIZED_NAME_VENDOR) + private String vendor; + + public static final String SERIALIZED_NAME_CREATED_BY = "createdBy"; + @SerializedName(SERIALIZED_NAME_CREATED_BY) + private String createdBy; + + public QuoteSearchResponseQuotesInner() { + } + + public QuoteSearchResponseQuotesInner quoteName(String quoteName) { + this.quoteName = quoteName; + return this; + } + + /** + * Quote Name given to quote by sales team or system generated. Generally used as a reference to identify the quote. + * @return quoteName + **/ + @javax.annotation.Nullable + public String getQuoteName() { + return quoteName; + } + + public void setQuoteName(String quoteName) { + this.quoteName = quoteName; + } + + + public QuoteSearchResponseQuotesInner quoteNumber(String quoteNumber) { + this.quoteNumber = quoteNumber; + return this; + } + + /** + * Unique identifier generated by Ingram Micros CRM specific to each quote. When applying a filter to the quoteNumber and including a partial quote number in the filter, all quotes containing any information included in the filter can be retrieved as a subset of all available customer quotes. + * @return quoteNumber + **/ + @javax.annotation.Nullable + public String getQuoteNumber() { + return quoteNumber; + } + + public void setQuoteNumber(String quoteNumber) { + this.quoteNumber = quoteNumber; + } + + + public QuoteSearchResponseQuotesInner revision(String revision) { + this.revision = revision; + return this; + } + + /** + * When a quote has been revised and updated, the quote number remains the same throughout the lifecycle of the quote, however, a Revision number is updated for each revision of the quote. The revision numbers is associated with the Unique Quote Number. + * @return revision + **/ + @javax.annotation.Nullable + public String getRevision() { + return revision; + } + + public void setRevision(String revision) { + this.revision = revision; + } + + + public QuoteSearchResponseQuotesInner endUserContact(String endUserContact) { + this.endUserContact = endUserContact; + return this; + } + + /** + * End User Name is the end customer name that is associated with a quote in Ingram Micros CRM. + * @return endUserContact + **/ + @javax.annotation.Nullable + public String getEndUserContact() { + return endUserContact; + } + + public void setEndUserContact(String endUserContact) { + this.endUserContact = endUserContact; + } + + + public QuoteSearchResponseQuotesInner specialBidNumber(String specialBidNumber) { + this.specialBidNumber = specialBidNumber; + return this; + } + + /** + * Special Pricing Bid Number, also refers to as Dart Number relates to a unique pricing deal associated with a vendor for the quote. + * @return specialBidNumber + **/ + @javax.annotation.Nullable + public String getSpecialBidNumber() { + return specialBidNumber; + } + + public void setSpecialBidNumber(String specialBidNumber) { + this.specialBidNumber = specialBidNumber; + } + + + public QuoteSearchResponseQuotesInner quoteTotal(BigDecimal quoteTotal) { + this.quoteTotal = quoteTotal; + return this; + } + + /** + * Total amount of quoted price for all products in the quote. + * @return quoteTotal + **/ + @javax.annotation.Nullable + public BigDecimal getQuoteTotal() { + return quoteTotal; + } + + public void setQuoteTotal(BigDecimal quoteTotal) { + this.quoteTotal = quoteTotal; + } + + + public QuoteSearchResponseQuotesInner quoteStatus(String quoteStatus) { + this.quoteStatus = quoteStatus; + return this; + } + + /** + * This refers to the primary status of the quote. + * @return quoteStatus + **/ + @javax.annotation.Nullable + public String getQuoteStatus() { + return quoteStatus; + } + + public void setQuoteStatus(String quoteStatus) { + this.quoteStatus = quoteStatus; + } + + + public QuoteSearchResponseQuotesInner ingramQuoteDate(String ingramQuoteDate) { + this.ingramQuoteDate = ingramQuoteDate; + return this; + } + + /** + * Date the Quote was initially Created. + * @return ingramQuoteDate + **/ + @javax.annotation.Nullable + public String getIngramQuoteDate() { + return ingramQuoteDate; + } + + public void setIngramQuoteDate(String ingramQuoteDate) { + this.ingramQuoteDate = ingramQuoteDate; + } + + + public QuoteSearchResponseQuotesInner lastModifiedDate(String lastModifiedDate) { + this.lastModifiedDate = lastModifiedDate; + return this; + } + + /** + * Date the Quote was last updated or modified. + * @return lastModifiedDate + **/ + @javax.annotation.Nullable + public String getLastModifiedDate() { + return lastModifiedDate; + } + + public void setLastModifiedDate(String lastModifiedDate) { + this.lastModifiedDate = lastModifiedDate; + } + + + public QuoteSearchResponseQuotesInner ingramQuoteExpiryDate(String ingramQuoteExpiryDate) { + this.ingramQuoteExpiryDate = ingramQuoteExpiryDate; + return this; + } + + /** + * Date when the Quote Expires. + * @return ingramQuoteExpiryDate + **/ + @javax.annotation.Nullable + public String getIngramQuoteExpiryDate() { + return ingramQuoteExpiryDate; + } + + public void setIngramQuoteExpiryDate(String ingramQuoteExpiryDate) { + this.ingramQuoteExpiryDate = ingramQuoteExpiryDate; + } + + + public QuoteSearchResponseQuotesInner vendor(String vendor) { + this.vendor = vendor; + return this; + } + + /** + * Name of the vendor. + * @return vendor + **/ + @javax.annotation.Nullable + public String getVendor() { + return vendor; + } + + public void setVendor(String vendor) { + this.vendor = vendor; + } + + + public QuoteSearchResponseQuotesInner createdBy(String createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + * Name of the end user/customer who created a quote. + * @return createdBy + **/ + @javax.annotation.Nullable + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteSearchResponseQuotesInner quoteSearchResponseQuotesInner = (QuoteSearchResponseQuotesInner) o; + return Objects.equals(this.quoteName, quoteSearchResponseQuotesInner.quoteName) && + Objects.equals(this.quoteNumber, quoteSearchResponseQuotesInner.quoteNumber) && + Objects.equals(this.revision, quoteSearchResponseQuotesInner.revision) && + Objects.equals(this.endUserContact, quoteSearchResponseQuotesInner.endUserContact) && + Objects.equals(this.specialBidNumber, quoteSearchResponseQuotesInner.specialBidNumber) && + Objects.equals(this.quoteTotal, quoteSearchResponseQuotesInner.quoteTotal) && + Objects.equals(this.quoteStatus, quoteSearchResponseQuotesInner.quoteStatus) && + Objects.equals(this.ingramQuoteDate, quoteSearchResponseQuotesInner.ingramQuoteDate) && + Objects.equals(this.lastModifiedDate, quoteSearchResponseQuotesInner.lastModifiedDate) && + Objects.equals(this.ingramQuoteExpiryDate, quoteSearchResponseQuotesInner.ingramQuoteExpiryDate) && + Objects.equals(this.vendor, quoteSearchResponseQuotesInner.vendor) && + Objects.equals(this.createdBy, quoteSearchResponseQuotesInner.createdBy); + } + + @Override + public int hashCode() { + return Objects.hash(quoteName, quoteNumber, revision, endUserContact, specialBidNumber, quoteTotal, quoteStatus, ingramQuoteDate, lastModifiedDate, ingramQuoteExpiryDate, vendor, createdBy); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteSearchResponseQuotesInner {\n"); + sb.append(" quoteName: ").append(toIndentedString(quoteName)).append("\n"); + sb.append(" quoteNumber: ").append(toIndentedString(quoteNumber)).append("\n"); + sb.append(" revision: ").append(toIndentedString(revision)).append("\n"); + sb.append(" endUserContact: ").append(toIndentedString(endUserContact)).append("\n"); + sb.append(" specialBidNumber: ").append(toIndentedString(specialBidNumber)).append("\n"); + sb.append(" quoteTotal: ").append(toIndentedString(quoteTotal)).append("\n"); + sb.append(" quoteStatus: ").append(toIndentedString(quoteStatus)).append("\n"); + sb.append(" ingramQuoteDate: ").append(toIndentedString(ingramQuoteDate)).append("\n"); + sb.append(" lastModifiedDate: ").append(toIndentedString(lastModifiedDate)).append("\n"); + sb.append(" ingramQuoteExpiryDate: ").append(toIndentedString(ingramQuoteExpiryDate)).append("\n"); + sb.append(" vendor: ").append(toIndentedString(vendor)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("quoteName"); + openapiFields.add("quoteNumber"); + openapiFields.add("revision"); + openapiFields.add("endUserContact"); + openapiFields.add("specialBidNumber"); + openapiFields.add("quoteTotal"); + openapiFields.add("quoteStatus"); + openapiFields.add("ingramQuoteDate"); + openapiFields.add("lastModifiedDate"); + openapiFields.add("ingramQuoteExpiryDate"); + openapiFields.add("vendor"); + openapiFields.add("createdBy"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteSearchResponseQuotesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteSearchResponseQuotesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteSearchResponseQuotesInner is not found in the empty JSON string", QuoteSearchResponseQuotesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteSearchResponseQuotesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteSearchResponseQuotesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("quoteName") != null && !jsonObj.get("quoteName").isJsonNull()) && !jsonObj.get("quoteName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quoteName").toString())); + } + if ((jsonObj.get("quoteNumber") != null && !jsonObj.get("quoteNumber").isJsonNull()) && !jsonObj.get("quoteNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quoteNumber").toString())); + } + if ((jsonObj.get("revision") != null && !jsonObj.get("revision").isJsonNull()) && !jsonObj.get("revision").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `revision` to be a primitive type in the JSON string but got `%s`", jsonObj.get("revision").toString())); + } + if ((jsonObj.get("endUserContact") != null && !jsonObj.get("endUserContact").isJsonNull()) && !jsonObj.get("endUserContact").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endUserContact` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endUserContact").toString())); + } + if ((jsonObj.get("specialBidNumber") != null && !jsonObj.get("specialBidNumber").isJsonNull()) && !jsonObj.get("specialBidNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `specialBidNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("specialBidNumber").toString())); + } + if ((jsonObj.get("quoteStatus") != null && !jsonObj.get("quoteStatus").isJsonNull()) && !jsonObj.get("quoteStatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quoteStatus").toString())); + } + if ((jsonObj.get("ingramQuoteDate") != null && !jsonObj.get("ingramQuoteDate").isJsonNull()) && !jsonObj.get("ingramQuoteDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramQuoteDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramQuoteDate").toString())); + } + if ((jsonObj.get("lastModifiedDate") != null && !jsonObj.get("lastModifiedDate").isJsonNull()) && !jsonObj.get("lastModifiedDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lastModifiedDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastModifiedDate").toString())); + } + if ((jsonObj.get("ingramQuoteExpiryDate") != null && !jsonObj.get("ingramQuoteExpiryDate").isJsonNull()) && !jsonObj.get("ingramQuoteExpiryDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramQuoteExpiryDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramQuoteExpiryDate").toString())); + } + if ((jsonObj.get("vendor") != null && !jsonObj.get("vendor").isJsonNull()) && !jsonObj.get("vendor").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendor").toString())); + } + if ((jsonObj.get("createdBy") != null && !jsonObj.get("createdBy").isJsonNull()) && !jsonObj.get("createdBy").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `createdBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("createdBy").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteSearchResponseQuotesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteSearchResponseQuotesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteSearchResponseQuotesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteSearchResponseQuotesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteSearchResponseQuotesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteSearchResponseQuotesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteSearchResponseQuotesInner + * @throws IOException if the JSON string is invalid with respect to QuoteSearchResponseQuotesInner + */ + public static QuoteSearchResponseQuotesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteSearchResponseQuotesInner.class); + } + + /** + * Convert an instance of QuoteSearchResponseQuotesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteToOrderDetailsDTO.java b/src/main/java/xiresellers/client/model/QuoteToOrderDetailsDTO.java new file mode 100644 index 00000000..f7b5bf82 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteToOrderDetailsDTO.java @@ -0,0 +1,552 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import xiresellers.client.model.QuoteToOrderDetailsDTOAdditionalAttributesInner; +import xiresellers.client.model.QuoteToOrderDetailsDTOEndUserInfoInner; +import xiresellers.client.model.QuoteToOrderDetailsDTOLinesInner; +import xiresellers.client.model.QuoteToOrderDetailsDTOShipToInfoInner; +import xiresellers.client.model.QuoteToOrderDetailsDTOVmfadditionalAttributesInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteToOrderDetailsDTO + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteToOrderDetailsDTO { + public static final String SERIALIZED_NAME_QUOTE_NUMBER = "quoteNumber"; + @SerializedName(SERIALIZED_NAME_QUOTE_NUMBER) + private String quoteNumber; + + public static final String SERIALIZED_NAME_CUSTOMER_ORDER_NUMBER = "customerOrderNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_ORDER_NUMBER) + private String customerOrderNumber; + + public static final String SERIALIZED_NAME_ENDUSER_ORDER_NUMBER = "enduserOrderNumber"; + @SerializedName(SERIALIZED_NAME_ENDUSER_ORDER_NUMBER) + private String enduserOrderNumber; + + public static final String SERIALIZED_NAME_BILL_TO_ADDRESS_ID = "billToAddressId"; + @SerializedName(SERIALIZED_NAME_BILL_TO_ADDRESS_ID) + private String billToAddressId; + + public static final String SERIALIZED_NAME_END_USER_INFO = "endUserInfo"; + @SerializedName(SERIALIZED_NAME_END_USER_INFO) + private List endUserInfo; + + public static final String SERIALIZED_NAME_SHIP_TO_INFO = "shipToInfo"; + @SerializedName(SERIALIZED_NAME_SHIP_TO_INFO) + private List shipToInfo; + + public static final String SERIALIZED_NAME_ADDITIONAL_ATTRIBUTES = "additionalAttributes"; + @SerializedName(SERIALIZED_NAME_ADDITIONAL_ATTRIBUTES) + private List additionalAttributes; + + public static final String SERIALIZED_NAME_VMFADDITIONAL_ATTRIBUTES = "vmfadditionalAttributes"; + @SerializedName(SERIALIZED_NAME_VMFADDITIONAL_ATTRIBUTES) + private List vmfadditionalAttributes; + + public static final String SERIALIZED_NAME_LINES = "lines"; + @SerializedName(SERIALIZED_NAME_LINES) + private List lines; + + public QuoteToOrderDetailsDTO() { + } + + public QuoteToOrderDetailsDTO quoteNumber(String quoteNumber) { + this.quoteNumber = quoteNumber; + return this; + } + + /** + * A unique identifier generated by Ingram Micro's CRM specific to each quote. + * @return quoteNumber + **/ + @javax.annotation.Nullable + public String getQuoteNumber() { + return quoteNumber; + } + + public void setQuoteNumber(String quoteNumber) { + this.quoteNumber = quoteNumber; + } + + + public QuoteToOrderDetailsDTO customerOrderNumber(String customerOrderNumber) { + this.customerOrderNumber = customerOrderNumber; + return this; + } + + /** + * The reseller's order number for reference in their system. + * @return customerOrderNumber + **/ + @javax.annotation.Nullable + public String getCustomerOrderNumber() { + return customerOrderNumber; + } + + public void setCustomerOrderNumber(String customerOrderNumber) { + this.customerOrderNumber = customerOrderNumber; + } + + + public QuoteToOrderDetailsDTO enduserOrderNumber(String enduserOrderNumber) { + this.enduserOrderNumber = enduserOrderNumber; + return this; + } + + /** + * The end customer's order number for reference in their system. + * @return enduserOrderNumber + **/ + @javax.annotation.Nullable + public String getEnduserOrderNumber() { + return enduserOrderNumber; + } + + public void setEnduserOrderNumber(String enduserOrderNumber) { + this.enduserOrderNumber = enduserOrderNumber; + } + + + public QuoteToOrderDetailsDTO billToAddressId(String billToAddressId) { + this.billToAddressId = billToAddressId; + return this; + } + + /** + * Suffix used to identify billing address. Created during onboarding. Resellers are provided with one or more address IDs depending on how many bill to addresses they need for various flooring companies they are using for credit. + * @return billToAddressId + **/ + @javax.annotation.Nullable + public String getBillToAddressId() { + return billToAddressId; + } + + public void setBillToAddressId(String billToAddressId) { + this.billToAddressId = billToAddressId; + } + + + public QuoteToOrderDetailsDTO endUserInfo(List endUserInfo) { + this.endUserInfo = endUserInfo; + return this; + } + + public QuoteToOrderDetailsDTO addEndUserInfoItem(QuoteToOrderDetailsDTOEndUserInfoInner endUserInfoItem) { + if (this.endUserInfo == null) { + this.endUserInfo = new ArrayList<>(); + } + this.endUserInfo.add(endUserInfoItem); + return this; + } + + /** + * The contact information for the end user/customer provided by the reseller. Used to determine pricing and discounts. + * @return endUserInfo + **/ + @javax.annotation.Nullable + public List getEndUserInfo() { + return endUserInfo; + } + + public void setEndUserInfo(List endUserInfo) { + this.endUserInfo = endUserInfo; + } + + + public QuoteToOrderDetailsDTO shipToInfo(List shipToInfo) { + this.shipToInfo = shipToInfo; + return this; + } + + public QuoteToOrderDetailsDTO addShipToInfoItem(QuoteToOrderDetailsDTOShipToInfoInner shipToInfoItem) { + if (this.shipToInfo == null) { + this.shipToInfo = new ArrayList<>(); + } + this.shipToInfo.add(shipToInfoItem); + return this; + } + + /** + * The shipping information provided by the reseller for order delivery. + * @return shipToInfo + **/ + @javax.annotation.Nullable + public List getShipToInfo() { + return shipToInfo; + } + + public void setShipToInfo(List shipToInfo) { + this.shipToInfo = shipToInfo; + } + + + public QuoteToOrderDetailsDTO additionalAttributes(List additionalAttributes) { + this.additionalAttributes = additionalAttributes; + return this; + } + + public QuoteToOrderDetailsDTO addAdditionalAttributesItem(QuoteToOrderDetailsDTOAdditionalAttributesInner additionalAttributesItem) { + if (this.additionalAttributes == null) { + this.additionalAttributes = new ArrayList<>(); + } + this.additionalAttributes.add(additionalAttributesItem); + return this; + } + + /** + * Additional order create attributes. + * @return additionalAttributes + **/ + @javax.annotation.Nullable + public List getAdditionalAttributes() { + return additionalAttributes; + } + + public void setAdditionalAttributes(List additionalAttributes) { + this.additionalAttributes = additionalAttributes; + } + + + public QuoteToOrderDetailsDTO vmfadditionalAttributes(List vmfadditionalAttributes) { + this.vmfadditionalAttributes = vmfadditionalAttributes; + return this; + } + + public QuoteToOrderDetailsDTO addVmfadditionalAttributesItem(QuoteToOrderDetailsDTOVmfadditionalAttributesInner vmfadditionalAttributesItem) { + if (this.vmfadditionalAttributes == null) { + this.vmfadditionalAttributes = new ArrayList<>(); + } + this.vmfadditionalAttributes.add(vmfadditionalAttributesItem); + return this; + } + + /** + * The object containing the list of fields required at a header level by the vendor. + * @return vmfadditionalAttributes + **/ + @javax.annotation.Nullable + public List getVmfadditionalAttributes() { + return vmfadditionalAttributes; + } + + public void setVmfadditionalAttributes(List vmfadditionalAttributes) { + this.vmfadditionalAttributes = vmfadditionalAttributes; + } + + + public QuoteToOrderDetailsDTO lines(List lines) { + this.lines = lines; + return this; + } + + public QuoteToOrderDetailsDTO addLinesItem(QuoteToOrderDetailsDTOLinesInner linesItem) { + if (this.lines == null) { + this.lines = new ArrayList<>(); + } + this.lines.add(linesItem); + return this; + } + + /** + * The object containing the lines that require vendor mandatory fields. + * @return lines + **/ + @javax.annotation.Nullable + public List getLines() { + return lines; + } + + public void setLines(List lines) { + this.lines = lines; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteToOrderDetailsDTO quoteToOrderDetailsDTO = (QuoteToOrderDetailsDTO) o; + return Objects.equals(this.quoteNumber, quoteToOrderDetailsDTO.quoteNumber) && + Objects.equals(this.customerOrderNumber, quoteToOrderDetailsDTO.customerOrderNumber) && + Objects.equals(this.enduserOrderNumber, quoteToOrderDetailsDTO.enduserOrderNumber) && + Objects.equals(this.billToAddressId, quoteToOrderDetailsDTO.billToAddressId) && + Objects.equals(this.endUserInfo, quoteToOrderDetailsDTO.endUserInfo) && + Objects.equals(this.shipToInfo, quoteToOrderDetailsDTO.shipToInfo) && + Objects.equals(this.additionalAttributes, quoteToOrderDetailsDTO.additionalAttributes) && + Objects.equals(this.vmfadditionalAttributes, quoteToOrderDetailsDTO.vmfadditionalAttributes) && + Objects.equals(this.lines, quoteToOrderDetailsDTO.lines); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(quoteNumber, customerOrderNumber, enduserOrderNumber, billToAddressId, endUserInfo, shipToInfo, additionalAttributes, vmfadditionalAttributes, lines); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteToOrderDetailsDTO {\n"); + sb.append(" quoteNumber: ").append(toIndentedString(quoteNumber)).append("\n"); + sb.append(" customerOrderNumber: ").append(toIndentedString(customerOrderNumber)).append("\n"); + sb.append(" enduserOrderNumber: ").append(toIndentedString(enduserOrderNumber)).append("\n"); + sb.append(" billToAddressId: ").append(toIndentedString(billToAddressId)).append("\n"); + sb.append(" endUserInfo: ").append(toIndentedString(endUserInfo)).append("\n"); + sb.append(" shipToInfo: ").append(toIndentedString(shipToInfo)).append("\n"); + sb.append(" additionalAttributes: ").append(toIndentedString(additionalAttributes)).append("\n"); + sb.append(" vmfadditionalAttributes: ").append(toIndentedString(vmfadditionalAttributes)).append("\n"); + sb.append(" lines: ").append(toIndentedString(lines)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("quoteNumber"); + openapiFields.add("customerOrderNumber"); + openapiFields.add("enduserOrderNumber"); + openapiFields.add("billToAddressId"); + openapiFields.add("endUserInfo"); + openapiFields.add("shipToInfo"); + openapiFields.add("additionalAttributes"); + openapiFields.add("vmfadditionalAttributes"); + openapiFields.add("lines"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteToOrderDetailsDTO + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteToOrderDetailsDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteToOrderDetailsDTO is not found in the empty JSON string", QuoteToOrderDetailsDTO.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteToOrderDetailsDTO.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteToOrderDetailsDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("quoteNumber") != null && !jsonObj.get("quoteNumber").isJsonNull()) && !jsonObj.get("quoteNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quoteNumber").toString())); + } + if ((jsonObj.get("customerOrderNumber") != null && !jsonObj.get("customerOrderNumber").isJsonNull()) && !jsonObj.get("customerOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerOrderNumber").toString())); + } + if ((jsonObj.get("enduserOrderNumber") != null && !jsonObj.get("enduserOrderNumber").isJsonNull()) && !jsonObj.get("enduserOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `enduserOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("enduserOrderNumber").toString())); + } + if ((jsonObj.get("billToAddressId") != null && !jsonObj.get("billToAddressId").isJsonNull()) && !jsonObj.get("billToAddressId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `billToAddressId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("billToAddressId").toString())); + } + if (jsonObj.get("endUserInfo") != null && !jsonObj.get("endUserInfo").isJsonNull()) { + JsonArray jsonArrayendUserInfo = jsonObj.getAsJsonArray("endUserInfo"); + if (jsonArrayendUserInfo != null) { + // ensure the json data is an array + if (!jsonObj.get("endUserInfo").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `endUserInfo` to be an array in the JSON string but got `%s`", jsonObj.get("endUserInfo").toString())); + } + + // validate the optional field `endUserInfo` (array) + for (int i = 0; i < jsonArrayendUserInfo.size(); i++) { + QuoteToOrderDetailsDTOEndUserInfoInner.validateJsonElement(jsonArrayendUserInfo.get(i)); + }; + } + } + if (jsonObj.get("shipToInfo") != null && !jsonObj.get("shipToInfo").isJsonNull()) { + JsonArray jsonArrayshipToInfo = jsonObj.getAsJsonArray("shipToInfo"); + if (jsonArrayshipToInfo != null) { + // ensure the json data is an array + if (!jsonObj.get("shipToInfo").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `shipToInfo` to be an array in the JSON string but got `%s`", jsonObj.get("shipToInfo").toString())); + } + + // validate the optional field `shipToInfo` (array) + for (int i = 0; i < jsonArrayshipToInfo.size(); i++) { + QuoteToOrderDetailsDTOShipToInfoInner.validateJsonElement(jsonArrayshipToInfo.get(i)); + }; + } + } + if (jsonObj.get("additionalAttributes") != null && !jsonObj.get("additionalAttributes").isJsonNull()) { + JsonArray jsonArrayadditionalAttributes = jsonObj.getAsJsonArray("additionalAttributes"); + if (jsonArrayadditionalAttributes != null) { + // ensure the json data is an array + if (!jsonObj.get("additionalAttributes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `additionalAttributes` to be an array in the JSON string but got `%s`", jsonObj.get("additionalAttributes").toString())); + } + + // validate the optional field `additionalAttributes` (array) + for (int i = 0; i < jsonArrayadditionalAttributes.size(); i++) { + QuoteToOrderDetailsDTOAdditionalAttributesInner.validateJsonElement(jsonArrayadditionalAttributes.get(i)); + }; + } + } + if (jsonObj.get("vmfadditionalAttributes") != null && !jsonObj.get("vmfadditionalAttributes").isJsonNull()) { + JsonArray jsonArrayvmfadditionalAttributes = jsonObj.getAsJsonArray("vmfadditionalAttributes"); + if (jsonArrayvmfadditionalAttributes != null) { + // ensure the json data is an array + if (!jsonObj.get("vmfadditionalAttributes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `vmfadditionalAttributes` to be an array in the JSON string but got `%s`", jsonObj.get("vmfadditionalAttributes").toString())); + } + + // validate the optional field `vmfadditionalAttributes` (array) + for (int i = 0; i < jsonArrayvmfadditionalAttributes.size(); i++) { + QuoteToOrderDetailsDTOVmfadditionalAttributesInner.validateJsonElement(jsonArrayvmfadditionalAttributes.get(i)); + }; + } + } + if (jsonObj.get("lines") != null && !jsonObj.get("lines").isJsonNull()) { + JsonArray jsonArraylines = jsonObj.getAsJsonArray("lines"); + if (jsonArraylines != null) { + // ensure the json data is an array + if (!jsonObj.get("lines").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `lines` to be an array in the JSON string but got `%s`", jsonObj.get("lines").toString())); + } + + // validate the optional field `lines` (array) + for (int i = 0; i < jsonArraylines.size(); i++) { + QuoteToOrderDetailsDTOLinesInner.validateJsonElement(jsonArraylines.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteToOrderDetailsDTO.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteToOrderDetailsDTO' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteToOrderDetailsDTO.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteToOrderDetailsDTO value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteToOrderDetailsDTO read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteToOrderDetailsDTO given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteToOrderDetailsDTO + * @throws IOException if the JSON string is invalid with respect to QuoteToOrderDetailsDTO + */ + public static QuoteToOrderDetailsDTO fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteToOrderDetailsDTO.class); + } + + /** + * Convert an instance of QuoteToOrderDetailsDTO to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteToOrderDetailsDTOAdditionalAttributesInner.java b/src/main/java/xiresellers/client/model/QuoteToOrderDetailsDTOAdditionalAttributesInner.java new file mode 100644 index 00000000..6a755ee5 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteToOrderDetailsDTOAdditionalAttributesInner.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteToOrderDetailsDTOAdditionalAttributesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteToOrderDetailsDTOAdditionalAttributesInner { + public static final String SERIALIZED_NAME_ATTRIBUTE_NAME = "attributeName"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_NAME) + private String attributeName; + + public static final String SERIALIZED_NAME_ATTRIBUTE_VALUE = "attributeValue"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_VALUE) + private String attributeValue; + + public QuoteToOrderDetailsDTOAdditionalAttributesInner() { + } + + public QuoteToOrderDetailsDTOAdditionalAttributesInner attributeName(String attributeName) { + this.attributeName = attributeName; + return this; + } + + /** + * The attribute name. allowDuplicateCustomerOrderNumber: Allow orders with duplicate customer PO numbers. Enables resellers to have the same PO number for multiple orders. enableCommentsAsLines: It will enable comments as lines. + * @return attributeName + **/ + @javax.annotation.Nullable + public String getAttributeName() { + return attributeName; + } + + public void setAttributeName(String attributeName) { + this.attributeName = attributeName; + } + + + public QuoteToOrderDetailsDTOAdditionalAttributesInner attributeValue(String attributeValue) { + this.attributeValue = attributeValue; + return this; + } + + /** + * The attribute field data. + * @return attributeValue + **/ + @javax.annotation.Nullable + public String getAttributeValue() { + return attributeValue; + } + + public void setAttributeValue(String attributeValue) { + this.attributeValue = attributeValue; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteToOrderDetailsDTOAdditionalAttributesInner quoteToOrderDetailsDTOAdditionalAttributesInner = (QuoteToOrderDetailsDTOAdditionalAttributesInner) o; + return Objects.equals(this.attributeName, quoteToOrderDetailsDTOAdditionalAttributesInner.attributeName) && + Objects.equals(this.attributeValue, quoteToOrderDetailsDTOAdditionalAttributesInner.attributeValue); + } + + @Override + public int hashCode() { + return Objects.hash(attributeName, attributeValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteToOrderDetailsDTOAdditionalAttributesInner {\n"); + sb.append(" attributeName: ").append(toIndentedString(attributeName)).append("\n"); + sb.append(" attributeValue: ").append(toIndentedString(attributeValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributeName"); + openapiFields.add("attributeValue"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteToOrderDetailsDTOAdditionalAttributesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteToOrderDetailsDTOAdditionalAttributesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteToOrderDetailsDTOAdditionalAttributesInner is not found in the empty JSON string", QuoteToOrderDetailsDTOAdditionalAttributesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteToOrderDetailsDTOAdditionalAttributesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteToOrderDetailsDTOAdditionalAttributesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("attributeName") != null && !jsonObj.get("attributeName").isJsonNull()) && !jsonObj.get("attributeName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeName").toString())); + } + if ((jsonObj.get("attributeValue") != null && !jsonObj.get("attributeValue").isJsonNull()) && !jsonObj.get("attributeValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeValue").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteToOrderDetailsDTOAdditionalAttributesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteToOrderDetailsDTOAdditionalAttributesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteToOrderDetailsDTOAdditionalAttributesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteToOrderDetailsDTOAdditionalAttributesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteToOrderDetailsDTOAdditionalAttributesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteToOrderDetailsDTOAdditionalAttributesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteToOrderDetailsDTOAdditionalAttributesInner + * @throws IOException if the JSON string is invalid with respect to QuoteToOrderDetailsDTOAdditionalAttributesInner + */ + public static QuoteToOrderDetailsDTOAdditionalAttributesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteToOrderDetailsDTOAdditionalAttributesInner.class); + } + + /** + * Convert an instance of QuoteToOrderDetailsDTOAdditionalAttributesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteToOrderDetailsDTOEndUserInfoInner.java b/src/main/java/xiresellers/client/model/QuoteToOrderDetailsDTOEndUserInfoInner.java new file mode 100644 index 00000000..90241125 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteToOrderDetailsDTOEndUserInfoInner.java @@ -0,0 +1,496 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteToOrderDetailsDTOEndUserInfoInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteToOrderDetailsDTOEndUserInfoInner { + public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; + @SerializedName(SERIALIZED_NAME_COMPANY_NAME) + private String companyName; + + public static final String SERIALIZED_NAME_CONTACT = "contact"; + @SerializedName(SERIALIZED_NAME_CONTACT) + private String contact; + + public static final String SERIALIZED_NAME_ADDRESS_LINE1 = "addressLine1"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE1) + private String addressLine1; + + public static final String SERIALIZED_NAME_ADDRESS_LINE2 = "addressLine2"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE2) + private String addressLine2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE3 = "addressLine3"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE3) + private String addressLine3; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; + @SerializedName(SERIALIZED_NAME_POSTAL_CODE) + private String postalCode; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) + private String phoneNumber; + + public QuoteToOrderDetailsDTOEndUserInfoInner() { + } + + public QuoteToOrderDetailsDTOEndUserInfoInner companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * The company name for the end user/customer. + * @return companyName + **/ + @javax.annotation.Nullable + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public QuoteToOrderDetailsDTOEndUserInfoInner contact(String contact) { + this.contact = contact; + return this; + } + + /** + * The contact name for the end user/customer. + * @return contact + **/ + @javax.annotation.Nullable + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + + public QuoteToOrderDetailsDTOEndUserInfoInner addressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + return this; + } + + /** + * The address line 1 for the end user/customer. + * @return addressLine1 + **/ + @javax.annotation.Nullable + public String getAddressLine1() { + return addressLine1; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + + public QuoteToOrderDetailsDTOEndUserInfoInner addressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + return this; + } + + /** + * The address line 2 for the end user/customer. + * @return addressLine2 + **/ + @javax.annotation.Nullable + public String getAddressLine2() { + return addressLine2; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + + public QuoteToOrderDetailsDTOEndUserInfoInner addressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + return this; + } + + /** + * The address line 3 for the end user/customer. + * @return addressLine3 + **/ + @javax.annotation.Nullable + public String getAddressLine3() { + return addressLine3; + } + + public void setAddressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + } + + + public QuoteToOrderDetailsDTOEndUserInfoInner city(String city) { + this.city = city; + return this; + } + + /** + * The end user/customer's city. + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public QuoteToOrderDetailsDTOEndUserInfoInner state(String state) { + this.state = state; + return this; + } + + /** + * The end user/customer's state. + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public QuoteToOrderDetailsDTOEndUserInfoInner postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * The end user/customer's zip or postal code. + * @return postalCode + **/ + @javax.annotation.Nullable + public String getPostalCode() { + return postalCode; + } + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public QuoteToOrderDetailsDTOEndUserInfoInner countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * The end user/customer's two character ISO country code. + * @return countryCode + **/ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public QuoteToOrderDetailsDTOEndUserInfoInner email(String email) { + this.email = email; + return this; + } + + /** + * The end user/customer's phone number. + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + public QuoteToOrderDetailsDTOEndUserInfoInner phoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * The end user/customer's phone number. + * @return phoneNumber + **/ + @javax.annotation.Nullable + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteToOrderDetailsDTOEndUserInfoInner quoteToOrderDetailsDTOEndUserInfoInner = (QuoteToOrderDetailsDTOEndUserInfoInner) o; + return Objects.equals(this.companyName, quoteToOrderDetailsDTOEndUserInfoInner.companyName) && + Objects.equals(this.contact, quoteToOrderDetailsDTOEndUserInfoInner.contact) && + Objects.equals(this.addressLine1, quoteToOrderDetailsDTOEndUserInfoInner.addressLine1) && + Objects.equals(this.addressLine2, quoteToOrderDetailsDTOEndUserInfoInner.addressLine2) && + Objects.equals(this.addressLine3, quoteToOrderDetailsDTOEndUserInfoInner.addressLine3) && + Objects.equals(this.city, quoteToOrderDetailsDTOEndUserInfoInner.city) && + Objects.equals(this.state, quoteToOrderDetailsDTOEndUserInfoInner.state) && + Objects.equals(this.postalCode, quoteToOrderDetailsDTOEndUserInfoInner.postalCode) && + Objects.equals(this.countryCode, quoteToOrderDetailsDTOEndUserInfoInner.countryCode) && + Objects.equals(this.email, quoteToOrderDetailsDTOEndUserInfoInner.email) && + Objects.equals(this.phoneNumber, quoteToOrderDetailsDTOEndUserInfoInner.phoneNumber); + } + + @Override + public int hashCode() { + return Objects.hash(companyName, contact, addressLine1, addressLine2, addressLine3, city, state, postalCode, countryCode, email, phoneNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteToOrderDetailsDTOEndUserInfoInner {\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); + sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); + sb.append(" addressLine3: ").append(toIndentedString(addressLine3)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("companyName"); + openapiFields.add("contact"); + openapiFields.add("addressLine1"); + openapiFields.add("addressLine2"); + openapiFields.add("addressLine3"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalCode"); + openapiFields.add("countryCode"); + openapiFields.add("email"); + openapiFields.add("phoneNumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteToOrderDetailsDTOEndUserInfoInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteToOrderDetailsDTOEndUserInfoInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteToOrderDetailsDTOEndUserInfoInner is not found in the empty JSON string", QuoteToOrderDetailsDTOEndUserInfoInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteToOrderDetailsDTOEndUserInfoInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteToOrderDetailsDTOEndUserInfoInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("companyName") != null && !jsonObj.get("companyName").isJsonNull()) && !jsonObj.get("companyName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); + } + if ((jsonObj.get("contact") != null && !jsonObj.get("contact").isJsonNull()) && !jsonObj.get("contact").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contact` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact").toString())); + } + if ((jsonObj.get("addressLine1") != null && !jsonObj.get("addressLine1").isJsonNull()) && !jsonObj.get("addressLine1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine1").toString())); + } + if ((jsonObj.get("addressLine2") != null && !jsonObj.get("addressLine2").isJsonNull()) && !jsonObj.get("addressLine2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine2").toString())); + } + if ((jsonObj.get("addressLine3") != null && !jsonObj.get("addressLine3").isJsonNull()) && !jsonObj.get("addressLine3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine3").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteToOrderDetailsDTOEndUserInfoInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteToOrderDetailsDTOEndUserInfoInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteToOrderDetailsDTOEndUserInfoInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteToOrderDetailsDTOEndUserInfoInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteToOrderDetailsDTOEndUserInfoInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteToOrderDetailsDTOEndUserInfoInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteToOrderDetailsDTOEndUserInfoInner + * @throws IOException if the JSON string is invalid with respect to QuoteToOrderDetailsDTOEndUserInfoInner + */ + public static QuoteToOrderDetailsDTOEndUserInfoInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteToOrderDetailsDTOEndUserInfoInner.class); + } + + /** + * Convert an instance of QuoteToOrderDetailsDTOEndUserInfoInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteToOrderDetailsDTOLinesInner.java b/src/main/java/xiresellers/client/model/QuoteToOrderDetailsDTOLinesInner.java new file mode 100644 index 00000000..b515ba4b --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteToOrderDetailsDTOLinesInner.java @@ -0,0 +1,315 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteToOrderDetailsDTOLinesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteToOrderDetailsDTOLinesInner { + public static final String SERIALIZED_NAME_CUSTOMER_LINE_NUMBER = "customerLineNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_LINE_NUMBER) + private String customerLineNumber; + + public static final String SERIALIZED_NAME_INGRAM_PART_NUMBER = "ingramPartNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PART_NUMBER) + private String ingramPartNumber; + + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + @SerializedName(SERIALIZED_NAME_QUANTITY) + private String quantity; + + public static final String SERIALIZED_NAME_VMF_ADDITIONAL_ATTRIBUTES_LINES = "vmfAdditionalAttributesLines"; + @SerializedName(SERIALIZED_NAME_VMF_ADDITIONAL_ATTRIBUTES_LINES) + private List vmfAdditionalAttributesLines; + + public QuoteToOrderDetailsDTOLinesInner() { + } + + public QuoteToOrderDetailsDTOLinesInner customerLineNumber(String customerLineNumber) { + this.customerLineNumber = customerLineNumber; + return this; + } + + /** + * The reseller's line item number for reference in their system. + * @return customerLineNumber + **/ + @javax.annotation.Nullable + public String getCustomerLineNumber() { + return customerLineNumber; + } + + public void setCustomerLineNumber(String customerLineNumber) { + this.customerLineNumber = customerLineNumber; + } + + + public QuoteToOrderDetailsDTOLinesInner ingramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + return this; + } + + /** + * Unique IngramMicro part number. + * @return ingramPartNumber + **/ + @javax.annotation.Nullable + public String getIngramPartNumber() { + return ingramPartNumber; + } + + public void setIngramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + } + + + public QuoteToOrderDetailsDTOLinesInner quantity(String quantity) { + this.quantity = quantity; + return this; + } + + /** + * The quantity of the line item. + * @return quantity + **/ + @javax.annotation.Nullable + public String getQuantity() { + return quantity; + } + + public void setQuantity(String quantity) { + this.quantity = quantity; + } + + + public QuoteToOrderDetailsDTOLinesInner vmfAdditionalAttributesLines(List vmfAdditionalAttributesLines) { + this.vmfAdditionalAttributesLines = vmfAdditionalAttributesLines; + return this; + } + + public QuoteToOrderDetailsDTOLinesInner addVmfAdditionalAttributesLinesItem(ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner vmfAdditionalAttributesLinesItem) { + if (this.vmfAdditionalAttributesLines == null) { + this.vmfAdditionalAttributesLines = new ArrayList<>(); + } + this.vmfAdditionalAttributesLines.add(vmfAdditionalAttributesLinesItem); + return this; + } + + /** + * The object containing the list of fields required at a line level by the vendor. + * @return vmfAdditionalAttributesLines + **/ + @javax.annotation.Nullable + public List getVmfAdditionalAttributesLines() { + return vmfAdditionalAttributesLines; + } + + public void setVmfAdditionalAttributesLines(List vmfAdditionalAttributesLines) { + this.vmfAdditionalAttributesLines = vmfAdditionalAttributesLines; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteToOrderDetailsDTOLinesInner quoteToOrderDetailsDTOLinesInner = (QuoteToOrderDetailsDTOLinesInner) o; + return Objects.equals(this.customerLineNumber, quoteToOrderDetailsDTOLinesInner.customerLineNumber) && + Objects.equals(this.ingramPartNumber, quoteToOrderDetailsDTOLinesInner.ingramPartNumber) && + Objects.equals(this.quantity, quoteToOrderDetailsDTOLinesInner.quantity) && + Objects.equals(this.vmfAdditionalAttributesLines, quoteToOrderDetailsDTOLinesInner.vmfAdditionalAttributesLines); + } + + @Override + public int hashCode() { + return Objects.hash(customerLineNumber, ingramPartNumber, quantity, vmfAdditionalAttributesLines); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteToOrderDetailsDTOLinesInner {\n"); + sb.append(" customerLineNumber: ").append(toIndentedString(customerLineNumber)).append("\n"); + sb.append(" ingramPartNumber: ").append(toIndentedString(ingramPartNumber)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" vmfAdditionalAttributesLines: ").append(toIndentedString(vmfAdditionalAttributesLines)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("customerLineNumber"); + openapiFields.add("ingramPartNumber"); + openapiFields.add("quantity"); + openapiFields.add("vmfAdditionalAttributesLines"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteToOrderDetailsDTOLinesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteToOrderDetailsDTOLinesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteToOrderDetailsDTOLinesInner is not found in the empty JSON string", QuoteToOrderDetailsDTOLinesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteToOrderDetailsDTOLinesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteToOrderDetailsDTOLinesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("customerLineNumber") != null && !jsonObj.get("customerLineNumber").isJsonNull()) && !jsonObj.get("customerLineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerLineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerLineNumber").toString())); + } + if ((jsonObj.get("ingramPartNumber") != null && !jsonObj.get("ingramPartNumber").isJsonNull()) && !jsonObj.get("ingramPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPartNumber").toString())); + } + if ((jsonObj.get("quantity") != null && !jsonObj.get("quantity").isJsonNull()) && !jsonObj.get("quantity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quantity").toString())); + } + if (jsonObj.get("vmfAdditionalAttributesLines") != null && !jsonObj.get("vmfAdditionalAttributesLines").isJsonNull()) { + JsonArray jsonArrayvmfAdditionalAttributesLines = jsonObj.getAsJsonArray("vmfAdditionalAttributesLines"); + if (jsonArrayvmfAdditionalAttributesLines != null) { + // ensure the json data is an array + if (!jsonObj.get("vmfAdditionalAttributesLines").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `vmfAdditionalAttributesLines` to be an array in the JSON string but got `%s`", jsonObj.get("vmfAdditionalAttributesLines").toString())); + } + + // validate the optional field `vmfAdditionalAttributesLines` (array) + for (int i = 0; i < jsonArrayvmfAdditionalAttributesLines.size(); i++) { + ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner.validateJsonElement(jsonArrayvmfAdditionalAttributesLines.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteToOrderDetailsDTOLinesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteToOrderDetailsDTOLinesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteToOrderDetailsDTOLinesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteToOrderDetailsDTOLinesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteToOrderDetailsDTOLinesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteToOrderDetailsDTOLinesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteToOrderDetailsDTOLinesInner + * @throws IOException if the JSON string is invalid with respect to QuoteToOrderDetailsDTOLinesInner + */ + public static QuoteToOrderDetailsDTOLinesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteToOrderDetailsDTOLinesInner.class); + } + + /** + * Convert an instance of QuoteToOrderDetailsDTOLinesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteToOrderDetailsDTOShipToInfoInner.java b/src/main/java/xiresellers/client/model/QuoteToOrderDetailsDTOShipToInfoInner.java new file mode 100644 index 00000000..e46ea5a0 --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteToOrderDetailsDTOShipToInfoInner.java @@ -0,0 +1,508 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteToOrderDetailsDTOShipToInfoInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteToOrderDetailsDTOShipToInfoInner { + public static final String SERIALIZED_NAME_ADDRESS_ID = "addressId"; + @SerializedName(SERIALIZED_NAME_ADDRESS_ID) + private String addressId; + + public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; + @SerializedName(SERIALIZED_NAME_COMPANY_NAME) + private String companyName; + + public static final String SERIALIZED_NAME_CONTACT = "contact"; + @SerializedName(SERIALIZED_NAME_CONTACT) + private String contact; + + public static final String SERIALIZED_NAME_ADDRESS_LINE1 = "addressLine1"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE1) + private String addressLine1; + + public static final String SERIALIZED_NAME_ADDRESS_LINE2 = "addressLine2"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE2) + private String addressLine2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE3 = "addressLine3"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE3) + private String addressLine3; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; + @SerializedName(SERIALIZED_NAME_POSTAL_CODE) + private String postalCode; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public QuoteToOrderDetailsDTOShipToInfoInner() { + } + + public QuoteToOrderDetailsDTOShipToInfoInner addressId(String addressId) { + this.addressId = addressId; + return this; + } + + /** + * The company contact provided by the reseller. + * @return addressId + **/ + @javax.annotation.Nullable + public String getAddressId() { + return addressId; + } + + public void setAddressId(String addressId) { + this.addressId = addressId; + } + + + public QuoteToOrderDetailsDTOShipToInfoInner companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * The name of the company the order will be shipped to. + * @return companyName + **/ + @javax.annotation.Nullable + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public QuoteToOrderDetailsDTOShipToInfoInner contact(String contact) { + this.contact = contact; + return this; + } + + /** + * The contact name for the order will be shipped to. + * @return contact + **/ + @javax.annotation.Nullable + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + + public QuoteToOrderDetailsDTOShipToInfoInner addressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + return this; + } + + /** + * The address line 1 the order will be shipped to. + * @return addressLine1 + **/ + @javax.annotation.Nullable + public String getAddressLine1() { + return addressLine1; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + + public QuoteToOrderDetailsDTOShipToInfoInner addressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + return this; + } + + /** + * The address line 2 the order will be shipped to. + * @return addressLine2 + **/ + @javax.annotation.Nullable + public String getAddressLine2() { + return addressLine2; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + + public QuoteToOrderDetailsDTOShipToInfoInner addressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + return this; + } + + /** + * The address line 3 the order will be shipped to. + * @return addressLine3 + **/ + @javax.annotation.Nullable + public String getAddressLine3() { + return addressLine3; + } + + public void setAddressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + } + + + public QuoteToOrderDetailsDTOShipToInfoInner city(String city) { + this.city = city; + return this; + } + + /** + * The city the order will be shipped to. + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public QuoteToOrderDetailsDTOShipToInfoInner state(String state) { + this.state = state; + return this; + } + + /** + * The state the order will be shipped to. + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public QuoteToOrderDetailsDTOShipToInfoInner postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * The zip or postal code the order will be shipped to. + * @return postalCode + **/ + @javax.annotation.Nullable + public String getPostalCode() { + return postalCode; + } + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public QuoteToOrderDetailsDTOShipToInfoInner countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * The two-character ISO country code the order will be shipped to. + * @return countryCode + **/ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public QuoteToOrderDetailsDTOShipToInfoInner email(String email) { + this.email = email; + return this; + } + + /** + * The company contact email address. + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteToOrderDetailsDTOShipToInfoInner quoteToOrderDetailsDTOShipToInfoInner = (QuoteToOrderDetailsDTOShipToInfoInner) o; + return Objects.equals(this.addressId, quoteToOrderDetailsDTOShipToInfoInner.addressId) && + Objects.equals(this.companyName, quoteToOrderDetailsDTOShipToInfoInner.companyName) && + Objects.equals(this.contact, quoteToOrderDetailsDTOShipToInfoInner.contact) && + Objects.equals(this.addressLine1, quoteToOrderDetailsDTOShipToInfoInner.addressLine1) && + Objects.equals(this.addressLine2, quoteToOrderDetailsDTOShipToInfoInner.addressLine2) && + Objects.equals(this.addressLine3, quoteToOrderDetailsDTOShipToInfoInner.addressLine3) && + Objects.equals(this.city, quoteToOrderDetailsDTOShipToInfoInner.city) && + Objects.equals(this.state, quoteToOrderDetailsDTOShipToInfoInner.state) && + Objects.equals(this.postalCode, quoteToOrderDetailsDTOShipToInfoInner.postalCode) && + Objects.equals(this.countryCode, quoteToOrderDetailsDTOShipToInfoInner.countryCode) && + Objects.equals(this.email, quoteToOrderDetailsDTOShipToInfoInner.email); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(addressId, companyName, contact, addressLine1, addressLine2, addressLine3, city, state, postalCode, countryCode, email); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteToOrderDetailsDTOShipToInfoInner {\n"); + sb.append(" addressId: ").append(toIndentedString(addressId)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); + sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); + sb.append(" addressLine3: ").append(toIndentedString(addressLine3)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("addressId"); + openapiFields.add("companyName"); + openapiFields.add("contact"); + openapiFields.add("addressLine1"); + openapiFields.add("addressLine2"); + openapiFields.add("addressLine3"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalCode"); + openapiFields.add("countryCode"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteToOrderDetailsDTOShipToInfoInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteToOrderDetailsDTOShipToInfoInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteToOrderDetailsDTOShipToInfoInner is not found in the empty JSON string", QuoteToOrderDetailsDTOShipToInfoInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteToOrderDetailsDTOShipToInfoInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteToOrderDetailsDTOShipToInfoInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("addressId") != null && !jsonObj.get("addressId").isJsonNull()) && !jsonObj.get("addressId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressId").toString())); + } + if ((jsonObj.get("companyName") != null && !jsonObj.get("companyName").isJsonNull()) && !jsonObj.get("companyName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); + } + if ((jsonObj.get("contact") != null && !jsonObj.get("contact").isJsonNull()) && !jsonObj.get("contact").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contact` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact").toString())); + } + if ((jsonObj.get("addressLine1") != null && !jsonObj.get("addressLine1").isJsonNull()) && !jsonObj.get("addressLine1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine1").toString())); + } + if ((jsonObj.get("addressLine2") != null && !jsonObj.get("addressLine2").isJsonNull()) && !jsonObj.get("addressLine2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine2").toString())); + } + if ((jsonObj.get("addressLine3") != null && !jsonObj.get("addressLine3").isJsonNull()) && !jsonObj.get("addressLine3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine3").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteToOrderDetailsDTOShipToInfoInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteToOrderDetailsDTOShipToInfoInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteToOrderDetailsDTOShipToInfoInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteToOrderDetailsDTOShipToInfoInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteToOrderDetailsDTOShipToInfoInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteToOrderDetailsDTOShipToInfoInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteToOrderDetailsDTOShipToInfoInner + * @throws IOException if the JSON string is invalid with respect to QuoteToOrderDetailsDTOShipToInfoInner + */ + public static QuoteToOrderDetailsDTOShipToInfoInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteToOrderDetailsDTOShipToInfoInner.class); + } + + /** + * Convert an instance of QuoteToOrderDetailsDTOShipToInfoInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteToOrderDetailsDTOVmfadditionalAttributesInner.java b/src/main/java/xiresellers/client/model/QuoteToOrderDetailsDTOVmfadditionalAttributesInner.java new file mode 100644 index 00000000..bf646b7c --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteToOrderDetailsDTOVmfadditionalAttributesInner.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteToOrderDetailsDTOVmfadditionalAttributesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteToOrderDetailsDTOVmfadditionalAttributesInner { + public static final String SERIALIZED_NAME_ATTRIBUTE_NAME = "attributeName"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_NAME) + private String attributeName; + + public static final String SERIALIZED_NAME_ATTRIBUTE_VALUE = "attributeValue"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_VALUE) + private String attributeValue; + + public static final String SERIALIZED_NAME_ATTRIBUTE_DESCRIPTION = "attributeDescription"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_DESCRIPTION) + private String attributeDescription; + + public QuoteToOrderDetailsDTOVmfadditionalAttributesInner() { + } + + public QuoteToOrderDetailsDTOVmfadditionalAttributesInner attributeName(String attributeName) { + this.attributeName = attributeName; + return this; + } + + /** + * The name of the header level field. + * @return attributeName + **/ + @javax.annotation.Nullable + public String getAttributeName() { + return attributeName; + } + + public void setAttributeName(String attributeName) { + this.attributeName = attributeName; + } + + + public QuoteToOrderDetailsDTOVmfadditionalAttributesInner attributeValue(String attributeValue) { + this.attributeValue = attributeValue; + return this; + } + + /** + * The value of the header level field. + * @return attributeValue + **/ + @javax.annotation.Nullable + public String getAttributeValue() { + return attributeValue; + } + + public void setAttributeValue(String attributeValue) { + this.attributeValue = attributeValue; + } + + + public QuoteToOrderDetailsDTOVmfadditionalAttributesInner attributeDescription(String attributeDescription) { + this.attributeDescription = attributeDescription; + return this; + } + + /** + * The description of the header level field. + * @return attributeDescription + **/ + @javax.annotation.Nullable + public String getAttributeDescription() { + return attributeDescription; + } + + public void setAttributeDescription(String attributeDescription) { + this.attributeDescription = attributeDescription; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteToOrderDetailsDTOVmfadditionalAttributesInner quoteToOrderDetailsDTOVmfadditionalAttributesInner = (QuoteToOrderDetailsDTOVmfadditionalAttributesInner) o; + return Objects.equals(this.attributeName, quoteToOrderDetailsDTOVmfadditionalAttributesInner.attributeName) && + Objects.equals(this.attributeValue, quoteToOrderDetailsDTOVmfadditionalAttributesInner.attributeValue) && + Objects.equals(this.attributeDescription, quoteToOrderDetailsDTOVmfadditionalAttributesInner.attributeDescription); + } + + @Override + public int hashCode() { + return Objects.hash(attributeName, attributeValue, attributeDescription); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteToOrderDetailsDTOVmfadditionalAttributesInner {\n"); + sb.append(" attributeName: ").append(toIndentedString(attributeName)).append("\n"); + sb.append(" attributeValue: ").append(toIndentedString(attributeValue)).append("\n"); + sb.append(" attributeDescription: ").append(toIndentedString(attributeDescription)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributeName"); + openapiFields.add("attributeValue"); + openapiFields.add("attributeDescription"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteToOrderDetailsDTOVmfadditionalAttributesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteToOrderDetailsDTOVmfadditionalAttributesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteToOrderDetailsDTOVmfadditionalAttributesInner is not found in the empty JSON string", QuoteToOrderDetailsDTOVmfadditionalAttributesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteToOrderDetailsDTOVmfadditionalAttributesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteToOrderDetailsDTOVmfadditionalAttributesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("attributeName") != null && !jsonObj.get("attributeName").isJsonNull()) && !jsonObj.get("attributeName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeName").toString())); + } + if ((jsonObj.get("attributeValue") != null && !jsonObj.get("attributeValue").isJsonNull()) && !jsonObj.get("attributeValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeValue").toString())); + } + if ((jsonObj.get("attributeDescription") != null && !jsonObj.get("attributeDescription").isJsonNull()) && !jsonObj.get("attributeDescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeDescription").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteToOrderDetailsDTOVmfadditionalAttributesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteToOrderDetailsDTOVmfadditionalAttributesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteToOrderDetailsDTOVmfadditionalAttributesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteToOrderDetailsDTOVmfadditionalAttributesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteToOrderDetailsDTOVmfadditionalAttributesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteToOrderDetailsDTOVmfadditionalAttributesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteToOrderDetailsDTOVmfadditionalAttributesInner + * @throws IOException if the JSON string is invalid with respect to QuoteToOrderDetailsDTOVmfadditionalAttributesInner + */ + public static QuoteToOrderDetailsDTOVmfadditionalAttributesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteToOrderDetailsDTOVmfadditionalAttributesInner.class); + } + + /** + * Convert an instance of QuoteToOrderDetailsDTOVmfadditionalAttributesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/QuoteToOrderResponse.java b/src/main/java/xiresellers/client/model/QuoteToOrderResponse.java new file mode 100644 index 00000000..aa60f80e --- /dev/null +++ b/src/main/java/xiresellers/client/model/QuoteToOrderResponse.java @@ -0,0 +1,262 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * QuoteToOrderResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class QuoteToOrderResponse { + public static final String SERIALIZED_NAME_QUOTE_NUMBER = "quoteNumber"; + @SerializedName(SERIALIZED_NAME_QUOTE_NUMBER) + private String quoteNumber; + + public static final String SERIALIZED_NAME_CONFIRMATION_NUMBER = "confirmationNumber"; + @SerializedName(SERIALIZED_NAME_CONFIRMATION_NUMBER) + private BigDecimal confirmationNumber; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public QuoteToOrderResponse() { + } + + public QuoteToOrderResponse quoteNumber(String quoteNumber) { + this.quoteNumber = quoteNumber; + return this; + } + + /** + * Unique identifier generated by Ingram Micro's CRM specific to each quote. + * @return quoteNumber + **/ + @javax.annotation.Nullable + public String getQuoteNumber() { + return quoteNumber; + } + + public void setQuoteNumber(String quoteNumber) { + this.quoteNumber = quoteNumber; + } + + + public QuoteToOrderResponse confirmationNumber(BigDecimal confirmationNumber) { + this.confirmationNumber = confirmationNumber; + return this; + } + + /** + * A unique confirmation number for tracking purposes. + * @return confirmationNumber + **/ + @javax.annotation.Nullable + public BigDecimal getConfirmationNumber() { + return confirmationNumber; + } + + public void setConfirmationNumber(BigDecimal confirmationNumber) { + this.confirmationNumber = confirmationNumber; + } + + + public QuoteToOrderResponse message(String message) { + this.message = message; + return this; + } + + /** + * A confirmation message. + * @return message + **/ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteToOrderResponse quoteToOrderResponse = (QuoteToOrderResponse) o; + return Objects.equals(this.quoteNumber, quoteToOrderResponse.quoteNumber) && + Objects.equals(this.confirmationNumber, quoteToOrderResponse.confirmationNumber) && + Objects.equals(this.message, quoteToOrderResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(quoteNumber, confirmationNumber, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteToOrderResponse {\n"); + sb.append(" quoteNumber: ").append(toIndentedString(quoteNumber)).append("\n"); + sb.append(" confirmationNumber: ").append(toIndentedString(confirmationNumber)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("quoteNumber"); + openapiFields.add("confirmationNumber"); + openapiFields.add("message"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to QuoteToOrderResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!QuoteToOrderResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in QuoteToOrderResponse is not found in the empty JSON string", QuoteToOrderResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!QuoteToOrderResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QuoteToOrderResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("quoteNumber") != null && !jsonObj.get("quoteNumber").isJsonNull()) && !jsonObj.get("quoteNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quoteNumber").toString())); + } + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!QuoteToOrderResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'QuoteToOrderResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(QuoteToOrderResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, QuoteToOrderResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public QuoteToOrderResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of QuoteToOrderResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of QuoteToOrderResponse + * @throws IOException if the JSON string is invalid with respect to QuoteToOrderResponse + */ + public static QuoteToOrderResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, QuoteToOrderResponse.class); + } + + /** + * Convert an instance of QuoteToOrderResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/RenewalsDetailsResponse.java b/src/main/java/xiresellers/client/model/RenewalsDetailsResponse.java new file mode 100644 index 00000000..47ce60fe --- /dev/null +++ b/src/main/java/xiresellers/client/model/RenewalsDetailsResponse.java @@ -0,0 +1,687 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.RenewalsDetailsResponseAdditionalAttributesInner; +import xiresellers.client.model.RenewalsDetailsResponseEndUserInfoInner; +import xiresellers.client.model.RenewalsDetailsResponseProductsInner; +import xiresellers.client.model.RenewalsDetailsResponseReferenceNumberInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * RenewalsDetailsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class RenewalsDetailsResponse { + public static final String SERIALIZED_NAME_RENEWAL_ID = "renewalId"; + @SerializedName(SERIALIZED_NAME_RENEWAL_ID) + private String renewalId; + + public static final String SERIALIZED_NAME_INGRAM_ORDER_NUMBER = "ingramOrderNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_ORDER_NUMBER) + private String ingramOrderNumber; + + public static final String SERIALIZED_NAME_INGRAM_ORDER_DATE = "ingramOrderDate"; + @SerializedName(SERIALIZED_NAME_INGRAM_ORDER_DATE) + private LocalDate ingramOrderDate; + + public static final String SERIALIZED_NAME_EXPIRATION_DATE = "expirationDate"; + @SerializedName(SERIALIZED_NAME_EXPIRATION_DATE) + private LocalDate expirationDate; + + public static final String SERIALIZED_NAME_INGRAM_PURCHASE_ORDER_NUMBER = "ingramPurchaseOrderNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PURCHASE_ORDER_NUMBER) + private String ingramPurchaseOrderNumber; + + public static final String SERIALIZED_NAME_CUSTOMER_ORDER_NUMBER = "customerOrderNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_ORDER_NUMBER) + private String customerOrderNumber; + + public static final String SERIALIZED_NAME_END_CUSTOMER_ORDER_NUMBER = "endCustomerOrderNumber"; + @SerializedName(SERIALIZED_NAME_END_CUSTOMER_ORDER_NUMBER) + private String endCustomerOrderNumber; + + public static final String SERIALIZED_NAME_RENEWAL_VALUE = "renewalValue"; + @SerializedName(SERIALIZED_NAME_RENEWAL_VALUE) + private BigDecimal renewalValue; + + public static final String SERIALIZED_NAME_END_USER = "endUser"; + @SerializedName(SERIALIZED_NAME_END_USER) + private String endUser; + + public static final String SERIALIZED_NAME_VENDOR = "vendor"; + @SerializedName(SERIALIZED_NAME_VENDOR) + private String vendor; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_END_USER_INFO = "endUserInfo"; + @SerializedName(SERIALIZED_NAME_END_USER_INFO) + private List endUserInfo; + + public static final String SERIALIZED_NAME_REFERENCE_NUMBER = "referenceNumber"; + @SerializedName(SERIALIZED_NAME_REFERENCE_NUMBER) + private List referenceNumber; + + public static final String SERIALIZED_NAME_PRODUCTS = "products"; + @SerializedName(SERIALIZED_NAME_PRODUCTS) + private List products; + + public static final String SERIALIZED_NAME_ADDITIONAL_ATTRIBUTES = "additionalAttributes"; + @SerializedName(SERIALIZED_NAME_ADDITIONAL_ATTRIBUTES) + private List additionalAttributes; + + public RenewalsDetailsResponse() { + } + + public RenewalsDetailsResponse renewalId(String renewalId) { + this.renewalId = renewalId; + return this; + } + + /** + * Unique Ingram renewal ID. + * @return renewalId + **/ + @javax.annotation.Nullable + public String getRenewalId() { + return renewalId; + } + + public void setRenewalId(String renewalId) { + this.renewalId = renewalId; + } + + + public RenewalsDetailsResponse ingramOrderNumber(String ingramOrderNumber) { + this.ingramOrderNumber = ingramOrderNumber; + return this; + } + + /** + * The IngramMicro sales order number. + * @return ingramOrderNumber + **/ + @javax.annotation.Nullable + public String getIngramOrderNumber() { + return ingramOrderNumber; + } + + public void setIngramOrderNumber(String ingramOrderNumber) { + this.ingramOrderNumber = ingramOrderNumber; + } + + + public RenewalsDetailsResponse ingramOrderDate(LocalDate ingramOrderDate) { + this.ingramOrderDate = ingramOrderDate; + return this; + } + + /** + * The IngramMicro sales order date. + * @return ingramOrderDate + **/ + @javax.annotation.Nullable + public LocalDate getIngramOrderDate() { + return ingramOrderDate; + } + + public void setIngramOrderDate(LocalDate ingramOrderDate) { + this.ingramOrderDate = ingramOrderDate; + } + + + public RenewalsDetailsResponse expirationDate(LocalDate expirationDate) { + this.expirationDate = expirationDate; + return this; + } + + /** + * Renewal expiration date. + * @return expirationDate + **/ + @javax.annotation.Nullable + public LocalDate getExpirationDate() { + return expirationDate; + } + + public void setExpirationDate(LocalDate expirationDate) { + this.expirationDate = expirationDate; + } + + + public RenewalsDetailsResponse ingramPurchaseOrderNumber(String ingramPurchaseOrderNumber) { + this.ingramPurchaseOrderNumber = ingramPurchaseOrderNumber; + return this; + } + + /** + * Ingram purchase order number. + * @return ingramPurchaseOrderNumber + **/ + @javax.annotation.Nullable + public String getIngramPurchaseOrderNumber() { + return ingramPurchaseOrderNumber; + } + + public void setIngramPurchaseOrderNumber(String ingramPurchaseOrderNumber) { + this.ingramPurchaseOrderNumber = ingramPurchaseOrderNumber; + } + + + public RenewalsDetailsResponse customerOrderNumber(String customerOrderNumber) { + this.customerOrderNumber = customerOrderNumber; + return this; + } + + /** + * The reseller's order number for reference in their system. + * @return customerOrderNumber + **/ + @javax.annotation.Nullable + public String getCustomerOrderNumber() { + return customerOrderNumber; + } + + public void setCustomerOrderNumber(String customerOrderNumber) { + this.customerOrderNumber = customerOrderNumber; + } + + + public RenewalsDetailsResponse endCustomerOrderNumber(String endCustomerOrderNumber) { + this.endCustomerOrderNumber = endCustomerOrderNumber; + return this; + } + + /** + * The end customer's order number for reference in their system. + * @return endCustomerOrderNumber + **/ + @javax.annotation.Nullable + public String getEndCustomerOrderNumber() { + return endCustomerOrderNumber; + } + + public void setEndCustomerOrderNumber(String endCustomerOrderNumber) { + this.endCustomerOrderNumber = endCustomerOrderNumber; + } + + + public RenewalsDetailsResponse renewalValue(BigDecimal renewalValue) { + this.renewalValue = renewalValue; + return this; + } + + /** + * The value of the renewal. + * @return renewalValue + **/ + @javax.annotation.Nullable + public BigDecimal getRenewalValue() { + return renewalValue; + } + + public void setRenewalValue(BigDecimal renewalValue) { + this.renewalValue = renewalValue; + } + + + public RenewalsDetailsResponse endUser(String endUser) { + this.endUser = endUser; + return this; + } + + /** + * The company name for the end user/customer. + * @return endUser + **/ + @javax.annotation.Nullable + public String getEndUser() { + return endUser; + } + + public void setEndUser(String endUser) { + this.endUser = endUser; + } + + + public RenewalsDetailsResponse vendor(String vendor) { + this.vendor = vendor; + return this; + } + + /** + * The name of the vendor. + * @return vendor + **/ + @javax.annotation.Nullable + public String getVendor() { + return vendor; + } + + public void setVendor(String vendor) { + this.vendor = vendor; + } + + + public RenewalsDetailsResponse status(String status) { + this.status = status; + return this; + } + + /** + * The status of the renewal. + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + public RenewalsDetailsResponse endUserInfo(List endUserInfo) { + this.endUserInfo = endUserInfo; + return this; + } + + public RenewalsDetailsResponse addEndUserInfoItem(RenewalsDetailsResponseEndUserInfoInner endUserInfoItem) { + if (this.endUserInfo == null) { + this.endUserInfo = new ArrayList<>(); + } + this.endUserInfo.add(endUserInfoItem); + return this; + } + + /** + * Get endUserInfo + * @return endUserInfo + **/ + @javax.annotation.Nullable + public List getEndUserInfo() { + return endUserInfo; + } + + public void setEndUserInfo(List endUserInfo) { + this.endUserInfo = endUserInfo; + } + + + public RenewalsDetailsResponse referenceNumber(List referenceNumber) { + this.referenceNumber = referenceNumber; + return this; + } + + public RenewalsDetailsResponse addReferenceNumberItem(RenewalsDetailsResponseReferenceNumberInner referenceNumberItem) { + if (this.referenceNumber == null) { + this.referenceNumber = new ArrayList<>(); + } + this.referenceNumber.add(referenceNumberItem); + return this; + } + + /** + * Get referenceNumber + * @return referenceNumber + **/ + @javax.annotation.Nullable + public List getReferenceNumber() { + return referenceNumber; + } + + public void setReferenceNumber(List referenceNumber) { + this.referenceNumber = referenceNumber; + } + + + public RenewalsDetailsResponse products(List products) { + this.products = products; + return this; + } + + public RenewalsDetailsResponse addProductsItem(RenewalsDetailsResponseProductsInner productsItem) { + if (this.products == null) { + this.products = new ArrayList<>(); + } + this.products.add(productsItem); + return this; + } + + /** + * Get products + * @return products + **/ + @javax.annotation.Nullable + public List getProducts() { + return products; + } + + public void setProducts(List products) { + this.products = products; + } + + + public RenewalsDetailsResponse additionalAttributes(List additionalAttributes) { + this.additionalAttributes = additionalAttributes; + return this; + } + + public RenewalsDetailsResponse addAdditionalAttributesItem(RenewalsDetailsResponseAdditionalAttributesInner additionalAttributesItem) { + if (this.additionalAttributes == null) { + this.additionalAttributes = new ArrayList<>(); + } + this.additionalAttributes.add(additionalAttributesItem); + return this; + } + + /** + * Get additionalAttributes + * @return additionalAttributes + **/ + @javax.annotation.Nullable + public List getAdditionalAttributes() { + return additionalAttributes; + } + + public void setAdditionalAttributes(List additionalAttributes) { + this.additionalAttributes = additionalAttributes; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RenewalsDetailsResponse renewalsDetailsResponse = (RenewalsDetailsResponse) o; + return Objects.equals(this.renewalId, renewalsDetailsResponse.renewalId) && + Objects.equals(this.ingramOrderNumber, renewalsDetailsResponse.ingramOrderNumber) && + Objects.equals(this.ingramOrderDate, renewalsDetailsResponse.ingramOrderDate) && + Objects.equals(this.expirationDate, renewalsDetailsResponse.expirationDate) && + Objects.equals(this.ingramPurchaseOrderNumber, renewalsDetailsResponse.ingramPurchaseOrderNumber) && + Objects.equals(this.customerOrderNumber, renewalsDetailsResponse.customerOrderNumber) && + Objects.equals(this.endCustomerOrderNumber, renewalsDetailsResponse.endCustomerOrderNumber) && + Objects.equals(this.renewalValue, renewalsDetailsResponse.renewalValue) && + Objects.equals(this.endUser, renewalsDetailsResponse.endUser) && + Objects.equals(this.vendor, renewalsDetailsResponse.vendor) && + Objects.equals(this.status, renewalsDetailsResponse.status) && + Objects.equals(this.endUserInfo, renewalsDetailsResponse.endUserInfo) && + Objects.equals(this.referenceNumber, renewalsDetailsResponse.referenceNumber) && + Objects.equals(this.products, renewalsDetailsResponse.products) && + Objects.equals(this.additionalAttributes, renewalsDetailsResponse.additionalAttributes); + } + + @Override + public int hashCode() { + return Objects.hash(renewalId, ingramOrderNumber, ingramOrderDate, expirationDate, ingramPurchaseOrderNumber, customerOrderNumber, endCustomerOrderNumber, renewalValue, endUser, vendor, status, endUserInfo, referenceNumber, products, additionalAttributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RenewalsDetailsResponse {\n"); + sb.append(" renewalId: ").append(toIndentedString(renewalId)).append("\n"); + sb.append(" ingramOrderNumber: ").append(toIndentedString(ingramOrderNumber)).append("\n"); + sb.append(" ingramOrderDate: ").append(toIndentedString(ingramOrderDate)).append("\n"); + sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); + sb.append(" ingramPurchaseOrderNumber: ").append(toIndentedString(ingramPurchaseOrderNumber)).append("\n"); + sb.append(" customerOrderNumber: ").append(toIndentedString(customerOrderNumber)).append("\n"); + sb.append(" endCustomerOrderNumber: ").append(toIndentedString(endCustomerOrderNumber)).append("\n"); + sb.append(" renewalValue: ").append(toIndentedString(renewalValue)).append("\n"); + sb.append(" endUser: ").append(toIndentedString(endUser)).append("\n"); + sb.append(" vendor: ").append(toIndentedString(vendor)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" endUserInfo: ").append(toIndentedString(endUserInfo)).append("\n"); + sb.append(" referenceNumber: ").append(toIndentedString(referenceNumber)).append("\n"); + sb.append(" products: ").append(toIndentedString(products)).append("\n"); + sb.append(" additionalAttributes: ").append(toIndentedString(additionalAttributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("renewalId"); + openapiFields.add("ingramOrderNumber"); + openapiFields.add("ingramOrderDate"); + openapiFields.add("expirationDate"); + openapiFields.add("ingramPurchaseOrderNumber"); + openapiFields.add("customerOrderNumber"); + openapiFields.add("endCustomerOrderNumber"); + openapiFields.add("renewalValue"); + openapiFields.add("endUser"); + openapiFields.add("vendor"); + openapiFields.add("status"); + openapiFields.add("endUserInfo"); + openapiFields.add("referenceNumber"); + openapiFields.add("products"); + openapiFields.add("additionalAttributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RenewalsDetailsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RenewalsDetailsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RenewalsDetailsResponse is not found in the empty JSON string", RenewalsDetailsResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RenewalsDetailsResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RenewalsDetailsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("renewalId") != null && !jsonObj.get("renewalId").isJsonNull()) && !jsonObj.get("renewalId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `renewalId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("renewalId").toString())); + } + if ((jsonObj.get("ingramOrderNumber") != null && !jsonObj.get("ingramOrderNumber").isJsonNull()) && !jsonObj.get("ingramOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramOrderNumber").toString())); + } + if ((jsonObj.get("ingramPurchaseOrderNumber") != null && !jsonObj.get("ingramPurchaseOrderNumber").isJsonNull()) && !jsonObj.get("ingramPurchaseOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPurchaseOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPurchaseOrderNumber").toString())); + } + if ((jsonObj.get("customerOrderNumber") != null && !jsonObj.get("customerOrderNumber").isJsonNull()) && !jsonObj.get("customerOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerOrderNumber").toString())); + } + if ((jsonObj.get("endCustomerOrderNumber") != null && !jsonObj.get("endCustomerOrderNumber").isJsonNull()) && !jsonObj.get("endCustomerOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endCustomerOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endCustomerOrderNumber").toString())); + } + if ((jsonObj.get("endUser") != null && !jsonObj.get("endUser").isJsonNull()) && !jsonObj.get("endUser").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endUser` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endUser").toString())); + } + if ((jsonObj.get("vendor") != null && !jsonObj.get("vendor").isJsonNull()) && !jsonObj.get("vendor").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendor").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if (jsonObj.get("endUserInfo") != null && !jsonObj.get("endUserInfo").isJsonNull()) { + JsonArray jsonArrayendUserInfo = jsonObj.getAsJsonArray("endUserInfo"); + if (jsonArrayendUserInfo != null) { + // ensure the json data is an array + if (!jsonObj.get("endUserInfo").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `endUserInfo` to be an array in the JSON string but got `%s`", jsonObj.get("endUserInfo").toString())); + } + + // validate the optional field `endUserInfo` (array) + for (int i = 0; i < jsonArrayendUserInfo.size(); i++) { + RenewalsDetailsResponseEndUserInfoInner.validateJsonElement(jsonArrayendUserInfo.get(i)); + }; + } + } + if (jsonObj.get("referenceNumber") != null && !jsonObj.get("referenceNumber").isJsonNull()) { + JsonArray jsonArrayreferenceNumber = jsonObj.getAsJsonArray("referenceNumber"); + if (jsonArrayreferenceNumber != null) { + // ensure the json data is an array + if (!jsonObj.get("referenceNumber").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `referenceNumber` to be an array in the JSON string but got `%s`", jsonObj.get("referenceNumber").toString())); + } + + // validate the optional field `referenceNumber` (array) + for (int i = 0; i < jsonArrayreferenceNumber.size(); i++) { + RenewalsDetailsResponseReferenceNumberInner.validateJsonElement(jsonArrayreferenceNumber.get(i)); + }; + } + } + if (jsonObj.get("products") != null && !jsonObj.get("products").isJsonNull()) { + JsonArray jsonArrayproducts = jsonObj.getAsJsonArray("products"); + if (jsonArrayproducts != null) { + // ensure the json data is an array + if (!jsonObj.get("products").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `products` to be an array in the JSON string but got `%s`", jsonObj.get("products").toString())); + } + + // validate the optional field `products` (array) + for (int i = 0; i < jsonArrayproducts.size(); i++) { + RenewalsDetailsResponseProductsInner.validateJsonElement(jsonArrayproducts.get(i)); + }; + } + } + if (jsonObj.get("additionalAttributes") != null && !jsonObj.get("additionalAttributes").isJsonNull()) { + JsonArray jsonArrayadditionalAttributes = jsonObj.getAsJsonArray("additionalAttributes"); + if (jsonArrayadditionalAttributes != null) { + // ensure the json data is an array + if (!jsonObj.get("additionalAttributes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `additionalAttributes` to be an array in the JSON string but got `%s`", jsonObj.get("additionalAttributes").toString())); + } + + // validate the optional field `additionalAttributes` (array) + for (int i = 0; i < jsonArrayadditionalAttributes.size(); i++) { + RenewalsDetailsResponseAdditionalAttributesInner.validateJsonElement(jsonArrayadditionalAttributes.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RenewalsDetailsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RenewalsDetailsResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RenewalsDetailsResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RenewalsDetailsResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RenewalsDetailsResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RenewalsDetailsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of RenewalsDetailsResponse + * @throws IOException if the JSON string is invalid with respect to RenewalsDetailsResponse + */ + public static RenewalsDetailsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RenewalsDetailsResponse.class); + } + + /** + * Convert an instance of RenewalsDetailsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/RenewalsDetailsResponseAdditionalAttributesInner.java b/src/main/java/xiresellers/client/model/RenewalsDetailsResponseAdditionalAttributesInner.java new file mode 100644 index 00000000..f50e8403 --- /dev/null +++ b/src/main/java/xiresellers/client/model/RenewalsDetailsResponseAdditionalAttributesInner.java @@ -0,0 +1,317 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * RenewalsDetailsResponseAdditionalAttributesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class RenewalsDetailsResponseAdditionalAttributesInner { + public static final String SERIALIZED_NAME_ATTRIBUTE_DESCRIPTION = "attributeDescription"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_DESCRIPTION) + private String attributeDescription; + + public static final String SERIALIZED_NAME_ATTRIBUTE_VALUE = "attributeValue"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_VALUE) + private String attributeValue; + + public static final String SERIALIZED_NAME_START_DATE = "startDate"; + @SerializedName(SERIALIZED_NAME_START_DATE) + private LocalDate startDate; + + public static final String SERIALIZED_NAME_EXPIRATION_DATE = "expirationDate"; + @SerializedName(SERIALIZED_NAME_EXPIRATION_DATE) + private LocalDate expirationDate; + + public static final String SERIALIZED_NAME_IS_CONSOLIDATED = "isConsolidated"; + @SerializedName(SERIALIZED_NAME_IS_CONSOLIDATED) + private String isConsolidated; + + public RenewalsDetailsResponseAdditionalAttributesInner() { + } + + public RenewalsDetailsResponseAdditionalAttributesInner attributeDescription(String attributeDescription) { + this.attributeDescription = attributeDescription; + return this; + } + + /** + * The description of the additional attribute. + * @return attributeDescription + **/ + @javax.annotation.Nullable + public String getAttributeDescription() { + return attributeDescription; + } + + public void setAttributeDescription(String attributeDescription) { + this.attributeDescription = attributeDescription; + } + + + public RenewalsDetailsResponseAdditionalAttributesInner attributeValue(String attributeValue) { + this.attributeValue = attributeValue; + return this; + } + + /** + * The value of the additional attribute. + * @return attributeValue + **/ + @javax.annotation.Nullable + public String getAttributeValue() { + return attributeValue; + } + + public void setAttributeValue(String attributeValue) { + this.attributeValue = attributeValue; + } + + + public RenewalsDetailsResponseAdditionalAttributesInner startDate(LocalDate startDate) { + this.startDate = startDate; + return this; + } + + /** + * The attribute start date. + * @return startDate + **/ + @javax.annotation.Nullable + public LocalDate getStartDate() { + return startDate; + } + + public void setStartDate(LocalDate startDate) { + this.startDate = startDate; + } + + + public RenewalsDetailsResponseAdditionalAttributesInner expirationDate(LocalDate expirationDate) { + this.expirationDate = expirationDate; + return this; + } + + /** + * The attribute expiration date. + * @return expirationDate + **/ + @javax.annotation.Nullable + public LocalDate getExpirationDate() { + return expirationDate; + } + + public void setExpirationDate(LocalDate expirationDate) { + this.expirationDate = expirationDate; + } + + + public RenewalsDetailsResponseAdditionalAttributesInner isConsolidated(String isConsolidated) { + this.isConsolidated = isConsolidated; + return this; + } + + /** + * Is the line item consolidated? Yes or No. + * @return isConsolidated + **/ + @javax.annotation.Nullable + public String getIsConsolidated() { + return isConsolidated; + } + + public void setIsConsolidated(String isConsolidated) { + this.isConsolidated = isConsolidated; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RenewalsDetailsResponseAdditionalAttributesInner renewalsDetailsResponseAdditionalAttributesInner = (RenewalsDetailsResponseAdditionalAttributesInner) o; + return Objects.equals(this.attributeDescription, renewalsDetailsResponseAdditionalAttributesInner.attributeDescription) && + Objects.equals(this.attributeValue, renewalsDetailsResponseAdditionalAttributesInner.attributeValue) && + Objects.equals(this.startDate, renewalsDetailsResponseAdditionalAttributesInner.startDate) && + Objects.equals(this.expirationDate, renewalsDetailsResponseAdditionalAttributesInner.expirationDate) && + Objects.equals(this.isConsolidated, renewalsDetailsResponseAdditionalAttributesInner.isConsolidated); + } + + @Override + public int hashCode() { + return Objects.hash(attributeDescription, attributeValue, startDate, expirationDate, isConsolidated); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RenewalsDetailsResponseAdditionalAttributesInner {\n"); + sb.append(" attributeDescription: ").append(toIndentedString(attributeDescription)).append("\n"); + sb.append(" attributeValue: ").append(toIndentedString(attributeValue)).append("\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); + sb.append(" isConsolidated: ").append(toIndentedString(isConsolidated)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributeDescription"); + openapiFields.add("attributeValue"); + openapiFields.add("startDate"); + openapiFields.add("expirationDate"); + openapiFields.add("isConsolidated"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RenewalsDetailsResponseAdditionalAttributesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RenewalsDetailsResponseAdditionalAttributesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RenewalsDetailsResponseAdditionalAttributesInner is not found in the empty JSON string", RenewalsDetailsResponseAdditionalAttributesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RenewalsDetailsResponseAdditionalAttributesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RenewalsDetailsResponseAdditionalAttributesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("attributeDescription") != null && !jsonObj.get("attributeDescription").isJsonNull()) && !jsonObj.get("attributeDescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeDescription").toString())); + } + if ((jsonObj.get("attributeValue") != null && !jsonObj.get("attributeValue").isJsonNull()) && !jsonObj.get("attributeValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeValue").toString())); + } + if ((jsonObj.get("isConsolidated") != null && !jsonObj.get("isConsolidated").isJsonNull()) && !jsonObj.get("isConsolidated").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `isConsolidated` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isConsolidated").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RenewalsDetailsResponseAdditionalAttributesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RenewalsDetailsResponseAdditionalAttributesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RenewalsDetailsResponseAdditionalAttributesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RenewalsDetailsResponseAdditionalAttributesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RenewalsDetailsResponseAdditionalAttributesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RenewalsDetailsResponseAdditionalAttributesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of RenewalsDetailsResponseAdditionalAttributesInner + * @throws IOException if the JSON string is invalid with respect to RenewalsDetailsResponseAdditionalAttributesInner + */ + public static RenewalsDetailsResponseAdditionalAttributesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RenewalsDetailsResponseAdditionalAttributesInner.class); + } + + /** + * Convert an instance of RenewalsDetailsResponseAdditionalAttributesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/RenewalsDetailsResponseEndUserInfoInner.java b/src/main/java/xiresellers/client/model/RenewalsDetailsResponseEndUserInfoInner.java new file mode 100644 index 00000000..61fc365b --- /dev/null +++ b/src/main/java/xiresellers/client/model/RenewalsDetailsResponseEndUserInfoInner.java @@ -0,0 +1,583 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * RenewalsDetailsResponseEndUserInfoInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class RenewalsDetailsResponseEndUserInfoInner { + public static final String SERIALIZED_NAME_CONTACT = "contact"; + @SerializedName(SERIALIZED_NAME_CONTACT) + private String contact; + + public static final String SERIALIZED_NAME_NAME1 = "name1"; + @SerializedName(SERIALIZED_NAME_NAME1) + private String name1; + + public static final String SERIALIZED_NAME_NAME2 = "name2"; + @SerializedName(SERIALIZED_NAME_NAME2) + private String name2; + + public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; + @SerializedName(SERIALIZED_NAME_COMPANY_NAME) + private String companyName; + + public static final String SERIALIZED_NAME_ADDRESS_LINE1 = "addressLine1"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE1) + private String addressLine1; + + public static final String SERIALIZED_NAME_ADDRESS_LINE2 = "addressLine2"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE2) + private String addressLine2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE3 = "addressLine3"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE3) + private String addressLine3; + + public static final String SERIALIZED_NAME_ADDRESS_LINE4 = "addressLine4"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE4) + private String addressLine4; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; + @SerializedName(SERIALIZED_NAME_POSTAL_CODE) + private String postalCode; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) + private String phoneNumber; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public RenewalsDetailsResponseEndUserInfoInner() { + } + + public RenewalsDetailsResponseEndUserInfoInner contact(String contact) { + this.contact = contact; + return this; + } + + /** + * The contact name for the end user/customer. + * @return contact + **/ + @javax.annotation.Nullable + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + + public RenewalsDetailsResponseEndUserInfoInner name1(String name1) { + this.name1 = name1; + return this; + } + + /** + * The name1 for the end user/customer. + * @return name1 + **/ + @javax.annotation.Nullable + public String getName1() { + return name1; + } + + public void setName1(String name1) { + this.name1 = name1; + } + + + public RenewalsDetailsResponseEndUserInfoInner name2(String name2) { + this.name2 = name2; + return this; + } + + /** + * The name2 for the end user/customer. + * @return name2 + **/ + @javax.annotation.Nullable + public String getName2() { + return name2; + } + + public void setName2(String name2) { + this.name2 = name2; + } + + + public RenewalsDetailsResponseEndUserInfoInner companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * The company name for the end user/customer. + * @return companyName + **/ + @javax.annotation.Nullable + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public RenewalsDetailsResponseEndUserInfoInner addressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + return this; + } + + /** + * The address line 1 for the end user/customer. + * @return addressLine1 + **/ + @javax.annotation.Nullable + public String getAddressLine1() { + return addressLine1; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + + public RenewalsDetailsResponseEndUserInfoInner addressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + return this; + } + + /** + * The address line 2 for the end user/customer. + * @return addressLine2 + **/ + @javax.annotation.Nullable + public String getAddressLine2() { + return addressLine2; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + + public RenewalsDetailsResponseEndUserInfoInner addressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + return this; + } + + /** + * The address line 3 for the end user/customer. + * @return addressLine3 + **/ + @javax.annotation.Nullable + public String getAddressLine3() { + return addressLine3; + } + + public void setAddressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + } + + + public RenewalsDetailsResponseEndUserInfoInner addressLine4(String addressLine4) { + this.addressLine4 = addressLine4; + return this; + } + + /** + * The address line 4 for the end user/customer. + * @return addressLine4 + **/ + @javax.annotation.Nullable + public String getAddressLine4() { + return addressLine4; + } + + public void setAddressLine4(String addressLine4) { + this.addressLine4 = addressLine4; + } + + + public RenewalsDetailsResponseEndUserInfoInner city(String city) { + this.city = city; + return this; + } + + /** + * The end user/customer's city. + * @return city + **/ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public RenewalsDetailsResponseEndUserInfoInner state(String state) { + this.state = state; + return this; + } + + /** + * The end user/customer's state. + * @return state + **/ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public RenewalsDetailsResponseEndUserInfoInner postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * The end user/customer's zip or postal code. + * @return postalCode + **/ + @javax.annotation.Nullable + public String getPostalCode() { + return postalCode; + } + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public RenewalsDetailsResponseEndUserInfoInner countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * The end user/customer's two character ISO country code. + * @return countryCode + **/ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public RenewalsDetailsResponseEndUserInfoInner phoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * The end user/customer's phone number. + * @return phoneNumber + **/ + @javax.annotation.Nullable + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public RenewalsDetailsResponseEndUserInfoInner email(String email) { + this.email = email; + return this; + } + + /** + * The end user/customer's email. + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RenewalsDetailsResponseEndUserInfoInner renewalsDetailsResponseEndUserInfoInner = (RenewalsDetailsResponseEndUserInfoInner) o; + return Objects.equals(this.contact, renewalsDetailsResponseEndUserInfoInner.contact) && + Objects.equals(this.name1, renewalsDetailsResponseEndUserInfoInner.name1) && + Objects.equals(this.name2, renewalsDetailsResponseEndUserInfoInner.name2) && + Objects.equals(this.companyName, renewalsDetailsResponseEndUserInfoInner.companyName) && + Objects.equals(this.addressLine1, renewalsDetailsResponseEndUserInfoInner.addressLine1) && + Objects.equals(this.addressLine2, renewalsDetailsResponseEndUserInfoInner.addressLine2) && + Objects.equals(this.addressLine3, renewalsDetailsResponseEndUserInfoInner.addressLine3) && + Objects.equals(this.addressLine4, renewalsDetailsResponseEndUserInfoInner.addressLine4) && + Objects.equals(this.city, renewalsDetailsResponseEndUserInfoInner.city) && + Objects.equals(this.state, renewalsDetailsResponseEndUserInfoInner.state) && + Objects.equals(this.postalCode, renewalsDetailsResponseEndUserInfoInner.postalCode) && + Objects.equals(this.countryCode, renewalsDetailsResponseEndUserInfoInner.countryCode) && + Objects.equals(this.phoneNumber, renewalsDetailsResponseEndUserInfoInner.phoneNumber) && + Objects.equals(this.email, renewalsDetailsResponseEndUserInfoInner.email); + } + + @Override + public int hashCode() { + return Objects.hash(contact, name1, name2, companyName, addressLine1, addressLine2, addressLine3, addressLine4, city, state, postalCode, countryCode, phoneNumber, email); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RenewalsDetailsResponseEndUserInfoInner {\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" name1: ").append(toIndentedString(name1)).append("\n"); + sb.append(" name2: ").append(toIndentedString(name2)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); + sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); + sb.append(" addressLine3: ").append(toIndentedString(addressLine3)).append("\n"); + sb.append(" addressLine4: ").append(toIndentedString(addressLine4)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("contact"); + openapiFields.add("name1"); + openapiFields.add("name2"); + openapiFields.add("companyName"); + openapiFields.add("addressLine1"); + openapiFields.add("addressLine2"); + openapiFields.add("addressLine3"); + openapiFields.add("addressLine4"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalCode"); + openapiFields.add("countryCode"); + openapiFields.add("phoneNumber"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RenewalsDetailsResponseEndUserInfoInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RenewalsDetailsResponseEndUserInfoInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RenewalsDetailsResponseEndUserInfoInner is not found in the empty JSON string", RenewalsDetailsResponseEndUserInfoInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RenewalsDetailsResponseEndUserInfoInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RenewalsDetailsResponseEndUserInfoInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("contact") != null && !jsonObj.get("contact").isJsonNull()) && !jsonObj.get("contact").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contact` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact").toString())); + } + if ((jsonObj.get("name1") != null && !jsonObj.get("name1").isJsonNull()) && !jsonObj.get("name1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name1").toString())); + } + if ((jsonObj.get("name2") != null && !jsonObj.get("name2").isJsonNull()) && !jsonObj.get("name2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name2").toString())); + } + if ((jsonObj.get("companyName") != null && !jsonObj.get("companyName").isJsonNull()) && !jsonObj.get("companyName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); + } + if ((jsonObj.get("addressLine1") != null && !jsonObj.get("addressLine1").isJsonNull()) && !jsonObj.get("addressLine1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine1").toString())); + } + if ((jsonObj.get("addressLine2") != null && !jsonObj.get("addressLine2").isJsonNull()) && !jsonObj.get("addressLine2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine2").toString())); + } + if ((jsonObj.get("addressLine3") != null && !jsonObj.get("addressLine3").isJsonNull()) && !jsonObj.get("addressLine3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine3").toString())); + } + if ((jsonObj.get("addressLine4") != null && !jsonObj.get("addressLine4").isJsonNull()) && !jsonObj.get("addressLine4").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine4` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine4").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RenewalsDetailsResponseEndUserInfoInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RenewalsDetailsResponseEndUserInfoInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RenewalsDetailsResponseEndUserInfoInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RenewalsDetailsResponseEndUserInfoInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RenewalsDetailsResponseEndUserInfoInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RenewalsDetailsResponseEndUserInfoInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of RenewalsDetailsResponseEndUserInfoInner + * @throws IOException if the JSON string is invalid with respect to RenewalsDetailsResponseEndUserInfoInner + */ + public static RenewalsDetailsResponseEndUserInfoInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RenewalsDetailsResponseEndUserInfoInner.class); + } + + /** + * Convert an instance of RenewalsDetailsResponseEndUserInfoInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/RenewalsDetailsResponseProductsInner.java b/src/main/java/xiresellers/client/model/RenewalsDetailsResponseProductsInner.java new file mode 100644 index 00000000..a59a11ae --- /dev/null +++ b/src/main/java/xiresellers/client/model/RenewalsDetailsResponseProductsInner.java @@ -0,0 +1,407 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * RenewalsDetailsResponseProductsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class RenewalsDetailsResponseProductsInner { + public static final String SERIALIZED_NAME_INGRAM_LINE_NUMBER = "ingramLineNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_LINE_NUMBER) + private String ingramLineNumber; + + public static final String SERIALIZED_NAME_PRODUCT_DESCRIPTION = "productDescription"; + @SerializedName(SERIALIZED_NAME_PRODUCT_DESCRIPTION) + private String productDescription; + + public static final String SERIALIZED_NAME_VENDOR_PART_NUMBER = "vendorPartNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_PART_NUMBER) + private String vendorPartNumber; + + public static final String SERIALIZED_NAME_INGRAM_PART_NUMBER = "ingramPartNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PART_NUMBER) + private String ingramPartNumber; + + public static final String SERIALIZED_NAME_MANUFACTURER_PART_NUMBER = "manufacturerPartNumber"; + @SerializedName(SERIALIZED_NAME_MANUFACTURER_PART_NUMBER) + private String manufacturerPartNumber; + + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + @SerializedName(SERIALIZED_NAME_QUANTITY) + private String quantity; + + public static final String SERIALIZED_NAME_UNIT_PRICE = "unitPrice"; + @SerializedName(SERIALIZED_NAME_UNIT_PRICE) + private BigDecimal unitPrice; + + public static final String SERIALIZED_NAME_IS_CONSOLIDATED = "isConsolidated"; + @SerializedName(SERIALIZED_NAME_IS_CONSOLIDATED) + private String isConsolidated; + + public RenewalsDetailsResponseProductsInner() { + } + + public RenewalsDetailsResponseProductsInner ingramLineNumber(String ingramLineNumber) { + this.ingramLineNumber = ingramLineNumber; + return this; + } + + /** + * Unique Ingram Micro line number. + * @return ingramLineNumber + **/ + @javax.annotation.Nullable + public String getIngramLineNumber() { + return ingramLineNumber; + } + + public void setIngramLineNumber(String ingramLineNumber) { + this.ingramLineNumber = ingramLineNumber; + } + + + public RenewalsDetailsResponseProductsInner productDescription(String productDescription) { + this.productDescription = productDescription; + return this; + } + + /** + * The description of the product. + * @return productDescription + **/ + @javax.annotation.Nullable + public String getProductDescription() { + return productDescription; + } + + public void setProductDescription(String productDescription) { + this.productDescription = productDescription; + } + + + public RenewalsDetailsResponseProductsInner vendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + return this; + } + + /** + * The vendor's part number for the line item. + * @return vendorPartNumber + **/ + @javax.annotation.Nullable + public String getVendorPartNumber() { + return vendorPartNumber; + } + + public void setVendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + } + + + public RenewalsDetailsResponseProductsInner ingramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + return this; + } + + /** + * Unique IngramMicro part number. + * @return ingramPartNumber + **/ + @javax.annotation.Nullable + public String getIngramPartNumber() { + return ingramPartNumber; + } + + public void setIngramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + } + + + public RenewalsDetailsResponseProductsInner manufacturerPartNumber(String manufacturerPartNumber) { + this.manufacturerPartNumber = manufacturerPartNumber; + return this; + } + + /** + * The manufacturer's part number for the line item. + * @return manufacturerPartNumber + **/ + @javax.annotation.Nullable + public String getManufacturerPartNumber() { + return manufacturerPartNumber; + } + + public void setManufacturerPartNumber(String manufacturerPartNumber) { + this.manufacturerPartNumber = manufacturerPartNumber; + } + + + public RenewalsDetailsResponseProductsInner quantity(String quantity) { + this.quantity = quantity; + return this; + } + + /** + * The quantity of the line item. + * @return quantity + **/ + @javax.annotation.Nullable + public String getQuantity() { + return quantity; + } + + public void setQuantity(String quantity) { + this.quantity = quantity; + } + + + public RenewalsDetailsResponseProductsInner unitPrice(BigDecimal unitPrice) { + this.unitPrice = unitPrice; + return this; + } + + /** + * The unit price of the line item. + * @return unitPrice + **/ + @javax.annotation.Nullable + public BigDecimal getUnitPrice() { + return unitPrice; + } + + public void setUnitPrice(BigDecimal unitPrice) { + this.unitPrice = unitPrice; + } + + + public RenewalsDetailsResponseProductsInner isConsolidated(String isConsolidated) { + this.isConsolidated = isConsolidated; + return this; + } + + /** + * Is the line item consolidated? Yes or No. + * @return isConsolidated + **/ + @javax.annotation.Nullable + public String getIsConsolidated() { + return isConsolidated; + } + + public void setIsConsolidated(String isConsolidated) { + this.isConsolidated = isConsolidated; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RenewalsDetailsResponseProductsInner renewalsDetailsResponseProductsInner = (RenewalsDetailsResponseProductsInner) o; + return Objects.equals(this.ingramLineNumber, renewalsDetailsResponseProductsInner.ingramLineNumber) && + Objects.equals(this.productDescription, renewalsDetailsResponseProductsInner.productDescription) && + Objects.equals(this.vendorPartNumber, renewalsDetailsResponseProductsInner.vendorPartNumber) && + Objects.equals(this.ingramPartNumber, renewalsDetailsResponseProductsInner.ingramPartNumber) && + Objects.equals(this.manufacturerPartNumber, renewalsDetailsResponseProductsInner.manufacturerPartNumber) && + Objects.equals(this.quantity, renewalsDetailsResponseProductsInner.quantity) && + Objects.equals(this.unitPrice, renewalsDetailsResponseProductsInner.unitPrice) && + Objects.equals(this.isConsolidated, renewalsDetailsResponseProductsInner.isConsolidated); + } + + @Override + public int hashCode() { + return Objects.hash(ingramLineNumber, productDescription, vendorPartNumber, ingramPartNumber, manufacturerPartNumber, quantity, unitPrice, isConsolidated); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RenewalsDetailsResponseProductsInner {\n"); + sb.append(" ingramLineNumber: ").append(toIndentedString(ingramLineNumber)).append("\n"); + sb.append(" productDescription: ").append(toIndentedString(productDescription)).append("\n"); + sb.append(" vendorPartNumber: ").append(toIndentedString(vendorPartNumber)).append("\n"); + sb.append(" ingramPartNumber: ").append(toIndentedString(ingramPartNumber)).append("\n"); + sb.append(" manufacturerPartNumber: ").append(toIndentedString(manufacturerPartNumber)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" unitPrice: ").append(toIndentedString(unitPrice)).append("\n"); + sb.append(" isConsolidated: ").append(toIndentedString(isConsolidated)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("ingramLineNumber"); + openapiFields.add("productDescription"); + openapiFields.add("vendorPartNumber"); + openapiFields.add("ingramPartNumber"); + openapiFields.add("manufacturerPartNumber"); + openapiFields.add("quantity"); + openapiFields.add("unitPrice"); + openapiFields.add("isConsolidated"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RenewalsDetailsResponseProductsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RenewalsDetailsResponseProductsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RenewalsDetailsResponseProductsInner is not found in the empty JSON string", RenewalsDetailsResponseProductsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RenewalsDetailsResponseProductsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RenewalsDetailsResponseProductsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("ingramLineNumber") != null && !jsonObj.get("ingramLineNumber").isJsonNull()) && !jsonObj.get("ingramLineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramLineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramLineNumber").toString())); + } + if ((jsonObj.get("productDescription") != null && !jsonObj.get("productDescription").isJsonNull()) && !jsonObj.get("productDescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `productDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productDescription").toString())); + } + if ((jsonObj.get("vendorPartNumber") != null && !jsonObj.get("vendorPartNumber").isJsonNull()) && !jsonObj.get("vendorPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorPartNumber").toString())); + } + if ((jsonObj.get("ingramPartNumber") != null && !jsonObj.get("ingramPartNumber").isJsonNull()) && !jsonObj.get("ingramPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPartNumber").toString())); + } + if ((jsonObj.get("manufacturerPartNumber") != null && !jsonObj.get("manufacturerPartNumber").isJsonNull()) && !jsonObj.get("manufacturerPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `manufacturerPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("manufacturerPartNumber").toString())); + } + if ((jsonObj.get("quantity") != null && !jsonObj.get("quantity").isJsonNull()) && !jsonObj.get("quantity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quantity").toString())); + } + if ((jsonObj.get("isConsolidated") != null && !jsonObj.get("isConsolidated").isJsonNull()) && !jsonObj.get("isConsolidated").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `isConsolidated` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isConsolidated").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RenewalsDetailsResponseProductsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RenewalsDetailsResponseProductsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RenewalsDetailsResponseProductsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RenewalsDetailsResponseProductsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RenewalsDetailsResponseProductsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RenewalsDetailsResponseProductsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of RenewalsDetailsResponseProductsInner + * @throws IOException if the JSON string is invalid with respect to RenewalsDetailsResponseProductsInner + */ + public static RenewalsDetailsResponseProductsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RenewalsDetailsResponseProductsInner.class); + } + + /** + * Convert an instance of RenewalsDetailsResponseProductsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/RenewalsDetailsResponseReferenceNumberInner.java b/src/main/java/xiresellers/client/model/RenewalsDetailsResponseReferenceNumberInner.java new file mode 100644 index 00000000..a158484f --- /dev/null +++ b/src/main/java/xiresellers/client/model/RenewalsDetailsResponseReferenceNumberInner.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * RenewalsDetailsResponseReferenceNumberInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class RenewalsDetailsResponseReferenceNumberInner { + public static final String SERIALIZED_NAME_NOTIFICATION_ID = "notificationId"; + @SerializedName(SERIALIZED_NAME_NOTIFICATION_ID) + private String notificationId; + + public static final String SERIALIZED_NAME_QUOTE_NUMBER = "quoteNumber"; + @SerializedName(SERIALIZED_NAME_QUOTE_NUMBER) + private String quoteNumber; + + public RenewalsDetailsResponseReferenceNumberInner() { + } + + public RenewalsDetailsResponseReferenceNumberInner notificationId(String notificationId) { + this.notificationId = notificationId; + return this; + } + + /** + * Notification id of the communication sent from Ingram. + * @return notificationId + **/ + @javax.annotation.Nullable + public String getNotificationId() { + return notificationId; + } + + public void setNotificationId(String notificationId) { + this.notificationId = notificationId; + } + + + public RenewalsDetailsResponseReferenceNumberInner quoteNumber(String quoteNumber) { + this.quoteNumber = quoteNumber; + return this; + } + + /** + * Quote number for the renewal. + * @return quoteNumber + **/ + @javax.annotation.Nullable + public String getQuoteNumber() { + return quoteNumber; + } + + public void setQuoteNumber(String quoteNumber) { + this.quoteNumber = quoteNumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RenewalsDetailsResponseReferenceNumberInner renewalsDetailsResponseReferenceNumberInner = (RenewalsDetailsResponseReferenceNumberInner) o; + return Objects.equals(this.notificationId, renewalsDetailsResponseReferenceNumberInner.notificationId) && + Objects.equals(this.quoteNumber, renewalsDetailsResponseReferenceNumberInner.quoteNumber); + } + + @Override + public int hashCode() { + return Objects.hash(notificationId, quoteNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RenewalsDetailsResponseReferenceNumberInner {\n"); + sb.append(" notificationId: ").append(toIndentedString(notificationId)).append("\n"); + sb.append(" quoteNumber: ").append(toIndentedString(quoteNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("notificationId"); + openapiFields.add("quoteNumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RenewalsDetailsResponseReferenceNumberInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RenewalsDetailsResponseReferenceNumberInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RenewalsDetailsResponseReferenceNumberInner is not found in the empty JSON string", RenewalsDetailsResponseReferenceNumberInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RenewalsDetailsResponseReferenceNumberInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RenewalsDetailsResponseReferenceNumberInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("notificationId") != null && !jsonObj.get("notificationId").isJsonNull()) && !jsonObj.get("notificationId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `notificationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("notificationId").toString())); + } + if ((jsonObj.get("quoteNumber") != null && !jsonObj.get("quoteNumber").isJsonNull()) && !jsonObj.get("quoteNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quoteNumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RenewalsDetailsResponseReferenceNumberInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RenewalsDetailsResponseReferenceNumberInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RenewalsDetailsResponseReferenceNumberInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RenewalsDetailsResponseReferenceNumberInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RenewalsDetailsResponseReferenceNumberInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RenewalsDetailsResponseReferenceNumberInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of RenewalsDetailsResponseReferenceNumberInner + * @throws IOException if the JSON string is invalid with respect to RenewalsDetailsResponseReferenceNumberInner + */ + public static RenewalsDetailsResponseReferenceNumberInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RenewalsDetailsResponseReferenceNumberInner.class); + } + + /** + * Convert an instance of RenewalsDetailsResponseReferenceNumberInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/RenewalsSearchRequest.java b/src/main/java/xiresellers/client/model/RenewalsSearchRequest.java new file mode 100644 index 00000000..6e8846dd --- /dev/null +++ b/src/main/java/xiresellers/client/model/RenewalsSearchRequest.java @@ -0,0 +1,297 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.RenewalsSearchRequestDataType; +import xiresellers.client.model.RenewalsSearchRequestStatus; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * RenewalsSearchRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class RenewalsSearchRequest { + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private RenewalsSearchRequestStatus status; + + public static final String SERIALIZED_NAME_DATA_TYPE = "dataType"; + @SerializedName(SERIALIZED_NAME_DATA_TYPE) + private RenewalsSearchRequestDataType dataType; + + public static final String SERIALIZED_NAME_VENDOR = "vendor"; + @SerializedName(SERIALIZED_NAME_VENDOR) + private String vendor; + + public static final String SERIALIZED_NAME_END_USER = "endUser"; + @SerializedName(SERIALIZED_NAME_END_USER) + private String endUser; + + public RenewalsSearchRequest() { + } + + public RenewalsSearchRequest status(RenewalsSearchRequestStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @javax.annotation.Nullable + public RenewalsSearchRequestStatus getStatus() { + return status; + } + + public void setStatus(RenewalsSearchRequestStatus status) { + this.status = status; + } + + + public RenewalsSearchRequest dataType(RenewalsSearchRequestDataType dataType) { + this.dataType = dataType; + return this; + } + + /** + * Get dataType + * @return dataType + **/ + @javax.annotation.Nullable + public RenewalsSearchRequestDataType getDataType() { + return dataType; + } + + public void setDataType(RenewalsSearchRequestDataType dataType) { + this.dataType = dataType; + } + + + public RenewalsSearchRequest vendor(String vendor) { + this.vendor = vendor; + return this; + } + + /** + * The name of the Vendor. + * @return vendor + **/ + @javax.annotation.Nullable + public String getVendor() { + return vendor; + } + + public void setVendor(String vendor) { + this.vendor = vendor; + } + + + public RenewalsSearchRequest endUser(String endUser) { + this.endUser = endUser; + return this; + } + + /** + * The name of the enduser. + * @return endUser + **/ + @javax.annotation.Nullable + public String getEndUser() { + return endUser; + } + + public void setEndUser(String endUser) { + this.endUser = endUser; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RenewalsSearchRequest renewalsSearchRequest = (RenewalsSearchRequest) o; + return Objects.equals(this.status, renewalsSearchRequest.status) && + Objects.equals(this.dataType, renewalsSearchRequest.dataType) && + Objects.equals(this.vendor, renewalsSearchRequest.vendor) && + Objects.equals(this.endUser, renewalsSearchRequest.endUser); + } + + @Override + public int hashCode() { + return Objects.hash(status, dataType, vendor, endUser); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RenewalsSearchRequest {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" dataType: ").append(toIndentedString(dataType)).append("\n"); + sb.append(" vendor: ").append(toIndentedString(vendor)).append("\n"); + sb.append(" endUser: ").append(toIndentedString(endUser)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("status"); + openapiFields.add("dataType"); + openapiFields.add("vendor"); + openapiFields.add("endUser"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RenewalsSearchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RenewalsSearchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RenewalsSearchRequest is not found in the empty JSON string", RenewalsSearchRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RenewalsSearchRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RenewalsSearchRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + RenewalsSearchRequestStatus.validateJsonElement(jsonObj.get("status")); + } + // validate the optional field `dataType` + if (jsonObj.get("dataType") != null && !jsonObj.get("dataType").isJsonNull()) { + RenewalsSearchRequestDataType.validateJsonElement(jsonObj.get("dataType")); + } + if ((jsonObj.get("vendor") != null && !jsonObj.get("vendor").isJsonNull()) && !jsonObj.get("vendor").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendor").toString())); + } + if ((jsonObj.get("endUser") != null && !jsonObj.get("endUser").isJsonNull()) && !jsonObj.get("endUser").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endUser` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endUser").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RenewalsSearchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RenewalsSearchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RenewalsSearchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RenewalsSearchRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RenewalsSearchRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RenewalsSearchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of RenewalsSearchRequest + * @throws IOException if the JSON string is invalid with respect to RenewalsSearchRequest + */ + public static RenewalsSearchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RenewalsSearchRequest.class); + } + + /** + * Convert an instance of RenewalsSearchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/RenewalsSearchRequestDataType.java b/src/main/java/xiresellers/client/model/RenewalsSearchRequestDataType.java new file mode 100644 index 00000000..4f4ab01d --- /dev/null +++ b/src/main/java/xiresellers/client/model/RenewalsSearchRequestDataType.java @@ -0,0 +1,301 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.RenewalsSearchRequestDataTypeEndDate; +import xiresellers.client.model.RenewalsSearchRequestDataTypeExpirationDate; +import xiresellers.client.model.RenewalsSearchRequestDataTypeInvoiceDate; +import xiresellers.client.model.RenewalsSearchRequestDataTypeStartDate; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * RenewalsSearchRequestDataType + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class RenewalsSearchRequestDataType { + public static final String SERIALIZED_NAME_START_DATE = "startDate"; + @SerializedName(SERIALIZED_NAME_START_DATE) + private RenewalsSearchRequestDataTypeStartDate startDate; + + public static final String SERIALIZED_NAME_END_DATE = "endDate"; + @SerializedName(SERIALIZED_NAME_END_DATE) + private RenewalsSearchRequestDataTypeEndDate endDate; + + public static final String SERIALIZED_NAME_INVOICE_DATE = "invoiceDate"; + @SerializedName(SERIALIZED_NAME_INVOICE_DATE) + private RenewalsSearchRequestDataTypeInvoiceDate invoiceDate; + + public static final String SERIALIZED_NAME_EXPIRATION_DATE = "expirationDate"; + @SerializedName(SERIALIZED_NAME_EXPIRATION_DATE) + private RenewalsSearchRequestDataTypeExpirationDate expirationDate; + + public RenewalsSearchRequestDataType() { + } + + public RenewalsSearchRequestDataType startDate(RenewalsSearchRequestDataTypeStartDate startDate) { + this.startDate = startDate; + return this; + } + + /** + * Get startDate + * @return startDate + **/ + @javax.annotation.Nullable + public RenewalsSearchRequestDataTypeStartDate getStartDate() { + return startDate; + } + + public void setStartDate(RenewalsSearchRequestDataTypeStartDate startDate) { + this.startDate = startDate; + } + + + public RenewalsSearchRequestDataType endDate(RenewalsSearchRequestDataTypeEndDate endDate) { + this.endDate = endDate; + return this; + } + + /** + * Get endDate + * @return endDate + **/ + @javax.annotation.Nullable + public RenewalsSearchRequestDataTypeEndDate getEndDate() { + return endDate; + } + + public void setEndDate(RenewalsSearchRequestDataTypeEndDate endDate) { + this.endDate = endDate; + } + + + public RenewalsSearchRequestDataType invoiceDate(RenewalsSearchRequestDataTypeInvoiceDate invoiceDate) { + this.invoiceDate = invoiceDate; + return this; + } + + /** + * Get invoiceDate + * @return invoiceDate + **/ + @javax.annotation.Nullable + public RenewalsSearchRequestDataTypeInvoiceDate getInvoiceDate() { + return invoiceDate; + } + + public void setInvoiceDate(RenewalsSearchRequestDataTypeInvoiceDate invoiceDate) { + this.invoiceDate = invoiceDate; + } + + + public RenewalsSearchRequestDataType expirationDate(RenewalsSearchRequestDataTypeExpirationDate expirationDate) { + this.expirationDate = expirationDate; + return this; + } + + /** + * Get expirationDate + * @return expirationDate + **/ + @javax.annotation.Nullable + public RenewalsSearchRequestDataTypeExpirationDate getExpirationDate() { + return expirationDate; + } + + public void setExpirationDate(RenewalsSearchRequestDataTypeExpirationDate expirationDate) { + this.expirationDate = expirationDate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RenewalsSearchRequestDataType renewalsSearchRequestDataType = (RenewalsSearchRequestDataType) o; + return Objects.equals(this.startDate, renewalsSearchRequestDataType.startDate) && + Objects.equals(this.endDate, renewalsSearchRequestDataType.endDate) && + Objects.equals(this.invoiceDate, renewalsSearchRequestDataType.invoiceDate) && + Objects.equals(this.expirationDate, renewalsSearchRequestDataType.expirationDate); + } + + @Override + public int hashCode() { + return Objects.hash(startDate, endDate, invoiceDate, expirationDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RenewalsSearchRequestDataType {\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" invoiceDate: ").append(toIndentedString(invoiceDate)).append("\n"); + sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("startDate"); + openapiFields.add("endDate"); + openapiFields.add("invoiceDate"); + openapiFields.add("expirationDate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RenewalsSearchRequestDataType + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RenewalsSearchRequestDataType.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RenewalsSearchRequestDataType is not found in the empty JSON string", RenewalsSearchRequestDataType.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RenewalsSearchRequestDataType.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RenewalsSearchRequestDataType` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `startDate` + if (jsonObj.get("startDate") != null && !jsonObj.get("startDate").isJsonNull()) { + RenewalsSearchRequestDataTypeStartDate.validateJsonElement(jsonObj.get("startDate")); + } + // validate the optional field `endDate` + if (jsonObj.get("endDate") != null && !jsonObj.get("endDate").isJsonNull()) { + RenewalsSearchRequestDataTypeEndDate.validateJsonElement(jsonObj.get("endDate")); + } + // validate the optional field `invoiceDate` + if (jsonObj.get("invoiceDate") != null && !jsonObj.get("invoiceDate").isJsonNull()) { + RenewalsSearchRequestDataTypeInvoiceDate.validateJsonElement(jsonObj.get("invoiceDate")); + } + // validate the optional field `expirationDate` + if (jsonObj.get("expirationDate") != null && !jsonObj.get("expirationDate").isJsonNull()) { + RenewalsSearchRequestDataTypeExpirationDate.validateJsonElement(jsonObj.get("expirationDate")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RenewalsSearchRequestDataType.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RenewalsSearchRequestDataType' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RenewalsSearchRequestDataType.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RenewalsSearchRequestDataType value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RenewalsSearchRequestDataType read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RenewalsSearchRequestDataType given an JSON string + * + * @param jsonString JSON string + * @return An instance of RenewalsSearchRequestDataType + * @throws IOException if the JSON string is invalid with respect to RenewalsSearchRequestDataType + */ + public static RenewalsSearchRequestDataType fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RenewalsSearchRequestDataType.class); + } + + /** + * Convert an instance of RenewalsSearchRequestDataType to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/RenewalsSearchRequestDataTypeEndDate.java b/src/main/java/xiresellers/client/model/RenewalsSearchRequestDataTypeEndDate.java new file mode 100644 index 00000000..afcaa472 --- /dev/null +++ b/src/main/java/xiresellers/client/model/RenewalsSearchRequestDataTypeEndDate.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * RenewalsSearchRequestDataTypeEndDate + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class RenewalsSearchRequestDataTypeEndDate { + public static final String SERIALIZED_NAME_CUSTOM_START_DATE = "customStartDate"; + @SerializedName(SERIALIZED_NAME_CUSTOM_START_DATE) + private String customStartDate; + + public static final String SERIALIZED_NAME_CUSTOM_END_DATE = "customEndDate"; + @SerializedName(SERIALIZED_NAME_CUSTOM_END_DATE) + private String customEndDate; + + public RenewalsSearchRequestDataTypeEndDate() { + } + + public RenewalsSearchRequestDataTypeEndDate customStartDate(String customStartDate) { + this.customStartDate = customStartDate; + return this; + } + + /** + * Custom from date for Renewal end date. + * @return customStartDate + **/ + @javax.annotation.Nullable + public String getCustomStartDate() { + return customStartDate; + } + + public void setCustomStartDate(String customStartDate) { + this.customStartDate = customStartDate; + } + + + public RenewalsSearchRequestDataTypeEndDate customEndDate(String customEndDate) { + this.customEndDate = customEndDate; + return this; + } + + /** + * Custom to date for Renewal end date. + * @return customEndDate + **/ + @javax.annotation.Nullable + public String getCustomEndDate() { + return customEndDate; + } + + public void setCustomEndDate(String customEndDate) { + this.customEndDate = customEndDate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RenewalsSearchRequestDataTypeEndDate renewalsSearchRequestDataTypeEndDate = (RenewalsSearchRequestDataTypeEndDate) o; + return Objects.equals(this.customStartDate, renewalsSearchRequestDataTypeEndDate.customStartDate) && + Objects.equals(this.customEndDate, renewalsSearchRequestDataTypeEndDate.customEndDate); + } + + @Override + public int hashCode() { + return Objects.hash(customStartDate, customEndDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RenewalsSearchRequestDataTypeEndDate {\n"); + sb.append(" customStartDate: ").append(toIndentedString(customStartDate)).append("\n"); + sb.append(" customEndDate: ").append(toIndentedString(customEndDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("customStartDate"); + openapiFields.add("customEndDate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RenewalsSearchRequestDataTypeEndDate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RenewalsSearchRequestDataTypeEndDate.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RenewalsSearchRequestDataTypeEndDate is not found in the empty JSON string", RenewalsSearchRequestDataTypeEndDate.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RenewalsSearchRequestDataTypeEndDate.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RenewalsSearchRequestDataTypeEndDate` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("customStartDate") != null && !jsonObj.get("customStartDate").isJsonNull()) && !jsonObj.get("customStartDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customStartDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customStartDate").toString())); + } + if ((jsonObj.get("customEndDate") != null && !jsonObj.get("customEndDate").isJsonNull()) && !jsonObj.get("customEndDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customEndDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customEndDate").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RenewalsSearchRequestDataTypeEndDate.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RenewalsSearchRequestDataTypeEndDate' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RenewalsSearchRequestDataTypeEndDate.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RenewalsSearchRequestDataTypeEndDate value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RenewalsSearchRequestDataTypeEndDate read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RenewalsSearchRequestDataTypeEndDate given an JSON string + * + * @param jsonString JSON string + * @return An instance of RenewalsSearchRequestDataTypeEndDate + * @throws IOException if the JSON string is invalid with respect to RenewalsSearchRequestDataTypeEndDate + */ + public static RenewalsSearchRequestDataTypeEndDate fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RenewalsSearchRequestDataTypeEndDate.class); + } + + /** + * Convert an instance of RenewalsSearchRequestDataTypeEndDate to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/RenewalsSearchRequestDataTypeExpirationDate.java b/src/main/java/xiresellers/client/model/RenewalsSearchRequestDataTypeExpirationDate.java new file mode 100644 index 00000000..4cf677e5 --- /dev/null +++ b/src/main/java/xiresellers/client/model/RenewalsSearchRequestDataTypeExpirationDate.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * RenewalsSearchRequestDataTypeExpirationDate + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class RenewalsSearchRequestDataTypeExpirationDate { + public static final String SERIALIZED_NAME_CUSTOM_START_DATE = "customStartDate"; + @SerializedName(SERIALIZED_NAME_CUSTOM_START_DATE) + private String customStartDate; + + public static final String SERIALIZED_NAME_CUSTOM_END_DATE = "customEndDate"; + @SerializedName(SERIALIZED_NAME_CUSTOM_END_DATE) + private String customEndDate; + + public RenewalsSearchRequestDataTypeExpirationDate() { + } + + public RenewalsSearchRequestDataTypeExpirationDate customStartDate(String customStartDate) { + this.customStartDate = customStartDate; + return this; + } + + /** + * Custom start date for expiration date. + * @return customStartDate + **/ + @javax.annotation.Nullable + public String getCustomStartDate() { + return customStartDate; + } + + public void setCustomStartDate(String customStartDate) { + this.customStartDate = customStartDate; + } + + + public RenewalsSearchRequestDataTypeExpirationDate customEndDate(String customEndDate) { + this.customEndDate = customEndDate; + return this; + } + + /** + * Custom end date for expiration date. + * @return customEndDate + **/ + @javax.annotation.Nullable + public String getCustomEndDate() { + return customEndDate; + } + + public void setCustomEndDate(String customEndDate) { + this.customEndDate = customEndDate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RenewalsSearchRequestDataTypeExpirationDate renewalsSearchRequestDataTypeExpirationDate = (RenewalsSearchRequestDataTypeExpirationDate) o; + return Objects.equals(this.customStartDate, renewalsSearchRequestDataTypeExpirationDate.customStartDate) && + Objects.equals(this.customEndDate, renewalsSearchRequestDataTypeExpirationDate.customEndDate); + } + + @Override + public int hashCode() { + return Objects.hash(customStartDate, customEndDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RenewalsSearchRequestDataTypeExpirationDate {\n"); + sb.append(" customStartDate: ").append(toIndentedString(customStartDate)).append("\n"); + sb.append(" customEndDate: ").append(toIndentedString(customEndDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("customStartDate"); + openapiFields.add("customEndDate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RenewalsSearchRequestDataTypeExpirationDate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RenewalsSearchRequestDataTypeExpirationDate.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RenewalsSearchRequestDataTypeExpirationDate is not found in the empty JSON string", RenewalsSearchRequestDataTypeExpirationDate.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RenewalsSearchRequestDataTypeExpirationDate.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RenewalsSearchRequestDataTypeExpirationDate` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("customStartDate") != null && !jsonObj.get("customStartDate").isJsonNull()) && !jsonObj.get("customStartDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customStartDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customStartDate").toString())); + } + if ((jsonObj.get("customEndDate") != null && !jsonObj.get("customEndDate").isJsonNull()) && !jsonObj.get("customEndDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customEndDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customEndDate").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RenewalsSearchRequestDataTypeExpirationDate.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RenewalsSearchRequestDataTypeExpirationDate' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RenewalsSearchRequestDataTypeExpirationDate.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RenewalsSearchRequestDataTypeExpirationDate value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RenewalsSearchRequestDataTypeExpirationDate read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RenewalsSearchRequestDataTypeExpirationDate given an JSON string + * + * @param jsonString JSON string + * @return An instance of RenewalsSearchRequestDataTypeExpirationDate + * @throws IOException if the JSON string is invalid with respect to RenewalsSearchRequestDataTypeExpirationDate + */ + public static RenewalsSearchRequestDataTypeExpirationDate fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RenewalsSearchRequestDataTypeExpirationDate.class); + } + + /** + * Convert an instance of RenewalsSearchRequestDataTypeExpirationDate to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/RenewalsSearchRequestDataTypeInvoiceDate.java b/src/main/java/xiresellers/client/model/RenewalsSearchRequestDataTypeInvoiceDate.java new file mode 100644 index 00000000..e916d00b --- /dev/null +++ b/src/main/java/xiresellers/client/model/RenewalsSearchRequestDataTypeInvoiceDate.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * RenewalsSearchRequestDataTypeInvoiceDate + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class RenewalsSearchRequestDataTypeInvoiceDate { + public static final String SERIALIZED_NAME_CUSTOM_START_DATE = "customStartDate"; + @SerializedName(SERIALIZED_NAME_CUSTOM_START_DATE) + private String customStartDate; + + public static final String SERIALIZED_NAME_CUSTOM_END_DATE = "customEndDate"; + @SerializedName(SERIALIZED_NAME_CUSTOM_END_DATE) + private String customEndDate; + + public RenewalsSearchRequestDataTypeInvoiceDate() { + } + + public RenewalsSearchRequestDataTypeInvoiceDate customStartDate(String customStartDate) { + this.customStartDate = customStartDate; + return this; + } + + /** + * Custom start date for invoice date. + * @return customStartDate + **/ + @javax.annotation.Nullable + public String getCustomStartDate() { + return customStartDate; + } + + public void setCustomStartDate(String customStartDate) { + this.customStartDate = customStartDate; + } + + + public RenewalsSearchRequestDataTypeInvoiceDate customEndDate(String customEndDate) { + this.customEndDate = customEndDate; + return this; + } + + /** + * Custom end date for invoice date. + * @return customEndDate + **/ + @javax.annotation.Nullable + public String getCustomEndDate() { + return customEndDate; + } + + public void setCustomEndDate(String customEndDate) { + this.customEndDate = customEndDate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RenewalsSearchRequestDataTypeInvoiceDate renewalsSearchRequestDataTypeInvoiceDate = (RenewalsSearchRequestDataTypeInvoiceDate) o; + return Objects.equals(this.customStartDate, renewalsSearchRequestDataTypeInvoiceDate.customStartDate) && + Objects.equals(this.customEndDate, renewalsSearchRequestDataTypeInvoiceDate.customEndDate); + } + + @Override + public int hashCode() { + return Objects.hash(customStartDate, customEndDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RenewalsSearchRequestDataTypeInvoiceDate {\n"); + sb.append(" customStartDate: ").append(toIndentedString(customStartDate)).append("\n"); + sb.append(" customEndDate: ").append(toIndentedString(customEndDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("customStartDate"); + openapiFields.add("customEndDate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RenewalsSearchRequestDataTypeInvoiceDate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RenewalsSearchRequestDataTypeInvoiceDate.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RenewalsSearchRequestDataTypeInvoiceDate is not found in the empty JSON string", RenewalsSearchRequestDataTypeInvoiceDate.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RenewalsSearchRequestDataTypeInvoiceDate.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RenewalsSearchRequestDataTypeInvoiceDate` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("customStartDate") != null && !jsonObj.get("customStartDate").isJsonNull()) && !jsonObj.get("customStartDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customStartDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customStartDate").toString())); + } + if ((jsonObj.get("customEndDate") != null && !jsonObj.get("customEndDate").isJsonNull()) && !jsonObj.get("customEndDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customEndDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customEndDate").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RenewalsSearchRequestDataTypeInvoiceDate.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RenewalsSearchRequestDataTypeInvoiceDate' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RenewalsSearchRequestDataTypeInvoiceDate.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RenewalsSearchRequestDataTypeInvoiceDate value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RenewalsSearchRequestDataTypeInvoiceDate read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RenewalsSearchRequestDataTypeInvoiceDate given an JSON string + * + * @param jsonString JSON string + * @return An instance of RenewalsSearchRequestDataTypeInvoiceDate + * @throws IOException if the JSON string is invalid with respect to RenewalsSearchRequestDataTypeInvoiceDate + */ + public static RenewalsSearchRequestDataTypeInvoiceDate fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RenewalsSearchRequestDataTypeInvoiceDate.class); + } + + /** + * Convert an instance of RenewalsSearchRequestDataTypeInvoiceDate to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/RenewalsSearchRequestDataTypeStartDate.java b/src/main/java/xiresellers/client/model/RenewalsSearchRequestDataTypeStartDate.java new file mode 100644 index 00000000..8976aa99 --- /dev/null +++ b/src/main/java/xiresellers/client/model/RenewalsSearchRequestDataTypeStartDate.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * RenewalsSearchRequestDataTypeStartDate + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class RenewalsSearchRequestDataTypeStartDate { + public static final String SERIALIZED_NAME_CUSTOM_START_DATE = "customStartDate"; + @SerializedName(SERIALIZED_NAME_CUSTOM_START_DATE) + private String customStartDate; + + public static final String SERIALIZED_NAME_CUSTOM_END_DATE = "customEndDate"; + @SerializedName(SERIALIZED_NAME_CUSTOM_END_DATE) + private String customEndDate; + + public RenewalsSearchRequestDataTypeStartDate() { + } + + public RenewalsSearchRequestDataTypeStartDate customStartDate(String customStartDate) { + this.customStartDate = customStartDate; + return this; + } + + /** + * Custom from date for Renewal Start date. + * @return customStartDate + **/ + @javax.annotation.Nullable + public String getCustomStartDate() { + return customStartDate; + } + + public void setCustomStartDate(String customStartDate) { + this.customStartDate = customStartDate; + } + + + public RenewalsSearchRequestDataTypeStartDate customEndDate(String customEndDate) { + this.customEndDate = customEndDate; + return this; + } + + /** + * Custom to date for Renewal Start date. + * @return customEndDate + **/ + @javax.annotation.Nullable + public String getCustomEndDate() { + return customEndDate; + } + + public void setCustomEndDate(String customEndDate) { + this.customEndDate = customEndDate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RenewalsSearchRequestDataTypeStartDate renewalsSearchRequestDataTypeStartDate = (RenewalsSearchRequestDataTypeStartDate) o; + return Objects.equals(this.customStartDate, renewalsSearchRequestDataTypeStartDate.customStartDate) && + Objects.equals(this.customEndDate, renewalsSearchRequestDataTypeStartDate.customEndDate); + } + + @Override + public int hashCode() { + return Objects.hash(customStartDate, customEndDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RenewalsSearchRequestDataTypeStartDate {\n"); + sb.append(" customStartDate: ").append(toIndentedString(customStartDate)).append("\n"); + sb.append(" customEndDate: ").append(toIndentedString(customEndDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("customStartDate"); + openapiFields.add("customEndDate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RenewalsSearchRequestDataTypeStartDate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RenewalsSearchRequestDataTypeStartDate.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RenewalsSearchRequestDataTypeStartDate is not found in the empty JSON string", RenewalsSearchRequestDataTypeStartDate.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RenewalsSearchRequestDataTypeStartDate.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RenewalsSearchRequestDataTypeStartDate` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("customStartDate") != null && !jsonObj.get("customStartDate").isJsonNull()) && !jsonObj.get("customStartDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customStartDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customStartDate").toString())); + } + if ((jsonObj.get("customEndDate") != null && !jsonObj.get("customEndDate").isJsonNull()) && !jsonObj.get("customEndDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customEndDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customEndDate").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RenewalsSearchRequestDataTypeStartDate.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RenewalsSearchRequestDataTypeStartDate' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RenewalsSearchRequestDataTypeStartDate.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RenewalsSearchRequestDataTypeStartDate value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RenewalsSearchRequestDataTypeStartDate read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RenewalsSearchRequestDataTypeStartDate given an JSON string + * + * @param jsonString JSON string + * @return An instance of RenewalsSearchRequestDataTypeStartDate + * @throws IOException if the JSON string is invalid with respect to RenewalsSearchRequestDataTypeStartDate + */ + public static RenewalsSearchRequestDataTypeStartDate fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RenewalsSearchRequestDataTypeStartDate.class); + } + + /** + * Convert an instance of RenewalsSearchRequestDataTypeStartDate to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/RenewalsSearchRequestStatus.java b/src/main/java/xiresellers/client/model/RenewalsSearchRequestStatus.java new file mode 100644 index 00000000..eb6b7229 --- /dev/null +++ b/src/main/java/xiresellers/client/model/RenewalsSearchRequestStatus.java @@ -0,0 +1,208 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.RenewalsSearchRequestStatusOpporutinyStatus; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * RenewalsSearchRequestStatus + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class RenewalsSearchRequestStatus { + public static final String SERIALIZED_NAME_OPPORUTINY_STATUS = "OpporutinyStatus"; + @SerializedName(SERIALIZED_NAME_OPPORUTINY_STATUS) + private RenewalsSearchRequestStatusOpporutinyStatus opporutinyStatus; + + public RenewalsSearchRequestStatus() { + } + + public RenewalsSearchRequestStatus opporutinyStatus(RenewalsSearchRequestStatusOpporutinyStatus opporutinyStatus) { + this.opporutinyStatus = opporutinyStatus; + return this; + } + + /** + * Get opporutinyStatus + * @return opporutinyStatus + **/ + @javax.annotation.Nullable + public RenewalsSearchRequestStatusOpporutinyStatus getOpporutinyStatus() { + return opporutinyStatus; + } + + public void setOpporutinyStatus(RenewalsSearchRequestStatusOpporutinyStatus opporutinyStatus) { + this.opporutinyStatus = opporutinyStatus; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RenewalsSearchRequestStatus renewalsSearchRequestStatus = (RenewalsSearchRequestStatus) o; + return Objects.equals(this.opporutinyStatus, renewalsSearchRequestStatus.opporutinyStatus); + } + + @Override + public int hashCode() { + return Objects.hash(opporutinyStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RenewalsSearchRequestStatus {\n"); + sb.append(" opporutinyStatus: ").append(toIndentedString(opporutinyStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("OpporutinyStatus"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RenewalsSearchRequestStatus + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RenewalsSearchRequestStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RenewalsSearchRequestStatus is not found in the empty JSON string", RenewalsSearchRequestStatus.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RenewalsSearchRequestStatus.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RenewalsSearchRequestStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `OpporutinyStatus` + if (jsonObj.get("OpporutinyStatus") != null && !jsonObj.get("OpporutinyStatus").isJsonNull()) { + RenewalsSearchRequestStatusOpporutinyStatus.validateJsonElement(jsonObj.get("OpporutinyStatus")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RenewalsSearchRequestStatus.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RenewalsSearchRequestStatus' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RenewalsSearchRequestStatus.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RenewalsSearchRequestStatus value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RenewalsSearchRequestStatus read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RenewalsSearchRequestStatus given an JSON string + * + * @param jsonString JSON string + * @return An instance of RenewalsSearchRequestStatus + * @throws IOException if the JSON string is invalid with respect to RenewalsSearchRequestStatus + */ + public static RenewalsSearchRequestStatus fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RenewalsSearchRequestStatus.class); + } + + /** + * Convert an instance of RenewalsSearchRequestStatus to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/RenewalsSearchRequestStatusOpporutinyStatus.java b/src/main/java/xiresellers/client/model/RenewalsSearchRequestStatusOpporutinyStatus.java new file mode 100644 index 00000000..5f97eb44 --- /dev/null +++ b/src/main/java/xiresellers/client/model/RenewalsSearchRequestStatusOpporutinyStatus.java @@ -0,0 +1,235 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * RenewalsSearchRequestStatusOpporutinyStatus + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class RenewalsSearchRequestStatusOpporutinyStatus { + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private String value; + + public static final String SERIALIZED_NAME_SUB_STATUS = "subStatus"; + @SerializedName(SERIALIZED_NAME_SUB_STATUS) + private String subStatus; + + public RenewalsSearchRequestStatusOpporutinyStatus() { + } + + public RenewalsSearchRequestStatusOpporutinyStatus value(String value) { + this.value = value; + return this; + } + + /** + * The value of opportunity status, it can be either Open or Closed. + * @return value + **/ + @javax.annotation.Nullable + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + + public RenewalsSearchRequestStatusOpporutinyStatus subStatus(String subStatus) { + this.subStatus = subStatus; + return this; + } + + /** + * The sub-status of Opportunity status. Possible sub-status values for Open opportunity status are Ready to order, Quote pending, Notification sent, Future, and Quote requested. Possible sub-status values for Closed opportunity status are All, Ordered, Quote closed-contract sales desk, Expired, Transition to new/upsell, Lost to competitior, Consolidated, Transitioned to cloud, Renewal went direct, EOL, End user out of business, Void, Other, and Cancelled. + * @return subStatus + **/ + @javax.annotation.Nullable + public String getSubStatus() { + return subStatus; + } + + public void setSubStatus(String subStatus) { + this.subStatus = subStatus; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RenewalsSearchRequestStatusOpporutinyStatus renewalsSearchRequestStatusOpporutinyStatus = (RenewalsSearchRequestStatusOpporutinyStatus) o; + return Objects.equals(this.value, renewalsSearchRequestStatusOpporutinyStatus.value) && + Objects.equals(this.subStatus, renewalsSearchRequestStatusOpporutinyStatus.subStatus); + } + + @Override + public int hashCode() { + return Objects.hash(value, subStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RenewalsSearchRequestStatusOpporutinyStatus {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" subStatus: ").append(toIndentedString(subStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("value"); + openapiFields.add("subStatus"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RenewalsSearchRequestStatusOpporutinyStatus + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RenewalsSearchRequestStatusOpporutinyStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RenewalsSearchRequestStatusOpporutinyStatus is not found in the empty JSON string", RenewalsSearchRequestStatusOpporutinyStatus.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RenewalsSearchRequestStatusOpporutinyStatus.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RenewalsSearchRequestStatusOpporutinyStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + if ((jsonObj.get("subStatus") != null && !jsonObj.get("subStatus").isJsonNull()) && !jsonObj.get("subStatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subStatus").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RenewalsSearchRequestStatusOpporutinyStatus.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RenewalsSearchRequestStatusOpporutinyStatus' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RenewalsSearchRequestStatusOpporutinyStatus.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RenewalsSearchRequestStatusOpporutinyStatus value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RenewalsSearchRequestStatusOpporutinyStatus read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RenewalsSearchRequestStatusOpporutinyStatus given an JSON string + * + * @param jsonString JSON string + * @return An instance of RenewalsSearchRequestStatusOpporutinyStatus + * @throws IOException if the JSON string is invalid with respect to RenewalsSearchRequestStatusOpporutinyStatus + */ + public static RenewalsSearchRequestStatusOpporutinyStatus fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RenewalsSearchRequestStatusOpporutinyStatus.class); + } + + /** + * Convert an instance of RenewalsSearchRequestStatusOpporutinyStatus to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/RenewalsSearchResponse.java b/src/main/java/xiresellers/client/model/RenewalsSearchResponse.java new file mode 100644 index 00000000..674c5543 --- /dev/null +++ b/src/main/java/xiresellers/client/model/RenewalsSearchResponse.java @@ -0,0 +1,364 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.RenewalsSearchResponseRenewalsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * RenewalsSearchResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class RenewalsSearchResponse { + public static final String SERIALIZED_NAME_RECORDS_FOUND = "recordsFound"; + @SerializedName(SERIALIZED_NAME_RECORDS_FOUND) + private Integer recordsFound; + + public static final String SERIALIZED_NAME_PAGE_SIZE = "pageSize"; + @SerializedName(SERIALIZED_NAME_PAGE_SIZE) + private Integer pageSize; + + public static final String SERIALIZED_NAME_PAGE_NUMBER = "pageNumber"; + @SerializedName(SERIALIZED_NAME_PAGE_NUMBER) + private Integer pageNumber; + + public static final String SERIALIZED_NAME_RENEWALS = "renewals"; + @SerializedName(SERIALIZED_NAME_RENEWALS) + private List renewals; + + public static final String SERIALIZED_NAME_NEXT_PAGE = "nextPage"; + @SerializedName(SERIALIZED_NAME_NEXT_PAGE) + private String nextPage; + + public static final String SERIALIZED_NAME_PREVIOUS_PAGE = "previousPage"; + @SerializedName(SERIALIZED_NAME_PREVIOUS_PAGE) + private String previousPage; + + public RenewalsSearchResponse() { + } + + public RenewalsSearchResponse recordsFound(Integer recordsFound) { + this.recordsFound = recordsFound; + return this; + } + + /** + * Number of records found. + * @return recordsFound + **/ + @javax.annotation.Nullable + public Integer getRecordsFound() { + return recordsFound; + } + + public void setRecordsFound(Integer recordsFound) { + this.recordsFound = recordsFound; + } + + + public RenewalsSearchResponse pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Number of records in a page. + * @return pageSize + **/ + @javax.annotation.Nullable + public Integer getPageSize() { + return pageSize; + } + + public void setPageSize(Integer pageSize) { + this.pageSize = pageSize; + } + + + public RenewalsSearchResponse pageNumber(Integer pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Number of page. + * @return pageNumber + **/ + @javax.annotation.Nullable + public Integer getPageNumber() { + return pageNumber; + } + + public void setPageNumber(Integer pageNumber) { + this.pageNumber = pageNumber; + } + + + public RenewalsSearchResponse renewals(List renewals) { + this.renewals = renewals; + return this; + } + + public RenewalsSearchResponse addRenewalsItem(RenewalsSearchResponseRenewalsInner renewalsItem) { + if (this.renewals == null) { + this.renewals = new ArrayList<>(); + } + this.renewals.add(renewalsItem); + return this; + } + + /** + * Get renewals + * @return renewals + **/ + @javax.annotation.Nullable + public List getRenewals() { + return renewals; + } + + public void setRenewals(List renewals) { + this.renewals = renewals; + } + + + public RenewalsSearchResponse nextPage(String nextPage) { + this.nextPage = nextPage; + return this; + } + + /** + * URL for the next page. + * @return nextPage + **/ + @javax.annotation.Nullable + public String getNextPage() { + return nextPage; + } + + public void setNextPage(String nextPage) { + this.nextPage = nextPage; + } + + + public RenewalsSearchResponse previousPage(String previousPage) { + this.previousPage = previousPage; + return this; + } + + /** + * URL for the previous page. + * @return previousPage + **/ + @javax.annotation.Nullable + public String getPreviousPage() { + return previousPage; + } + + public void setPreviousPage(String previousPage) { + this.previousPage = previousPage; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RenewalsSearchResponse renewalsSearchResponse = (RenewalsSearchResponse) o; + return Objects.equals(this.recordsFound, renewalsSearchResponse.recordsFound) && + Objects.equals(this.pageSize, renewalsSearchResponse.pageSize) && + Objects.equals(this.pageNumber, renewalsSearchResponse.pageNumber) && + Objects.equals(this.renewals, renewalsSearchResponse.renewals) && + Objects.equals(this.nextPage, renewalsSearchResponse.nextPage) && + Objects.equals(this.previousPage, renewalsSearchResponse.previousPage); + } + + @Override + public int hashCode() { + return Objects.hash(recordsFound, pageSize, pageNumber, renewals, nextPage, previousPage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RenewalsSearchResponse {\n"); + sb.append(" recordsFound: ").append(toIndentedString(recordsFound)).append("\n"); + sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); + sb.append(" pageNumber: ").append(toIndentedString(pageNumber)).append("\n"); + sb.append(" renewals: ").append(toIndentedString(renewals)).append("\n"); + sb.append(" nextPage: ").append(toIndentedString(nextPage)).append("\n"); + sb.append(" previousPage: ").append(toIndentedString(previousPage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("recordsFound"); + openapiFields.add("pageSize"); + openapiFields.add("pageNumber"); + openapiFields.add("renewals"); + openapiFields.add("nextPage"); + openapiFields.add("previousPage"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RenewalsSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RenewalsSearchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RenewalsSearchResponse is not found in the empty JSON string", RenewalsSearchResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RenewalsSearchResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RenewalsSearchResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("renewals") != null && !jsonObj.get("renewals").isJsonNull()) { + JsonArray jsonArrayrenewals = jsonObj.getAsJsonArray("renewals"); + if (jsonArrayrenewals != null) { + // ensure the json data is an array + if (!jsonObj.get("renewals").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `renewals` to be an array in the JSON string but got `%s`", jsonObj.get("renewals").toString())); + } + + // validate the optional field `renewals` (array) + for (int i = 0; i < jsonArrayrenewals.size(); i++) { + RenewalsSearchResponseRenewalsInner.validateJsonElement(jsonArrayrenewals.get(i)); + }; + } + } + if ((jsonObj.get("nextPage") != null && !jsonObj.get("nextPage").isJsonNull()) && !jsonObj.get("nextPage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nextPage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextPage").toString())); + } + if ((jsonObj.get("previousPage") != null && !jsonObj.get("previousPage").isJsonNull()) && !jsonObj.get("previousPage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `previousPage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("previousPage").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RenewalsSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RenewalsSearchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RenewalsSearchResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RenewalsSearchResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RenewalsSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RenewalsSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of RenewalsSearchResponse + * @throws IOException if the JSON string is invalid with respect to RenewalsSearchResponse + */ + public static RenewalsSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RenewalsSearchResponse.class); + } + + /** + * Convert an instance of RenewalsSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/RenewalsSearchResponseRenewalsInner.java b/src/main/java/xiresellers/client/model/RenewalsSearchResponseRenewalsInner.java new file mode 100644 index 00000000..5f66da2f --- /dev/null +++ b/src/main/java/xiresellers/client/model/RenewalsSearchResponseRenewalsInner.java @@ -0,0 +1,460 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.RenewalsSearchResponseRenewalsInnerLinksInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * RenewalsSearchResponseRenewalsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class RenewalsSearchResponseRenewalsInner { + public static final String SERIALIZED_NAME_RENEWAL_ID = "renewalId"; + @SerializedName(SERIALIZED_NAME_RENEWAL_ID) + private String renewalId; + + public static final String SERIALIZED_NAME_CUSTOMER_ORDER_NUMBER = "customerOrderNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_ORDER_NUMBER) + private String customerOrderNumber; + + public static final String SERIALIZED_NAME_REFERENCE_NUMBER = "referenceNumber"; + @SerializedName(SERIALIZED_NAME_REFERENCE_NUMBER) + private String referenceNumber; + + public static final String SERIALIZED_NAME_END_USER = "endUser"; + @SerializedName(SERIALIZED_NAME_END_USER) + private String endUser; + + public static final String SERIALIZED_NAME_VENDOR = "vendor"; + @SerializedName(SERIALIZED_NAME_VENDOR) + private String vendor; + + public static final String SERIALIZED_NAME_EXPIRATION_DATE = "expirationDate"; + @SerializedName(SERIALIZED_NAME_EXPIRATION_DATE) + private String expirationDate; + + public static final String SERIALIZED_NAME_RENEWAL_VALUE = "renewalValue"; + @SerializedName(SERIALIZED_NAME_RENEWAL_VALUE) + private String renewalValue; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_LINKS = "links"; + @SerializedName(SERIALIZED_NAME_LINKS) + private List links; + + public RenewalsSearchResponseRenewalsInner() { + } + + public RenewalsSearchResponseRenewalsInner renewalId(String renewalId) { + this.renewalId = renewalId; + return this; + } + + /** + * Unique renewal ID. + * @return renewalId + **/ + @javax.annotation.Nullable + public String getRenewalId() { + return renewalId; + } + + public void setRenewalId(String renewalId) { + this.renewalId = renewalId; + } + + + public RenewalsSearchResponseRenewalsInner customerOrderNumber(String customerOrderNumber) { + this.customerOrderNumber = customerOrderNumber; + return this; + } + + /** + * The reseller's order number for reference in their system. + * @return customerOrderNumber + **/ + @javax.annotation.Nullable + public String getCustomerOrderNumber() { + return customerOrderNumber; + } + + public void setCustomerOrderNumber(String customerOrderNumber) { + this.customerOrderNumber = customerOrderNumber; + } + + + public RenewalsSearchResponseRenewalsInner referenceNumber(String referenceNumber) { + this.referenceNumber = referenceNumber; + return this; + } + + /** + * Renewal reference number. It could be notification id or quote number. + * @return referenceNumber + **/ + @javax.annotation.Nullable + public String getReferenceNumber() { + return referenceNumber; + } + + public void setReferenceNumber(String referenceNumber) { + this.referenceNumber = referenceNumber; + } + + + public RenewalsSearchResponseRenewalsInner endUser(String endUser) { + this.endUser = endUser; + return this; + } + + /** + * The company name for the end user/customer. + * @return endUser + **/ + @javax.annotation.Nullable + public String getEndUser() { + return endUser; + } + + public void setEndUser(String endUser) { + this.endUser = endUser; + } + + + public RenewalsSearchResponseRenewalsInner vendor(String vendor) { + this.vendor = vendor; + return this; + } + + /** + * The name of the vendor. + * @return vendor + **/ + @javax.annotation.Nullable + public String getVendor() { + return vendor; + } + + public void setVendor(String vendor) { + this.vendor = vendor; + } + + + public RenewalsSearchResponseRenewalsInner expirationDate(String expirationDate) { + this.expirationDate = expirationDate; + return this; + } + + /** + * Renewal expiration date. + * @return expirationDate + **/ + @javax.annotation.Nullable + public String getExpirationDate() { + return expirationDate; + } + + public void setExpirationDate(String expirationDate) { + this.expirationDate = expirationDate; + } + + + public RenewalsSearchResponseRenewalsInner renewalValue(String renewalValue) { + this.renewalValue = renewalValue; + return this; + } + + /** + * The value of the renewal. + * @return renewalValue + **/ + @javax.annotation.Nullable + public String getRenewalValue() { + return renewalValue; + } + + public void setRenewalValue(String renewalValue) { + this.renewalValue = renewalValue; + } + + + public RenewalsSearchResponseRenewalsInner status(String status) { + this.status = status; + return this; + } + + /** + * The status of the renewal. + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + public RenewalsSearchResponseRenewalsInner links(List links) { + this.links = links; + return this; + } + + public RenewalsSearchResponseRenewalsInner addLinksItem(RenewalsSearchResponseRenewalsInnerLinksInner linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * Get links + * @return links + **/ + @javax.annotation.Nullable + public List getLinks() { + return links; + } + + public void setLinks(List links) { + this.links = links; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RenewalsSearchResponseRenewalsInner renewalsSearchResponseRenewalsInner = (RenewalsSearchResponseRenewalsInner) o; + return Objects.equals(this.renewalId, renewalsSearchResponseRenewalsInner.renewalId) && + Objects.equals(this.customerOrderNumber, renewalsSearchResponseRenewalsInner.customerOrderNumber) && + Objects.equals(this.referenceNumber, renewalsSearchResponseRenewalsInner.referenceNumber) && + Objects.equals(this.endUser, renewalsSearchResponseRenewalsInner.endUser) && + Objects.equals(this.vendor, renewalsSearchResponseRenewalsInner.vendor) && + Objects.equals(this.expirationDate, renewalsSearchResponseRenewalsInner.expirationDate) && + Objects.equals(this.renewalValue, renewalsSearchResponseRenewalsInner.renewalValue) && + Objects.equals(this.status, renewalsSearchResponseRenewalsInner.status) && + Objects.equals(this.links, renewalsSearchResponseRenewalsInner.links); + } + + @Override + public int hashCode() { + return Objects.hash(renewalId, customerOrderNumber, referenceNumber, endUser, vendor, expirationDate, renewalValue, status, links); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RenewalsSearchResponseRenewalsInner {\n"); + sb.append(" renewalId: ").append(toIndentedString(renewalId)).append("\n"); + sb.append(" customerOrderNumber: ").append(toIndentedString(customerOrderNumber)).append("\n"); + sb.append(" referenceNumber: ").append(toIndentedString(referenceNumber)).append("\n"); + sb.append(" endUser: ").append(toIndentedString(endUser)).append("\n"); + sb.append(" vendor: ").append(toIndentedString(vendor)).append("\n"); + sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); + sb.append(" renewalValue: ").append(toIndentedString(renewalValue)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("renewalId"); + openapiFields.add("customerOrderNumber"); + openapiFields.add("referenceNumber"); + openapiFields.add("endUser"); + openapiFields.add("vendor"); + openapiFields.add("expirationDate"); + openapiFields.add("renewalValue"); + openapiFields.add("status"); + openapiFields.add("links"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RenewalsSearchResponseRenewalsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RenewalsSearchResponseRenewalsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RenewalsSearchResponseRenewalsInner is not found in the empty JSON string", RenewalsSearchResponseRenewalsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RenewalsSearchResponseRenewalsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RenewalsSearchResponseRenewalsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("renewalId") != null && !jsonObj.get("renewalId").isJsonNull()) && !jsonObj.get("renewalId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `renewalId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("renewalId").toString())); + } + if ((jsonObj.get("customerOrderNumber") != null && !jsonObj.get("customerOrderNumber").isJsonNull()) && !jsonObj.get("customerOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerOrderNumber").toString())); + } + if ((jsonObj.get("referenceNumber") != null && !jsonObj.get("referenceNumber").isJsonNull()) && !jsonObj.get("referenceNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `referenceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceNumber").toString())); + } + if ((jsonObj.get("endUser") != null && !jsonObj.get("endUser").isJsonNull()) && !jsonObj.get("endUser").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endUser` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endUser").toString())); + } + if ((jsonObj.get("vendor") != null && !jsonObj.get("vendor").isJsonNull()) && !jsonObj.get("vendor").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendor").toString())); + } + if ((jsonObj.get("expirationDate") != null && !jsonObj.get("expirationDate").isJsonNull()) && !jsonObj.get("expirationDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `expirationDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expirationDate").toString())); + } + if ((jsonObj.get("renewalValue") != null && !jsonObj.get("renewalValue").isJsonNull()) && !jsonObj.get("renewalValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `renewalValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("renewalValue").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull()) { + JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); + if (jsonArraylinks != null) { + // ensure the json data is an array + if (!jsonObj.get("links").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + } + + // validate the optional field `links` (array) + for (int i = 0; i < jsonArraylinks.size(); i++) { + RenewalsSearchResponseRenewalsInnerLinksInner.validateJsonElement(jsonArraylinks.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RenewalsSearchResponseRenewalsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RenewalsSearchResponseRenewalsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RenewalsSearchResponseRenewalsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RenewalsSearchResponseRenewalsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RenewalsSearchResponseRenewalsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RenewalsSearchResponseRenewalsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of RenewalsSearchResponseRenewalsInner + * @throws IOException if the JSON string is invalid with respect to RenewalsSearchResponseRenewalsInner + */ + public static RenewalsSearchResponseRenewalsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RenewalsSearchResponseRenewalsInner.class); + } + + /** + * Convert an instance of RenewalsSearchResponseRenewalsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/RenewalsSearchResponseRenewalsInnerLinksInner.java b/src/main/java/xiresellers/client/model/RenewalsSearchResponseRenewalsInnerLinksInner.java new file mode 100644 index 00000000..bb7493f8 --- /dev/null +++ b/src/main/java/xiresellers/client/model/RenewalsSearchResponseRenewalsInnerLinksInner.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * RenewalsSearchResponseRenewalsInnerLinksInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class RenewalsSearchResponseRenewalsInnerLinksInner { + public static final String SERIALIZED_NAME_TOPIC = "topic"; + @SerializedName(SERIALIZED_NAME_TOPIC) + private String topic; + + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + private String href; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public RenewalsSearchResponseRenewalsInnerLinksInner() { + } + + public RenewalsSearchResponseRenewalsInnerLinksInner topic(String topic) { + this.topic = topic; + return this; + } + + /** + * The topic of the link. + * @return topic + **/ + @javax.annotation.Nullable + public String getTopic() { + return topic; + } + + public void setTopic(String topic) { + this.topic = topic; + } + + + public RenewalsSearchResponseRenewalsInnerLinksInner href(String href) { + this.href = href; + return this; + } + + /** + * The URL of the topic. + * @return href + **/ + @javax.annotation.Nullable + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + + public RenewalsSearchResponseRenewalsInnerLinksInner type(String type) { + this.type = type; + return this; + } + + /** + * Type of a call. + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RenewalsSearchResponseRenewalsInnerLinksInner renewalsSearchResponseRenewalsInnerLinksInner = (RenewalsSearchResponseRenewalsInnerLinksInner) o; + return Objects.equals(this.topic, renewalsSearchResponseRenewalsInnerLinksInner.topic) && + Objects.equals(this.href, renewalsSearchResponseRenewalsInnerLinksInner.href) && + Objects.equals(this.type, renewalsSearchResponseRenewalsInnerLinksInner.type); + } + + @Override + public int hashCode() { + return Objects.hash(topic, href, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RenewalsSearchResponseRenewalsInnerLinksInner {\n"); + sb.append(" topic: ").append(toIndentedString(topic)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("topic"); + openapiFields.add("href"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RenewalsSearchResponseRenewalsInnerLinksInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RenewalsSearchResponseRenewalsInnerLinksInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RenewalsSearchResponseRenewalsInnerLinksInner is not found in the empty JSON string", RenewalsSearchResponseRenewalsInnerLinksInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RenewalsSearchResponseRenewalsInnerLinksInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RenewalsSearchResponseRenewalsInnerLinksInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("topic") != null && !jsonObj.get("topic").isJsonNull()) && !jsonObj.get("topic").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `topic` to be a primitive type in the JSON string but got `%s`", jsonObj.get("topic").toString())); + } + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RenewalsSearchResponseRenewalsInnerLinksInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RenewalsSearchResponseRenewalsInnerLinksInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RenewalsSearchResponseRenewalsInnerLinksInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RenewalsSearchResponseRenewalsInnerLinksInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RenewalsSearchResponseRenewalsInnerLinksInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RenewalsSearchResponseRenewalsInnerLinksInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of RenewalsSearchResponseRenewalsInnerLinksInner + * @throws IOException if the JSON string is invalid with respect to RenewalsSearchResponseRenewalsInnerLinksInner + */ + public static RenewalsSearchResponseRenewalsInnerLinksInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RenewalsSearchResponseRenewalsInnerLinksInner.class); + } + + /** + * Convert an instance of RenewalsSearchResponseRenewalsInnerLinksInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ReturnsCreateRequest.java b/src/main/java/xiresellers/client/model/ReturnsCreateRequest.java new file mode 100644 index 00000000..02266310 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ReturnsCreateRequest.java @@ -0,0 +1,228 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ReturnsCreateRequestListInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ReturnsCreateRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ReturnsCreateRequest { + public static final String SERIALIZED_NAME_LIST = "list"; + @SerializedName(SERIALIZED_NAME_LIST) + private List _list; + + public ReturnsCreateRequest() { + } + + public ReturnsCreateRequest _list(List _list) { + this._list = _list; + return this; + } + + public ReturnsCreateRequest addListItem(ReturnsCreateRequestListInner _listItem) { + if (this._list == null) { + this._list = new ArrayList<>(); + } + this._list.add(_listItem); + return this; + } + + /** + * Get _list + * @return _list + **/ + @javax.annotation.Nullable + public List getList() { + return _list; + } + + public void setList(List _list) { + this._list = _list; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnsCreateRequest returnsCreateRequest = (ReturnsCreateRequest) o; + return Objects.equals(this._list, returnsCreateRequest._list); + } + + @Override + public int hashCode() { + return Objects.hash(_list); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnsCreateRequest {\n"); + sb.append(" _list: ").append(toIndentedString(_list)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("list"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ReturnsCreateRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ReturnsCreateRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ReturnsCreateRequest is not found in the empty JSON string", ReturnsCreateRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ReturnsCreateRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReturnsCreateRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("list") != null && !jsonObj.get("list").isJsonNull()) { + JsonArray jsonArray_list = jsonObj.getAsJsonArray("list"); + if (jsonArray_list != null) { + // ensure the json data is an array + if (!jsonObj.get("list").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `list` to be an array in the JSON string but got `%s`", jsonObj.get("list").toString())); + } + + // validate the optional field `list` (array) + for (int i = 0; i < jsonArray_list.size(); i++) { + ReturnsCreateRequestListInner.validateJsonElement(jsonArray_list.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ReturnsCreateRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReturnsCreateRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ReturnsCreateRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ReturnsCreateRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ReturnsCreateRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ReturnsCreateRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReturnsCreateRequest + * @throws IOException if the JSON string is invalid with respect to ReturnsCreateRequest + */ + public static ReturnsCreateRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReturnsCreateRequest.class); + } + + /** + * Convert an instance of ReturnsCreateRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ReturnsCreateRequestListInner.java b/src/main/java/xiresellers/client/model/ReturnsCreateRequestListInner.java new file mode 100644 index 00000000..fcf73b47 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ReturnsCreateRequestListInner.java @@ -0,0 +1,607 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ReturnsCreateRequestListInnerShipFromInfoInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ReturnsCreateRequestListInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ReturnsCreateRequestListInner { + public static final String SERIALIZED_NAME_INVOICE_NUMBER = "invoiceNumber"; + @SerializedName(SERIALIZED_NAME_INVOICE_NUMBER) + private String invoiceNumber; + + public static final String SERIALIZED_NAME_INVOICE_DATE = "invoiceDate"; + @SerializedName(SERIALIZED_NAME_INVOICE_DATE) + private LocalDate invoiceDate; + + public static final String SERIALIZED_NAME_CUSTOMER_ORDER_NUMBER = "customerOrderNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_ORDER_NUMBER) + private String customerOrderNumber; + + public static final String SERIALIZED_NAME_INGRAM_PART_NUMBER = "ingramPartNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PART_NUMBER) + private String ingramPartNumber; + + public static final String SERIALIZED_NAME_VENDOR_PART_NUMBER = "vendorPartNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_PART_NUMBER) + private String vendorPartNumber; + + public static final String SERIALIZED_NAME_SERIAL_NUMBER = "serialNumber"; + @SerializedName(SERIALIZED_NAME_SERIAL_NUMBER) + private String serialNumber; + + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + @SerializedName(SERIALIZED_NAME_QUANTITY) + private Integer quantity; + + public static final String SERIALIZED_NAME_PRIMARY_REASON = "primaryReason"; + @SerializedName(SERIALIZED_NAME_PRIMARY_REASON) + private String primaryReason; + + public static final String SERIALIZED_NAME_SECONDARY_REASON = "secondaryReason"; + @SerializedName(SERIALIZED_NAME_SECONDARY_REASON) + private String secondaryReason; + + public static final String SERIALIZED_NAME_NOTES = "notes"; + @SerializedName(SERIALIZED_NAME_NOTES) + private String notes; + + public static final String SERIALIZED_NAME_REFERENCE_NUMBER = "referenceNumber"; + @SerializedName(SERIALIZED_NAME_REFERENCE_NUMBER) + private String referenceNumber; + + public static final String SERIALIZED_NAME_BILL_TO_ADDRESS_ID = "billToAddressId"; + @SerializedName(SERIALIZED_NAME_BILL_TO_ADDRESS_ID) + private String billToAddressId; + + public static final String SERIALIZED_NAME_SHIP_FROM_INFO = "shipFromInfo"; + @SerializedName(SERIALIZED_NAME_SHIP_FROM_INFO) + private List shipFromInfo = new ArrayList<>(); + + public static final String SERIALIZED_NAME_NUMBER_OF_BOXES = "numberOfBoxes"; + @SerializedName(SERIALIZED_NAME_NUMBER_OF_BOXES) + private Integer numberOfBoxes; + + public ReturnsCreateRequestListInner() { + } + + public ReturnsCreateRequestListInner invoiceNumber(String invoiceNumber) { + this.invoiceNumber = invoiceNumber; + return this; + } + + /** + * The Invoice number of the order. + * @return invoiceNumber + **/ + @javax.annotation.Nonnull + public String getInvoiceNumber() { + return invoiceNumber; + } + + public void setInvoiceNumber(String invoiceNumber) { + this.invoiceNumber = invoiceNumber; + } + + + public ReturnsCreateRequestListInner invoiceDate(LocalDate invoiceDate) { + this.invoiceDate = invoiceDate; + return this; + } + + /** + * Date of an Invoice. + * @return invoiceDate + **/ + @javax.annotation.Nonnull + public LocalDate getInvoiceDate() { + return invoiceDate; + } + + public void setInvoiceDate(LocalDate invoiceDate) { + this.invoiceDate = invoiceDate; + } + + + public ReturnsCreateRequestListInner customerOrderNumber(String customerOrderNumber) { + this.customerOrderNumber = customerOrderNumber; + return this; + } + + /** + * The reseller's order number for reference in their system. + * @return customerOrderNumber + **/ + @javax.annotation.Nullable + public String getCustomerOrderNumber() { + return customerOrderNumber; + } + + public void setCustomerOrderNumber(String customerOrderNumber) { + this.customerOrderNumber = customerOrderNumber; + } + + + public ReturnsCreateRequestListInner ingramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + return this; + } + + /** + * Unique line number from Ingram. + * @return ingramPartNumber + **/ + @javax.annotation.Nullable + public String getIngramPartNumber() { + return ingramPartNumber; + } + + public void setIngramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + } + + + public ReturnsCreateRequestListInner vendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + return this; + } + + /** + * Vendor Part Number. + * @return vendorPartNumber + **/ + @javax.annotation.Nullable + public String getVendorPartNumber() { + return vendorPartNumber; + } + + public void setVendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + } + + + public ReturnsCreateRequestListInner serialNumber(String serialNumber) { + this.serialNumber = serialNumber; + return this; + } + + /** + * Serial number of the product. + * @return serialNumber + **/ + @javax.annotation.Nullable + public String getSerialNumber() { + return serialNumber; + } + + public void setSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + } + + + public ReturnsCreateRequestListInner quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Return quantity of the product. + * @return quantity + **/ + @javax.annotation.Nonnull + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + + public ReturnsCreateRequestListInner primaryReason(String primaryReason) { + this.primaryReason = primaryReason; + return this; + } + + /** + * Primary reason to return the product. + * @return primaryReason + **/ + @javax.annotation.Nonnull + public String getPrimaryReason() { + return primaryReason; + } + + public void setPrimaryReason(String primaryReason) { + this.primaryReason = primaryReason; + } + + + public ReturnsCreateRequestListInner secondaryReason(String secondaryReason) { + this.secondaryReason = secondaryReason; + return this; + } + + /** + * Secondary reason to return the product. + * @return secondaryReason + **/ + @javax.annotation.Nonnull + public String getSecondaryReason() { + return secondaryReason; + } + + public void setSecondaryReason(String secondaryReason) { + this.secondaryReason = secondaryReason; + } + + + public ReturnsCreateRequestListInner notes(String notes) { + this.notes = notes; + return this; + } + + /** + * Return notes. + * @return notes + **/ + @javax.annotation.Nullable + public String getNotes() { + return notes; + } + + public void setNotes(String notes) { + this.notes = notes; + } + + + public ReturnsCreateRequestListInner referenceNumber(String referenceNumber) { + this.referenceNumber = referenceNumber; + return this; + } + + /** + * Reference number to return the product. + * @return referenceNumber + **/ + @javax.annotation.Nullable + public String getReferenceNumber() { + return referenceNumber; + } + + public void setReferenceNumber(String referenceNumber) { + this.referenceNumber = referenceNumber; + } + + + public ReturnsCreateRequestListInner billToAddressId(String billToAddressId) { + this.billToAddressId = billToAddressId; + return this; + } + + /** + * Suffix used to identify billing address. + * @return billToAddressId + **/ + @javax.annotation.Nullable + public String getBillToAddressId() { + return billToAddressId; + } + + public void setBillToAddressId(String billToAddressId) { + this.billToAddressId = billToAddressId; + } + + + public ReturnsCreateRequestListInner shipFromInfo(List shipFromInfo) { + this.shipFromInfo = shipFromInfo; + return this; + } + + public ReturnsCreateRequestListInner addShipFromInfoItem(ReturnsCreateRequestListInnerShipFromInfoInner shipFromInfoItem) { + if (this.shipFromInfo == null) { + this.shipFromInfo = new ArrayList<>(); + } + this.shipFromInfo.add(shipFromInfoItem); + return this; + } + + /** + * Get shipFromInfo + * @return shipFromInfo + **/ + @javax.annotation.Nonnull + public List getShipFromInfo() { + return shipFromInfo; + } + + public void setShipFromInfo(List shipFromInfo) { + this.shipFromInfo = shipFromInfo; + } + + + public ReturnsCreateRequestListInner numberOfBoxes(Integer numberOfBoxes) { + this.numberOfBoxes = numberOfBoxes; + return this; + } + + /** + * Number of boxes to return. + * @return numberOfBoxes + **/ + @javax.annotation.Nonnull + public Integer getNumberOfBoxes() { + return numberOfBoxes; + } + + public void setNumberOfBoxes(Integer numberOfBoxes) { + this.numberOfBoxes = numberOfBoxes; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnsCreateRequestListInner returnsCreateRequestListInner = (ReturnsCreateRequestListInner) o; + return Objects.equals(this.invoiceNumber, returnsCreateRequestListInner.invoiceNumber) && + Objects.equals(this.invoiceDate, returnsCreateRequestListInner.invoiceDate) && + Objects.equals(this.customerOrderNumber, returnsCreateRequestListInner.customerOrderNumber) && + Objects.equals(this.ingramPartNumber, returnsCreateRequestListInner.ingramPartNumber) && + Objects.equals(this.vendorPartNumber, returnsCreateRequestListInner.vendorPartNumber) && + Objects.equals(this.serialNumber, returnsCreateRequestListInner.serialNumber) && + Objects.equals(this.quantity, returnsCreateRequestListInner.quantity) && + Objects.equals(this.primaryReason, returnsCreateRequestListInner.primaryReason) && + Objects.equals(this.secondaryReason, returnsCreateRequestListInner.secondaryReason) && + Objects.equals(this.notes, returnsCreateRequestListInner.notes) && + Objects.equals(this.referenceNumber, returnsCreateRequestListInner.referenceNumber) && + Objects.equals(this.billToAddressId, returnsCreateRequestListInner.billToAddressId) && + Objects.equals(this.shipFromInfo, returnsCreateRequestListInner.shipFromInfo) && + Objects.equals(this.numberOfBoxes, returnsCreateRequestListInner.numberOfBoxes); + } + + @Override + public int hashCode() { + return Objects.hash(invoiceNumber, invoiceDate, customerOrderNumber, ingramPartNumber, vendorPartNumber, serialNumber, quantity, primaryReason, secondaryReason, notes, referenceNumber, billToAddressId, shipFromInfo, numberOfBoxes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnsCreateRequestListInner {\n"); + sb.append(" invoiceNumber: ").append(toIndentedString(invoiceNumber)).append("\n"); + sb.append(" invoiceDate: ").append(toIndentedString(invoiceDate)).append("\n"); + sb.append(" customerOrderNumber: ").append(toIndentedString(customerOrderNumber)).append("\n"); + sb.append(" ingramPartNumber: ").append(toIndentedString(ingramPartNumber)).append("\n"); + sb.append(" vendorPartNumber: ").append(toIndentedString(vendorPartNumber)).append("\n"); + sb.append(" serialNumber: ").append(toIndentedString(serialNumber)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" primaryReason: ").append(toIndentedString(primaryReason)).append("\n"); + sb.append(" secondaryReason: ").append(toIndentedString(secondaryReason)).append("\n"); + sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); + sb.append(" referenceNumber: ").append(toIndentedString(referenceNumber)).append("\n"); + sb.append(" billToAddressId: ").append(toIndentedString(billToAddressId)).append("\n"); + sb.append(" shipFromInfo: ").append(toIndentedString(shipFromInfo)).append("\n"); + sb.append(" numberOfBoxes: ").append(toIndentedString(numberOfBoxes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("invoiceNumber"); + openapiFields.add("invoiceDate"); + openapiFields.add("customerOrderNumber"); + openapiFields.add("ingramPartNumber"); + openapiFields.add("vendorPartNumber"); + openapiFields.add("serialNumber"); + openapiFields.add("quantity"); + openapiFields.add("primaryReason"); + openapiFields.add("secondaryReason"); + openapiFields.add("notes"); + openapiFields.add("referenceNumber"); + openapiFields.add("billToAddressId"); + openapiFields.add("shipFromInfo"); + openapiFields.add("numberOfBoxes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("invoiceNumber"); + openapiRequiredFields.add("invoiceDate"); + openapiRequiredFields.add("quantity"); + openapiRequiredFields.add("primaryReason"); + openapiRequiredFields.add("secondaryReason"); + openapiRequiredFields.add("shipFromInfo"); + openapiRequiredFields.add("numberOfBoxes"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ReturnsCreateRequestListInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ReturnsCreateRequestListInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ReturnsCreateRequestListInner is not found in the empty JSON string", ReturnsCreateRequestListInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ReturnsCreateRequestListInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReturnsCreateRequestListInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ReturnsCreateRequestListInner.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("invoiceNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `invoiceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoiceNumber").toString())); + } + if ((jsonObj.get("customerOrderNumber") != null && !jsonObj.get("customerOrderNumber").isJsonNull()) && !jsonObj.get("customerOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerOrderNumber").toString())); + } + if ((jsonObj.get("ingramPartNumber") != null && !jsonObj.get("ingramPartNumber").isJsonNull()) && !jsonObj.get("ingramPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPartNumber").toString())); + } + if ((jsonObj.get("vendorPartNumber") != null && !jsonObj.get("vendorPartNumber").isJsonNull()) && !jsonObj.get("vendorPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorPartNumber").toString())); + } + if ((jsonObj.get("serialNumber") != null && !jsonObj.get("serialNumber").isJsonNull()) && !jsonObj.get("serialNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `serialNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("serialNumber").toString())); + } + if (!jsonObj.get("primaryReason").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `primaryReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("primaryReason").toString())); + } + if (!jsonObj.get("secondaryReason").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `secondaryReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secondaryReason").toString())); + } + if ((jsonObj.get("notes") != null && !jsonObj.get("notes").isJsonNull()) && !jsonObj.get("notes").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `notes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("notes").toString())); + } + if ((jsonObj.get("referenceNumber") != null && !jsonObj.get("referenceNumber").isJsonNull()) && !jsonObj.get("referenceNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `referenceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceNumber").toString())); + } + if ((jsonObj.get("billToAddressId") != null && !jsonObj.get("billToAddressId").isJsonNull()) && !jsonObj.get("billToAddressId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `billToAddressId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("billToAddressId").toString())); + } + // ensure the json data is an array + if (!jsonObj.get("shipFromInfo").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `shipFromInfo` to be an array in the JSON string but got `%s`", jsonObj.get("shipFromInfo").toString())); + } + + JsonArray jsonArrayshipFromInfo = jsonObj.getAsJsonArray("shipFromInfo"); + // validate the required field `shipFromInfo` (array) + for (int i = 0; i < jsonArrayshipFromInfo.size(); i++) { + ReturnsCreateRequestListInnerShipFromInfoInner.validateJsonElement(jsonArrayshipFromInfo.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ReturnsCreateRequestListInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReturnsCreateRequestListInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ReturnsCreateRequestListInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ReturnsCreateRequestListInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ReturnsCreateRequestListInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ReturnsCreateRequestListInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReturnsCreateRequestListInner + * @throws IOException if the JSON string is invalid with respect to ReturnsCreateRequestListInner + */ + public static ReturnsCreateRequestListInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReturnsCreateRequestListInner.class); + } + + /** + * Convert an instance of ReturnsCreateRequestListInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ReturnsCreateRequestListInnerShipFromInfoInner.java b/src/main/java/xiresellers/client/model/ReturnsCreateRequestListInnerShipFromInfoInner.java new file mode 100644 index 00000000..42cd00a4 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ReturnsCreateRequestListInnerShipFromInfoInner.java @@ -0,0 +1,511 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ReturnsCreateRequestListInnerShipFromInfoInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ReturnsCreateRequestListInnerShipFromInfoInner { + public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; + @SerializedName(SERIALIZED_NAME_COMPANY_NAME) + private String companyName; + + public static final String SERIALIZED_NAME_CONTACT = "contact"; + @SerializedName(SERIALIZED_NAME_CONTACT) + private String contact; + + public static final String SERIALIZED_NAME_ADDRESS_LINE1 = "addressLine1"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE1) + private String addressLine1; + + public static final String SERIALIZED_NAME_ADDRESS_LINE2 = "addressLine2"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE2) + private String addressLine2; + + public static final String SERIALIZED_NAME_ADDRESS_LINE3 = "addressLine3"; + @SerializedName(SERIALIZED_NAME_ADDRESS_LINE3) + private String addressLine3; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; + @SerializedName(SERIALIZED_NAME_POSTAL_CODE) + private String postalCode; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) + private String phoneNumber; + + public ReturnsCreateRequestListInnerShipFromInfoInner() { + } + + public ReturnsCreateRequestListInnerShipFromInfoInner companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * Name of the company from where the product will be shipped. + * @return companyName + **/ + @javax.annotation.Nonnull + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + public ReturnsCreateRequestListInnerShipFromInfoInner contact(String contact) { + this.contact = contact; + return this; + } + + /** + * Contact name of the person from where the product will be shipped. + * @return contact + **/ + @javax.annotation.Nonnull + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + + public ReturnsCreateRequestListInnerShipFromInfoInner addressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + return this; + } + + /** + * Ship from Address Line1. + * @return addressLine1 + **/ + @javax.annotation.Nonnull + public String getAddressLine1() { + return addressLine1; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + + public ReturnsCreateRequestListInnerShipFromInfoInner addressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + return this; + } + + /** + * Ship from Address Line2. + * @return addressLine2 + **/ + @javax.annotation.Nullable + public String getAddressLine2() { + return addressLine2; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + + public ReturnsCreateRequestListInnerShipFromInfoInner addressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + return this; + } + + /** + * Ship from Address Line3. + * @return addressLine3 + **/ + @javax.annotation.Nullable + public String getAddressLine3() { + return addressLine3; + } + + public void setAddressLine3(String addressLine3) { + this.addressLine3 = addressLine3; + } + + + public ReturnsCreateRequestListInnerShipFromInfoInner city(String city) { + this.city = city; + return this; + } + + /** + * Ship from City. + * @return city + **/ + @javax.annotation.Nonnull + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public ReturnsCreateRequestListInnerShipFromInfoInner state(String state) { + this.state = state; + return this; + } + + /** + * Ship from state. + * @return state + **/ + @javax.annotation.Nonnull + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public ReturnsCreateRequestListInnerShipFromInfoInner postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * Ship from postal code. + * @return postalCode + **/ + @javax.annotation.Nonnull + public String getPostalCode() { + return postalCode; + } + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public ReturnsCreateRequestListInnerShipFromInfoInner countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * ship from country code. + * @return countryCode + **/ + @javax.annotation.Nonnull + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public ReturnsCreateRequestListInnerShipFromInfoInner email(String email) { + this.email = email; + return this; + } + + /** + * Ship from email. + * @return email + **/ + @javax.annotation.Nonnull + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + public ReturnsCreateRequestListInnerShipFromInfoInner phoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * Ship from phone number. + * @return phoneNumber + **/ + @javax.annotation.Nullable + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnsCreateRequestListInnerShipFromInfoInner returnsCreateRequestListInnerShipFromInfoInner = (ReturnsCreateRequestListInnerShipFromInfoInner) o; + return Objects.equals(this.companyName, returnsCreateRequestListInnerShipFromInfoInner.companyName) && + Objects.equals(this.contact, returnsCreateRequestListInnerShipFromInfoInner.contact) && + Objects.equals(this.addressLine1, returnsCreateRequestListInnerShipFromInfoInner.addressLine1) && + Objects.equals(this.addressLine2, returnsCreateRequestListInnerShipFromInfoInner.addressLine2) && + Objects.equals(this.addressLine3, returnsCreateRequestListInnerShipFromInfoInner.addressLine3) && + Objects.equals(this.city, returnsCreateRequestListInnerShipFromInfoInner.city) && + Objects.equals(this.state, returnsCreateRequestListInnerShipFromInfoInner.state) && + Objects.equals(this.postalCode, returnsCreateRequestListInnerShipFromInfoInner.postalCode) && + Objects.equals(this.countryCode, returnsCreateRequestListInnerShipFromInfoInner.countryCode) && + Objects.equals(this.email, returnsCreateRequestListInnerShipFromInfoInner.email) && + Objects.equals(this.phoneNumber, returnsCreateRequestListInnerShipFromInfoInner.phoneNumber); + } + + @Override + public int hashCode() { + return Objects.hash(companyName, contact, addressLine1, addressLine2, addressLine3, city, state, postalCode, countryCode, email, phoneNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnsCreateRequestListInnerShipFromInfoInner {\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); + sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); + sb.append(" addressLine3: ").append(toIndentedString(addressLine3)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("companyName"); + openapiFields.add("contact"); + openapiFields.add("addressLine1"); + openapiFields.add("addressLine2"); + openapiFields.add("addressLine3"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("postalCode"); + openapiFields.add("countryCode"); + openapiFields.add("email"); + openapiFields.add("phoneNumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("companyName"); + openapiRequiredFields.add("contact"); + openapiRequiredFields.add("addressLine1"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("state"); + openapiRequiredFields.add("postalCode"); + openapiRequiredFields.add("countryCode"); + openapiRequiredFields.add("email"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ReturnsCreateRequestListInnerShipFromInfoInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ReturnsCreateRequestListInnerShipFromInfoInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ReturnsCreateRequestListInnerShipFromInfoInner is not found in the empty JSON string", ReturnsCreateRequestListInnerShipFromInfoInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ReturnsCreateRequestListInnerShipFromInfoInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReturnsCreateRequestListInnerShipFromInfoInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ReturnsCreateRequestListInnerShipFromInfoInner.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("companyName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); + } + if (!jsonObj.get("contact").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `contact` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact").toString())); + } + if (!jsonObj.get("addressLine1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine1").toString())); + } + if ((jsonObj.get("addressLine2") != null && !jsonObj.get("addressLine2").isJsonNull()) && !jsonObj.get("addressLine2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine2").toString())); + } + if ((jsonObj.get("addressLine3") != null && !jsonObj.get("addressLine3").isJsonNull()) && !jsonObj.get("addressLine3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `addressLine3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressLine3").toString())); + } + if (!jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if (!jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if (!jsonObj.get("postalCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); + } + if (!jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + if (!jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ReturnsCreateRequestListInnerShipFromInfoInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReturnsCreateRequestListInnerShipFromInfoInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ReturnsCreateRequestListInnerShipFromInfoInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ReturnsCreateRequestListInnerShipFromInfoInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ReturnsCreateRequestListInnerShipFromInfoInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ReturnsCreateRequestListInnerShipFromInfoInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReturnsCreateRequestListInnerShipFromInfoInner + * @throws IOException if the JSON string is invalid with respect to ReturnsCreateRequestListInnerShipFromInfoInner + */ + public static ReturnsCreateRequestListInnerShipFromInfoInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReturnsCreateRequestListInnerShipFromInfoInner.class); + } + + /** + * Convert an instance of ReturnsCreateRequestListInnerShipFromInfoInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ReturnsCreateResponse.java b/src/main/java/xiresellers/client/model/ReturnsCreateResponse.java new file mode 100644 index 00000000..b7d3f621 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ReturnsCreateResponse.java @@ -0,0 +1,228 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ReturnsCreateResponseReturnsClaimsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ReturnsCreateResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ReturnsCreateResponse { + public static final String SERIALIZED_NAME_RETURNS_CLAIMS = "returnsClaims"; + @SerializedName(SERIALIZED_NAME_RETURNS_CLAIMS) + private List returnsClaims; + + public ReturnsCreateResponse() { + } + + public ReturnsCreateResponse returnsClaims(List returnsClaims) { + this.returnsClaims = returnsClaims; + return this; + } + + public ReturnsCreateResponse addReturnsClaimsItem(ReturnsCreateResponseReturnsClaimsInner returnsClaimsItem) { + if (this.returnsClaims == null) { + this.returnsClaims = new ArrayList<>(); + } + this.returnsClaims.add(returnsClaimsItem); + return this; + } + + /** + * Get returnsClaims + * @return returnsClaims + **/ + @javax.annotation.Nullable + public List getReturnsClaims() { + return returnsClaims; + } + + public void setReturnsClaims(List returnsClaims) { + this.returnsClaims = returnsClaims; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnsCreateResponse returnsCreateResponse = (ReturnsCreateResponse) o; + return Objects.equals(this.returnsClaims, returnsCreateResponse.returnsClaims); + } + + @Override + public int hashCode() { + return Objects.hash(returnsClaims); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnsCreateResponse {\n"); + sb.append(" returnsClaims: ").append(toIndentedString(returnsClaims)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("returnsClaims"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ReturnsCreateResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ReturnsCreateResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ReturnsCreateResponse is not found in the empty JSON string", ReturnsCreateResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ReturnsCreateResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReturnsCreateResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("returnsClaims") != null && !jsonObj.get("returnsClaims").isJsonNull()) { + JsonArray jsonArrayreturnsClaims = jsonObj.getAsJsonArray("returnsClaims"); + if (jsonArrayreturnsClaims != null) { + // ensure the json data is an array + if (!jsonObj.get("returnsClaims").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `returnsClaims` to be an array in the JSON string but got `%s`", jsonObj.get("returnsClaims").toString())); + } + + // validate the optional field `returnsClaims` (array) + for (int i = 0; i < jsonArrayreturnsClaims.size(); i++) { + ReturnsCreateResponseReturnsClaimsInner.validateJsonElement(jsonArrayreturnsClaims.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ReturnsCreateResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReturnsCreateResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ReturnsCreateResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ReturnsCreateResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ReturnsCreateResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ReturnsCreateResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReturnsCreateResponse + * @throws IOException if the JSON string is invalid with respect to ReturnsCreateResponse + */ + public static ReturnsCreateResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReturnsCreateResponse.class); + } + + /** + * Convert an instance of ReturnsCreateResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ReturnsCreateResponseReturnsClaimsInner.java b/src/main/java/xiresellers/client/model/ReturnsCreateResponseReturnsClaimsInner.java new file mode 100644 index 00000000..c690b447 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ReturnsCreateResponseReturnsClaimsInner.java @@ -0,0 +1,595 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ReturnsSearchResponseReturnsClaimsInnerLinksInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ReturnsCreateResponseReturnsClaimsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ReturnsCreateResponseReturnsClaimsInner { + public static final String SERIALIZED_NAME_RMA_CLAIM_ID = "rmaClaimId"; + @SerializedName(SERIALIZED_NAME_RMA_CLAIM_ID) + private String rmaClaimId; + + public static final String SERIALIZED_NAME_CASE_REQUEST_NUMBER = "caseRequestNumber"; + @SerializedName(SERIALIZED_NAME_CASE_REQUEST_NUMBER) + private String caseRequestNumber; + + public static final String SERIALIZED_NAME_REFERENCE_NUMBER = "referenceNumber"; + @SerializedName(SERIALIZED_NAME_REFERENCE_NUMBER) + private String referenceNumber; + + public static final String SERIALIZED_NAME_CREATED_ON = "createdOn"; + @SerializedName(SERIALIZED_NAME_CREATED_ON) + private LocalDate createdOn; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_RETURN_REASON = "returnReason"; + @SerializedName(SERIALIZED_NAME_RETURN_REASON) + private String returnReason; + + public static final String SERIALIZED_NAME_INGRAM_PART_NUMBER = "ingramPartNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PART_NUMBER) + private String ingramPartNumber; + + public static final String SERIALIZED_NAME_VENDOR_PART_NUMBER = "vendorPartNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_PART_NUMBER) + private String vendorPartNumber; + + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + @SerializedName(SERIALIZED_NAME_QUANTITY) + private Integer quantity; + + public static final String SERIALIZED_NAME_NOTES = "notes"; + @SerializedName(SERIALIZED_NAME_NOTES) + private String notes; + + public static final String SERIALIZED_NAME_ESTIMATED_TOTAL_VALUE = "estimatedTotalValue"; + @SerializedName(SERIALIZED_NAME_ESTIMATED_TOTAL_VALUE) + private BigDecimal estimatedTotalValue; + + public static final String SERIALIZED_NAME_CREDIT = "credit"; + @SerializedName(SERIALIZED_NAME_CREDIT) + private BigDecimal credit; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_LINKS = "links"; + @SerializedName(SERIALIZED_NAME_LINKS) + private List links; + + public ReturnsCreateResponseReturnsClaimsInner() { + } + + public ReturnsCreateResponseReturnsClaimsInner rmaClaimId(String rmaClaimId) { + this.rmaClaimId = rmaClaimId; + return this; + } + + /** + * The rmaClaimId claim id. + * @return rmaClaimId + **/ + @javax.annotation.Nullable + public String getRmaClaimId() { + return rmaClaimId; + } + + public void setRmaClaimId(String rmaClaimId) { + this.rmaClaimId = rmaClaimId; + } + + + public ReturnsCreateResponseReturnsClaimsInner caseRequestNumber(String caseRequestNumber) { + this.caseRequestNumber = caseRequestNumber; + return this; + } + + /** + * A unique return request number. + * @return caseRequestNumber + **/ + @javax.annotation.Nullable + public String getCaseRequestNumber() { + return caseRequestNumber; + } + + public void setCaseRequestNumber(String caseRequestNumber) { + this.caseRequestNumber = caseRequestNumber; + } + + + public ReturnsCreateResponseReturnsClaimsInner referenceNumber(String referenceNumber) { + this.referenceNumber = referenceNumber; + return this; + } + + /** + * The reference number for the return. + * @return referenceNumber + **/ + @javax.annotation.Nullable + public String getReferenceNumber() { + return referenceNumber; + } + + public void setReferenceNumber(String referenceNumber) { + this.referenceNumber = referenceNumber; + } + + + public ReturnsCreateResponseReturnsClaimsInner createdOn(LocalDate createdOn) { + this.createdOn = createdOn; + return this; + } + + /** + * The date on which the return request was created. + * @return createdOn + **/ + @javax.annotation.Nullable + public LocalDate getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(LocalDate createdOn) { + this.createdOn = createdOn; + } + + + public ReturnsCreateResponseReturnsClaimsInner type(String type) { + this.type = type; + return this; + } + + /** + * Type of request. + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + + public ReturnsCreateResponseReturnsClaimsInner returnReason(String returnReason) { + this.returnReason = returnReason; + return this; + } + + /** + * The reason for the return. + * @return returnReason + **/ + @javax.annotation.Nullable + public String getReturnReason() { + return returnReason; + } + + public void setReturnReason(String returnReason) { + this.returnReason = returnReason; + } + + + public ReturnsCreateResponseReturnsClaimsInner ingramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + return this; + } + + /** + * Unique line number from Ingram. + * @return ingramPartNumber + **/ + @javax.annotation.Nullable + public String getIngramPartNumber() { + return ingramPartNumber; + } + + public void setIngramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + } + + + public ReturnsCreateResponseReturnsClaimsInner vendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + return this; + } + + /** + * Vendor Part Number. + * @return vendorPartNumber + **/ + @javax.annotation.Nullable + public String getVendorPartNumber() { + return vendorPartNumber; + } + + public void setVendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + } + + + public ReturnsCreateResponseReturnsClaimsInner quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Return quantity of the product. + * @return quantity + **/ + @javax.annotation.Nullable + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + + public ReturnsCreateResponseReturnsClaimsInner notes(String notes) { + this.notes = notes; + return this; + } + + /** + * Return notes. + * @return notes + **/ + @javax.annotation.Nullable + public String getNotes() { + return notes; + } + + public void setNotes(String notes) { + this.notes = notes; + } + + + public ReturnsCreateResponseReturnsClaimsInner estimatedTotalValue(BigDecimal estimatedTotalValue) { + this.estimatedTotalValue = estimatedTotalValue; + return this; + } + + /** + * The estimated total value of the return. + * @return estimatedTotalValue + **/ + @javax.annotation.Nullable + public BigDecimal getEstimatedTotalValue() { + return estimatedTotalValue; + } + + public void setEstimatedTotalValue(BigDecimal estimatedTotalValue) { + this.estimatedTotalValue = estimatedTotalValue; + } + + + public ReturnsCreateResponseReturnsClaimsInner credit(BigDecimal credit) { + this.credit = credit; + return this; + } + + /** + * The amount of credit. + * @return credit + **/ + @javax.annotation.Nullable + public BigDecimal getCredit() { + return credit; + } + + public void setCredit(BigDecimal credit) { + this.credit = credit; + } + + + public ReturnsCreateResponseReturnsClaimsInner status(String status) { + this.status = status; + return this; + } + + /** + * The status of the request. + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + public ReturnsCreateResponseReturnsClaimsInner links(List links) { + this.links = links; + return this; + } + + public ReturnsCreateResponseReturnsClaimsInner addLinksItem(ReturnsSearchResponseReturnsClaimsInnerLinksInner linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * Get links + * @return links + **/ + @javax.annotation.Nullable + public List getLinks() { + return links; + } + + public void setLinks(List links) { + this.links = links; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnsCreateResponseReturnsClaimsInner returnsCreateResponseReturnsClaimsInner = (ReturnsCreateResponseReturnsClaimsInner) o; + return Objects.equals(this.rmaClaimId, returnsCreateResponseReturnsClaimsInner.rmaClaimId) && + Objects.equals(this.caseRequestNumber, returnsCreateResponseReturnsClaimsInner.caseRequestNumber) && + Objects.equals(this.referenceNumber, returnsCreateResponseReturnsClaimsInner.referenceNumber) && + Objects.equals(this.createdOn, returnsCreateResponseReturnsClaimsInner.createdOn) && + Objects.equals(this.type, returnsCreateResponseReturnsClaimsInner.type) && + Objects.equals(this.returnReason, returnsCreateResponseReturnsClaimsInner.returnReason) && + Objects.equals(this.ingramPartNumber, returnsCreateResponseReturnsClaimsInner.ingramPartNumber) && + Objects.equals(this.vendorPartNumber, returnsCreateResponseReturnsClaimsInner.vendorPartNumber) && + Objects.equals(this.quantity, returnsCreateResponseReturnsClaimsInner.quantity) && + Objects.equals(this.notes, returnsCreateResponseReturnsClaimsInner.notes) && + Objects.equals(this.estimatedTotalValue, returnsCreateResponseReturnsClaimsInner.estimatedTotalValue) && + Objects.equals(this.credit, returnsCreateResponseReturnsClaimsInner.credit) && + Objects.equals(this.status, returnsCreateResponseReturnsClaimsInner.status) && + Objects.equals(this.links, returnsCreateResponseReturnsClaimsInner.links); + } + + @Override + public int hashCode() { + return Objects.hash(rmaClaimId, caseRequestNumber, referenceNumber, createdOn, type, returnReason, ingramPartNumber, vendorPartNumber, quantity, notes, estimatedTotalValue, credit, status, links); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnsCreateResponseReturnsClaimsInner {\n"); + sb.append(" rmaClaimId: ").append(toIndentedString(rmaClaimId)).append("\n"); + sb.append(" caseRequestNumber: ").append(toIndentedString(caseRequestNumber)).append("\n"); + sb.append(" referenceNumber: ").append(toIndentedString(referenceNumber)).append("\n"); + sb.append(" createdOn: ").append(toIndentedString(createdOn)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" returnReason: ").append(toIndentedString(returnReason)).append("\n"); + sb.append(" ingramPartNumber: ").append(toIndentedString(ingramPartNumber)).append("\n"); + sb.append(" vendorPartNumber: ").append(toIndentedString(vendorPartNumber)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); + sb.append(" estimatedTotalValue: ").append(toIndentedString(estimatedTotalValue)).append("\n"); + sb.append(" credit: ").append(toIndentedString(credit)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("rmaClaimId"); + openapiFields.add("caseRequestNumber"); + openapiFields.add("referenceNumber"); + openapiFields.add("createdOn"); + openapiFields.add("type"); + openapiFields.add("returnReason"); + openapiFields.add("ingramPartNumber"); + openapiFields.add("vendorPartNumber"); + openapiFields.add("quantity"); + openapiFields.add("notes"); + openapiFields.add("estimatedTotalValue"); + openapiFields.add("credit"); + openapiFields.add("status"); + openapiFields.add("links"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ReturnsCreateResponseReturnsClaimsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ReturnsCreateResponseReturnsClaimsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ReturnsCreateResponseReturnsClaimsInner is not found in the empty JSON string", ReturnsCreateResponseReturnsClaimsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ReturnsCreateResponseReturnsClaimsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReturnsCreateResponseReturnsClaimsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("rmaClaimId") != null && !jsonObj.get("rmaClaimId").isJsonNull()) && !jsonObj.get("rmaClaimId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `rmaClaimId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rmaClaimId").toString())); + } + if ((jsonObj.get("caseRequestNumber") != null && !jsonObj.get("caseRequestNumber").isJsonNull()) && !jsonObj.get("caseRequestNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `caseRequestNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("caseRequestNumber").toString())); + } + if ((jsonObj.get("referenceNumber") != null && !jsonObj.get("referenceNumber").isJsonNull()) && !jsonObj.get("referenceNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `referenceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceNumber").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("returnReason") != null && !jsonObj.get("returnReason").isJsonNull()) && !jsonObj.get("returnReason").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `returnReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("returnReason").toString())); + } + if ((jsonObj.get("ingramPartNumber") != null && !jsonObj.get("ingramPartNumber").isJsonNull()) && !jsonObj.get("ingramPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPartNumber").toString())); + } + if ((jsonObj.get("vendorPartNumber") != null && !jsonObj.get("vendorPartNumber").isJsonNull()) && !jsonObj.get("vendorPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorPartNumber").toString())); + } + if ((jsonObj.get("notes") != null && !jsonObj.get("notes").isJsonNull()) && !jsonObj.get("notes").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `notes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("notes").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull()) { + JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); + if (jsonArraylinks != null) { + // ensure the json data is an array + if (!jsonObj.get("links").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + } + + // validate the optional field `links` (array) + for (int i = 0; i < jsonArraylinks.size(); i++) { + ReturnsSearchResponseReturnsClaimsInnerLinksInner.validateJsonElement(jsonArraylinks.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ReturnsCreateResponseReturnsClaimsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReturnsCreateResponseReturnsClaimsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ReturnsCreateResponseReturnsClaimsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ReturnsCreateResponseReturnsClaimsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ReturnsCreateResponseReturnsClaimsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ReturnsCreateResponseReturnsClaimsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReturnsCreateResponseReturnsClaimsInner + * @throws IOException if the JSON string is invalid with respect to ReturnsCreateResponseReturnsClaimsInner + */ + public static ReturnsCreateResponseReturnsClaimsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReturnsCreateResponseReturnsClaimsInner.class); + } + + /** + * Convert an instance of ReturnsCreateResponseReturnsClaimsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ReturnsDetailsResponse.java b/src/main/java/xiresellers/client/model/ReturnsDetailsResponse.java new file mode 100644 index 00000000..81840ba2 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ReturnsDetailsResponse.java @@ -0,0 +1,563 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ReturnsDetailsResponseProductsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ReturnsDetailsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ReturnsDetailsResponse { + public static final String SERIALIZED_NAME_TYPE_OF_DETAILS = "typeOfDetails"; + @SerializedName(SERIALIZED_NAME_TYPE_OF_DETAILS) + private String typeOfDetails; + + public static final String SERIALIZED_NAME_RMA_CLAIM_ID = "rmaClaimId"; + @SerializedName(SERIALIZED_NAME_RMA_CLAIM_ID) + private String rmaClaimId; + + public static final String SERIALIZED_NAME_CASE_REQUEST_NUMBER = "caseRequestNumber"; + @SerializedName(SERIALIZED_NAME_CASE_REQUEST_NUMBER) + private String caseRequestNumber; + + public static final String SERIALIZED_NAME_CREATED_ON = "createdOn"; + @SerializedName(SERIALIZED_NAME_CREATED_ON) + private LocalDate createdOn; + + public static final String SERIALIZED_NAME_RETURN_REASON = "returnReason"; + @SerializedName(SERIALIZED_NAME_RETURN_REASON) + private String returnReason; + + public static final String SERIALIZED_NAME_REFERENCE_NUMBER = "referenceNumber"; + @SerializedName(SERIALIZED_NAME_REFERENCE_NUMBER) + private String referenceNumber; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_RETURN_WAREHOUSE_ADDRESS = "returnWarehouseAddress"; + @SerializedName(SERIALIZED_NAME_RETURN_WAREHOUSE_ADDRESS) + private String returnWarehouseAddress; + + public static final String SERIALIZED_NAME_PRODUCTS = "products"; + @SerializedName(SERIALIZED_NAME_PRODUCTS) + private List products; + + public static final String SERIALIZED_NAME_SUB_TOTAL = "subTotal"; + @SerializedName(SERIALIZED_NAME_SUB_TOTAL) + private BigDecimal subTotal; + + public static final String SERIALIZED_NAME_TAX = "tax"; + @SerializedName(SERIALIZED_NAME_TAX) + private BigDecimal tax; + + public static final String SERIALIZED_NAME_ADDITIONAL_FEES = "additionalFees"; + @SerializedName(SERIALIZED_NAME_ADDITIONAL_FEES) + private BigDecimal additionalFees; + + public static final String SERIALIZED_NAME_ESTIMATED_TOTAL = "estimatedTotal"; + @SerializedName(SERIALIZED_NAME_ESTIMATED_TOTAL) + private BigDecimal estimatedTotal; + + public ReturnsDetailsResponse() { + } + + public ReturnsDetailsResponse typeOfDetails(String typeOfDetails) { + this.typeOfDetails = typeOfDetails; + return this; + } + + /** + * The type of the details. Return or Claim. + * @return typeOfDetails + **/ + @javax.annotation.Nullable + public String getTypeOfDetails() { + return typeOfDetails; + } + + public void setTypeOfDetails(String typeOfDetails) { + this.typeOfDetails = typeOfDetails; + } + + + public ReturnsDetailsResponse rmaClaimId(String rmaClaimId) { + this.rmaClaimId = rmaClaimId; + return this; + } + + /** + * The rmaClaimId claim id. + * @return rmaClaimId + **/ + @javax.annotation.Nullable + public String getRmaClaimId() { + return rmaClaimId; + } + + public void setRmaClaimId(String rmaClaimId) { + this.rmaClaimId = rmaClaimId; + } + + + public ReturnsDetailsResponse caseRequestNumber(String caseRequestNumber) { + this.caseRequestNumber = caseRequestNumber; + return this; + } + + /** + * A unique return request number. + * @return caseRequestNumber + **/ + @javax.annotation.Nullable + public String getCaseRequestNumber() { + return caseRequestNumber; + } + + public void setCaseRequestNumber(String caseRequestNumber) { + this.caseRequestNumber = caseRequestNumber; + } + + + public ReturnsDetailsResponse createdOn(LocalDate createdOn) { + this.createdOn = createdOn; + return this; + } + + /** + * The date on which the return request was created. + * @return createdOn + **/ + @javax.annotation.Nullable + public LocalDate getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(LocalDate createdOn) { + this.createdOn = createdOn; + } + + + public ReturnsDetailsResponse returnReason(String returnReason) { + this.returnReason = returnReason; + return this; + } + + /** + * The reason for the return. + * @return returnReason + **/ + @javax.annotation.Nullable + public String getReturnReason() { + return returnReason; + } + + public void setReturnReason(String returnReason) { + this.returnReason = returnReason; + } + + + public ReturnsDetailsResponse referenceNumber(String referenceNumber) { + this.referenceNumber = referenceNumber; + return this; + } + + /** + * The reference number for the return. + * @return referenceNumber + **/ + @javax.annotation.Nullable + public String getReferenceNumber() { + return referenceNumber; + } + + public void setReferenceNumber(String referenceNumber) { + this.referenceNumber = referenceNumber; + } + + + public ReturnsDetailsResponse status(String status) { + this.status = status; + return this; + } + + /** + * The status of the request. + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + public ReturnsDetailsResponse returnWarehouseAddress(String returnWarehouseAddress) { + this.returnWarehouseAddress = returnWarehouseAddress; + return this; + } + + /** + * The address of the return warehouse. + * @return returnWarehouseAddress + **/ + @javax.annotation.Nullable + public String getReturnWarehouseAddress() { + return returnWarehouseAddress; + } + + public void setReturnWarehouseAddress(String returnWarehouseAddress) { + this.returnWarehouseAddress = returnWarehouseAddress; + } + + + public ReturnsDetailsResponse products(List products) { + this.products = products; + return this; + } + + public ReturnsDetailsResponse addProductsItem(ReturnsDetailsResponseProductsInner productsItem) { + if (this.products == null) { + this.products = new ArrayList<>(); + } + this.products.add(productsItem); + return this; + } + + /** + * Get products + * @return products + **/ + @javax.annotation.Nullable + public List getProducts() { + return products; + } + + public void setProducts(List products) { + this.products = products; + } + + + public ReturnsDetailsResponse subTotal(BigDecimal subTotal) { + this.subTotal = subTotal; + return this; + } + + /** + * Sub total amount of the return request. + * @return subTotal + **/ + @javax.annotation.Nullable + public BigDecimal getSubTotal() { + return subTotal; + } + + public void setSubTotal(BigDecimal subTotal) { + this.subTotal = subTotal; + } + + + public ReturnsDetailsResponse tax(BigDecimal tax) { + this.tax = tax; + return this; + } + + /** + * The tax amount of the return request. + * @return tax + **/ + @javax.annotation.Nullable + public BigDecimal getTax() { + return tax; + } + + public void setTax(BigDecimal tax) { + this.tax = tax; + } + + + public ReturnsDetailsResponse additionalFees(BigDecimal additionalFees) { + this.additionalFees = additionalFees; + return this; + } + + /** + * The additional fees for the return request. + * @return additionalFees + **/ + @javax.annotation.Nullable + public BigDecimal getAdditionalFees() { + return additionalFees; + } + + public void setAdditionalFees(BigDecimal additionalFees) { + this.additionalFees = additionalFees; + } + + + public ReturnsDetailsResponse estimatedTotal(BigDecimal estimatedTotal) { + this.estimatedTotal = estimatedTotal; + return this; + } + + /** + * The total estimated amount for the return request. + * @return estimatedTotal + **/ + @javax.annotation.Nullable + public BigDecimal getEstimatedTotal() { + return estimatedTotal; + } + + public void setEstimatedTotal(BigDecimal estimatedTotal) { + this.estimatedTotal = estimatedTotal; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnsDetailsResponse returnsDetailsResponse = (ReturnsDetailsResponse) o; + return Objects.equals(this.typeOfDetails, returnsDetailsResponse.typeOfDetails) && + Objects.equals(this.rmaClaimId, returnsDetailsResponse.rmaClaimId) && + Objects.equals(this.caseRequestNumber, returnsDetailsResponse.caseRequestNumber) && + Objects.equals(this.createdOn, returnsDetailsResponse.createdOn) && + Objects.equals(this.returnReason, returnsDetailsResponse.returnReason) && + Objects.equals(this.referenceNumber, returnsDetailsResponse.referenceNumber) && + Objects.equals(this.status, returnsDetailsResponse.status) && + Objects.equals(this.returnWarehouseAddress, returnsDetailsResponse.returnWarehouseAddress) && + Objects.equals(this.products, returnsDetailsResponse.products) && + Objects.equals(this.subTotal, returnsDetailsResponse.subTotal) && + Objects.equals(this.tax, returnsDetailsResponse.tax) && + Objects.equals(this.additionalFees, returnsDetailsResponse.additionalFees) && + Objects.equals(this.estimatedTotal, returnsDetailsResponse.estimatedTotal); + } + + @Override + public int hashCode() { + return Objects.hash(typeOfDetails, rmaClaimId, caseRequestNumber, createdOn, returnReason, referenceNumber, status, returnWarehouseAddress, products, subTotal, tax, additionalFees, estimatedTotal); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnsDetailsResponse {\n"); + sb.append(" typeOfDetails: ").append(toIndentedString(typeOfDetails)).append("\n"); + sb.append(" rmaClaimId: ").append(toIndentedString(rmaClaimId)).append("\n"); + sb.append(" caseRequestNumber: ").append(toIndentedString(caseRequestNumber)).append("\n"); + sb.append(" createdOn: ").append(toIndentedString(createdOn)).append("\n"); + sb.append(" returnReason: ").append(toIndentedString(returnReason)).append("\n"); + sb.append(" referenceNumber: ").append(toIndentedString(referenceNumber)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" returnWarehouseAddress: ").append(toIndentedString(returnWarehouseAddress)).append("\n"); + sb.append(" products: ").append(toIndentedString(products)).append("\n"); + sb.append(" subTotal: ").append(toIndentedString(subTotal)).append("\n"); + sb.append(" tax: ").append(toIndentedString(tax)).append("\n"); + sb.append(" additionalFees: ").append(toIndentedString(additionalFees)).append("\n"); + sb.append(" estimatedTotal: ").append(toIndentedString(estimatedTotal)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("typeOfDetails"); + openapiFields.add("rmaClaimId"); + openapiFields.add("caseRequestNumber"); + openapiFields.add("createdOn"); + openapiFields.add("returnReason"); + openapiFields.add("referenceNumber"); + openapiFields.add("status"); + openapiFields.add("returnWarehouseAddress"); + openapiFields.add("products"); + openapiFields.add("subTotal"); + openapiFields.add("tax"); + openapiFields.add("additionalFees"); + openapiFields.add("estimatedTotal"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ReturnsDetailsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ReturnsDetailsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ReturnsDetailsResponse is not found in the empty JSON string", ReturnsDetailsResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ReturnsDetailsResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReturnsDetailsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("typeOfDetails") != null && !jsonObj.get("typeOfDetails").isJsonNull()) && !jsonObj.get("typeOfDetails").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `typeOfDetails` to be a primitive type in the JSON string but got `%s`", jsonObj.get("typeOfDetails").toString())); + } + if ((jsonObj.get("rmaClaimId") != null && !jsonObj.get("rmaClaimId").isJsonNull()) && !jsonObj.get("rmaClaimId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `rmaClaimId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rmaClaimId").toString())); + } + if ((jsonObj.get("caseRequestNumber") != null && !jsonObj.get("caseRequestNumber").isJsonNull()) && !jsonObj.get("caseRequestNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `caseRequestNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("caseRequestNumber").toString())); + } + if ((jsonObj.get("returnReason") != null && !jsonObj.get("returnReason").isJsonNull()) && !jsonObj.get("returnReason").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `returnReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("returnReason").toString())); + } + if ((jsonObj.get("referenceNumber") != null && !jsonObj.get("referenceNumber").isJsonNull()) && !jsonObj.get("referenceNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `referenceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceNumber").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if ((jsonObj.get("returnWarehouseAddress") != null && !jsonObj.get("returnWarehouseAddress").isJsonNull()) && !jsonObj.get("returnWarehouseAddress").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `returnWarehouseAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("returnWarehouseAddress").toString())); + } + if (jsonObj.get("products") != null && !jsonObj.get("products").isJsonNull()) { + JsonArray jsonArrayproducts = jsonObj.getAsJsonArray("products"); + if (jsonArrayproducts != null) { + // ensure the json data is an array + if (!jsonObj.get("products").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `products` to be an array in the JSON string but got `%s`", jsonObj.get("products").toString())); + } + + // validate the optional field `products` (array) + for (int i = 0; i < jsonArrayproducts.size(); i++) { + ReturnsDetailsResponseProductsInner.validateJsonElement(jsonArrayproducts.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ReturnsDetailsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReturnsDetailsResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ReturnsDetailsResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ReturnsDetailsResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ReturnsDetailsResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ReturnsDetailsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReturnsDetailsResponse + * @throws IOException if the JSON string is invalid with respect to ReturnsDetailsResponse + */ + public static ReturnsDetailsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReturnsDetailsResponse.class); + } + + /** + * Convert an instance of ReturnsDetailsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ReturnsDetailsResponseProductsInner.java b/src/main/java/xiresellers/client/model/ReturnsDetailsResponseProductsInner.java new file mode 100644 index 00000000..bf66a824 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ReturnsDetailsResponseProductsInner.java @@ -0,0 +1,590 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ReturnsDetailsResponseProductsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ReturnsDetailsResponseProductsInner { + public static final String SERIALIZED_NAME_INGRAM_LINE_NUMBER = "ingramLineNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_LINE_NUMBER) + private String ingramLineNumber; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_INGRAM_PART_NUMBER = "ingramPartNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PART_NUMBER) + private String ingramPartNumber; + + public static final String SERIALIZED_NAME_VENDOR_PART_NUMBER = "vendorPartNumber"; + @SerializedName(SERIALIZED_NAME_VENDOR_PART_NUMBER) + private String vendorPartNumber; + + public static final String SERIALIZED_NAME_UPC = "upc"; + @SerializedName(SERIALIZED_NAME_UPC) + private String upc; + + public static final String SERIALIZED_NAME_INVOICE_DATE = "invoiceDate"; + @SerializedName(SERIALIZED_NAME_INVOICE_DATE) + private LocalDate invoiceDate; + + public static final String SERIALIZED_NAME_INVOICE_NUMBER = "invoiceNumber"; + @SerializedName(SERIALIZED_NAME_INVOICE_NUMBER) + private String invoiceNumber; + + public static final String SERIALIZED_NAME_CUSTOMER_ORDER_NUMBER = "customerOrderNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_ORDER_NUMBER) + private Integer customerOrderNumber; + + public static final String SERIALIZED_NAME_REQUEST_DETAILS = "requestDetails"; + @SerializedName(SERIALIZED_NAME_REQUEST_DETAILS) + private Integer requestDetails; + + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + @SerializedName(SERIALIZED_NAME_QUANTITY) + private Integer quantity; + + public static final String SERIALIZED_NAME_UNIT_PRICE = "unitPrice"; + @SerializedName(SERIALIZED_NAME_UNIT_PRICE) + private BigDecimal unitPrice; + + public static final String SERIALIZED_NAME_EXTENDED_PRICE = "extendedPrice"; + @SerializedName(SERIALIZED_NAME_EXTENDED_PRICE) + private BigDecimal extendedPrice; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_RETURN_BRANCH = "returnBranch"; + @SerializedName(SERIALIZED_NAME_RETURN_BRANCH) + private Integer returnBranch; + + public static final String SERIALIZED_NAME_SHIP_FROM_BRANCH = "shipFromBranch"; + @SerializedName(SERIALIZED_NAME_SHIP_FROM_BRANCH) + private Integer shipFromBranch; + + public ReturnsDetailsResponseProductsInner() { + } + + public ReturnsDetailsResponseProductsInner ingramLineNumber(String ingramLineNumber) { + this.ingramLineNumber = ingramLineNumber; + return this; + } + + /** + * Unique Ingram Micro line number. + * @return ingramLineNumber + **/ + @javax.annotation.Nullable + public String getIngramLineNumber() { + return ingramLineNumber; + } + + public void setIngramLineNumber(String ingramLineNumber) { + this.ingramLineNumber = ingramLineNumber; + } + + + public ReturnsDetailsResponseProductsInner description(String description) { + this.description = description; + return this; + } + + /** + * The description of the line item product. + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + + public ReturnsDetailsResponseProductsInner ingramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + return this; + } + + /** + * Unique IngramMicro part number. + * @return ingramPartNumber + **/ + @javax.annotation.Nullable + public String getIngramPartNumber() { + return ingramPartNumber; + } + + public void setIngramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + } + + + public ReturnsDetailsResponseProductsInner vendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + return this; + } + + /** + * The vendor's part number for the line item. + * @return vendorPartNumber + **/ + @javax.annotation.Nullable + public String getVendorPartNumber() { + return vendorPartNumber; + } + + public void setVendorPartNumber(String vendorPartNumber) { + this.vendorPartNumber = vendorPartNumber; + } + + + public ReturnsDetailsResponseProductsInner upc(String upc) { + this.upc = upc; + return this; + } + + /** + * The UPC code of a product. + * @return upc + **/ + @javax.annotation.Nullable + public String getUpc() { + return upc; + } + + public void setUpc(String upc) { + this.upc = upc; + } + + + public ReturnsDetailsResponseProductsInner invoiceDate(LocalDate invoiceDate) { + this.invoiceDate = invoiceDate; + return this; + } + + /** + * The date of the invoice. + * @return invoiceDate + **/ + @javax.annotation.Nullable + public LocalDate getInvoiceDate() { + return invoiceDate; + } + + public void setInvoiceDate(LocalDate invoiceDate) { + this.invoiceDate = invoiceDate; + } + + + public ReturnsDetailsResponseProductsInner invoiceNumber(String invoiceNumber) { + this.invoiceNumber = invoiceNumber; + return this; + } + + /** + * Ingram micro Invoice number. + * @return invoiceNumber + **/ + @javax.annotation.Nullable + public String getInvoiceNumber() { + return invoiceNumber; + } + + public void setInvoiceNumber(String invoiceNumber) { + this.invoiceNumber = invoiceNumber; + } + + + public ReturnsDetailsResponseProductsInner customerOrderNumber(Integer customerOrderNumber) { + this.customerOrderNumber = customerOrderNumber; + return this; + } + + /** + * The reseller's order number for reference in their system. + * @return customerOrderNumber + **/ + @javax.annotation.Nullable + public Integer getCustomerOrderNumber() { + return customerOrderNumber; + } + + public void setCustomerOrderNumber(Integer customerOrderNumber) { + this.customerOrderNumber = customerOrderNumber; + } + + + public ReturnsDetailsResponseProductsInner requestDetails(Integer requestDetails) { + this.requestDetails = requestDetails; + return this; + } + + /** + * Request details. + * @return requestDetails + **/ + @javax.annotation.Nullable + public Integer getRequestDetails() { + return requestDetails; + } + + public void setRequestDetails(Integer requestDetails) { + this.requestDetails = requestDetails; + } + + + public ReturnsDetailsResponseProductsInner quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * The quantity of the line item. + * @return quantity + **/ + @javax.annotation.Nullable + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + + public ReturnsDetailsResponseProductsInner unitPrice(BigDecimal unitPrice) { + this.unitPrice = unitPrice; + return this; + } + + /** + * The unit price of the line item. + * @return unitPrice + **/ + @javax.annotation.Nullable + public BigDecimal getUnitPrice() { + return unitPrice; + } + + public void setUnitPrice(BigDecimal unitPrice) { + this.unitPrice = unitPrice; + } + + + public ReturnsDetailsResponseProductsInner extendedPrice(BigDecimal extendedPrice) { + this.extendedPrice = extendedPrice; + return this; + } + + /** + * Unit price X quantity for the line item. + * @return extendedPrice + **/ + @javax.annotation.Nullable + public BigDecimal getExtendedPrice() { + return extendedPrice; + } + + public void setExtendedPrice(BigDecimal extendedPrice) { + this.extendedPrice = extendedPrice; + } + + + public ReturnsDetailsResponseProductsInner status(String status) { + this.status = status; + return this; + } + + /** + * The status of the line item. + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + public ReturnsDetailsResponseProductsInner returnBranch(Integer returnBranch) { + this.returnBranch = returnBranch; + return this; + } + + /** + * The code of the return branch. + * @return returnBranch + **/ + @javax.annotation.Nullable + public Integer getReturnBranch() { + return returnBranch; + } + + public void setReturnBranch(Integer returnBranch) { + this.returnBranch = returnBranch; + } + + + public ReturnsDetailsResponseProductsInner shipFromBranch(Integer shipFromBranch) { + this.shipFromBranch = shipFromBranch; + return this; + } + + /** + * The code of the ship from branch. + * @return shipFromBranch + **/ + @javax.annotation.Nullable + public Integer getShipFromBranch() { + return shipFromBranch; + } + + public void setShipFromBranch(Integer shipFromBranch) { + this.shipFromBranch = shipFromBranch; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnsDetailsResponseProductsInner returnsDetailsResponseProductsInner = (ReturnsDetailsResponseProductsInner) o; + return Objects.equals(this.ingramLineNumber, returnsDetailsResponseProductsInner.ingramLineNumber) && + Objects.equals(this.description, returnsDetailsResponseProductsInner.description) && + Objects.equals(this.ingramPartNumber, returnsDetailsResponseProductsInner.ingramPartNumber) && + Objects.equals(this.vendorPartNumber, returnsDetailsResponseProductsInner.vendorPartNumber) && + Objects.equals(this.upc, returnsDetailsResponseProductsInner.upc) && + Objects.equals(this.invoiceDate, returnsDetailsResponseProductsInner.invoiceDate) && + Objects.equals(this.invoiceNumber, returnsDetailsResponseProductsInner.invoiceNumber) && + Objects.equals(this.customerOrderNumber, returnsDetailsResponseProductsInner.customerOrderNumber) && + Objects.equals(this.requestDetails, returnsDetailsResponseProductsInner.requestDetails) && + Objects.equals(this.quantity, returnsDetailsResponseProductsInner.quantity) && + Objects.equals(this.unitPrice, returnsDetailsResponseProductsInner.unitPrice) && + Objects.equals(this.extendedPrice, returnsDetailsResponseProductsInner.extendedPrice) && + Objects.equals(this.status, returnsDetailsResponseProductsInner.status) && + Objects.equals(this.returnBranch, returnsDetailsResponseProductsInner.returnBranch) && + Objects.equals(this.shipFromBranch, returnsDetailsResponseProductsInner.shipFromBranch); + } + + @Override + public int hashCode() { + return Objects.hash(ingramLineNumber, description, ingramPartNumber, vendorPartNumber, upc, invoiceDate, invoiceNumber, customerOrderNumber, requestDetails, quantity, unitPrice, extendedPrice, status, returnBranch, shipFromBranch); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnsDetailsResponseProductsInner {\n"); + sb.append(" ingramLineNumber: ").append(toIndentedString(ingramLineNumber)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" ingramPartNumber: ").append(toIndentedString(ingramPartNumber)).append("\n"); + sb.append(" vendorPartNumber: ").append(toIndentedString(vendorPartNumber)).append("\n"); + sb.append(" upc: ").append(toIndentedString(upc)).append("\n"); + sb.append(" invoiceDate: ").append(toIndentedString(invoiceDate)).append("\n"); + sb.append(" invoiceNumber: ").append(toIndentedString(invoiceNumber)).append("\n"); + sb.append(" customerOrderNumber: ").append(toIndentedString(customerOrderNumber)).append("\n"); + sb.append(" requestDetails: ").append(toIndentedString(requestDetails)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" unitPrice: ").append(toIndentedString(unitPrice)).append("\n"); + sb.append(" extendedPrice: ").append(toIndentedString(extendedPrice)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" returnBranch: ").append(toIndentedString(returnBranch)).append("\n"); + sb.append(" shipFromBranch: ").append(toIndentedString(shipFromBranch)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("ingramLineNumber"); + openapiFields.add("description"); + openapiFields.add("ingramPartNumber"); + openapiFields.add("vendorPartNumber"); + openapiFields.add("upc"); + openapiFields.add("invoiceDate"); + openapiFields.add("invoiceNumber"); + openapiFields.add("customerOrderNumber"); + openapiFields.add("requestDetails"); + openapiFields.add("quantity"); + openapiFields.add("unitPrice"); + openapiFields.add("extendedPrice"); + openapiFields.add("status"); + openapiFields.add("returnBranch"); + openapiFields.add("shipFromBranch"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ReturnsDetailsResponseProductsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ReturnsDetailsResponseProductsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ReturnsDetailsResponseProductsInner is not found in the empty JSON string", ReturnsDetailsResponseProductsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ReturnsDetailsResponseProductsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReturnsDetailsResponseProductsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("ingramLineNumber") != null && !jsonObj.get("ingramLineNumber").isJsonNull()) && !jsonObj.get("ingramLineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramLineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramLineNumber").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("ingramPartNumber") != null && !jsonObj.get("ingramPartNumber").isJsonNull()) && !jsonObj.get("ingramPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPartNumber").toString())); + } + if ((jsonObj.get("vendorPartNumber") != null && !jsonObj.get("vendorPartNumber").isJsonNull()) && !jsonObj.get("vendorPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorPartNumber").toString())); + } + if ((jsonObj.get("upc") != null && !jsonObj.get("upc").isJsonNull()) && !jsonObj.get("upc").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `upc` to be a primitive type in the JSON string but got `%s`", jsonObj.get("upc").toString())); + } + if ((jsonObj.get("invoiceNumber") != null && !jsonObj.get("invoiceNumber").isJsonNull()) && !jsonObj.get("invoiceNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `invoiceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoiceNumber").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ReturnsDetailsResponseProductsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReturnsDetailsResponseProductsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ReturnsDetailsResponseProductsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ReturnsDetailsResponseProductsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ReturnsDetailsResponseProductsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ReturnsDetailsResponseProductsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReturnsDetailsResponseProductsInner + * @throws IOException if the JSON string is invalid with respect to ReturnsDetailsResponseProductsInner + */ + public static ReturnsDetailsResponseProductsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReturnsDetailsResponseProductsInner.class); + } + + /** + * Convert an instance of ReturnsDetailsResponseProductsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ReturnsSearchResponse.java b/src/main/java/xiresellers/client/model/ReturnsSearchResponse.java new file mode 100644 index 00000000..b0045692 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ReturnsSearchResponse.java @@ -0,0 +1,364 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ReturnsSearchResponseReturnsClaimsInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ReturnsSearchResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ReturnsSearchResponse { + public static final String SERIALIZED_NAME_RECORDS_FOUND = "recordsFound"; + @SerializedName(SERIALIZED_NAME_RECORDS_FOUND) + private Integer recordsFound; + + public static final String SERIALIZED_NAME_PAGE_SIZE = "pageSize"; + @SerializedName(SERIALIZED_NAME_PAGE_SIZE) + private Integer pageSize; + + public static final String SERIALIZED_NAME_PAGE_NUMBER = "pageNumber"; + @SerializedName(SERIALIZED_NAME_PAGE_NUMBER) + private Integer pageNumber; + + public static final String SERIALIZED_NAME_RETURNS_CLAIMS = "returnsClaims"; + @SerializedName(SERIALIZED_NAME_RETURNS_CLAIMS) + private List returnsClaims; + + public static final String SERIALIZED_NAME_NEXT_PAGE = "nextPage"; + @SerializedName(SERIALIZED_NAME_NEXT_PAGE) + private String nextPage; + + public static final String SERIALIZED_NAME_PREVIOUS_PAGE = "previousPage"; + @SerializedName(SERIALIZED_NAME_PREVIOUS_PAGE) + private String previousPage; + + public ReturnsSearchResponse() { + } + + public ReturnsSearchResponse recordsFound(Integer recordsFound) { + this.recordsFound = recordsFound; + return this; + } + + /** + * Number of records found. + * @return recordsFound + **/ + @javax.annotation.Nullable + public Integer getRecordsFound() { + return recordsFound; + } + + public void setRecordsFound(Integer recordsFound) { + this.recordsFound = recordsFound; + } + + + public ReturnsSearchResponse pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Number of records in a page. + * @return pageSize + **/ + @javax.annotation.Nullable + public Integer getPageSize() { + return pageSize; + } + + public void setPageSize(Integer pageSize) { + this.pageSize = pageSize; + } + + + public ReturnsSearchResponse pageNumber(Integer pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Number of page. + * @return pageNumber + **/ + @javax.annotation.Nullable + public Integer getPageNumber() { + return pageNumber; + } + + public void setPageNumber(Integer pageNumber) { + this.pageNumber = pageNumber; + } + + + public ReturnsSearchResponse returnsClaims(List returnsClaims) { + this.returnsClaims = returnsClaims; + return this; + } + + public ReturnsSearchResponse addReturnsClaimsItem(ReturnsSearchResponseReturnsClaimsInner returnsClaimsItem) { + if (this.returnsClaims == null) { + this.returnsClaims = new ArrayList<>(); + } + this.returnsClaims.add(returnsClaimsItem); + return this; + } + + /** + * Get returnsClaims + * @return returnsClaims + **/ + @javax.annotation.Nullable + public List getReturnsClaims() { + return returnsClaims; + } + + public void setReturnsClaims(List returnsClaims) { + this.returnsClaims = returnsClaims; + } + + + public ReturnsSearchResponse nextPage(String nextPage) { + this.nextPage = nextPage; + return this; + } + + /** + * URL for the next page. + * @return nextPage + **/ + @javax.annotation.Nullable + public String getNextPage() { + return nextPage; + } + + public void setNextPage(String nextPage) { + this.nextPage = nextPage; + } + + + public ReturnsSearchResponse previousPage(String previousPage) { + this.previousPage = previousPage; + return this; + } + + /** + * URL for the previous page. + * @return previousPage + **/ + @javax.annotation.Nullable + public String getPreviousPage() { + return previousPage; + } + + public void setPreviousPage(String previousPage) { + this.previousPage = previousPage; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnsSearchResponse returnsSearchResponse = (ReturnsSearchResponse) o; + return Objects.equals(this.recordsFound, returnsSearchResponse.recordsFound) && + Objects.equals(this.pageSize, returnsSearchResponse.pageSize) && + Objects.equals(this.pageNumber, returnsSearchResponse.pageNumber) && + Objects.equals(this.returnsClaims, returnsSearchResponse.returnsClaims) && + Objects.equals(this.nextPage, returnsSearchResponse.nextPage) && + Objects.equals(this.previousPage, returnsSearchResponse.previousPage); + } + + @Override + public int hashCode() { + return Objects.hash(recordsFound, pageSize, pageNumber, returnsClaims, nextPage, previousPage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnsSearchResponse {\n"); + sb.append(" recordsFound: ").append(toIndentedString(recordsFound)).append("\n"); + sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); + sb.append(" pageNumber: ").append(toIndentedString(pageNumber)).append("\n"); + sb.append(" returnsClaims: ").append(toIndentedString(returnsClaims)).append("\n"); + sb.append(" nextPage: ").append(toIndentedString(nextPage)).append("\n"); + sb.append(" previousPage: ").append(toIndentedString(previousPage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("recordsFound"); + openapiFields.add("pageSize"); + openapiFields.add("pageNumber"); + openapiFields.add("returnsClaims"); + openapiFields.add("nextPage"); + openapiFields.add("previousPage"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ReturnsSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ReturnsSearchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ReturnsSearchResponse is not found in the empty JSON string", ReturnsSearchResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ReturnsSearchResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReturnsSearchResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("returnsClaims") != null && !jsonObj.get("returnsClaims").isJsonNull()) { + JsonArray jsonArrayreturnsClaims = jsonObj.getAsJsonArray("returnsClaims"); + if (jsonArrayreturnsClaims != null) { + // ensure the json data is an array + if (!jsonObj.get("returnsClaims").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `returnsClaims` to be an array in the JSON string but got `%s`", jsonObj.get("returnsClaims").toString())); + } + + // validate the optional field `returnsClaims` (array) + for (int i = 0; i < jsonArrayreturnsClaims.size(); i++) { + ReturnsSearchResponseReturnsClaimsInner.validateJsonElement(jsonArrayreturnsClaims.get(i)); + }; + } + } + if ((jsonObj.get("nextPage") != null && !jsonObj.get("nextPage").isJsonNull()) && !jsonObj.get("nextPage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nextPage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextPage").toString())); + } + if ((jsonObj.get("previousPage") != null && !jsonObj.get("previousPage").isJsonNull()) && !jsonObj.get("previousPage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `previousPage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("previousPage").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ReturnsSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReturnsSearchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ReturnsSearchResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ReturnsSearchResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ReturnsSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ReturnsSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReturnsSearchResponse + * @throws IOException if the JSON string is invalid with respect to ReturnsSearchResponse + */ + public static ReturnsSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReturnsSearchResponse.class); + } + + /** + * Convert an instance of ReturnsSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ReturnsSearchResponseReturnsClaimsInner.java b/src/main/java/xiresellers/client/model/ReturnsSearchResponseReturnsClaimsInner.java new file mode 100644 index 00000000..c3fbad40 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ReturnsSearchResponseReturnsClaimsInner.java @@ -0,0 +1,511 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ReturnsSearchResponseReturnsClaimsInnerLinksInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ReturnsSearchResponseReturnsClaimsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ReturnsSearchResponseReturnsClaimsInner { + public static final String SERIALIZED_NAME_RETURN_CLAIM_ID = "returnClaimId"; + @SerializedName(SERIALIZED_NAME_RETURN_CLAIM_ID) + private String returnClaimId; + + public static final String SERIALIZED_NAME_CASE_REQUEST_NUMBER = "caseRequestNumber"; + @SerializedName(SERIALIZED_NAME_CASE_REQUEST_NUMBER) + private String caseRequestNumber; + + public static final String SERIALIZED_NAME_CREATED_ON = "createdOn"; + @SerializedName(SERIALIZED_NAME_CREATED_ON) + private LocalDate createdOn; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_RETURN_REASON = "returnReason"; + @SerializedName(SERIALIZED_NAME_RETURN_REASON) + private String returnReason; + + public static final String SERIALIZED_NAME_REFERENCE_NUMBER = "referenceNumber"; + @SerializedName(SERIALIZED_NAME_REFERENCE_NUMBER) + private String referenceNumber; + + public static final String SERIALIZED_NAME_ESTIMATED_TOTAL_VALUE = "estimatedTotalValue"; + @SerializedName(SERIALIZED_NAME_ESTIMATED_TOTAL_VALUE) + private LocalDate estimatedTotalValue; + + public static final String SERIALIZED_NAME_CREDIT = "credit"; + @SerializedName(SERIALIZED_NAME_CREDIT) + private BigDecimal credit; + + public static final String SERIALIZED_NAME_MODIFIED_ON = "modifiedOn"; + @SerializedName(SERIALIZED_NAME_MODIFIED_ON) + private String modifiedOn; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_LINKS = "links"; + @SerializedName(SERIALIZED_NAME_LINKS) + private List links; + + public ReturnsSearchResponseReturnsClaimsInner() { + } + + public ReturnsSearchResponseReturnsClaimsInner returnClaimId(String returnClaimId) { + this.returnClaimId = returnClaimId; + return this; + } + + /** + * A unique return claim Id. + * @return returnClaimId + **/ + @javax.annotation.Nullable + public String getReturnClaimId() { + return returnClaimId; + } + + public void setReturnClaimId(String returnClaimId) { + this.returnClaimId = returnClaimId; + } + + + public ReturnsSearchResponseReturnsClaimsInner caseRequestNumber(String caseRequestNumber) { + this.caseRequestNumber = caseRequestNumber; + return this; + } + + /** + * A unique return request number. + * @return caseRequestNumber + **/ + @javax.annotation.Nullable + public String getCaseRequestNumber() { + return caseRequestNumber; + } + + public void setCaseRequestNumber(String caseRequestNumber) { + this.caseRequestNumber = caseRequestNumber; + } + + + public ReturnsSearchResponseReturnsClaimsInner createdOn(LocalDate createdOn) { + this.createdOn = createdOn; + return this; + } + + /** + * The date on which the return request was created. + * @return createdOn + **/ + @javax.annotation.Nullable + public LocalDate getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(LocalDate createdOn) { + this.createdOn = createdOn; + } + + + public ReturnsSearchResponseReturnsClaimsInner type(String type) { + this.type = type; + return this; + } + + /** + * Type of request. + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + + public ReturnsSearchResponseReturnsClaimsInner returnReason(String returnReason) { + this.returnReason = returnReason; + return this; + } + + /** + * The reason for the return. + * @return returnReason + **/ + @javax.annotation.Nullable + public String getReturnReason() { + return returnReason; + } + + public void setReturnReason(String returnReason) { + this.returnReason = returnReason; + } + + + public ReturnsSearchResponseReturnsClaimsInner referenceNumber(String referenceNumber) { + this.referenceNumber = referenceNumber; + return this; + } + + /** + * The reference number for the return. + * @return referenceNumber + **/ + @javax.annotation.Nullable + public String getReferenceNumber() { + return referenceNumber; + } + + public void setReferenceNumber(String referenceNumber) { + this.referenceNumber = referenceNumber; + } + + + public ReturnsSearchResponseReturnsClaimsInner estimatedTotalValue(LocalDate estimatedTotalValue) { + this.estimatedTotalValue = estimatedTotalValue; + return this; + } + + /** + * The estimated total value of the return. + * @return estimatedTotalValue + **/ + @javax.annotation.Nullable + public LocalDate getEstimatedTotalValue() { + return estimatedTotalValue; + } + + public void setEstimatedTotalValue(LocalDate estimatedTotalValue) { + this.estimatedTotalValue = estimatedTotalValue; + } + + + public ReturnsSearchResponseReturnsClaimsInner credit(BigDecimal credit) { + this.credit = credit; + return this; + } + + /** + * The amount of credit. + * @return credit + **/ + @javax.annotation.Nullable + public BigDecimal getCredit() { + return credit; + } + + public void setCredit(BigDecimal credit) { + this.credit = credit; + } + + + public ReturnsSearchResponseReturnsClaimsInner modifiedOn(String modifiedOn) { + this.modifiedOn = modifiedOn; + return this; + } + + /** + * The date on which the return request was last updated. + * @return modifiedOn + **/ + @javax.annotation.Nullable + public String getModifiedOn() { + return modifiedOn; + } + + public void setModifiedOn(String modifiedOn) { + this.modifiedOn = modifiedOn; + } + + + public ReturnsSearchResponseReturnsClaimsInner status(String status) { + this.status = status; + return this; + } + + /** + * The status of the request. + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + public ReturnsSearchResponseReturnsClaimsInner links(List links) { + this.links = links; + return this; + } + + public ReturnsSearchResponseReturnsClaimsInner addLinksItem(ReturnsSearchResponseReturnsClaimsInnerLinksInner linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * Get links + * @return links + **/ + @javax.annotation.Nullable + public List getLinks() { + return links; + } + + public void setLinks(List links) { + this.links = links; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnsSearchResponseReturnsClaimsInner returnsSearchResponseReturnsClaimsInner = (ReturnsSearchResponseReturnsClaimsInner) o; + return Objects.equals(this.returnClaimId, returnsSearchResponseReturnsClaimsInner.returnClaimId) && + Objects.equals(this.caseRequestNumber, returnsSearchResponseReturnsClaimsInner.caseRequestNumber) && + Objects.equals(this.createdOn, returnsSearchResponseReturnsClaimsInner.createdOn) && + Objects.equals(this.type, returnsSearchResponseReturnsClaimsInner.type) && + Objects.equals(this.returnReason, returnsSearchResponseReturnsClaimsInner.returnReason) && + Objects.equals(this.referenceNumber, returnsSearchResponseReturnsClaimsInner.referenceNumber) && + Objects.equals(this.estimatedTotalValue, returnsSearchResponseReturnsClaimsInner.estimatedTotalValue) && + Objects.equals(this.credit, returnsSearchResponseReturnsClaimsInner.credit) && + Objects.equals(this.modifiedOn, returnsSearchResponseReturnsClaimsInner.modifiedOn) && + Objects.equals(this.status, returnsSearchResponseReturnsClaimsInner.status) && + Objects.equals(this.links, returnsSearchResponseReturnsClaimsInner.links); + } + + @Override + public int hashCode() { + return Objects.hash(returnClaimId, caseRequestNumber, createdOn, type, returnReason, referenceNumber, estimatedTotalValue, credit, modifiedOn, status, links); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnsSearchResponseReturnsClaimsInner {\n"); + sb.append(" returnClaimId: ").append(toIndentedString(returnClaimId)).append("\n"); + sb.append(" caseRequestNumber: ").append(toIndentedString(caseRequestNumber)).append("\n"); + sb.append(" createdOn: ").append(toIndentedString(createdOn)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" returnReason: ").append(toIndentedString(returnReason)).append("\n"); + sb.append(" referenceNumber: ").append(toIndentedString(referenceNumber)).append("\n"); + sb.append(" estimatedTotalValue: ").append(toIndentedString(estimatedTotalValue)).append("\n"); + sb.append(" credit: ").append(toIndentedString(credit)).append("\n"); + sb.append(" modifiedOn: ").append(toIndentedString(modifiedOn)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("returnClaimId"); + openapiFields.add("caseRequestNumber"); + openapiFields.add("createdOn"); + openapiFields.add("type"); + openapiFields.add("returnReason"); + openapiFields.add("referenceNumber"); + openapiFields.add("estimatedTotalValue"); + openapiFields.add("credit"); + openapiFields.add("modifiedOn"); + openapiFields.add("status"); + openapiFields.add("links"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ReturnsSearchResponseReturnsClaimsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ReturnsSearchResponseReturnsClaimsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ReturnsSearchResponseReturnsClaimsInner is not found in the empty JSON string", ReturnsSearchResponseReturnsClaimsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ReturnsSearchResponseReturnsClaimsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReturnsSearchResponseReturnsClaimsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("returnClaimId") != null && !jsonObj.get("returnClaimId").isJsonNull()) && !jsonObj.get("returnClaimId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `returnClaimId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("returnClaimId").toString())); + } + if ((jsonObj.get("caseRequestNumber") != null && !jsonObj.get("caseRequestNumber").isJsonNull()) && !jsonObj.get("caseRequestNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `caseRequestNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("caseRequestNumber").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("returnReason") != null && !jsonObj.get("returnReason").isJsonNull()) && !jsonObj.get("returnReason").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `returnReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("returnReason").toString())); + } + if ((jsonObj.get("referenceNumber") != null && !jsonObj.get("referenceNumber").isJsonNull()) && !jsonObj.get("referenceNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `referenceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceNumber").toString())); + } + if ((jsonObj.get("modifiedOn") != null && !jsonObj.get("modifiedOn").isJsonNull()) && !jsonObj.get("modifiedOn").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `modifiedOn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("modifiedOn").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull()) { + JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); + if (jsonArraylinks != null) { + // ensure the json data is an array + if (!jsonObj.get("links").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + } + + // validate the optional field `links` (array) + for (int i = 0; i < jsonArraylinks.size(); i++) { + ReturnsSearchResponseReturnsClaimsInnerLinksInner.validateJsonElement(jsonArraylinks.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ReturnsSearchResponseReturnsClaimsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReturnsSearchResponseReturnsClaimsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ReturnsSearchResponseReturnsClaimsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ReturnsSearchResponseReturnsClaimsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ReturnsSearchResponseReturnsClaimsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ReturnsSearchResponseReturnsClaimsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReturnsSearchResponseReturnsClaimsInner + * @throws IOException if the JSON string is invalid with respect to ReturnsSearchResponseReturnsClaimsInner + */ + public static ReturnsSearchResponseReturnsClaimsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReturnsSearchResponseReturnsClaimsInner.class); + } + + /** + * Convert an instance of ReturnsSearchResponseReturnsClaimsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ReturnsSearchResponseReturnsClaimsInnerLinksInner.java b/src/main/java/xiresellers/client/model/ReturnsSearchResponseReturnsClaimsInnerLinksInner.java new file mode 100644 index 00000000..564af84f --- /dev/null +++ b/src/main/java/xiresellers/client/model/ReturnsSearchResponseReturnsClaimsInnerLinksInner.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ReturnsSearchResponseReturnsClaimsInnerLinksInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ReturnsSearchResponseReturnsClaimsInnerLinksInner { + public static final String SERIALIZED_NAME_TOPIC = "topic"; + @SerializedName(SERIALIZED_NAME_TOPIC) + private String topic; + + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + private String href; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public ReturnsSearchResponseReturnsClaimsInnerLinksInner() { + } + + public ReturnsSearchResponseReturnsClaimsInnerLinksInner topic(String topic) { + this.topic = topic; + return this; + } + + /** + * Provides the details of the return. + * @return topic + **/ + @javax.annotation.Nullable + public String getTopic() { + return topic; + } + + public void setTopic(String topic) { + this.topic = topic; + } + + + public ReturnsSearchResponseReturnsClaimsInnerLinksInner href(String href) { + this.href = href; + return this; + } + + /** + * The URL endpoint for accessing the relevant data. + * @return href + **/ + @javax.annotation.Nullable + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + + public ReturnsSearchResponseReturnsClaimsInnerLinksInner type(String type) { + this.type = type; + return this; + } + + /** + * The type of call that can be made to the href link (GET, POST, Etc.). + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnsSearchResponseReturnsClaimsInnerLinksInner returnsSearchResponseReturnsClaimsInnerLinksInner = (ReturnsSearchResponseReturnsClaimsInnerLinksInner) o; + return Objects.equals(this.topic, returnsSearchResponseReturnsClaimsInnerLinksInner.topic) && + Objects.equals(this.href, returnsSearchResponseReturnsClaimsInnerLinksInner.href) && + Objects.equals(this.type, returnsSearchResponseReturnsClaimsInnerLinksInner.type); + } + + @Override + public int hashCode() { + return Objects.hash(topic, href, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnsSearchResponseReturnsClaimsInnerLinksInner {\n"); + sb.append(" topic: ").append(toIndentedString(topic)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("topic"); + openapiFields.add("href"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ReturnsSearchResponseReturnsClaimsInnerLinksInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ReturnsSearchResponseReturnsClaimsInnerLinksInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ReturnsSearchResponseReturnsClaimsInnerLinksInner is not found in the empty JSON string", ReturnsSearchResponseReturnsClaimsInnerLinksInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ReturnsSearchResponseReturnsClaimsInnerLinksInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReturnsSearchResponseReturnsClaimsInnerLinksInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("topic") != null && !jsonObj.get("topic").isJsonNull()) && !jsonObj.get("topic").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `topic` to be a primitive type in the JSON string but got `%s`", jsonObj.get("topic").toString())); + } + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ReturnsSearchResponseReturnsClaimsInnerLinksInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReturnsSearchResponseReturnsClaimsInnerLinksInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ReturnsSearchResponseReturnsClaimsInnerLinksInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ReturnsSearchResponseReturnsClaimsInnerLinksInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ReturnsSearchResponseReturnsClaimsInnerLinksInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ReturnsSearchResponseReturnsClaimsInnerLinksInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReturnsSearchResponseReturnsClaimsInnerLinksInner + * @throws IOException if the JSON string is invalid with respect to ReturnsSearchResponseReturnsClaimsInnerLinksInner + */ + public static ReturnsSearchResponseReturnsClaimsInnerLinksInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReturnsSearchResponseReturnsClaimsInnerLinksInner.class); + } + + /** + * Convert an instance of ReturnsSearchResponseReturnsClaimsInnerLinksInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ValidateQuoteResponse.java b/src/main/java/xiresellers/client/model/ValidateQuoteResponse.java new file mode 100644 index 00000000..24f04db6 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ValidateQuoteResponse.java @@ -0,0 +1,335 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ValidateQuoteResponseLinesInner; +import xiresellers.client.model.ValidateQuoteResponseVmfAdditionalAttributesInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ValidateQuoteResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ValidateQuoteResponse { + public static final String SERIALIZED_NAME_QUOTE_NUMBER = "quoteNumber"; + @SerializedName(SERIALIZED_NAME_QUOTE_NUMBER) + private String quoteNumber; + + public static final String SERIALIZED_NAME_VENDOR_NAME = "vendorName"; + @SerializedName(SERIALIZED_NAME_VENDOR_NAME) + private String vendorName; + + public static final String SERIALIZED_NAME_VMF_ADDITIONAL_ATTRIBUTES = "vmfAdditionalAttributes"; + @SerializedName(SERIALIZED_NAME_VMF_ADDITIONAL_ATTRIBUTES) + private List vmfAdditionalAttributes; + + public static final String SERIALIZED_NAME_LINES = "lines"; + @SerializedName(SERIALIZED_NAME_LINES) + private List lines; + + public ValidateQuoteResponse() { + } + + public ValidateQuoteResponse quoteNumber(String quoteNumber) { + this.quoteNumber = quoteNumber; + return this; + } + + /** + * A unique identifier generated by Ingram Micro's CRM specific to each quote. + * @return quoteNumber + **/ + @javax.annotation.Nullable + public String getQuoteNumber() { + return quoteNumber; + } + + public void setQuoteNumber(String quoteNumber) { + this.quoteNumber = quoteNumber; + } + + + public ValidateQuoteResponse vendorName(String vendorName) { + this.vendorName = vendorName; + return this; + } + + /** + * The name of the vendor. + * @return vendorName + **/ + @javax.annotation.Nullable + public String getVendorName() { + return vendorName; + } + + public void setVendorName(String vendorName) { + this.vendorName = vendorName; + } + + + public ValidateQuoteResponse vmfAdditionalAttributes(List vmfAdditionalAttributes) { + this.vmfAdditionalAttributes = vmfAdditionalAttributes; + return this; + } + + public ValidateQuoteResponse addVmfAdditionalAttributesItem(ValidateQuoteResponseVmfAdditionalAttributesInner vmfAdditionalAttributesItem) { + if (this.vmfAdditionalAttributes == null) { + this.vmfAdditionalAttributes = new ArrayList<>(); + } + this.vmfAdditionalAttributes.add(vmfAdditionalAttributesItem); + return this; + } + + /** + * The object containing the list of fields required at a header level by the vendor. + * @return vmfAdditionalAttributes + **/ + @javax.annotation.Nullable + public List getVmfAdditionalAttributes() { + return vmfAdditionalAttributes; + } + + public void setVmfAdditionalAttributes(List vmfAdditionalAttributes) { + this.vmfAdditionalAttributes = vmfAdditionalAttributes; + } + + + public ValidateQuoteResponse lines(List lines) { + this.lines = lines; + return this; + } + + public ValidateQuoteResponse addLinesItem(ValidateQuoteResponseLinesInner linesItem) { + if (this.lines == null) { + this.lines = new ArrayList<>(); + } + this.lines.add(linesItem); + return this; + } + + /** + * The object containing the lines from the quote. + * @return lines + **/ + @javax.annotation.Nullable + public List getLines() { + return lines; + } + + public void setLines(List lines) { + this.lines = lines; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValidateQuoteResponse validateQuoteResponse = (ValidateQuoteResponse) o; + return Objects.equals(this.quoteNumber, validateQuoteResponse.quoteNumber) && + Objects.equals(this.vendorName, validateQuoteResponse.vendorName) && + Objects.equals(this.vmfAdditionalAttributes, validateQuoteResponse.vmfAdditionalAttributes) && + Objects.equals(this.lines, validateQuoteResponse.lines); + } + + @Override + public int hashCode() { + return Objects.hash(quoteNumber, vendorName, vmfAdditionalAttributes, lines); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValidateQuoteResponse {\n"); + sb.append(" quoteNumber: ").append(toIndentedString(quoteNumber)).append("\n"); + sb.append(" vendorName: ").append(toIndentedString(vendorName)).append("\n"); + sb.append(" vmfAdditionalAttributes: ").append(toIndentedString(vmfAdditionalAttributes)).append("\n"); + sb.append(" lines: ").append(toIndentedString(lines)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("quoteNumber"); + openapiFields.add("vendorName"); + openapiFields.add("vmfAdditionalAttributes"); + openapiFields.add("lines"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ValidateQuoteResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ValidateQuoteResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ValidateQuoteResponse is not found in the empty JSON string", ValidateQuoteResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ValidateQuoteResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ValidateQuoteResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("quoteNumber") != null && !jsonObj.get("quoteNumber").isJsonNull()) && !jsonObj.get("quoteNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quoteNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quoteNumber").toString())); + } + if ((jsonObj.get("vendorName") != null && !jsonObj.get("vendorName").isJsonNull()) && !jsonObj.get("vendorName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `vendorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendorName").toString())); + } + if (jsonObj.get("vmfAdditionalAttributes") != null && !jsonObj.get("vmfAdditionalAttributes").isJsonNull()) { + JsonArray jsonArrayvmfAdditionalAttributes = jsonObj.getAsJsonArray("vmfAdditionalAttributes"); + if (jsonArrayvmfAdditionalAttributes != null) { + // ensure the json data is an array + if (!jsonObj.get("vmfAdditionalAttributes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `vmfAdditionalAttributes` to be an array in the JSON string but got `%s`", jsonObj.get("vmfAdditionalAttributes").toString())); + } + + // validate the optional field `vmfAdditionalAttributes` (array) + for (int i = 0; i < jsonArrayvmfAdditionalAttributes.size(); i++) { + ValidateQuoteResponseVmfAdditionalAttributesInner.validateJsonElement(jsonArrayvmfAdditionalAttributes.get(i)); + }; + } + } + if (jsonObj.get("lines") != null && !jsonObj.get("lines").isJsonNull()) { + JsonArray jsonArraylines = jsonObj.getAsJsonArray("lines"); + if (jsonArraylines != null) { + // ensure the json data is an array + if (!jsonObj.get("lines").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `lines` to be an array in the JSON string but got `%s`", jsonObj.get("lines").toString())); + } + + // validate the optional field `lines` (array) + for (int i = 0; i < jsonArraylines.size(); i++) { + ValidateQuoteResponseLinesInner.validateJsonElement(jsonArraylines.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ValidateQuoteResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ValidateQuoteResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ValidateQuoteResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ValidateQuoteResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ValidateQuoteResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ValidateQuoteResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ValidateQuoteResponse + * @throws IOException if the JSON string is invalid with respect to ValidateQuoteResponse + */ + public static ValidateQuoteResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ValidateQuoteResponse.class); + } + + /** + * Convert an instance of ValidateQuoteResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ValidateQuoteResponseLinesInner.java b/src/main/java/xiresellers/client/model/ValidateQuoteResponseLinesInner.java new file mode 100644 index 00000000..e6de401d --- /dev/null +++ b/src/main/java/xiresellers/client/model/ValidateQuoteResponseLinesInner.java @@ -0,0 +1,315 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ValidateQuoteResponseLinesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ValidateQuoteResponseLinesInner { + public static final String SERIALIZED_NAME_CUSTOMER_LINE_NUMBER = "customerLineNumber"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_LINE_NUMBER) + private String customerLineNumber; + + public static final String SERIALIZED_NAME_INGRAM_PART_NUMBER = "ingramPartNumber"; + @SerializedName(SERIALIZED_NAME_INGRAM_PART_NUMBER) + private String ingramPartNumber; + + public static final String SERIALIZED_NAME_QUANTITY = "quantity"; + @SerializedName(SERIALIZED_NAME_QUANTITY) + private String quantity; + + public static final String SERIALIZED_NAME_VMF_ADDITIONAL_ATTRIBUTES_LINES = "vmfAdditionalAttributesLines"; + @SerializedName(SERIALIZED_NAME_VMF_ADDITIONAL_ATTRIBUTES_LINES) + private List vmfAdditionalAttributesLines; + + public ValidateQuoteResponseLinesInner() { + } + + public ValidateQuoteResponseLinesInner customerLineNumber(String customerLineNumber) { + this.customerLineNumber = customerLineNumber; + return this; + } + + /** + * The reseller's line item number for reference in their system. + * @return customerLineNumber + **/ + @javax.annotation.Nullable + public String getCustomerLineNumber() { + return customerLineNumber; + } + + public void setCustomerLineNumber(String customerLineNumber) { + this.customerLineNumber = customerLineNumber; + } + + + public ValidateQuoteResponseLinesInner ingramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + return this; + } + + /** + * Unique Ingram Micro part number. + * @return ingramPartNumber + **/ + @javax.annotation.Nullable + public String getIngramPartNumber() { + return ingramPartNumber; + } + + public void setIngramPartNumber(String ingramPartNumber) { + this.ingramPartNumber = ingramPartNumber; + } + + + public ValidateQuoteResponseLinesInner quantity(String quantity) { + this.quantity = quantity; + return this; + } + + /** + * The quantity of the line item. + * @return quantity + **/ + @javax.annotation.Nullable + public String getQuantity() { + return quantity; + } + + public void setQuantity(String quantity) { + this.quantity = quantity; + } + + + public ValidateQuoteResponseLinesInner vmfAdditionalAttributesLines(List vmfAdditionalAttributesLines) { + this.vmfAdditionalAttributesLines = vmfAdditionalAttributesLines; + return this; + } + + public ValidateQuoteResponseLinesInner addVmfAdditionalAttributesLinesItem(ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner vmfAdditionalAttributesLinesItem) { + if (this.vmfAdditionalAttributesLines == null) { + this.vmfAdditionalAttributesLines = new ArrayList<>(); + } + this.vmfAdditionalAttributesLines.add(vmfAdditionalAttributesLinesItem); + return this; + } + + /** + * The object containing the list of fields required at a line level by the vendor. + * @return vmfAdditionalAttributesLines + **/ + @javax.annotation.Nullable + public List getVmfAdditionalAttributesLines() { + return vmfAdditionalAttributesLines; + } + + public void setVmfAdditionalAttributesLines(List vmfAdditionalAttributesLines) { + this.vmfAdditionalAttributesLines = vmfAdditionalAttributesLines; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValidateQuoteResponseLinesInner validateQuoteResponseLinesInner = (ValidateQuoteResponseLinesInner) o; + return Objects.equals(this.customerLineNumber, validateQuoteResponseLinesInner.customerLineNumber) && + Objects.equals(this.ingramPartNumber, validateQuoteResponseLinesInner.ingramPartNumber) && + Objects.equals(this.quantity, validateQuoteResponseLinesInner.quantity) && + Objects.equals(this.vmfAdditionalAttributesLines, validateQuoteResponseLinesInner.vmfAdditionalAttributesLines); + } + + @Override + public int hashCode() { + return Objects.hash(customerLineNumber, ingramPartNumber, quantity, vmfAdditionalAttributesLines); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValidateQuoteResponseLinesInner {\n"); + sb.append(" customerLineNumber: ").append(toIndentedString(customerLineNumber)).append("\n"); + sb.append(" ingramPartNumber: ").append(toIndentedString(ingramPartNumber)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" vmfAdditionalAttributesLines: ").append(toIndentedString(vmfAdditionalAttributesLines)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("customerLineNumber"); + openapiFields.add("ingramPartNumber"); + openapiFields.add("quantity"); + openapiFields.add("vmfAdditionalAttributesLines"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ValidateQuoteResponseLinesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ValidateQuoteResponseLinesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ValidateQuoteResponseLinesInner is not found in the empty JSON string", ValidateQuoteResponseLinesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ValidateQuoteResponseLinesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ValidateQuoteResponseLinesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("customerLineNumber") != null && !jsonObj.get("customerLineNumber").isJsonNull()) && !jsonObj.get("customerLineNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `customerLineNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerLineNumber").toString())); + } + if ((jsonObj.get("ingramPartNumber") != null && !jsonObj.get("ingramPartNumber").isJsonNull()) && !jsonObj.get("ingramPartNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingramPartNumber").toString())); + } + if ((jsonObj.get("quantity") != null && !jsonObj.get("quantity").isJsonNull()) && !jsonObj.get("quantity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `quantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quantity").toString())); + } + if (jsonObj.get("vmfAdditionalAttributesLines") != null && !jsonObj.get("vmfAdditionalAttributesLines").isJsonNull()) { + JsonArray jsonArrayvmfAdditionalAttributesLines = jsonObj.getAsJsonArray("vmfAdditionalAttributesLines"); + if (jsonArrayvmfAdditionalAttributesLines != null) { + // ensure the json data is an array + if (!jsonObj.get("vmfAdditionalAttributesLines").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `vmfAdditionalAttributesLines` to be an array in the JSON string but got `%s`", jsonObj.get("vmfAdditionalAttributesLines").toString())); + } + + // validate the optional field `vmfAdditionalAttributesLines` (array) + for (int i = 0; i < jsonArrayvmfAdditionalAttributesLines.size(); i++) { + ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner.validateJsonElement(jsonArrayvmfAdditionalAttributesLines.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ValidateQuoteResponseLinesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ValidateQuoteResponseLinesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ValidateQuoteResponseLinesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ValidateQuoteResponseLinesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ValidateQuoteResponseLinesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ValidateQuoteResponseLinesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ValidateQuoteResponseLinesInner + * @throws IOException if the JSON string is invalid with respect to ValidateQuoteResponseLinesInner + */ + public static ValidateQuoteResponseLinesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ValidateQuoteResponseLinesInner.class); + } + + /** + * Convert an instance of ValidateQuoteResponseLinesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner.java b/src/main/java/xiresellers/client/model/ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner.java new file mode 100644 index 00000000..7a9d4d31 --- /dev/null +++ b/src/main/java/xiresellers/client/model/ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner { + public static final String SERIALIZED_NAME_ATTRIBUTE_NAME = "attributeName"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_NAME) + private String attributeName; + + public static final String SERIALIZED_NAME_ATTRIBUTE_VALUE = "attributeValue"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_VALUE) + private String attributeValue; + + public static final String SERIALIZED_NAME_ATTRIBUTE_DESCRIPTION = "attributeDescription"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_DESCRIPTION) + private String attributeDescription; + + public ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner() { + } + + public ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner attributeName(String attributeName) { + this.attributeName = attributeName; + return this; + } + + /** + * The name of the line level field. + * @return attributeName + **/ + @javax.annotation.Nullable + public String getAttributeName() { + return attributeName; + } + + public void setAttributeName(String attributeName) { + this.attributeName = attributeName; + } + + + public ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner attributeValue(String attributeValue) { + this.attributeValue = attributeValue; + return this; + } + + /** + * The value of the line level field. + * @return attributeValue + **/ + @javax.annotation.Nullable + public String getAttributeValue() { + return attributeValue; + } + + public void setAttributeValue(String attributeValue) { + this.attributeValue = attributeValue; + } + + + public ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner attributeDescription(String attributeDescription) { + this.attributeDescription = attributeDescription; + return this; + } + + /** + * The description of the line level field. + * @return attributeDescription + **/ + @javax.annotation.Nullable + public String getAttributeDescription() { + return attributeDescription; + } + + public void setAttributeDescription(String attributeDescription) { + this.attributeDescription = attributeDescription; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner validateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner = (ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner) o; + return Objects.equals(this.attributeName, validateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner.attributeName) && + Objects.equals(this.attributeValue, validateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner.attributeValue) && + Objects.equals(this.attributeDescription, validateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner.attributeDescription); + } + + @Override + public int hashCode() { + return Objects.hash(attributeName, attributeValue, attributeDescription); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner {\n"); + sb.append(" attributeName: ").append(toIndentedString(attributeName)).append("\n"); + sb.append(" attributeValue: ").append(toIndentedString(attributeValue)).append("\n"); + sb.append(" attributeDescription: ").append(toIndentedString(attributeDescription)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributeName"); + openapiFields.add("attributeValue"); + openapiFields.add("attributeDescription"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner is not found in the empty JSON string", ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("attributeName") != null && !jsonObj.get("attributeName").isJsonNull()) && !jsonObj.get("attributeName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeName").toString())); + } + if ((jsonObj.get("attributeValue") != null && !jsonObj.get("attributeValue").isJsonNull()) && !jsonObj.get("attributeValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeValue").toString())); + } + if ((jsonObj.get("attributeDescription") != null && !jsonObj.get("attributeDescription").isJsonNull()) && !jsonObj.get("attributeDescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeDescription").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner + * @throws IOException if the JSON string is invalid with respect to ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner + */ + public static ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner.class); + } + + /** + * Convert an instance of ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/ValidateQuoteResponseVmfAdditionalAttributesInner.java b/src/main/java/xiresellers/client/model/ValidateQuoteResponseVmfAdditionalAttributesInner.java new file mode 100644 index 00000000..baae983d --- /dev/null +++ b/src/main/java/xiresellers/client/model/ValidateQuoteResponseVmfAdditionalAttributesInner.java @@ -0,0 +1,264 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * ValidateQuoteResponseVmfAdditionalAttributesInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class ValidateQuoteResponseVmfAdditionalAttributesInner { + public static final String SERIALIZED_NAME_ATTRIBUTE_NAME = "attributeName"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_NAME) + private String attributeName; + + public static final String SERIALIZED_NAME_ATTRIBUTE_VALUE = "attributeValue"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_VALUE) + private String attributeValue; + + public static final String SERIALIZED_NAME_ATTRIBUTE_DESCRIPTION = "attributeDescription"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_DESCRIPTION) + private String attributeDescription; + + public ValidateQuoteResponseVmfAdditionalAttributesInner() { + } + + public ValidateQuoteResponseVmfAdditionalAttributesInner attributeName(String attributeName) { + this.attributeName = attributeName; + return this; + } + + /** + * The name of the header level field. + * @return attributeName + **/ + @javax.annotation.Nullable + public String getAttributeName() { + return attributeName; + } + + public void setAttributeName(String attributeName) { + this.attributeName = attributeName; + } + + + public ValidateQuoteResponseVmfAdditionalAttributesInner attributeValue(String attributeValue) { + this.attributeValue = attributeValue; + return this; + } + + /** + * The value of the header level field. + * @return attributeValue + **/ + @javax.annotation.Nullable + public String getAttributeValue() { + return attributeValue; + } + + public void setAttributeValue(String attributeValue) { + this.attributeValue = attributeValue; + } + + + public ValidateQuoteResponseVmfAdditionalAttributesInner attributeDescription(String attributeDescription) { + this.attributeDescription = attributeDescription; + return this; + } + + /** + * The description of the header level field. + * @return attributeDescription + **/ + @javax.annotation.Nullable + public String getAttributeDescription() { + return attributeDescription; + } + + public void setAttributeDescription(String attributeDescription) { + this.attributeDescription = attributeDescription; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValidateQuoteResponseVmfAdditionalAttributesInner validateQuoteResponseVmfAdditionalAttributesInner = (ValidateQuoteResponseVmfAdditionalAttributesInner) o; + return Objects.equals(this.attributeName, validateQuoteResponseVmfAdditionalAttributesInner.attributeName) && + Objects.equals(this.attributeValue, validateQuoteResponseVmfAdditionalAttributesInner.attributeValue) && + Objects.equals(this.attributeDescription, validateQuoteResponseVmfAdditionalAttributesInner.attributeDescription); + } + + @Override + public int hashCode() { + return Objects.hash(attributeName, attributeValue, attributeDescription); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValidateQuoteResponseVmfAdditionalAttributesInner {\n"); + sb.append(" attributeName: ").append(toIndentedString(attributeName)).append("\n"); + sb.append(" attributeValue: ").append(toIndentedString(attributeValue)).append("\n"); + sb.append(" attributeDescription: ").append(toIndentedString(attributeDescription)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributeName"); + openapiFields.add("attributeValue"); + openapiFields.add("attributeDescription"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ValidateQuoteResponseVmfAdditionalAttributesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ValidateQuoteResponseVmfAdditionalAttributesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ValidateQuoteResponseVmfAdditionalAttributesInner is not found in the empty JSON string", ValidateQuoteResponseVmfAdditionalAttributesInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ValidateQuoteResponseVmfAdditionalAttributesInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ValidateQuoteResponseVmfAdditionalAttributesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("attributeName") != null && !jsonObj.get("attributeName").isJsonNull()) && !jsonObj.get("attributeName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeName").toString())); + } + if ((jsonObj.get("attributeValue") != null && !jsonObj.get("attributeValue").isJsonNull()) && !jsonObj.get("attributeValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeValue").toString())); + } + if ((jsonObj.get("attributeDescription") != null && !jsonObj.get("attributeDescription").isJsonNull()) && !jsonObj.get("attributeDescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attributeDescription").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ValidateQuoteResponseVmfAdditionalAttributesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ValidateQuoteResponseVmfAdditionalAttributesInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ValidateQuoteResponseVmfAdditionalAttributesInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ValidateQuoteResponseVmfAdditionalAttributesInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ValidateQuoteResponseVmfAdditionalAttributesInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ValidateQuoteResponseVmfAdditionalAttributesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of ValidateQuoteResponseVmfAdditionalAttributesInner + * @throws IOException if the JSON string is invalid with respect to ValidateQuoteResponseVmfAdditionalAttributesInner + */ + public static ValidateQuoteResponseVmfAdditionalAttributesInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ValidateQuoteResponseVmfAdditionalAttributesInner.class); + } + + /** + * Convert an instance of ValidateQuoteResponseVmfAdditionalAttributesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/xiresellers/client/model/WarehouseListType.java b/src/main/java/xiresellers/client/model/WarehouseListType.java new file mode 100644 index 00000000..e10ca1ca --- /dev/null +++ b/src/main/java/xiresellers/client/model/WarehouseListType.java @@ -0,0 +1,342 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import xiresellers.client.JSON; + +/** + * WarehouseListType + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-01-22T11:06:29.712836Z[Etc/UTC]") +public class WarehouseListType { + public static final String SERIALIZED_NAME_WAREHOUSEID = "warehouseid"; + @SerializedName(SERIALIZED_NAME_WAREHOUSEID) + private String warehouseid; + + public static final String SERIALIZED_NAME_WAREHOUSEDESCRIPTION = "warehousedescription"; + @SerializedName(SERIALIZED_NAME_WAREHOUSEDESCRIPTION) + private String warehousedescription; + + public static final String SERIALIZED_NAME_AVAILABLEQUANTITY = "availablequantity"; + @SerializedName(SERIALIZED_NAME_AVAILABLEQUANTITY) + private Integer availablequantity; + + public static final String SERIALIZED_NAME_ONORDERQUANTITY = "onorderquantity"; + @SerializedName(SERIALIZED_NAME_ONORDERQUANTITY) + private Integer onorderquantity; + + public static final String SERIALIZED_NAME_ONHOLDQUANTITY = "onholdquantity"; + @SerializedName(SERIALIZED_NAME_ONHOLDQUANTITY) + private Integer onholdquantity; + + public static final String SERIALIZED_NAME_ETADATE = "etadate"; + @SerializedName(SERIALIZED_NAME_ETADATE) + private String etadate; + + public WarehouseListType() { + } + + public WarehouseListType warehouseid(String warehouseid) { + this.warehouseid = warehouseid; + return this; + } + + /** + * + * @return warehouseid + **/ + @javax.annotation.Nullable + public String getWarehouseid() { + return warehouseid; + } + + public void setWarehouseid(String warehouseid) { + this.warehouseid = warehouseid; + } + + + public WarehouseListType warehousedescription(String warehousedescription) { + this.warehousedescription = warehousedescription; + return this; + } + + /** + * City of the Ingram Micro warehouse location + * @return warehousedescription + **/ + @javax.annotation.Nullable + public String getWarehousedescription() { + return warehousedescription; + } + + public void setWarehousedescription(String warehousedescription) { + this.warehousedescription = warehousedescription; + } + + + public WarehouseListType availablequantity(Integer availablequantity) { + this.availablequantity = availablequantity; + return this; + } + + /** + * On hand available quantity + * @return availablequantity + **/ + @javax.annotation.Nullable + public Integer getAvailablequantity() { + return availablequantity; + } + + public void setAvailablequantity(Integer availablequantity) { + this.availablequantity = availablequantity; + } + + + public WarehouseListType onorderquantity(Integer onorderquantity) { + this.onorderquantity = onorderquantity; + return this; + } + + /** + * On Order quantity + * @return onorderquantity + **/ + @javax.annotation.Nullable + public Integer getOnorderquantity() { + return onorderquantity; + } + + public void setOnorderquantity(Integer onorderquantity) { + this.onorderquantity = onorderquantity; + } + + + public WarehouseListType onholdquantity(Integer onholdquantity) { + this.onholdquantity = onholdquantity; + return this; + } + + /** + * On hold quantity + * @return onholdquantity + **/ + @javax.annotation.Nullable + public Integer getOnholdquantity() { + return onholdquantity; + } + + public void setOnholdquantity(Integer onholdquantity) { + this.onholdquantity = onholdquantity; + } + + + public WarehouseListType etadate(String etadate) { + this.etadate = etadate; + return this; + } + + /** + * Get etadate + * @return etadate + **/ + @javax.annotation.Nullable + public String getEtadate() { + return etadate; + } + + public void setEtadate(String etadate) { + this.etadate = etadate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WarehouseListType warehouseListType = (WarehouseListType) o; + return Objects.equals(this.warehouseid, warehouseListType.warehouseid) && + Objects.equals(this.warehousedescription, warehouseListType.warehousedescription) && + Objects.equals(this.availablequantity, warehouseListType.availablequantity) && + Objects.equals(this.onorderquantity, warehouseListType.onorderquantity) && + Objects.equals(this.onholdquantity, warehouseListType.onholdquantity) && + Objects.equals(this.etadate, warehouseListType.etadate); + } + + @Override + public int hashCode() { + return Objects.hash(warehouseid, warehousedescription, availablequantity, onorderquantity, onholdquantity, etadate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WarehouseListType {\n"); + sb.append(" warehouseid: ").append(toIndentedString(warehouseid)).append("\n"); + sb.append(" warehousedescription: ").append(toIndentedString(warehousedescription)).append("\n"); + sb.append(" availablequantity: ").append(toIndentedString(availablequantity)).append("\n"); + sb.append(" onorderquantity: ").append(toIndentedString(onorderquantity)).append("\n"); + sb.append(" onholdquantity: ").append(toIndentedString(onholdquantity)).append("\n"); + sb.append(" etadate: ").append(toIndentedString(etadate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("warehouseid"); + openapiFields.add("warehousedescription"); + openapiFields.add("availablequantity"); + openapiFields.add("onorderquantity"); + openapiFields.add("onholdquantity"); + openapiFields.add("etadate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WarehouseListType + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WarehouseListType.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in WarehouseListType is not found in the empty JSON string", WarehouseListType.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!WarehouseListType.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `WarehouseListType` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("warehouseid") != null && !jsonObj.get("warehouseid").isJsonNull()) && !jsonObj.get("warehouseid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `warehouseid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("warehouseid").toString())); + } + if ((jsonObj.get("warehousedescription") != null && !jsonObj.get("warehousedescription").isJsonNull()) && !jsonObj.get("warehousedescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `warehousedescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("warehousedescription").toString())); + } + if ((jsonObj.get("etadate") != null && !jsonObj.get("etadate").isJsonNull()) && !jsonObj.get("etadate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `etadate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("etadate").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WarehouseListType.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WarehouseListType' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(WarehouseListType.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, WarehouseListType value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public WarehouseListType read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of WarehouseListType given an JSON string + * + * @param jsonString JSON string + * @return An instance of WarehouseListType + * @throws IOException if the JSON string is invalid with respect to WarehouseListType + */ + public static WarehouseListType fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WarehouseListType.class); + } + + /** + * Convert an instance of WarehouseListType to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/test/java/xiresellers/client/api/DealsApiTest.java b/src/test/java/xiresellers/client/api/DealsApiTest.java new file mode 100644 index 00000000..82dfbb1f --- /dev/null +++ b/src/test/java/xiresellers/client/api/DealsApiTest.java @@ -0,0 +1,75 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiException; +import xiresellers.client.model.DealsDetailsResponse; +import xiresellers.client.model.DealsSearchResponse; +import xiresellers.client.model.GetResellerV6ValidateQuote500Response; +import xiresellers.client.model.PostRenewalssearch400Response; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for DealsApi + */ +@Disabled +public class DealsApiTest { + + private final DealsApi api = new DealsApi(); + + /** + * Deals Details + * + * The Deals Details API will retrieve all the details related to the specific deal id. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getResellersV6DealsdetailsTest() throws ApiException { + String imCustomerNumber = null; + String imCountryCode = null; + String imCorrelationID = null; + String dealId = null; + String imSenderID = null; + DealsDetailsResponse response = api.getResellersV6Dealsdetails(imCustomerNumber, imCountryCode, imCorrelationID, dealId, imSenderID); + // TODO: test validations + } + + /** + * Deals Search + * + * The Deals Search API, by default, will retrieve all the deals that are associated with the customer’s account. The customer will be able to search deals using the End-user name, Vendor name, or DealID. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getResellersV6DealssearchTest() throws ApiException { + String imCustomerNumber = null; + String imCountryCode = null; + String imCorrelationID = null; + String imSenderID = null; + String endUser = null; + String vendor = null; + String dealId = null; + DealsSearchResponse response = api.getResellersV6Dealssearch(imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, endUser, vendor, dealId); + // TODO: test validations + } + +} diff --git a/src/test/java/xiresellers/client/api/FreightEstimateApiTest.java b/src/test/java/xiresellers/client/api/FreightEstimateApiTest.java new file mode 100644 index 00000000..1359ed1a --- /dev/null +++ b/src/test/java/xiresellers/client/api/FreightEstimateApiTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiException; +import xiresellers.client.model.FreightRequest; +import xiresellers.client.model.FreightResponse; +import xiresellers.client.model.GetResellerV6ValidateQuote500Response; +import xiresellers.client.model.PostRenewalssearch400Response; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for FreightEstimateApi + */ +@Disabled +public class FreightEstimateApiTest { + + private final FreightEstimateApi api = new FreightEstimateApi(); + + /** + * Freight Estimate + * + * The freight estimator endpoint will allow customers to understand the freight cost for an order. + * + * @throws ApiException if the Api call fails + */ + @Test + public void postFreightestimateTest() throws ApiException { + String imCustomerNumber = null; + String imCountryCode = null; + String imCorrelationID = null; + String imCustomerContact = null; + String imSenderID = null; + FreightRequest freightRequest = null; + FreightResponse response = api.postFreightestimate(imCustomerNumber, imCountryCode, imCorrelationID, imCustomerContact, imSenderID, freightRequest); + // TODO: test validations + } + +} diff --git a/src/test/java/xiresellers/client/api/InvoicesApiTest.java b/src/test/java/xiresellers/client/api/InvoicesApiTest.java new file mode 100644 index 00000000..46dd12bc --- /dev/null +++ b/src/test/java/xiresellers/client/api/InvoicesApiTest.java @@ -0,0 +1,96 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiException; +import xiresellers.client.model.ErrorResponse; +import xiresellers.client.model.InvoiceDetailsv61Response; +import xiresellers.client.model.InvoiceSearchResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for InvoicesApi + */ +@Disabled +public class InvoicesApiTest { + + private final InvoicesApi api = new InvoicesApi(); + + /** + * Get Invoice Details v6.1 + * + * Use your Ingram Micro invoice number to search for existing invoices or retrieve existing invoice details. The invoice number, IM-CustomerNumber, IM-CountryCode, IM-ApplicationId and IM-CorrelationID are required parameters. . + * + * @throws ApiException if the Api call fails + */ + @Test + public void getInvoicedetailsV61Test() throws ApiException { + String invoiceNumber = null; + String imCustomerNumber = null; + String imCountryCode = null; + String imCorrelationID = null; + String imApplicationID = null; + String customerType = null; + Boolean includeSerialNumbers = null; + InvoiceDetailsv61Response response = api.getInvoicedetailsV61(invoiceNumber, imCustomerNumber, imCountryCode, imCorrelationID, imApplicationID, customerType, includeSerialNumbers); + // TODO: test validations + } + + /** + * Search your invoice + * + * Search your Ingram Micro invoices. This endpoint searches by multiple invoice parameters and supports pagination of results. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getResellersV6InvoicesearchTest() throws ApiException { + String imApplicationID = null; + String imCustomerNumber = null; + String imCountryCode = null; + String imCorrelationID = null; + String paymentTermsNetDate = null; + String invoiceDate = null; + String invoiceDueDate = null; + String orderDate = null; + String orderFromDate = null; + String orderToDate = null; + String orderNumber = null; + String deliveryNumber = null; + String invoiceNumber = null; + String invoiceStatus = null; + String invoiceType = null; + String customerOrderNumber = null; + String endCustomerOrderNumber = null; + String specialBidNumber = null; + String invoiceFromDueDate = null; + String invoiceToDueDate = null; + List invoiceFromDate = null; + List invoiceToDate = null; + Integer pageSize = null; + Integer pageNumber = null; + String orderby = null; + String direction = null; + String serialNumber = null; + InvoiceSearchResponse response = api.getResellersV6Invoicesearch(imApplicationID, imCustomerNumber, imCountryCode, imCorrelationID, paymentTermsNetDate, invoiceDate, invoiceDueDate, orderDate, orderFromDate, orderToDate, orderNumber, deliveryNumber, invoiceNumber, invoiceStatus, invoiceType, customerOrderNumber, endCustomerOrderNumber, specialBidNumber, invoiceFromDueDate, invoiceToDueDate, invoiceFromDate, invoiceToDate, pageSize, pageNumber, orderby, direction, serialNumber); + // TODO: test validations + } + +} diff --git a/src/test/java/xiresellers/client/api/InvoicesV4ApiTest.java b/src/test/java/xiresellers/client/api/InvoicesV4ApiTest.java new file mode 100644 index 00000000..829852da --- /dev/null +++ b/src/test/java/xiresellers/client/api/InvoicesV4ApiTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiException; +import xiresellers.client.model.InvoiceDetailRequest; +import xiresellers.client.model.InvoiceDetailResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for InvoicesV4Api + */ +@Disabled +public class InvoicesV4ApiTest { + + private final InvoicesV4Api api = new InvoicesV4Api(); + + /** + * Get Invoice Details + * + * A real-time request that allows the customer to query Ingram Micro for Invoice information for a specific open or shipped order (in the past 9 months). Orders are searched using Ingram Micro Sales Order Number. + * + * @throws ApiException if the Api call fails + */ + @Test + public void postV4InvoicedetailsTest() throws ApiException { + InvoiceDetailRequest invoiceDetailRequest = null; + InvoiceDetailResponse response = api.postV4Invoicedetails(invoiceDetailRequest); + // TODO: test validations + } + +} diff --git a/src/test/java/xiresellers/client/api/InvoicesV5ApiTest.java b/src/test/java/xiresellers/client/api/InvoicesV5ApiTest.java new file mode 100644 index 00000000..9a1c13fa --- /dev/null +++ b/src/test/java/xiresellers/client/api/InvoicesV5ApiTest.java @@ -0,0 +1,50 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiException; +import xiresellers.client.model.InvoiceDetails; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for InvoicesV5Api + */ +@Disabled +public class InvoicesV5ApiTest { + + private final InvoicesV5Api api = new InvoicesV5Api(); + + /** + * Get Invoice Details + * + * View invoice details. This is a request to query invoice details for a specific Ingram Micro order placed in the last 9 months, whether open or shipped. <strong>invoiceNumber</strong>, <strong>isoCountryCode</strong> and <strong>customerNumber</strong> parameters are required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getInvoicesTest() throws ApiException { + String invoiceNumber = null; + String customerNumber = null; + String isoCountryCode = null; + InvoiceDetails response = api.getInvoices(invoiceNumber, customerNumber, isoCountryCode); + // TODO: test validations + } + +} diff --git a/src/test/java/xiresellers/client/api/InvoicesV6ApiTest.java b/src/test/java/xiresellers/client/api/InvoicesV6ApiTest.java new file mode 100644 index 00000000..83fb3315 --- /dev/null +++ b/src/test/java/xiresellers/client/api/InvoicesV6ApiTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiException; +import xiresellers.client.model.ErrorResponse; +import xiresellers.client.model.InvoiceDetailResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for InvoicesV6Api + */ +@Disabled +public class InvoicesV6ApiTest { + + private final InvoicesV6Api api = new InvoicesV6Api(); + + /** + * Get Invoice Details v6 + * + * Use your Ingram Micro invoice number to search for existing invoices or retrieve existing invoice details. The invoice number, IM-CustomerNumber, IM-CountryCode, IM-ApplicationId and IM-CorrelationID are required parameters. . + * + * @throws ApiException if the Api call fails + */ + @Test + public void getInvoicedetailsV6Test() throws ApiException { + String invoicenumber = null; + String version = null; + String imCustomerNumber = null; + String imCountryCode = null; + String imCorrelationID = null; + String imApplicationID = null; + String customerType = null; + Boolean includeSerialNumbers = null; + InvoiceDetailResponse response = api.getInvoicedetailsV6(invoicenumber, version, imCustomerNumber, imCountryCode, imCorrelationID, imApplicationID, customerType, includeSerialNumbers); + // TODO: test validations + } + +} diff --git a/src/test/java/xiresellers/client/api/OrderStatusApiTest.java b/src/test/java/xiresellers/client/api/OrderStatusApiTest.java new file mode 100644 index 00000000..1e06f2ae --- /dev/null +++ b/src/test/java/xiresellers/client/api/OrderStatusApiTest.java @@ -0,0 +1,48 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiException; +import xiresellers.client.model.OrderStatusAsyncNotificationRequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for OrderStatusApi + */ +@Disabled +public class OrderStatusApiTest { + + private final OrderStatusApi api = new OrderStatusApi(); + + /** + * Order Status + * + * @throws ApiException if the Api call fails + */ + @Test + public void resellersV1WebhooksOrderstatuseventPostTest() throws ApiException { + String targeturl = null; + String xHubSignature = null; + OrderStatusAsyncNotificationRequest orderStatusAsyncNotificationRequest = null; + api.resellersV1WebhooksOrderstatuseventPost(targeturl, xHubSignature, orderStatusAsyncNotificationRequest); + // TODO: test validations + } + +} diff --git a/src/test/java/xiresellers/client/api/OrdersApiTest.java b/src/test/java/xiresellers/client/api/OrdersApiTest.java new file mode 100644 index 00000000..e8057439 --- /dev/null +++ b/src/test/java/xiresellers/client/api/OrdersApiTest.java @@ -0,0 +1,158 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiException; +import xiresellers.client.model.ErrorResponse; +import xiresellers.client.model.ErrorResponseDTO; +import java.time.LocalDate; +import xiresellers.client.model.OrderCreateRequest; +import xiresellers.client.model.OrderCreateResponse; +import xiresellers.client.model.OrderDetailB2B; +import xiresellers.client.model.OrderModifyRequest; +import xiresellers.client.model.OrderModifyResponse; +import xiresellers.client.model.OrderSearchResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for OrdersApi + */ +@Disabled +public class OrdersApiTest { + + private final OrdersApi api = new OrdersApi(); + + /** + * Cancel your Order + * + * This call must be submitted before the order is released to Ingram Micro’s warehouse. The order cannot be canceled once it is released to the warehouse. Order should be on customer hold to delete any order from Ingram system. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteOrdercancelTest() throws ApiException { + String orderNumber = null; + String imCustomerNumber = null; + String imCountryCode = null; + String imCorrelationID = null; + String regionCode = null; + String imSenderID = null; + api.deleteOrdercancel(orderNumber, imCustomerNumber, imCountryCode, imCorrelationID, regionCode, imSenderID); + // TODO: test validations + } + + /** + * Get Order Details v6.1 + * + * The Orders details API endpoint allows a customer to retrieve their Ingram Micro orders details by using the Ingram Micro sales order number as a path parameter. The sales order number, IM-CustomerNumber, IM-CountryCode, and IM-CorrelationID are required parameters.<br><br>*Service contracts, subscriptions, and license information are unavailable at the moment, this information will be available in the future. <br><br> Recent bug fixes: - Fixed duplication of serial numbers in the API response. - Fixed API time-out issues - Fixed missing tracking information. - Implemented enhanced order status. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getOrderdetailsV61Test() throws ApiException { + String ordernumber = null; + String imCustomerNumber = null; + String imCountryCode = null; + String imCorrelationID = null; + String imSenderID = null; + LocalDate ingramOrderDate = null; + String vendorNumber = null; + String simulateStatus = null; + Boolean isIml = null; + String regionCode = null; + OrderDetailB2B response = api.getOrderdetailsV61(ordernumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, ingramOrderDate, vendorNumber, simulateStatus, isIml, regionCode); + // TODO: test validations + } + + /** + * Search your Orders + * + * The Orders Search API endpoint allows a customer to search their Ingram Micro orders by using any of the available query string parameters, customer can search their order by using single query string parameters or combining them together. This endpoint supports the pagination of results. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getResellersV6OrdersearchTest() throws ApiException { + String imCustomerNumber = null; + String imCountryCode = null; + String imCorrelationID = null; + String ingramOrderNumber = null; + String orderStatus = null; + List orderStatusIn = null; + String ingramOrderDate = null; + List ingramOrderDateBt = null; + String imSenderID = null; + String customerOrderNumber = null; + Integer pageSize = null; + Integer pageNumber = null; + String endCustomerOrderNumber = null; + List invoiceDateBt = null; + List shipDateBt = null; + List deliveryDateBt = null; + String ingramPartNumber = null; + String vendorPartNumber = null; + String serialNumber = null; + String trackingNumber = null; + String vendorName = null; + String specialBidNumber = null; + OrderSearchResponse response = api.getResellersV6Ordersearch(imCustomerNumber, imCountryCode, imCorrelationID, ingramOrderNumber, orderStatus, orderStatusIn, ingramOrderDate, ingramOrderDateBt, imSenderID, customerOrderNumber, pageSize, pageNumber, endCustomerOrderNumber, invoiceDateBt, shipDateBt, deliveryDateBt, ingramPartNumber, vendorPartNumber, serialNumber, trackingNumber, vendorName, specialBidNumber); + // TODO: test validations + } + + /** + * Create your Order + * + * Instantly create and place orders. The POST API supports stocked SKUs as well as licensing and warranties SKUs. IM-CustomerNumber, IM-CountryCode, IM-SenderID and IM-CorrelationID are required parameters. Ingram Micro recommends that you provide the ingrampartnumber for each SKU contained in each order. NOTE: You must have net terms to use the Ingram Micro Order Create API. Ingram Micro offers trade credit when using our APIs, and repayment is based on net terms. For example, if your net terms agreement is net-30, you will have 30 days to make a full payment. Ingram Micro does not allow credit card transactions for API ordering. + * + * @throws ApiException if the Api call fails + */ + @Test + public void postCreateorderV6Test() throws ApiException { + String imCustomerNumber = null; + String imCountryCode = null; + String imCorrelationID = null; + OrderCreateRequest orderCreateRequest = null; + String imSenderID = null; + OrderCreateResponse response = api.postCreateorderV6(imCustomerNumber, imCountryCode, imCorrelationID, orderCreateRequest, imSenderID); + // TODO: test validations + } + + /** + * Modify your Order + * + * The Order Modify API endpoint allows for changes to be made to an order after the order creation process as long as the order was created with the customer hold flag. * Orders can be modified within 24hrs of being placed with the customer hold flag, after 24hrs they are voided if they are not released by the customer. * Modifying orders that were placed without the customer hold flag is not possible + * + * @throws ApiException if the Api call fails + */ + @Test + public void putOrdermodifyTest() throws ApiException { + String orderNumber = null; + String imCustomerNumber = null; + String imCountryCode = null; + String imCorrelationID = null; + OrderModifyRequest orderModifyRequest = null; + String actionCode = null; + String regionCode = null; + String imSenderID = null; + OrderModifyResponse response = api.putOrdermodify(orderNumber, imCustomerNumber, imCountryCode, imCorrelationID, orderModifyRequest, actionCode, regionCode, imSenderID); + // TODO: test validations + } + +} diff --git a/src/test/java/xiresellers/client/api/OrdersV4ApiTest.java b/src/test/java/xiresellers/client/api/OrdersV4ApiTest.java new file mode 100644 index 00000000..a5e5d308 --- /dev/null +++ b/src/test/java/xiresellers/client/api/OrdersV4ApiTest.java @@ -0,0 +1,113 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiException; +import xiresellers.client.model.OrderCreateRequest; +import xiresellers.client.model.OrderCreateResponse; +import xiresellers.client.model.OrderDeleteRequest; +import xiresellers.client.model.OrderDeleteResponse; +import xiresellers.client.model.OrderDetailRequest; +import xiresellers.client.model.OrderDetailResponse; +import xiresellers.client.model.OrderModifyRequest; +import xiresellers.client.model.OrderModifyResponse; +import xiresellers.client.model.OrderSearchRequest; +import xiresellers.client.model.OrderSearchResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for OrdersV4Api + */ +@Disabled +public class OrdersV4ApiTest { + + private final OrdersV4Api api = new OrdersV4Api(); + + /** + * Create a new Order + * + * The order create transaction is a real-time transaction that allows customers to place standard product and direct ship (licensing and warranties) orders with Ingram Micro using API. + * + * @throws ApiException if the Api call fails + */ + @Test + public void postV4OrdercreateTest() throws ApiException { + OrderCreateRequest orderCreateRequest = null; + OrderCreateResponse response = api.postV4Ordercreate(orderCreateRequest); + // TODO: test validations + } + + /** + * Delete an Order + * + * A real-time request to delete a previously accepted order must be submitted before the order is released to Ingram Micro’s warehouse. After release the order is no longer eligible for deletion. Order delete transaction submitted after the order is released will be rejected and will not be applied. *Direct ship orders cannot be deleted. Contact your sales rep for assistance. + * + * @throws ApiException if the Api call fails + */ + @Test + public void postV4OrderdeleteTest() throws ApiException { + OrderDeleteRequest orderDeleteRequest = null; + OrderDeleteResponse response = api.postV4Orderdelete(orderDeleteRequest); + // TODO: test validations + } + + /** + * Get Order Details + * + * A real-time request that allows the customer to query Ingram Micro for detailed information for a specific open or shipped order. Orders are searched using Ingram Micro Sales Order Number. + * + * @throws ApiException if the Api call fails + */ + @Test + public void postV4OrderdetailsTest() throws ApiException { + OrderDetailRequest orderDetailRequest = null; + OrderDetailResponse response = api.postV4Orderdetails(orderDetailRequest); + // TODO: test validations + } + + /** + * Modify an Existing Order + * + * The order modify transaction allows for changes to be made after the order creation process but before the order is released to Ingram Micro’s warehouse system. Order modify transaction submitted after the order is released will be rejected and will not be applied. Types of modifications allowable: Order release, add comment, and carrier change. NOTE - Direct Ship orders cannot be modified. + * + * @throws ApiException if the Api call fails + */ + @Test + public void postV4OrdermodifyTest() throws ApiException { + OrderModifyRequest orderModifyRequest = null; + OrderModifyResponse response = api.postV4Ordermodify(orderModifyRequest); + // TODO: test validations + } + + /** + * Order Search + * + * Search your orders using various search parameters + * + * @throws ApiException if the Api call fails + */ + @Test + public void postV4OrdersearchTest() throws ApiException { + OrderSearchRequest orderSearchRequest = null; + OrderSearchResponse response = api.postV4Ordersearch(orderSearchRequest); + // TODO: test validations + } + +} diff --git a/src/test/java/xiresellers/client/api/OrdersV5ApiTest.java b/src/test/java/xiresellers/client/api/OrdersV5ApiTest.java new file mode 100644 index 00000000..10bdc1b3 --- /dev/null +++ b/src/test/java/xiresellers/client/api/OrdersV5ApiTest.java @@ -0,0 +1,113 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiException; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import xiresellers.client.model.OrderCancelResponse; +import xiresellers.client.model.OrderCreateRequest; +import xiresellers.client.model.OrderCreateResponse; +import xiresellers.client.model.OrderDetailResponse; +import xiresellers.client.model.OrderSearchResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for OrdersV5Api + */ +@Disabled +public class OrdersV5ApiTest { + + private final OrdersV5Api api = new OrdersV5Api(); + + /** + * Cancel an Existing Order + * + * This endpoint is a request to cancel a previously accepted order. Use your Ingram Micro sales order number to cancel an order. The <strong>orderNumber, isoCountryCode, customerNumber</strong> and <strong>entryDate</strong> parameters are required. This call must be submitted <strong>before</strong> the order is released to Ingram Micro’s warehouse. The order cannot be canceled once it is released to the warehouse. Direct ship orders cannot be canceled. Contact your Ingram Micro sales rep for assistance. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteOrdersOrderNumberTest() throws ApiException { + String ordernumber = null; + String customerNumber = null; + String isoCountryCode = null; + String entryDate = null; + OrderCancelResponse response = api.deleteOrdersOrderNumber(ordernumber, customerNumber, isoCountryCode, entryDate); + // TODO: test validations + } + + /** + * Search your Orders + * + * Search your Ingram Micro orders. This endpoint searches by multiple order parameters and supports pagination of results. Search using one or more of the parameters below: <ul><li>ordernumber — Ingram Micro sales order number</li><li>customerordernumber — The PO or order number provided by you when creating an order</li><li>orderstatus — user order status codes for the search, default is set to \"any\"</li><li>startcreatetimestamp and endcreatetimestamp — Order create date range</li></ul> For pagination, please use these parameters: <ul><li>pagesize — default 25, max 100</li><li>pagenumber — default 1</li></ul> Order Status Values: <ul><li>P – PENDING</li><li>R – RELEASED</li><li>4 – SHIPPED</li><li>I – INVOICED</li><li>V – VOIDED</li></ul> The search endpoint also returns HATEOAS links for order details and invoice details, if applicable. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getOrdersSearchTest() throws ApiException { + String customerNumber = null; + String isocountrycode = null; + String ordernumber = null; + String customerordernumber = null; + String orderstatus = null; + OffsetDateTime startcreatetimestamp = null; + OffsetDateTime endcreatetimestamp = null; + Integer pagesize = null; + Integer pagenumber = null; + OrderSearchResponse response = api.getOrdersSearch(customerNumber, isocountrycode, ordernumber, customerordernumber, orderstatus, startcreatetimestamp, endcreatetimestamp, pagesize, pagenumber); + // TODO: test validations + } + + /** + * Get Order Details + * + * Use your Ingram Micro sales order number to search for existing orders or retrieve existing order details. <b>The sales order number, customer number and isoCountryCode are required parameters.</b> The sales order number is returned in the Order Create POST response. Ingram Micro recommends that you save this number for future uses. The IM sales order number can also be retrieved by searching for your existing order using the Order Search GET endpoint. You will need the customer PO number or order number that was provided at the time of order creation. In a case when the IM sales order number is repeated, you can refine the result by providing customer order number for additional filtering or using the date range to filter orders by creation date. Use the \"simulate\" query parameter to test the GET order response for various order statuses. This parameter is only available in the sandbox to help with development and testing of the GET order endpoint. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getV5OrdersDetailsTest() throws ApiException { + String ordernumber = null; + String customernumber = null; + String isocountrycode = null; + String customerordernumber = null; + LocalDate startcreatetimestamp = null; + String endcreatetimestamp = null; + String simulate = null; + OrderDetailResponse response = api.getV5OrdersDetails(ordernumber, customernumber, isocountrycode, customerordernumber, startcreatetimestamp, endcreatetimestamp, simulate); + // TODO: test validations + } + + /** + * Create a New Order + * + * Instantly create and place orders. The POST API supports stocked SKUs as well as licensing and warranties SKUs. Every order to be created with this API must complete these validations to be placed and processed:<ul><li>SKU, shipping address, product authorization and stock allocations must clear validation.</li><li>Ingram Micro Sales validates pricing, stock or other processing parameters. Ingram Micro sales may place an order a hold if revision is necessary.</li><li>Credit validation confirms available credit prior to processing an order. If an order does not clear credit validation, the Ingram Micro sales rep or accounts receivable manager will contact you for next steps.</li><li>Warehouse validation selects the location closest to the destination zip code. If the stock is not available in any of the warehouses, Ingram Micro places a backorder in the warehouse closest to the destination zip code.</li></ul> Ingram Micro recommends that you provide the <strong>ingrampartnumber</strong> for each SKU contained in each order. When using <strong>vendorpartnumber</strong> to place an order, please use the product search endpoint to find the <strong>ingrampartnumber</strong> for a specific <strong>vendorpartnumber</strong>, and then supply the <strong>ingrampartnumber</strong> to place an order. <strong>NOTE:</strong> You must have net terms to use the <strong>Ingram Micro Order Create API</strong>. Ingram Micro offers trade credit when using our APIs, and repayment is based on net terms. For example, if your net terms agreement is net-30, you will have 30 days to make a full payment. Ingram Micro does not allow credit card transactions for API ordering. + * + * @throws ApiException if the Api call fails + */ + @Test + public void postV5OrdersCreateTest() throws ApiException { + OrderCreateRequest orderCreateRequest = null; + OrderCreateResponse response = api.postV5OrdersCreate(orderCreateRequest); + // TODO: test validations + } + +} diff --git a/src/test/java/xiresellers/client/api/OrdersV6ApiTest.java b/src/test/java/xiresellers/client/api/OrdersV6ApiTest.java new file mode 100644 index 00000000..6f95d935 --- /dev/null +++ b/src/test/java/xiresellers/client/api/OrdersV6ApiTest.java @@ -0,0 +1,59 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiException; +import xiresellers.client.model.ErrorResponse; +import java.time.LocalDate; +import xiresellers.client.model.OrderDetailResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for OrdersV6Api + */ +@Disabled +public class OrdersV6ApiTest { + + private final OrdersV6Api api = new OrdersV6Api(); + + /** + * Get Order Details v6 + * + * Use your Ingram Micro sales order number to search for existing orders or retrieve existing order details. The sales order number, IM-CustomerNumber, IM-CountryCode, IM-SenderID and IM-CorrelationID are required parameters. In a case when the IM sales order number is repeated, you can refine the result by providing for additional filtering. Use the \"simulateStatus\" query parameter to test the GET order response for various order statuses. This parameter is only available in the sandbox to help with development and testing of the GET order endpoint. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getOrderdetailsV6Test() throws ApiException { + String ordernumber = null; + String imCustomerNumber = null; + String imCountryCode = null; + String imCorrelationID = null; + String imSenderID = null; + LocalDate ingramOrderDate = null; + String vendorNumber = null; + String simulateStatus = null; + Boolean isIml = null; + String regionCode = null; + OrderDetailResponse response = api.getOrderdetailsV6(ordernumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, ingramOrderDate, vendorNumber, simulateStatus, isIml, regionCode); + // TODO: test validations + } + +} diff --git a/src/test/java/xiresellers/client/api/ProductCatalogApiTest.java b/src/test/java/xiresellers/client/api/ProductCatalogApiTest.java new file mode 100644 index 00000000..792c6090 --- /dev/null +++ b/src/test/java/xiresellers/client/api/ProductCatalogApiTest.java @@ -0,0 +1,105 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiException; +import xiresellers.client.model.ErrorResponse; +import xiresellers.client.model.PriceAndAvailabilityRequest; +import xiresellers.client.model.PriceAndAvailabilityResponseInner; +import xiresellers.client.model.ProductDetailResponse; +import xiresellers.client.model.ProductSearchResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for ProductCatalogApi + */ +@Disabled +public class ProductCatalogApiTest { + + private final ProductCatalogApi api = new ProductCatalogApi(); + + /** + * Product Details + * + * Search all the product-related details using a unique Ingram Part Number. Currently, this API is available in the USA, India, and Netherlands. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getResellerV6ProductdetailTest() throws ApiException { + String ingramPartNumber = null; + String imCustomerNumber = null; + String imCountryCode = null; + String imCorrelationID = null; + String imSenderID = null; + ProductDetailResponse response = api.getResellerV6Productdetail(ingramPartNumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID); + // TODO: test validations + } + + /** + * Search Products + * + * Search the Ingram Micro product catalog by providing any of the information in the keyword(Ingram part number / vendor part number/ product description / UPC + * + * @throws ApiException if the Api call fails + */ + @Test + public void getResellerV6ProductsearchTest() throws ApiException { + String imCustomerNumber = null; + String imCorrelationID = null; + String imCountryCode = null; + Integer pageNumber = null; + Integer pageSize = null; + String imSenderID = null; + String type = null; + String hasDiscounts = null; + List vendor = null; + List vendorPartNumber = null; + String acceptLanguage = null; + String vendorNumber = null; + List keyword = null; + String category = null; + String skipAuthorisation = null; + ProductSearchResponse response = api.getResellerV6Productsearch(imCustomerNumber, imCorrelationID, imCountryCode, pageNumber, pageSize, imSenderID, type, hasDiscounts, vendor, vendorPartNumber, acceptLanguage, vendorNumber, keyword, category, skipAuthorisation); + // TODO: test validations + } + + /** + * Price and Availability + * + * The PriceAndAvailability API, will retrieve Pricing, Availability, discounts, Inventory Location, Reserve Inventory for the products upto 50 products. + * + * @throws ApiException if the Api call fails + */ + @Test + public void postPriceandavailabilityTest() throws ApiException { + List includeAvailability = null; + Boolean includePricing = null; + String imCustomerNumber = null; + String imCountryCode = null; + String imCorrelationID = null; + PriceAndAvailabilityRequest priceAndAvailabilityRequest = null; + Boolean includeProductAttributes = null; + String imSenderID = null; + List response = api.postPriceandavailability(includeAvailability, includePricing, imCustomerNumber, imCountryCode, imCorrelationID, priceAndAvailabilityRequest, includeProductAttributes, imSenderID); + // TODO: test validations + } + +} diff --git a/src/test/java/xiresellers/client/api/ProductCatalogV4ApiTest.java b/src/test/java/xiresellers/client/api/ProductCatalogV4ApiTest.java new file mode 100644 index 00000000..06489b24 --- /dev/null +++ b/src/test/java/xiresellers/client/api/ProductCatalogV4ApiTest.java @@ -0,0 +1,65 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiException; +import xiresellers.client.model.MultiSKUPriceAndStockRequest; +import xiresellers.client.model.MultiSKUPriceAndStockResponse; +import xiresellers.client.model.ProductSearchRequest; +import xiresellers.client.model.ProductSearchResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for ProductCatalogV4Api + */ +@Disabled +public class ProductCatalogV4ApiTest { + + private final ProductCatalogV4Api api = new ProductCatalogV4Api(); + + /** + * Product availability for upto 50 SKUs + * + * Find price and availability of up to 50 SKUs in a single request. As you increase the number of items in the request response time will be extended. This transaction must not be used as a continuous cyclical call to populate availability and pricing for your full catalog. Customers that perform this activity will lose access to price and availability. Ingram can provide a Price catalog file and an Inventory file in flat file format, which can be obtained through FTP download. Please contact 1800-616-4665 or Electronic.Services@ingrammicro.com for more information on these files. + * + * @throws ApiException if the Api call fails + */ + @Test + public void postV4MultiskupriceandstockTest() throws ApiException { + MultiSKUPriceAndStockRequest multiSKUPriceAndStockRequest = null; + MultiSKUPriceAndStockResponse response = api.postV4Multiskupriceandstock(multiSKUPriceAndStockRequest); + // TODO: test validations + } + + /** + * Real-time Product Search + * + * A real time search that provides the Ingram Micro part number using the manufacturer part number. This API is helpful to eliminate any errors when a manufactuer has the same part number and Ingram Micro has had to create multiple sku numbers + * + * @throws ApiException if the Api call fails + */ + @Test + public void postV4ProductsearchTest() throws ApiException { + ProductSearchRequest productSearchRequest = null; + ProductSearchResponse response = api.postV4Productsearch(productSearchRequest); + // TODO: test validations + } + +} diff --git a/src/test/java/xiresellers/client/api/ProductCatalogV5ApiTest.java b/src/test/java/xiresellers/client/api/ProductCatalogV5ApiTest.java new file mode 100644 index 00000000..d5897c68 --- /dev/null +++ b/src/test/java/xiresellers/client/api/ProductCatalogV5ApiTest.java @@ -0,0 +1,66 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiException; +import xiresellers.client.model.PriceAndAvailabilityRequest; +import xiresellers.client.model.PriceAndAvailabilityResponse; +import xiresellers.client.model.ProductSearchResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for ProductCatalogV5Api + */ +@Disabled +public class ProductCatalogV5ApiTest { + + private final ProductCatalogV5Api api = new ProductCatalogV5Api(); + + /** + * Search Product Catalog + * + * Search the Ingram Micro product catalog using customerNumber, isoCountryCode and partNumber.<ul><li>customerNumber and isoCountryCode fields are required.</li><li>The PartNumber field accepts the following:<ul><li>Ingram part number</li><li>Vendor part number</li><li>Customer part number</li><li>UPC (Universal Product Code)</li></ul></li></ul> + * + * @throws ApiException if the Api call fails + */ + @Test + public void getV5CatalogProductsearchTest() throws ApiException { + String customerNumber = null; + String isoCountryCode = null; + String partNumber = null; + ProductSearchResponse response = api.getV5CatalogProductsearch(customerNumber, isoCountryCode, partNumber); + // TODO: test validations + } + + /** + * Find availability of upto 50 SKUs + * + * Search the product catalog for the price and availability for up to 50 SKUs at one time. This endpoint helps to confirm the details just prior to placing a real-time call.<ul><li>You may request visibility for reserve stock if you participate in reserved inventory, in addition to the stock that is open to all the partners. Please see the details in the endpoint model below.</li><li>Follow these guidelines when using this endpoint:<ul><li>This endpoint is not for refreshing the full catalog with availability and pricing information. Ingram Micro applies rate limits on this endpoint. Continuous cyclical calls will error out. Customers that perform this activity may lose access to the endpoint.</li><li>For the full catalog refresh, Ingram Micro can provide a Price and Inventory file in flat file format, made available through FTP download. Please contact your Ingram Micro sales rep for details.</li></ul></li></ul> + * + * @throws ApiException if the Api call fails + */ + @Test + public void multiSKUPriceAndStockTest() throws ApiException { + PriceAndAvailabilityRequest priceAndAvailabilityRequest = null; + PriceAndAvailabilityResponse response = api.multiSKUPriceAndStock(priceAndAvailabilityRequest); + // TODO: test validations + } + +} diff --git a/src/test/java/xiresellers/client/api/QuoteToOrderApiTest.java b/src/test/java/xiresellers/client/api/QuoteToOrderApiTest.java new file mode 100644 index 00000000..407347ad --- /dev/null +++ b/src/test/java/xiresellers/client/api/QuoteToOrderApiTest.java @@ -0,0 +1,55 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiException; +import xiresellers.client.model.GetResellerV6ValidateQuote500Response; +import xiresellers.client.model.PostQuoteToOrderV6400Response; +import xiresellers.client.model.QuoteToOrderDetailsDTO; +import xiresellers.client.model.QuoteToOrderResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for QuoteToOrderApi + */ +@Disabled +public class QuoteToOrderApiTest { + + private final QuoteToOrderApi api = new QuoteToOrderApi(); + + /** + * Quote To Order + * + * The “Quote to Order” (QTO) endpoint allows a customer to create an order using the existing quote which is in “Ready to Order” status. A customer can create an order using Configure to order (CTO) quote or a non-configure to order (Non-CTO) quote. Upon successful submission of the order create request, a confirmation message will be returned as an API response. <br > <br >Ingram Micro offers webhooks as a method to send notifications to Resellers once the order creation request is received. All the updates related to Order creation will be pushed as a notification to the customer via a pre-defined callback URL as an HTTP post. <br > <br > **Prerequisite:** Pre-defined callback URL <br > <br > Before creating an order using the quote, it’s recommended to validate the quote using the “Validate Quote” endpoint. Validate Quote endpoint will not only validate the quote but also outline all the mandatory fields required by the vendor at a header level and at the line level which a customer need to pass to the Quote To Order endpoint request. For a detailed understanding of the “Validate Quote” endpoint, review the “Validate Quote” endpoint documentation. <br ><br > **How it works:** <br ><br > - The customer validates the quote with a quote number from Validate Quote endpoint. <br > - The customer copies all the mandatory fields required by the vendor and adds them to the QTO request body. <br > - The customer provides all the values for Vendor mandatory fields along with other required information for QTO to create an order. <br > - After the order creation request receipt acknowledgment from the QTO endpoint, all further order creation updates will be provided via webhook push notification. + * + * @throws ApiException if the Api call fails + */ + @Test + public void postQuoteToOrderV6Test() throws ApiException { + String imCustomerNumber = null; + String imCountryCode = null; + String imCorrelationID = null; + QuoteToOrderDetailsDTO quoteToOrderDetailsDTO = null; + String imSenderID = null; + QuoteToOrderResponse response = api.postQuoteToOrderV6(imCustomerNumber, imCountryCode, imCorrelationID, quoteToOrderDetailsDTO, imSenderID); + // TODO: test validations + } + +} diff --git a/src/test/java/xiresellers/client/api/QuotesApiTest.java b/src/test/java/xiresellers/client/api/QuotesApiTest.java new file mode 100644 index 00000000..e5717a8d --- /dev/null +++ b/src/test/java/xiresellers/client/api/QuotesApiTest.java @@ -0,0 +1,105 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiException; +import xiresellers.client.model.ErrorResponse; +import xiresellers.client.model.GetResellerV6ValidateQuote400Response; +import xiresellers.client.model.GetResellerV6ValidateQuote500Response; +import xiresellers.client.model.QuoteDetailsResponse; +import xiresellers.client.model.QuoteSearchResponse; +import xiresellers.client.model.ValidateQuoteResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for QuotesApi + */ +@Disabled +public class QuotesApiTest { + + private final QuotesApi api = new QuotesApi(); + + /** + * Quote Search + * + * The Quote Search API, by default, will retrieve quotes modified or created within the last 30 days. Quotes older than 365 days are excluded by default. The date filters enable the retrieval of quotes older than 30 days and up to 365 days when using date range criteria. The Quote Search API enables the retrieval and filtering of relevant quote list key criteria data such as Quote Number, Special Bid Numbers, End User Name, Quote Status, and Date Ranges from Ingram Micros CRM system. Only Active quotes are avaiable through the API. Draft and Closed quotes are excluded and are not accessable through the Quote List Search API. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getQuotessearchV6Test() throws ApiException { + String imCustomerNumber = null; + String imCountryCode = null; + String imCustomerContact = null; + String imCorrelationID = null; + List ingramOrderDateBt = null; + String quoteNumber = null; + String specialBidNumber = null; + String endUserContact = null; + String sortingOrder = null; + String sortBy = null; + Integer pageSize = null; + Integer pageNumber = null; + String vendorName = null; + String quoteName = null; + String status = null; + String quoteCreateDateBt = null; + String imSenderID = null; + QuoteSearchResponse response = api.getQuotessearchV6(imCustomerNumber, imCountryCode, imCustomerContact, imCorrelationID, ingramOrderDateBt, quoteNumber, specialBidNumber, endUserContact, sortingOrder, sortBy, pageSize, pageNumber, vendorName, quoteName, status, quoteCreateDateBt, imSenderID); + // TODO: test validations + } + + /** + * Validate Quote + * + * The validate quote helps the customer validate the quote created in Ingram Micro's system. Apart from validating the quote, the endpoint also identifies all the mandatory fields that are required by the vendor at the header and line levels. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getResellerV6ValidateQuoteTest() throws ApiException { + String quoteNumber = null; + String imCustomerNumber = null; + String imCountryCode = null; + String imCorrelationID = null; + String imSenderID = null; + ValidateQuoteResponse response = api.getResellerV6ValidateQuote(quoteNumber, imCustomerNumber, imCountryCode, imCorrelationID, imSenderID); + // TODO: test validations + } + + /** + * Get Quote Details + * + * The quote details API provides all quote details associated with the quote number provided. The **“quoteNumber”**, **“isoCountryCode”** and **“customerNumber”** parameters are required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getResellersV6QuotesTest() throws ApiException { + String imCustomerNumber = null; + String imCountryCode = null; + String imCorrelationID = null; + String quoteNumber = null; + String imSenderID = null; + QuoteDetailsResponse response = api.getResellersV6Quotes(imCustomerNumber, imCountryCode, imCorrelationID, quoteNumber, imSenderID); + // TODO: test validations + } + +} diff --git a/src/test/java/xiresellers/client/api/QuotesV4ApiTest.java b/src/test/java/xiresellers/client/api/QuotesV4ApiTest.java new file mode 100644 index 00000000..b60729fe --- /dev/null +++ b/src/test/java/xiresellers/client/api/QuotesV4ApiTest.java @@ -0,0 +1,65 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiException; +import xiresellers.client.model.QuoteDetailsRequest; +import xiresellers.client.model.QuoteDetailsResponse; +import xiresellers.client.model.QuoteListRequest; +import xiresellers.client.model.QuoteListResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for QuotesV4Api + */ +@Disabled +public class QuotesV4ApiTest { + + private final QuotesV4Api api = new QuotesV4Api(); + + /** + * Get Quote Details + * + * A real-time request to delete a previously accepted order must be submitted before the order is released to Ingram Micro’s warehouse. After release the order is no longer eligible for deletion. Order delete transaction submitted after the order is released will be rejected and will not be applied. *Direct ship orders cannot be deleted. Contact your sales rep for assistance. + * + * @throws ApiException if the Api call fails + */ + @Test + public void postV4QuotedetailsTest() throws ApiException { + QuoteDetailsRequest quoteDetailsRequest = null; + QuoteDetailsResponse response = api.postV4Quotedetails(quoteDetailsRequest); + // TODO: test validations + } + + /** + * Get Quote List + * + * A real-time request that allows the customer to query Ingram Micro for detailed information for a specific open or shipped order. Orders are searched using Ingram Micro Sales Order Number. + * + * @throws ApiException if the Api call fails + */ + @Test + public void postV4QuotesearchTest() throws ApiException { + QuoteListRequest quoteListRequest = null; + QuoteListResponse response = api.postV4Quotesearch(quoteListRequest); + // TODO: test validations + } + +} diff --git a/src/test/java/xiresellers/client/api/QuotesV5ApiTest.java b/src/test/java/xiresellers/client/api/QuotesV5ApiTest.java new file mode 100644 index 00000000..c73c2cd8 --- /dev/null +++ b/src/test/java/xiresellers/client/api/QuotesV5ApiTest.java @@ -0,0 +1,67 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiException; +import xiresellers.client.model.QuoteDetails; +import xiresellers.client.model.QuoteListRequest; +import xiresellers.client.model.QuoteListResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for QuotesV5Api + */ +@Disabled +public class QuotesV5ApiTest { + + private final QuotesV5Api api = new QuotesV5Api(); + + /** + * Get Quote Details + * + * The quote details API provides all quote details associated with the quote number provided. The “<strong>quoteNumber</strong>”, “<strong>isoCountryCode</strong>” and “<strong>customerNumber</strong>” parameters are required. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getV5QuotesDetailsTest() throws ApiException { + String quoteNumber = null; + String customerNumber = null; + String isoCountryCode = null; + String thirdPartySource = null; + QuoteDetails response = api.getV5QuotesDetails(quoteNumber, customerNumber, isoCountryCode, thirdPartySource); + // TODO: test validations + } + + /** + * Search Quotes + * + * This endpoint enables the retrieval and filtering of relevant quote list key criteria data, such as quote number, special bid numbers, end user name, status, and date ranges from the Ingram Micro system. By default, the Quotes endpoint retrieves quotes modified or created within the last 30 days. Observe these additional parameters:<ul><li>Only active quotes are available through this API.</li><li>Quotes older than 365 days are excluded by default.</li><li>You can use date range filters to retrieve quotes older than 30 days and up to 365 days.</li><li>Quotes that are in draft and closed states are excluded, and are not accessible through this API.</li></ul> + * + * @throws ApiException if the Api call fails + */ + @Test + public void postV5QuotesSearchTest() throws ApiException { + QuoteListRequest quoteListRequest = null; + QuoteListResponse response = api.postV5QuotesSearch(quoteListRequest); + // TODO: test validations + } + +} diff --git a/src/test/java/xiresellers/client/api/RenewalsApiTest.java b/src/test/java/xiresellers/client/api/RenewalsApiTest.java new file mode 100644 index 00000000..2030c0db --- /dev/null +++ b/src/test/java/xiresellers/client/api/RenewalsApiTest.java @@ -0,0 +1,81 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiException; +import xiresellers.client.model.GetResellerV6ValidateQuote500Response; +import xiresellers.client.model.PostRenewalssearch400Response; +import xiresellers.client.model.RenewalsDetailsResponse; +import xiresellers.client.model.RenewalsSearchRequest; +import xiresellers.client.model.RenewalsSearchResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for RenewalsApi + */ +@Disabled +public class RenewalsApiTest { + + private final RenewalsApi api = new RenewalsApi(); + + /** + * Renewals Details + * + * The Renewal Details API endpoint will retrieve all the details related to the renewal. The customer is required to pass renewalId as a path parameter while sending a request. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getResellersV6RenewalsdetailsTest() throws ApiException { + String imCustomerNumber = null; + String imCountryCode = null; + String imCorrelationID = null; + String renewalId = null; + String imSenderID = null; + RenewalsDetailsResponse response = api.getResellersV6Renewalsdetails(imCustomerNumber, imCountryCode, imCorrelationID, renewalId, imSenderID); + // TODO: test validations + } + + /** + * Renewals Search + * + * The Renewal Search API, by default, will retrieve all the renewals that are associated with the customer’s account. The customer will be able to search for renewals via basic search or advanced search. Basic search is available thru the query string parameters, whereas the advanced search is available thru the request body schema. + * + * @throws ApiException if the Api call fails + */ + @Test + public void postRenewalssearchTest() throws ApiException { + String imCustomerNumber = null; + String imCountryCode = null; + String imCorrelationID = null; + String contentType = null; + String imSenderID = null; + String customerOrderNumber = null; + String ingramPurchaseOrderNumber = null; + String serialNumber = null; + String page = null; + String size = null; + String sort = null; + RenewalsSearchRequest renewalsSearchRequest = null; + RenewalsSearchResponse response = api.postRenewalssearch(imCustomerNumber, imCountryCode, imCorrelationID, contentType, imSenderID, customerOrderNumber, ingramPurchaseOrderNumber, serialNumber, page, size, sort, renewalsSearchRequest); + // TODO: test validations + } + +} diff --git a/src/test/java/xiresellers/client/api/ReturnsApiTest.java b/src/test/java/xiresellers/client/api/ReturnsApiTest.java new file mode 100644 index 00000000..ded7d6fa --- /dev/null +++ b/src/test/java/xiresellers/client/api/ReturnsApiTest.java @@ -0,0 +1,107 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiException; +import xiresellers.client.model.GetResellerV6ValidateQuote500Response; +import xiresellers.client.model.PostRenewalssearch400Response; +import xiresellers.client.model.ReturnsCreateRequest; +import xiresellers.client.model.ReturnsCreateResponse; +import xiresellers.client.model.ReturnsDetailsResponse; +import xiresellers.client.model.ReturnsSearchResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for ReturnsApi + */ +@Disabled +public class ReturnsApiTest { + + private final ReturnsApi api = new ReturnsApi(); + + /** + * Returns Details + * + * The Returns Details API will retrieve all the details related to the specific caseRequestNumber. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getResellersV6ReturnsdetailsTest() throws ApiException { + String imCustomerNumber = null; + String imCountryCode = null; + String imCorrelationID = null; + String caseRequestNumber = null; + String imSenderID = null; + ReturnsDetailsResponse response = api.getResellersV6Returnsdetails(imCustomerNumber, imCountryCode, imCorrelationID, caseRequestNumber, imSenderID); + // TODO: test validations + } + + /** + * Returns Search + * + * The Returns Search API, by default, will retrieve all the returns that are associated with the customer’s account. The customer will be able to search returns using the query parameters. The Returns Search response will return the following information: returnClaimId, caseRequestNumber, createdOn, referenceNumber, and returnReason. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getResellersV6ReturnssearchTest() throws ApiException { + String imCustomerNumber = null; + String imCountryCode = null; + String imCorrelationID = null; + String imSenderID = null; + String caseRequestNumber = null; + String invoiceNumber = null; + String returnClaimId = null; + String referenceNumber = null; + String ingramPartNumber = null; + String vendorPartNumber = null; + String returnStatusIn = null; + String claimStatusIn = null; + String createdOnBt = null; + String modifiedOnBt = null; + String returnReasonIn = null; + String page = null; + String size = null; + String sort = null; + String sortingColumnName = null; + ReturnsSearchResponse response = api.getResellersV6Returnssearch(imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, caseRequestNumber, invoiceNumber, returnClaimId, referenceNumber, ingramPartNumber, vendorPartNumber, returnStatusIn, claimStatusIn, createdOnBt, modifiedOnBt, returnReasonIn, page, size, sort, sortingColumnName); + // TODO: test validations + } + + /** + * Returns Create + * + * Return create endpoint will allow customers to create a return request. In order to create a request, the customer must provide either ingramPartNumber or vendorPartNumber along with other required fields listed below. + * + * @throws ApiException if the Api call fails + */ + @Test + public void postReturnscreateTest() throws ApiException { + String imCustomerNumber = null; + String imCountryCode = null; + String imCorrelationID = null; + String imSenderID = null; + ReturnsCreateRequest returnsCreateRequest = null; + ReturnsCreateResponse response = api.postReturnscreate(imCustomerNumber, imCountryCode, imCorrelationID, imSenderID, returnsCreateRequest); + // TODO: test validations + } + +} diff --git a/src/test/java/xiresellers/client/api/StockUpdateApiTest.java b/src/test/java/xiresellers/client/api/StockUpdateApiTest.java new file mode 100644 index 00000000..6a8628a1 --- /dev/null +++ b/src/test/java/xiresellers/client/api/StockUpdateApiTest.java @@ -0,0 +1,48 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.api; + +import xiresellers.client.ApiException; +import xiresellers.client.model.AvailabilityAsyncNotificationRequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for StockUpdateApi + */ +@Disabled +public class StockUpdateApiTest { + + private final StockUpdateApi api = new StockUpdateApi(); + + /** + * Stock Update + * + * @throws ApiException if the Api call fails + */ + @Test + public void resellersV1WebhooksAvailabilityupdatePostTest() throws ApiException { + String targeturl = null; + String xHubSignature = null; + AvailabilityAsyncNotificationRequest availabilityAsyncNotificationRequest = null; + api.resellersV1WebhooksAvailabilityupdatePost(targeturl, xHubSignature, availabilityAsyncNotificationRequest); + // TODO: test validations + } + +} diff --git a/src/test/java/xiresellers/client/model/AddressTypeTest.java b/src/test/java/xiresellers/client/model/AddressTypeTest.java new file mode 100644 index 00000000..85015461 --- /dev/null +++ b/src/test/java/xiresellers/client/model/AddressTypeTest.java @@ -0,0 +1,144 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for AddressType + */ +public class AddressTypeTest { + private final AddressType model = new AddressType(); + + /** + * Model tests for AddressType + */ + @Test + public void testAddressType() { + // TODO: test AddressType + } + + /** + * Test the property 'attention' + */ + @Test + public void attentionTest() { + // TODO: test attention + } + + /** + * Test the property 'name1' + */ + @Test + public void name1Test() { + // TODO: test name1 + } + + /** + * Test the property 'name2' + */ + @Test + public void name2Test() { + // TODO: test name2 + } + + /** + * Test the property 'addressline1' + */ + @Test + public void addressline1Test() { + // TODO: test addressline1 + } + + /** + * Test the property 'addressline2' + */ + @Test + public void addressline2Test() { + // TODO: test addressline2 + } + + /** + * Test the property 'addressline3' + */ + @Test + public void addressline3Test() { + // TODO: test addressline3 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalcode' + */ + @Test + public void postalcodeTest() { + // TODO: test postalcode + } + + /** + * Test the property 'countrycode' + */ + @Test + public void countrycodeTest() { + // TODO: test countrycode + } + + /** + * Test the property 'fax' + */ + @Test + public void faxTest() { + // TODO: test fax + } + + /** + * Test the property 'phonenumber' + */ + @Test + public void phonenumberTest() { + // TODO: test phonenumber + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + +} diff --git a/src/test/java/xiresellers/client/model/AvailabilityAsyncNotificationRequestResourceInnerLinksInnerTest.java b/src/test/java/xiresellers/client/model/AvailabilityAsyncNotificationRequestResourceInnerLinksInnerTest.java new file mode 100644 index 00000000..7bccb7fe --- /dev/null +++ b/src/test/java/xiresellers/client/model/AvailabilityAsyncNotificationRequestResourceInnerLinksInnerTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for AvailabilityAsyncNotificationRequestResourceInnerLinksInner + */ +public class AvailabilityAsyncNotificationRequestResourceInnerLinksInnerTest { + private final AvailabilityAsyncNotificationRequestResourceInnerLinksInner model = new AvailabilityAsyncNotificationRequestResourceInnerLinksInner(); + + /** + * Model tests for AvailabilityAsyncNotificationRequestResourceInnerLinksInner + */ + @Test + public void testAvailabilityAsyncNotificationRequestResourceInnerLinksInner() { + // TODO: test AvailabilityAsyncNotificationRequestResourceInnerLinksInner + } + + /** + * Test the property 'topic' + */ + @Test + public void topicTest() { + // TODO: test topic + } + + /** + * Test the property 'href' + */ + @Test + public void hrefTest() { + // TODO: test href + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/xiresellers/client/model/AvailabilityAsyncNotificationRequestResourceInnerTest.java b/src/test/java/xiresellers/client/model/AvailabilityAsyncNotificationRequestResourceInnerTest.java new file mode 100644 index 00000000..ea2a21a1 --- /dev/null +++ b/src/test/java/xiresellers/client/model/AvailabilityAsyncNotificationRequestResourceInnerTest.java @@ -0,0 +1,115 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.AvailabilityAsyncNotificationRequestResourceInnerLinksInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for AvailabilityAsyncNotificationRequestResourceInner + */ +public class AvailabilityAsyncNotificationRequestResourceInnerTest { + private final AvailabilityAsyncNotificationRequestResourceInner model = new AvailabilityAsyncNotificationRequestResourceInner(); + + /** + * Model tests for AvailabilityAsyncNotificationRequestResourceInner + */ + @Test + public void testAvailabilityAsyncNotificationRequestResourceInner() { + // TODO: test AvailabilityAsyncNotificationRequestResourceInner + } + + /** + * Test the property 'eventType' + */ + @Test + public void eventTypeTest() { + // TODO: test eventType + } + + /** + * Test the property 'ingramPartNumber' + */ + @Test + public void ingramPartNumberTest() { + // TODO: test ingramPartNumber + } + + /** + * Test the property 'vendorPartNumber' + */ + @Test + public void vendorPartNumberTest() { + // TODO: test vendorPartNumber + } + + /** + * Test the property 'vendorName' + */ + @Test + public void vendorNameTest() { + // TODO: test vendorName + } + + /** + * Test the property 'upcCode' + */ + @Test + public void upcCodeTest() { + // TODO: test upcCode + } + + /** + * Test the property 'skuStatus' + */ + @Test + public void skuStatusTest() { + // TODO: test skuStatus + } + + /** + * Test the property 'backOrderFlag' + */ + @Test + public void backOrderFlagTest() { + // TODO: test backOrderFlag + } + + /** + * Test the property 'totalAvailability' + */ + @Test + public void totalAvailabilityTest() { + // TODO: test totalAvailability + } + + /** + * Test the property 'links' + */ + @Test + public void linksTest() { + // TODO: test links + } + +} diff --git a/src/test/java/xiresellers/client/model/AvailabilityAsyncNotificationRequestTest.java b/src/test/java/xiresellers/client/model/AvailabilityAsyncNotificationRequestTest.java new file mode 100644 index 00000000..00aac6d9 --- /dev/null +++ b/src/test/java/xiresellers/client/model/AvailabilityAsyncNotificationRequestTest.java @@ -0,0 +1,83 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.AvailabilityAsyncNotificationRequestResourceInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for AvailabilityAsyncNotificationRequest + */ +public class AvailabilityAsyncNotificationRequestTest { + private final AvailabilityAsyncNotificationRequest model = new AvailabilityAsyncNotificationRequest(); + + /** + * Model tests for AvailabilityAsyncNotificationRequest + */ + @Test + public void testAvailabilityAsyncNotificationRequest() { + // TODO: test AvailabilityAsyncNotificationRequest + } + + /** + * Test the property 'topic' + */ + @Test + public void topicTest() { + // TODO: test topic + } + + /** + * Test the property 'event' + */ + @Test + public void eventTest() { + // TODO: test event + } + + /** + * Test the property 'eventTimeStamp' + */ + @Test + public void eventTimeStampTest() { + // TODO: test eventTimeStamp + } + + /** + * Test the property 'eventId' + */ + @Test + public void eventIdTest() { + // TODO: test eventId + } + + /** + * Test the property 'resource' + */ + @Test + public void resourceTest() { + // TODO: test resource + } + +} diff --git a/src/test/java/xiresellers/client/model/DealsDetailsResponseProductsInnerTest.java b/src/test/java/xiresellers/client/model/DealsDetailsResponseProductsInnerTest.java new file mode 100644 index 00000000..a397ddc0 --- /dev/null +++ b/src/test/java/xiresellers/client/model/DealsDetailsResponseProductsInnerTest.java @@ -0,0 +1,154 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for DealsDetailsResponseProductsInner + */ +public class DealsDetailsResponseProductsInnerTest { + private final DealsDetailsResponseProductsInner model = new DealsDetailsResponseProductsInner(); + + /** + * Model tests for DealsDetailsResponseProductsInner + */ + @Test + public void testDealsDetailsResponseProductsInner() { + // TODO: test DealsDetailsResponseProductsInner + } + + /** + * Test the property 'ingramPartNumber' + */ + @Test + public void ingramPartNumberTest() { + // TODO: test ingramPartNumber + } + + /** + * Test the property 'vendorPartNumber' + */ + @Test + public void vendorPartNumberTest() { + // TODO: test vendorPartNumber + } + + /** + * Test the property 'upc' + */ + @Test + public void upcTest() { + // TODO: test upc + } + + /** + * Test the property 'productDescription' + */ + @Test + public void productDescriptionTest() { + // TODO: test productDescription + } + + /** + * Test the property 'msrp' + */ + @Test + public void msrpTest() { + // TODO: test msrp + } + + /** + * Test the property 'extendedMSRP' + */ + @Test + public void extendedMSRPTest() { + // TODO: test extendedMSRP + } + + /** + * Test the property 'standardPrice' + */ + @Test + public void standardPriceTest() { + // TODO: test standardPrice + } + + /** + * Test the property 'approvedQuantity' + */ + @Test + public void approvedQuantityTest() { + // TODO: test approvedQuantity + } + + /** + * Test the property 'remainingQuantity' + */ + @Test + public void remainingQuantityTest() { + // TODO: test remainingQuantity + } + + /** + * Test the property 'comments' + */ + @Test + public void commentsTest() { + // TODO: test comments + } + + /** + * Test the property 'specialConditions' + */ + @Test + public void specialConditionsTest() { + // TODO: test specialConditions + } + + /** + * Test the property 'startDate' + */ + @Test + public void startDateTest() { + // TODO: test startDate + } + + /** + * Test the property 'expirationDate' + */ + @Test + public void expirationDateTest() { + // TODO: test expirationDate + } + + /** + * Test the property 'daysRemaining' + */ + @Test + public void daysRemainingTest() { + // TODO: test daysRemaining + } + +} diff --git a/src/test/java/xiresellers/client/model/DealsDetailsResponseTest.java b/src/test/java/xiresellers/client/model/DealsDetailsResponseTest.java new file mode 100644 index 00000000..7e2b7c2e --- /dev/null +++ b/src/test/java/xiresellers/client/model/DealsDetailsResponseTest.java @@ -0,0 +1,134 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.DealsDetailsResponseProductsInner; +import xiresellers.client.model.RenewalsDetailsResponseEndUserInfoInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for DealsDetailsResponse + */ +public class DealsDetailsResponseTest { + private final DealsDetailsResponse model = new DealsDetailsResponse(); + + /** + * Model tests for DealsDetailsResponse + */ + @Test + public void testDealsDetailsResponse() { + // TODO: test DealsDetailsResponse + } + + /** + * Test the property 'dealId' + */ + @Test + public void dealIdTest() { + // TODO: test dealId + } + + /** + * Test the property 'version' + */ + @Test + public void versionTest() { + // TODO: test version + } + + /** + * Test the property 'endUser' + */ + @Test + public void endUserTest() { + // TODO: test endUser + } + + /** + * Test the property 'extendedMsrp' + */ + @Test + public void extendedMsrpTest() { + // TODO: test extendedMsrp + } + + /** + * Test the property 'vendor' + */ + @Test + public void vendorTest() { + // TODO: test vendor + } + + /** + * Test the property 'dealReceivedOn' + */ + @Test + public void dealReceivedOnTest() { + // TODO: test dealReceivedOn + } + + /** + * Test the property 'dealExpiryDate' + */ + @Test + public void dealExpiryDateTest() { + // TODO: test dealExpiryDate + } + + /** + * Test the property 'priceProtectionEndDate' + */ + @Test + public void priceProtectionEndDateTest() { + // TODO: test priceProtectionEndDate + } + + /** + * Test the property 'currencyCode' + */ + @Test + public void currencyCodeTest() { + // TODO: test currencyCode + } + + /** + * Test the property 'endUserInfo' + */ + @Test + public void endUserInfoTest() { + // TODO: test endUserInfo + } + + /** + * Test the property 'products' + */ + @Test + public void productsTest() { + // TODO: test products + } + +} diff --git a/src/test/java/xiresellers/client/model/DealsSearchResponseDealsInnerTest.java b/src/test/java/xiresellers/client/model/DealsSearchResponseDealsInnerTest.java new file mode 100644 index 00000000..7c6a4542 --- /dev/null +++ b/src/test/java/xiresellers/client/model/DealsSearchResponseDealsInnerTest.java @@ -0,0 +1,92 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.RenewalsSearchResponseRenewalsInnerLinksInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for DealsSearchResponseDealsInner + */ +public class DealsSearchResponseDealsInnerTest { + private final DealsSearchResponseDealsInner model = new DealsSearchResponseDealsInner(); + + /** + * Model tests for DealsSearchResponseDealsInner + */ + @Test + public void testDealsSearchResponseDealsInner() { + // TODO: test DealsSearchResponseDealsInner + } + + /** + * Test the property 'dealId' + */ + @Test + public void dealIdTest() { + // TODO: test dealId + } + + /** + * Test the property 'version' + */ + @Test + public void versionTest() { + // TODO: test version + } + + /** + * Test the property 'endUser' + */ + @Test + public void endUserTest() { + // TODO: test endUser + } + + /** + * Test the property 'vendor' + */ + @Test + public void vendorTest() { + // TODO: test vendor + } + + /** + * Test the property 'dealExpiryDate' + */ + @Test + public void dealExpiryDateTest() { + // TODO: test dealExpiryDate + } + + /** + * Test the property 'links' + */ + @Test + public void linksTest() { + // TODO: test links + } + +} diff --git a/src/test/java/xiresellers/client/model/DealsSearchResponseTest.java b/src/test/java/xiresellers/client/model/DealsSearchResponseTest.java new file mode 100644 index 00000000..f6eafda0 --- /dev/null +++ b/src/test/java/xiresellers/client/model/DealsSearchResponseTest.java @@ -0,0 +1,91 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.DealsSearchResponseDealsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for DealsSearchResponse + */ +public class DealsSearchResponseTest { + private final DealsSearchResponse model = new DealsSearchResponse(); + + /** + * Model tests for DealsSearchResponse + */ + @Test + public void testDealsSearchResponse() { + // TODO: test DealsSearchResponse + } + + /** + * Test the property 'recordsFound' + */ + @Test + public void recordsFoundTest() { + // TODO: test recordsFound + } + + /** + * Test the property 'pageSize' + */ + @Test + public void pageSizeTest() { + // TODO: test pageSize + } + + /** + * Test the property 'pageNumber' + */ + @Test + public void pageNumberTest() { + // TODO: test pageNumber + } + + /** + * Test the property 'deals' + */ + @Test + public void dealsTest() { + // TODO: test deals + } + + /** + * Test the property 'nextPage' + */ + @Test + public void nextPageTest() { + // TODO: test nextPage + } + + /** + * Test the property 'previousPage' + */ + @Test + public void previousPageTest() { + // TODO: test previousPage + } + +} diff --git a/src/test/java/xiresellers/client/model/ErrorResponseDTOTest.java b/src/test/java/xiresellers/client/model/ErrorResponseDTOTest.java new file mode 100644 index 00000000..debd448b --- /dev/null +++ b/src/test/java/xiresellers/client/model/ErrorResponseDTOTest.java @@ -0,0 +1,52 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import xiresellers.client.model.Error; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ErrorResponseDTO + */ +public class ErrorResponseDTOTest { + private final ErrorResponseDTO model = new ErrorResponseDTO(); + + /** + * Model tests for ErrorResponseDTO + */ + @Test + public void testErrorResponseDTO() { + // TODO: test ErrorResponseDTO + } + + /** + * Test the property 'errors' + */ + @Test + public void errorsTest() { + // TODO: test errors + } + +} diff --git a/src/test/java/xiresellers/client/model/ErrorResponseErrorsInnerFieldsInnerTest.java b/src/test/java/xiresellers/client/model/ErrorResponseErrorsInnerFieldsInnerTest.java new file mode 100644 index 00000000..2151ef1c --- /dev/null +++ b/src/test/java/xiresellers/client/model/ErrorResponseErrorsInnerFieldsInnerTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ErrorResponseErrorsInnerFieldsInner + */ +public class ErrorResponseErrorsInnerFieldsInnerTest { + private final ErrorResponseErrorsInnerFieldsInner model = new ErrorResponseErrorsInnerFieldsInner(); + + /** + * Model tests for ErrorResponseErrorsInnerFieldsInner + */ + @Test + public void testErrorResponseErrorsInnerFieldsInner() { + // TODO: test ErrorResponseErrorsInnerFieldsInner + } + + /** + * Test the property 'field' + */ + @Test + public void fieldTest() { + // TODO: test field + } + + /** + * Test the property 'value' + */ + @Test + public void valueTest() { + // TODO: test value + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + +} diff --git a/src/test/java/xiresellers/client/model/ErrorResponseErrorsInnerTest.java b/src/test/java/xiresellers/client/model/ErrorResponseErrorsInnerTest.java new file mode 100644 index 00000000..5df94ad1 --- /dev/null +++ b/src/test/java/xiresellers/client/model/ErrorResponseErrorsInnerTest.java @@ -0,0 +1,75 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ErrorResponseErrorsInnerFieldsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ErrorResponseErrorsInner + */ +public class ErrorResponseErrorsInnerTest { + private final ErrorResponseErrorsInner model = new ErrorResponseErrorsInner(); + + /** + * Model tests for ErrorResponseErrorsInner + */ + @Test + public void testErrorResponseErrorsInner() { + // TODO: test ErrorResponseErrorsInner + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + + /** + * Test the property 'fields' + */ + @Test + public void fieldsTest() { + // TODO: test fields + } + +} diff --git a/src/test/java/xiresellers/client/model/ErrorResponseTest.java b/src/test/java/xiresellers/client/model/ErrorResponseTest.java new file mode 100644 index 00000000..e735e261 --- /dev/null +++ b/src/test/java/xiresellers/client/model/ErrorResponseTest.java @@ -0,0 +1,51 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ErrorResponseErrorsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ErrorResponse + */ +public class ErrorResponseTest { + private final ErrorResponse model = new ErrorResponse(); + + /** + * Model tests for ErrorResponse + */ + @Test + public void testErrorResponse() { + // TODO: test ErrorResponse + } + + /** + * Test the property 'errors' + */ + @Test + public void errorsTest() { + // TODO: test errors + } + +} diff --git a/src/test/java/xiresellers/client/model/ErrorTest.java b/src/test/java/xiresellers/client/model/ErrorTest.java new file mode 100644 index 00000000..76002275 --- /dev/null +++ b/src/test/java/xiresellers/client/model/ErrorTest.java @@ -0,0 +1,76 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import xiresellers.client.model.Fields; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Error + */ +public class ErrorTest { + private final Error model = new Error(); + + /** + * Model tests for Error + */ + @Test + public void testError() { + // TODO: test Error + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + + /** + * Test the property 'fields' + */ + @Test + public void fieldsTest() { + // TODO: test fields + } + +} diff --git a/src/test/java/xiresellers/client/model/FieldsTest.java b/src/test/java/xiresellers/client/model/FieldsTest.java new file mode 100644 index 00000000..73483a43 --- /dev/null +++ b/src/test/java/xiresellers/client/model/FieldsTest.java @@ -0,0 +1,65 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Fields + */ +public class FieldsTest { + private final Fields model = new Fields(); + + /** + * Model tests for Fields + */ + @Test + public void testFields() { + // TODO: test Fields + } + + /** + * Test the property 'field' + */ + @Test + public void fieldTest() { + // TODO: test field + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + + /** + * Test the property 'value' + */ + @Test + public void valueTest() { + // TODO: test value + } + +} diff --git a/src/test/java/xiresellers/client/model/FreightRequestLinesInnerTest.java b/src/test/java/xiresellers/client/model/FreightRequestLinesInnerTest.java new file mode 100644 index 00000000..482ea939 --- /dev/null +++ b/src/test/java/xiresellers/client/model/FreightRequestLinesInnerTest.java @@ -0,0 +1,80 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for FreightRequestLinesInner + */ +public class FreightRequestLinesInnerTest { + private final FreightRequestLinesInner model = new FreightRequestLinesInner(); + + /** + * Model tests for FreightRequestLinesInner + */ + @Test + public void testFreightRequestLinesInner() { + // TODO: test FreightRequestLinesInner + } + + /** + * Test the property 'customerLineNumber' + */ + @Test + public void customerLineNumberTest() { + // TODO: test customerLineNumber + } + + /** + * Test the property 'ingramPartNumber' + */ + @Test + public void ingramPartNumberTest() { + // TODO: test ingramPartNumber + } + + /** + * Test the property 'quantity' + */ + @Test + public void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'warehouseId' + */ + @Test + public void warehouseIdTest() { + // TODO: test warehouseId + } + + /** + * Test the property 'carrierCode' + */ + @Test + public void carrierCodeTest() { + // TODO: test carrierCode + } + +} diff --git a/src/test/java/xiresellers/client/model/FreightRequestShipToAddressInnerTest.java b/src/test/java/xiresellers/client/model/FreightRequestShipToAddressInnerTest.java new file mode 100644 index 00000000..049bc475 --- /dev/null +++ b/src/test/java/xiresellers/client/model/FreightRequestShipToAddressInnerTest.java @@ -0,0 +1,104 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for FreightRequestShipToAddressInner + */ +public class FreightRequestShipToAddressInnerTest { + private final FreightRequestShipToAddressInner model = new FreightRequestShipToAddressInner(); + + /** + * Model tests for FreightRequestShipToAddressInner + */ + @Test + public void testFreightRequestShipToAddressInner() { + // TODO: test FreightRequestShipToAddressInner + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'addressLine1' + */ + @Test + public void addressLine1Test() { + // TODO: test addressLine1 + } + + /** + * Test the property 'addressLine2' + */ + @Test + public void addressLine2Test() { + // TODO: test addressLine2 + } + + /** + * Test the property 'addressLine3' + */ + @Test + public void addressLine3Test() { + // TODO: test addressLine3 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalCode' + */ + @Test + public void postalCodeTest() { + // TODO: test postalCode + } + + /** + * Test the property 'countryCode' + */ + @Test + public void countryCodeTest() { + // TODO: test countryCode + } + +} diff --git a/src/test/java/xiresellers/client/model/FreightRequestTest.java b/src/test/java/xiresellers/client/model/FreightRequestTest.java new file mode 100644 index 00000000..0dc54979 --- /dev/null +++ b/src/test/java/xiresellers/client/model/FreightRequestTest.java @@ -0,0 +1,76 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.FreightRequestLinesInner; +import xiresellers.client.model.FreightRequestShipToAddressInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for FreightRequest + */ +public class FreightRequestTest { + private final FreightRequest model = new FreightRequest(); + + /** + * Model tests for FreightRequest + */ + @Test + public void testFreightRequest() { + // TODO: test FreightRequest + } + + /** + * Test the property 'billToAddressId' + */ + @Test + public void billToAddressIdTest() { + // TODO: test billToAddressId + } + + /** + * Test the property 'shipToAddressId' + */ + @Test + public void shipToAddressIdTest() { + // TODO: test shipToAddressId + } + + /** + * Test the property 'shipToAddress' + */ + @Test + public void shipToAddressTest() { + // TODO: test shipToAddress + } + + /** + * Test the property 'lines' + */ + @Test + public void linesTest() { + // TODO: test lines + } + +} diff --git a/src/test/java/xiresellers/client/model/FreightResponseFreightEstimateResponseDistributionInnerCarrierListInnerTest.java b/src/test/java/xiresellers/client/model/FreightResponseFreightEstimateResponseDistributionInnerCarrierListInnerTest.java new file mode 100644 index 00000000..969acf30 --- /dev/null +++ b/src/test/java/xiresellers/client/model/FreightResponseFreightEstimateResponseDistributionInnerCarrierListInnerTest.java @@ -0,0 +1,81 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner + */ +public class FreightResponseFreightEstimateResponseDistributionInnerCarrierListInnerTest { + private final FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner model = new FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner(); + + /** + * Model tests for FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner + */ + @Test + public void testFreightResponseFreightEstimateResponseDistributionInnerCarrierListInner() { + // TODO: test FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner + } + + /** + * Test the property 'carrierCode' + */ + @Test + public void carrierCodeTest() { + // TODO: test carrierCode + } + + /** + * Test the property 'shipVia' + */ + @Test + public void shipViaTest() { + // TODO: test shipVia + } + + /** + * Test the property 'carrierMode' + */ + @Test + public void carrierModeTest() { + // TODO: test carrierMode + } + + /** + * Test the property 'estimatedFreightCharge' + */ + @Test + public void estimatedFreightChargeTest() { + // TODO: test estimatedFreightCharge + } + + /** + * Test the property 'daysInTransit' + */ + @Test + public void daysInTransitTest() { + // TODO: test daysInTransit + } + +} diff --git a/src/test/java/xiresellers/client/model/FreightResponseFreightEstimateResponseDistributionInnerTest.java b/src/test/java/xiresellers/client/model/FreightResponseFreightEstimateResponseDistributionInnerTest.java new file mode 100644 index 00000000..a6fedde2 --- /dev/null +++ b/src/test/java/xiresellers/client/model/FreightResponseFreightEstimateResponseDistributionInnerTest.java @@ -0,0 +1,100 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for FreightResponseFreightEstimateResponseDistributionInner + */ +public class FreightResponseFreightEstimateResponseDistributionInnerTest { + private final FreightResponseFreightEstimateResponseDistributionInner model = new FreightResponseFreightEstimateResponseDistributionInner(); + + /** + * Model tests for FreightResponseFreightEstimateResponseDistributionInner + */ + @Test + public void testFreightResponseFreightEstimateResponseDistributionInner() { + // TODO: test FreightResponseFreightEstimateResponseDistributionInner + } + + /** + * Test the property 'shipFromBranchNumber' + */ + @Test + public void shipFromBranchNumberTest() { + // TODO: test shipFromBranchNumber + } + + /** + * Test the property 'carrierCode' + */ + @Test + public void carrierCodeTest() { + // TODO: test carrierCode + } + + /** + * Test the property 'shipVia' + */ + @Test + public void shipViaTest() { + // TODO: test shipVia + } + + /** + * Test the property 'freightRate' + */ + @Test + public void freightRateTest() { + // TODO: test freightRate + } + + /** + * Test the property 'totalWeight' + */ + @Test + public void totalWeightTest() { + // TODO: test totalWeight + } + + /** + * Test the property 'transitDays' + */ + @Test + public void transitDaysTest() { + // TODO: test transitDays + } + + /** + * Test the property 'carrierList' + */ + @Test + public void carrierListTest() { + // TODO: test carrierList + } + +} diff --git a/src/test/java/xiresellers/client/model/FreightResponseFreightEstimateResponseLinesInnerTest.java b/src/test/java/xiresellers/client/model/FreightResponseFreightEstimateResponseLinesInnerTest.java new file mode 100644 index 00000000..94b32059 --- /dev/null +++ b/src/test/java/xiresellers/client/model/FreightResponseFreightEstimateResponseLinesInnerTest.java @@ -0,0 +1,89 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for FreightResponseFreightEstimateResponseLinesInner + */ +public class FreightResponseFreightEstimateResponseLinesInnerTest { + private final FreightResponseFreightEstimateResponseLinesInner model = new FreightResponseFreightEstimateResponseLinesInner(); + + /** + * Model tests for FreightResponseFreightEstimateResponseLinesInner + */ + @Test + public void testFreightResponseFreightEstimateResponseLinesInner() { + // TODO: test FreightResponseFreightEstimateResponseLinesInner + } + + /** + * Test the property 'ingramPartNumber' + */ + @Test + public void ingramPartNumberTest() { + // TODO: test ingramPartNumber + } + + /** + * Test the property 'vendorPartNumber' + */ + @Test + public void vendorPartNumberTest() { + // TODO: test vendorPartNumber + } + + /** + * Test the property 'warehouseId' + */ + @Test + public void warehouseIdTest() { + // TODO: test warehouseId + } + + /** + * Test the property 'quantity' + */ + @Test + public void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'unitPrice' + */ + @Test + public void unitPriceTest() { + // TODO: test unitPrice + } + + /** + * Test the property 'netAmount' + */ + @Test + public void netAmountTest() { + // TODO: test netAmount + } + +} diff --git a/src/test/java/xiresellers/client/model/FreightResponseFreightEstimateResponseTest.java b/src/test/java/xiresellers/client/model/FreightResponseFreightEstimateResponseTest.java new file mode 100644 index 00000000..a9ac60cc --- /dev/null +++ b/src/test/java/xiresellers/client/model/FreightResponseFreightEstimateResponseTest.java @@ -0,0 +1,109 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.FreightResponseFreightEstimateResponseDistributionInner; +import xiresellers.client.model.FreightResponseFreightEstimateResponseLinesInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for FreightResponseFreightEstimateResponse + */ +public class FreightResponseFreightEstimateResponseTest { + private final FreightResponseFreightEstimateResponse model = new FreightResponseFreightEstimateResponse(); + + /** + * Model tests for FreightResponseFreightEstimateResponse + */ + @Test + public void testFreightResponseFreightEstimateResponse() { + // TODO: test FreightResponseFreightEstimateResponse + } + + /** + * Test the property 'currencyCode' + */ + @Test + public void currencyCodeTest() { + // TODO: test currencyCode + } + + /** + * Test the property 'totalFreightAmount' + */ + @Test + public void totalFreightAmountTest() { + // TODO: test totalFreightAmount + } + + /** + * Test the property 'totalTaxAmount' + */ + @Test + public void totalTaxAmountTest() { + // TODO: test totalTaxAmount + } + + /** + * Test the property 'totalFees' + */ + @Test + public void totalFeesTest() { + // TODO: test totalFees + } + + /** + * Test the property 'totalNetAmount' + */ + @Test + public void totalNetAmountTest() { + // TODO: test totalNetAmount + } + + /** + * Test the property 'grossAmount' + */ + @Test + public void grossAmountTest() { + // TODO: test grossAmount + } + + /** + * Test the property 'distribution' + */ + @Test + public void distributionTest() { + // TODO: test distribution + } + + /** + * Test the property 'lines' + */ + @Test + public void linesTest() { + // TODO: test lines + } + +} diff --git a/src/test/java/xiresellers/client/model/FreightResponseTest.java b/src/test/java/xiresellers/client/model/FreightResponseTest.java new file mode 100644 index 00000000..2cc91428 --- /dev/null +++ b/src/test/java/xiresellers/client/model/FreightResponseTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.FreightResponseFreightEstimateResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for FreightResponse + */ +public class FreightResponseTest { + private final FreightResponse model = new FreightResponse(); + + /** + * Model tests for FreightResponse + */ + @Test + public void testFreightResponse() { + // TODO: test FreightResponse + } + + /** + * Test the property 'freightEstimateResponse' + */ + @Test + public void freightEstimateResponseTest() { + // TODO: test freightEstimateResponse + } + +} diff --git a/src/test/java/xiresellers/client/model/GetResellerV6ValidateQuote400ResponseFieldsInnerTest.java b/src/test/java/xiresellers/client/model/GetResellerV6ValidateQuote400ResponseFieldsInnerTest.java new file mode 100644 index 00000000..81fe97bc --- /dev/null +++ b/src/test/java/xiresellers/client/model/GetResellerV6ValidateQuote400ResponseFieldsInnerTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetResellerV6ValidateQuote400ResponseFieldsInner + */ +public class GetResellerV6ValidateQuote400ResponseFieldsInnerTest { + private final GetResellerV6ValidateQuote400ResponseFieldsInner model = new GetResellerV6ValidateQuote400ResponseFieldsInner(); + + /** + * Model tests for GetResellerV6ValidateQuote400ResponseFieldsInner + */ + @Test + public void testGetResellerV6ValidateQuote400ResponseFieldsInner() { + // TODO: test GetResellerV6ValidateQuote400ResponseFieldsInner + } + + /** + * Test the property 'field' + */ + @Test + public void fieldTest() { + // TODO: test field + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + + /** + * Test the property 'value' + */ + @Test + public void valueTest() { + // TODO: test value + } + +} diff --git a/src/test/java/xiresellers/client/model/GetResellerV6ValidateQuote400ResponseTest.java b/src/test/java/xiresellers/client/model/GetResellerV6ValidateQuote400ResponseTest.java new file mode 100644 index 00000000..c6434b47 --- /dev/null +++ b/src/test/java/xiresellers/client/model/GetResellerV6ValidateQuote400ResponseTest.java @@ -0,0 +1,75 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.GetResellerV6ValidateQuote400ResponseFieldsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetResellerV6ValidateQuote400Response + */ +public class GetResellerV6ValidateQuote400ResponseTest { + private final GetResellerV6ValidateQuote400Response model = new GetResellerV6ValidateQuote400Response(); + + /** + * Model tests for GetResellerV6ValidateQuote400Response + */ + @Test + public void testGetResellerV6ValidateQuote400Response() { + // TODO: test GetResellerV6ValidateQuote400Response + } + + /** + * Test the property 'traceid' + */ + @Test + public void traceidTest() { + // TODO: test traceid + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + + /** + * Test the property 'fields' + */ + @Test + public void fieldsTest() { + // TODO: test fields + } + +} diff --git a/src/test/java/xiresellers/client/model/GetResellerV6ValidateQuote500ResponseTest.java b/src/test/java/xiresellers/client/model/GetResellerV6ValidateQuote500ResponseTest.java new file mode 100644 index 00000000..7ede4358 --- /dev/null +++ b/src/test/java/xiresellers/client/model/GetResellerV6ValidateQuote500ResponseTest.java @@ -0,0 +1,74 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetResellerV6ValidateQuote500Response + */ +public class GetResellerV6ValidateQuote500ResponseTest { + private final GetResellerV6ValidateQuote500Response model = new GetResellerV6ValidateQuote500Response(); + + /** + * Model tests for GetResellerV6ValidateQuote500Response + */ + @Test + public void testGetResellerV6ValidateQuote500Response() { + // TODO: test GetResellerV6ValidateQuote500Response + } + + /** + * Test the property 'traceid' + */ + @Test + public void traceidTest() { + // TODO: test traceid + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + + /** + * Test the property 'fields' + */ + @Test + public void fieldsTest() { + // TODO: test fields + } + +} diff --git a/src/test/java/xiresellers/client/model/InvoiceDetailRequestServicerequestInvoicedetailrequestTest.java b/src/test/java/xiresellers/client/model/InvoiceDetailRequestServicerequestInvoicedetailrequestTest.java new file mode 100644 index 00000000..ef82f86a --- /dev/null +++ b/src/test/java/xiresellers/client/model/InvoiceDetailRequestServicerequestInvoicedetailrequestTest.java @@ -0,0 +1,48 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InvoiceDetailRequestServicerequestInvoicedetailrequest + */ +public class InvoiceDetailRequestServicerequestInvoicedetailrequestTest { + private final InvoiceDetailRequestServicerequestInvoicedetailrequest model = new InvoiceDetailRequestServicerequestInvoicedetailrequest(); + + /** + * Model tests for InvoiceDetailRequestServicerequestInvoicedetailrequest + */ + @Test + public void testInvoiceDetailRequestServicerequestInvoicedetailrequest() { + // TODO: test InvoiceDetailRequestServicerequestInvoicedetailrequest + } + + /** + * Test the property 'invoicenumber' + */ + @Test + public void invoicenumberTest() { + // TODO: test invoicenumber + } + +} diff --git a/src/test/java/xiresellers/client/model/InvoiceDetailRequestServicerequestRequestpreambleTest.java b/src/test/java/xiresellers/client/model/InvoiceDetailRequestServicerequestRequestpreambleTest.java new file mode 100644 index 00000000..92ea2edb --- /dev/null +++ b/src/test/java/xiresellers/client/model/InvoiceDetailRequestServicerequestRequestpreambleTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InvoiceDetailRequestServicerequestRequestpreamble + */ +public class InvoiceDetailRequestServicerequestRequestpreambleTest { + private final InvoiceDetailRequestServicerequestRequestpreamble model = new InvoiceDetailRequestServicerequestRequestpreamble(); + + /** + * Model tests for InvoiceDetailRequestServicerequestRequestpreamble + */ + @Test + public void testInvoiceDetailRequestServicerequestRequestpreamble() { + // TODO: test InvoiceDetailRequestServicerequestRequestpreamble + } + + /** + * Test the property 'isocountrycode' + */ + @Test + public void isocountrycodeTest() { + // TODO: test isocountrycode + } + + /** + * Test the property 'customernumber' + */ + @Test + public void customernumberTest() { + // TODO: test customernumber + } + +} diff --git a/src/test/java/xiresellers/client/model/InvoiceDetailRequestServicerequestTest.java b/src/test/java/xiresellers/client/model/InvoiceDetailRequestServicerequestTest.java new file mode 100644 index 00000000..762900c0 --- /dev/null +++ b/src/test/java/xiresellers/client/model/InvoiceDetailRequestServicerequestTest.java @@ -0,0 +1,58 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.InvoiceDetailRequestServicerequestInvoicedetailrequest; +import xiresellers.client.model.InvoiceDetailRequestServicerequestRequestpreamble; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InvoiceDetailRequestServicerequest + */ +public class InvoiceDetailRequestServicerequestTest { + private final InvoiceDetailRequestServicerequest model = new InvoiceDetailRequestServicerequest(); + + /** + * Model tests for InvoiceDetailRequestServicerequest + */ + @Test + public void testInvoiceDetailRequestServicerequest() { + // TODO: test InvoiceDetailRequestServicerequest + } + + /** + * Test the property 'requestpreamble' + */ + @Test + public void requestpreambleTest() { + // TODO: test requestpreamble + } + + /** + * Test the property 'invoicedetailrequest' + */ + @Test + public void invoicedetailrequestTest() { + // TODO: test invoicedetailrequest + } + +} diff --git a/src/test/java/xiresellers/client/model/InvoiceDetailRequestTest.java b/src/test/java/xiresellers/client/model/InvoiceDetailRequestTest.java new file mode 100644 index 00000000..257ce274 --- /dev/null +++ b/src/test/java/xiresellers/client/model/InvoiceDetailRequestTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.InvoiceDetailRequestServicerequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InvoiceDetailRequest + */ +public class InvoiceDetailRequestTest { + private final InvoiceDetailRequest model = new InvoiceDetailRequest(); + + /** + * Model tests for InvoiceDetailRequest + */ + @Test + public void testInvoiceDetailRequest() { + // TODO: test InvoiceDetailRequest + } + + /** + * Test the property 'servicerequest' + */ + @Test + public void servicerequestTest() { + // TODO: test servicerequest + } + +} diff --git a/src/test/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInnerTest.java b/src/test/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInnerTest.java new file mode 100644 index 00000000..7e53ac92 --- /dev/null +++ b/src/test/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInnerTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner + */ +public class InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInnerTest { + private final InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner model = new InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner(); + + /** + * Model tests for InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner + */ + @Test + public void testInvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner() { + // TODO: test InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner + } + + /** + * Test the property 'attributename' + */ + @Test + public void attributenameTest() { + // TODO: test attributename + } + + /** + * Test the property 'attributevalue' + */ + @Test + public void attributevalueTest() { + // TODO: test attributevalue + } + +} diff --git a/src/test/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInnerTest.java b/src/test/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInnerTest.java new file mode 100644 index 00000000..2cb35de2 --- /dev/null +++ b/src/test/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInnerTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner + */ +public class InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInnerTest { + private final InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner model = new InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner(); + + /** + * Model tests for InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner + */ + @Test + public void testInvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner() { + // TODO: test InvoiceDetailResponseServiceresponseInvoicedetailresponseMiscfeelineInner + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'chargeamount' + */ + @Test + public void chargeamountTest() { + // TODO: test chargeamount + } + +} diff --git a/src/test/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseInvoicedetailresponseTest.java b/src/test/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseInvoicedetailresponseTest.java new file mode 100644 index 00000000..505d27a3 --- /dev/null +++ b/src/test/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseInvoicedetailresponseTest.java @@ -0,0 +1,209 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InvoiceDetailResponseServiceresponseInvoicedetailresponse + */ +public class InvoiceDetailResponseServiceresponseInvoicedetailresponseTest { + private final InvoiceDetailResponseServiceresponseInvoicedetailresponse model = new InvoiceDetailResponseServiceresponseInvoicedetailresponse(); + + /** + * Model tests for InvoiceDetailResponseServiceresponseInvoicedetailresponse + */ + @Test + public void testInvoiceDetailResponseServiceresponseInvoicedetailresponse() { + // TODO: test InvoiceDetailResponseServiceresponseInvoicedetailresponse + } + + /** + * Test the property 'customernumber' + */ + @Test + public void customernumberTest() { + // TODO: test customernumber + } + + /** + * Test the property 'invoicenumber' + */ + @Test + public void invoicenumberTest() { + // TODO: test invoicenumber + } + + /** + * Test the property 'invoicedate' + */ + @Test + public void invoicedateTest() { + // TODO: test invoicedate + } + + /** + * Test the property 'invoicetype' + */ + @Test + public void invoicetypeTest() { + // TODO: test invoicetype + } + + /** + * Test the property 'customerordernumber' + */ + @Test + public void customerordernumberTest() { + // TODO: test customerordernumber + } + + /** + * Test the property 'customerfreightamount' + */ + @Test + public void customerfreightamountTest() { + // TODO: test customerfreightamount + } + + /** + * Test the property 'customerforeignfrightamt' + */ + @Test + public void customerforeignfrightamtTest() { + // TODO: test customerforeignfrightamt + } + + /** + * Test the property 'totaltaxamount' + */ + @Test + public void totaltaxamountTest() { + // TODO: test totaltaxamount + } + + /** + * Test the property 'totalamount' + */ + @Test + public void totalamountTest() { + // TODO: test totalamount + } + + /** + * Test the property 'shiptosuffix' + */ + @Test + public void shiptosuffixTest() { + // TODO: test shiptosuffix + } + + /** + * Test the property 'billtosuffix' + */ + @Test + public void billtosuffixTest() { + // TODO: test billtosuffix + } + + /** + * Test the property 'freightamount' + */ + @Test + public void freightamountTest() { + // TODO: test freightamount + } + + /** + * Test the property 'paymentterms' + */ + @Test + public void paymenttermsTest() { + // TODO: test paymentterms + } + + /** + * Test the property 'orderdate' + */ + @Test + public void orderdateTest() { + // TODO: test orderdate + } + + /** + * Test the property 'carrier' + */ + @Test + public void carrierTest() { + // TODO: test carrier + } + + /** + * Test the property 'carrierdescription' + */ + @Test + public void carrierdescriptionTest() { + // TODO: test carrierdescription + } + + /** + * Test the property 'discountamount' + */ + @Test + public void discountamountTest() { + // TODO: test discountamount + } + + /** + * Test the property 'taxtype' + */ + @Test + public void taxtypeTest() { + // TODO: test taxtype + } + + /** + * Test the property 'enduserponumber' + */ + @Test + public void enduserponumberTest() { + // TODO: test enduserponumber + } + + /** + * Test the property 'freightforwardercode' + */ + @Test + public void freightforwardercodeTest() { + // TODO: test freightforwardercode + } + + /** + * Test the property 'creditmemoreasoncode' + */ + @Test + public void creditmemoreasoncodeTest() { + // TODO: test creditmemoreasoncode + } + +} diff --git a/src/test/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseResponsepreambleTest.java b/src/test/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseResponsepreambleTest.java new file mode 100644 index 00000000..cffd7321 --- /dev/null +++ b/src/test/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseResponsepreambleTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InvoiceDetailResponseServiceresponseResponsepreamble + */ +public class InvoiceDetailResponseServiceresponseResponsepreambleTest { + private final InvoiceDetailResponseServiceresponseResponsepreamble model = new InvoiceDetailResponseServiceresponseResponsepreamble(); + + /** + * Model tests for InvoiceDetailResponseServiceresponseResponsepreamble + */ + @Test + public void testInvoiceDetailResponseServiceresponseResponsepreamble() { + // TODO: test InvoiceDetailResponseServiceresponseResponsepreamble + } + + /** + * Test the property 'responsestatus' + */ + @Test + public void responsestatusTest() { + // TODO: test responsestatus + } + + /** + * Test the property 'statuscode' + */ + @Test + public void statuscodeTest() { + // TODO: test statuscode + } + + /** + * Test the property 'responsemessage' + */ + @Test + public void responsemessageTest() { + // TODO: test responsemessage + } + +} diff --git a/src/test/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseTest.java b/src/test/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseTest.java new file mode 100644 index 00000000..1c24b521 --- /dev/null +++ b/src/test/java/xiresellers/client/model/InvoiceDetailResponseServiceresponseTest.java @@ -0,0 +1,58 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.InvoiceDetailResponseServiceresponseInvoicedetailresponse; +import xiresellers.client.model.InvoiceDetailResponseServiceresponseResponsepreamble; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InvoiceDetailResponseServiceresponse + */ +public class InvoiceDetailResponseServiceresponseTest { + private final InvoiceDetailResponseServiceresponse model = new InvoiceDetailResponseServiceresponse(); + + /** + * Model tests for InvoiceDetailResponseServiceresponse + */ + @Test + public void testInvoiceDetailResponseServiceresponse() { + // TODO: test InvoiceDetailResponseServiceresponse + } + + /** + * Test the property 'responsepreamble' + */ + @Test + public void responsepreambleTest() { + // TODO: test responsepreamble + } + + /** + * Test the property 'invoicedetailresponse' + */ + @Test + public void invoicedetailresponseTest() { + // TODO: test invoicedetailresponse + } + +} diff --git a/src/test/java/xiresellers/client/model/InvoiceDetailResponseTest.java b/src/test/java/xiresellers/client/model/InvoiceDetailResponseTest.java new file mode 100644 index 00000000..a2e90989 --- /dev/null +++ b/src/test/java/xiresellers/client/model/InvoiceDetailResponseTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.InvoiceDetailResponseServiceresponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InvoiceDetailResponse + */ +public class InvoiceDetailResponseTest { + private final InvoiceDetailResponse model = new InvoiceDetailResponse(); + + /** + * Model tests for InvoiceDetailResponse + */ + @Test + public void testInvoiceDetailResponse() { + // TODO: test InvoiceDetailResponse + } + + /** + * Test the property 'serviceresponse' + */ + @Test + public void serviceresponseTest() { + // TODO: test serviceresponse + } + +} diff --git a/src/test/java/xiresellers/client/model/InvoiceDetailsTest.java b/src/test/java/xiresellers/client/model/InvoiceDetailsTest.java new file mode 100644 index 00000000..3bd44f8e --- /dev/null +++ b/src/test/java/xiresellers/client/model/InvoiceDetailsTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.InvoiceDetailResponseServiceresponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InvoiceDetails + */ +public class InvoiceDetailsTest { + private final InvoiceDetails model = new InvoiceDetails(); + + /** + * Model tests for InvoiceDetails + */ + @Test + public void testInvoiceDetails() { + // TODO: test InvoiceDetails + } + + /** + * Test the property 'serviceresponse' + */ + @Test + public void serviceresponseTest() { + // TODO: test serviceresponse + } + +} diff --git a/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseBillToInfoTest.java b/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseBillToInfoTest.java new file mode 100644 index 00000000..52df8436 --- /dev/null +++ b/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseBillToInfoTest.java @@ -0,0 +1,128 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InvoiceDetailsv61ResponseBillToInfo + */ +public class InvoiceDetailsv61ResponseBillToInfoTest { + private final InvoiceDetailsv61ResponseBillToInfo model = new InvoiceDetailsv61ResponseBillToInfo(); + + /** + * Model tests for InvoiceDetailsv61ResponseBillToInfo + */ + @Test + public void testInvoiceDetailsv61ResponseBillToInfo() { + // TODO: test InvoiceDetailsv61ResponseBillToInfo + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'addressLine1' + */ + @Test + public void addressLine1Test() { + // TODO: test addressLine1 + } + + /** + * Test the property 'addressLine2' + */ + @Test + public void addressLine2Test() { + // TODO: test addressLine2 + } + + /** + * Test the property 'addressLine3' + */ + @Test + public void addressLine3Test() { + // TODO: test addressLine3 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalCode' + */ + @Test + public void postalCodeTest() { + // TODO: test postalCode + } + + /** + * Test the property 'countryCode' + */ + @Test + public void countryCodeTest() { + // TODO: test countryCode + } + + /** + * Test the property 'phoneNumber' + */ + @Test + public void phoneNumberTest() { + // TODO: test phoneNumber + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + +} diff --git a/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseFxRateInfoTest.java b/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseFxRateInfoTest.java new file mode 100644 index 00000000..00368080 --- /dev/null +++ b/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseFxRateInfoTest.java @@ -0,0 +1,72 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InvoiceDetailsv61ResponseFxRateInfo + */ +public class InvoiceDetailsv61ResponseFxRateInfoTest { + private final InvoiceDetailsv61ResponseFxRateInfo model = new InvoiceDetailsv61ResponseFxRateInfo(); + + /** + * Model tests for InvoiceDetailsv61ResponseFxRateInfo + */ + @Test + public void testInvoiceDetailsv61ResponseFxRateInfo() { + // TODO: test InvoiceDetailsv61ResponseFxRateInfo + } + + /** + * Test the property 'currencyCode' + */ + @Test + public void currencyCodeTest() { + // TODO: test currencyCode + } + + /** + * Test the property 'companyCurrency' + */ + @Test + public void companyCurrencyTest() { + // TODO: test companyCurrency + } + + /** + * Test the property 'invoiceCurrency' + */ + @Test + public void invoiceCurrencyTest() { + // TODO: test invoiceCurrency + } + + /** + * Test the property 'currencyFxRate' + */ + @Test + public void currencyFxRateTest() { + // TODO: test currencyFxRate + } + +} diff --git a/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseLinesInnerSerialNumbersInnerTest.java b/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseLinesInnerSerialNumbersInnerTest.java new file mode 100644 index 00000000..417f68c3 --- /dev/null +++ b/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseLinesInnerSerialNumbersInnerTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner + */ +public class InvoiceDetailsv61ResponseLinesInnerSerialNumbersInnerTest { + private final InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner model = new InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner(); + + /** + * Model tests for InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner + */ + @Test + public void testInvoiceDetailsv61ResponseLinesInnerSerialNumbersInner() { + // TODO: test InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner + } + + /** + * Test the property 'serialNumber' + */ + @Test + public void serialNumberTest() { + // TODO: test serialNumber + } + +} diff --git a/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseLinesInnerTest.java b/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseLinesInnerTest.java new file mode 100644 index 00000000..10bedc44 --- /dev/null +++ b/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseLinesInnerTest.java @@ -0,0 +1,196 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import xiresellers.client.model.InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InvoiceDetailsv61ResponseLinesInner + */ +public class InvoiceDetailsv61ResponseLinesInnerTest { + private final InvoiceDetailsv61ResponseLinesInner model = new InvoiceDetailsv61ResponseLinesInner(); + + /** + * Model tests for InvoiceDetailsv61ResponseLinesInner + */ + @Test + public void testInvoiceDetailsv61ResponseLinesInner() { + // TODO: test InvoiceDetailsv61ResponseLinesInner + } + + /** + * Test the property 'ingramLineNumber' + */ + @Test + public void ingramLineNumberTest() { + // TODO: test ingramLineNumber + } + + /** + * Test the property 'customerLineNumber' + */ + @Test + public void customerLineNumberTest() { + // TODO: test customerLineNumber + } + + /** + * Test the property 'ingramPartNumber' + */ + @Test + public void ingramPartNumberTest() { + // TODO: test ingramPartNumber + } + + /** + * Test the property 'vendorPartNumber' + */ + @Test + public void vendorPartNumberTest() { + // TODO: test vendorPartNumber + } + + /** + * Test the property 'customerPartNumber' + */ + @Test + public void customerPartNumberTest() { + // TODO: test customerPartNumber + } + + /** + * Test the property 'vendorName' + */ + @Test + public void vendorNameTest() { + // TODO: test vendorName + } + + /** + * Test the property 'productDescription' + */ + @Test + public void productDescriptionTest() { + // TODO: test productDescription + } + + /** + * Test the property 'unitWeight' + */ + @Test + public void unitWeightTest() { + // TODO: test unitWeight + } + + /** + * Test the property 'quantity' + */ + @Test + public void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'unitPrice' + */ + @Test + public void unitPriceTest() { + // TODO: test unitPrice + } + + /** + * Test the property 'unitOfMeasure' + */ + @Test + public void unitOfMeasureTest() { + // TODO: test unitOfMeasure + } + + /** + * Test the property 'currencyCode' + */ + @Test + public void currencyCodeTest() { + // TODO: test currencyCode + } + + /** + * Test the property 'extendedPrice' + */ + @Test + public void extendedPriceTest() { + // TODO: test extendedPrice + } + + /** + * Test the property 'taxPercentage' + */ + @Test + public void taxPercentageTest() { + // TODO: test taxPercentage + } + + /** + * Test the property 'taxRate' + */ + @Test + public void taxRateTest() { + // TODO: test taxRate + } + + /** + * Test the property 'taxAmount' + */ + @Test + public void taxAmountTest() { + // TODO: test taxAmount + } + + /** + * Test the property 'serialNumbers' + */ + @Test + public void serialNumbersTest() { + // TODO: test serialNumbers + } + + /** + * Test the property 'quantityOrdered' + */ + @Test + public void quantityOrderedTest() { + // TODO: test quantityOrdered + } + + /** + * Test the property 'quantityShipped' + */ + @Test + public void quantityShippedTest() { + // TODO: test quantityShipped + } + +} diff --git a/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponsePaymentTermsInfoTest.java b/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponsePaymentTermsInfoTest.java new file mode 100644 index 00000000..3472a255 --- /dev/null +++ b/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponsePaymentTermsInfoTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InvoiceDetailsv61ResponsePaymentTermsInfo + */ +public class InvoiceDetailsv61ResponsePaymentTermsInfoTest { + private final InvoiceDetailsv61ResponsePaymentTermsInfo model = new InvoiceDetailsv61ResponsePaymentTermsInfo(); + + /** + * Model tests for InvoiceDetailsv61ResponsePaymentTermsInfo + */ + @Test + public void testInvoiceDetailsv61ResponsePaymentTermsInfo() { + // TODO: test InvoiceDetailsv61ResponsePaymentTermsInfo + } + + /** + * Test the property 'paymentTermsCode' + */ + @Test + public void paymentTermsCodeTest() { + // TODO: test paymentTermsCode + } + + /** + * Test the property 'paymentTermsDescription' + */ + @Test + public void paymentTermsDescriptionTest() { + // TODO: test paymentTermsDescription + } + + /** + * Test the property 'paymentTermsDueDate' + */ + @Test + public void paymentTermsDueDateTest() { + // TODO: test paymentTermsDueDate + } + +} diff --git a/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseShipToInfoTest.java b/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseShipToInfoTest.java new file mode 100644 index 00000000..f1eb7f1c --- /dev/null +++ b/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseShipToInfoTest.java @@ -0,0 +1,128 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InvoiceDetailsv61ResponseShipToInfo + */ +public class InvoiceDetailsv61ResponseShipToInfoTest { + private final InvoiceDetailsv61ResponseShipToInfo model = new InvoiceDetailsv61ResponseShipToInfo(); + + /** + * Model tests for InvoiceDetailsv61ResponseShipToInfo + */ + @Test + public void testInvoiceDetailsv61ResponseShipToInfo() { + // TODO: test InvoiceDetailsv61ResponseShipToInfo + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'addressLine1' + */ + @Test + public void addressLine1Test() { + // TODO: test addressLine1 + } + + /** + * Test the property 'addressLine2' + */ + @Test + public void addressLine2Test() { + // TODO: test addressLine2 + } + + /** + * Test the property 'addressLine3' + */ + @Test + public void addressLine3Test() { + // TODO: test addressLine3 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalCode' + */ + @Test + public void postalCodeTest() { + // TODO: test postalCode + } + + /** + * Test the property 'countryCode' + */ + @Test + public void countryCodeTest() { + // TODO: test countryCode + } + + /** + * Test the property 'phoneNumber' + */ + @Test + public void phoneNumberTest() { + // TODO: test phoneNumber + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + +} diff --git a/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryForeignFxTotalsTest.java b/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryForeignFxTotalsTest.java new file mode 100644 index 00000000..acada8c9 --- /dev/null +++ b/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryForeignFxTotalsTest.java @@ -0,0 +1,80 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InvoiceDetailsv61ResponseSummaryForeignFxTotals + */ +public class InvoiceDetailsv61ResponseSummaryForeignFxTotalsTest { + private final InvoiceDetailsv61ResponseSummaryForeignFxTotals model = new InvoiceDetailsv61ResponseSummaryForeignFxTotals(); + + /** + * Model tests for InvoiceDetailsv61ResponseSummaryForeignFxTotals + */ + @Test + public void testInvoiceDetailsv61ResponseSummaryForeignFxTotals() { + // TODO: test InvoiceDetailsv61ResponseSummaryForeignFxTotals + } + + /** + * Test the property 'foreignCurrencyCode' + */ + @Test + public void foreignCurrencyCodeTest() { + // TODO: test foreignCurrencyCode + } + + /** + * Test the property 'foreignCurrencyFxRate' + */ + @Test + public void foreignCurrencyFxRateTest() { + // TODO: test foreignCurrencyFxRate + } + + /** + * Test the property 'foreignTotalTaxableAmount' + */ + @Test + public void foreignTotalTaxableAmountTest() { + // TODO: test foreignTotalTaxableAmount + } + + /** + * Test the property 'foreignTotalTaxAmount' + */ + @Test + public void foreignTotalTaxAmountTest() { + // TODO: test foreignTotalTaxAmount + } + + /** + * Test the property 'foreignInvoiceAmountDue' + */ + @Test + public void foreignInvoiceAmountDueTest() { + // TODO: test foreignInvoiceAmountDue + } + +} diff --git a/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryLinesTest.java b/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryLinesTest.java new file mode 100644 index 00000000..b7284926 --- /dev/null +++ b/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryLinesTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InvoiceDetailsv61ResponseSummaryLines + */ +public class InvoiceDetailsv61ResponseSummaryLinesTest { + private final InvoiceDetailsv61ResponseSummaryLines model = new InvoiceDetailsv61ResponseSummaryLines(); + + /** + * Model tests for InvoiceDetailsv61ResponseSummaryLines + */ + @Test + public void testInvoiceDetailsv61ResponseSummaryLines() { + // TODO: test InvoiceDetailsv61ResponseSummaryLines + } + + /** + * Test the property 'productLineCount' + */ + @Test + public void productLineCountTest() { + // TODO: test productLineCount + } + + /** + * Test the property 'productLineTotalQuantity' + */ + @Test + public void productLineTotalQuantityTest() { + // TODO: test productLineTotalQuantity + } + +} diff --git a/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryMiscChargesInnerTest.java b/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryMiscChargesInnerTest.java new file mode 100644 index 00000000..623e6473 --- /dev/null +++ b/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryMiscChargesInnerTest.java @@ -0,0 +1,80 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InvoiceDetailsv61ResponseSummaryMiscChargesInner + */ +public class InvoiceDetailsv61ResponseSummaryMiscChargesInnerTest { + private final InvoiceDetailsv61ResponseSummaryMiscChargesInner model = new InvoiceDetailsv61ResponseSummaryMiscChargesInner(); + + /** + * Model tests for InvoiceDetailsv61ResponseSummaryMiscChargesInner + */ + @Test + public void testInvoiceDetailsv61ResponseSummaryMiscChargesInner() { + // TODO: test InvoiceDetailsv61ResponseSummaryMiscChargesInner + } + + /** + * Test the property 'chargeDescription' + */ + @Test + public void chargeDescriptionTest() { + // TODO: test chargeDescription + } + + /** + * Test the property 'miscChargeLineCount' + */ + @Test + public void miscChargeLineCountTest() { + // TODO: test miscChargeLineCount + } + + /** + * Test the property 'miscChargeLineTotal' + */ + @Test + public void miscChargeLineTotalTest() { + // TODO: test miscChargeLineTotal + } + + /** + * Test the property 'chargeLineReference' + */ + @Test + public void chargeLineReferenceTest() { + // TODO: test chargeLineReference + } + + /** + * Test the property 'isNonMisc' + */ + @Test + public void isNonMiscTest() { + // TODO: test isNonMisc + } + +} diff --git a/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryTest.java b/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryTest.java new file mode 100644 index 00000000..5ac521a6 --- /dev/null +++ b/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryTest.java @@ -0,0 +1,79 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import xiresellers.client.model.InvoiceDetailsv61ResponseSummaryForeignFxTotals; +import xiresellers.client.model.InvoiceDetailsv61ResponseSummaryLines; +import xiresellers.client.model.InvoiceDetailsv61ResponseSummaryMiscChargesInner; +import xiresellers.client.model.InvoiceDetailsv61ResponseSummaryTotals; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InvoiceDetailsv61ResponseSummary + */ +public class InvoiceDetailsv61ResponseSummaryTest { + private final InvoiceDetailsv61ResponseSummary model = new InvoiceDetailsv61ResponseSummary(); + + /** + * Model tests for InvoiceDetailsv61ResponseSummary + */ + @Test + public void testInvoiceDetailsv61ResponseSummary() { + // TODO: test InvoiceDetailsv61ResponseSummary + } + + /** + * Test the property 'lines' + */ + @Test + public void linesTest() { + // TODO: test lines + } + + /** + * Test the property 'miscCharges' + */ + @Test + public void miscChargesTest() { + // TODO: test miscCharges + } + + /** + * Test the property 'totals' + */ + @Test + public void totalsTest() { + // TODO: test totals + } + + /** + * Test the property 'foreignFxTotals' + */ + @Test + public void foreignFxTotalsTest() { + // TODO: test foreignFxTotals + } + +} diff --git a/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryTotalsTest.java b/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryTotalsTest.java new file mode 100644 index 00000000..b9d360dc --- /dev/null +++ b/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseSummaryTotalsTest.java @@ -0,0 +1,88 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InvoiceDetailsv61ResponseSummaryTotals + */ +public class InvoiceDetailsv61ResponseSummaryTotalsTest { + private final InvoiceDetailsv61ResponseSummaryTotals model = new InvoiceDetailsv61ResponseSummaryTotals(); + + /** + * Model tests for InvoiceDetailsv61ResponseSummaryTotals + */ + @Test + public void testInvoiceDetailsv61ResponseSummaryTotals() { + // TODO: test InvoiceDetailsv61ResponseSummaryTotals + } + + /** + * Test the property 'netInvoiceAmount' + */ + @Test + public void netInvoiceAmountTest() { + // TODO: test netInvoiceAmount + } + + /** + * Test the property 'discountAmount' + */ + @Test + public void discountAmountTest() { + // TODO: test discountAmount + } + + /** + * Test the property 'discountType' + */ + @Test + public void discountTypeTest() { + // TODO: test discountType + } + + /** + * Test the property 'totalTaxAmount' + */ + @Test + public void totalTaxAmountTest() { + // TODO: test totalTaxAmount + } + + /** + * Test the property 'invoicedAmountDue' + */ + @Test + public void invoicedAmountDueTest() { + // TODO: test invoicedAmountDue + } + + /** + * Test the property 'freightAmount' + */ + @Test + public void freightAmountTest() { + // TODO: test freightAmount + } + +} diff --git a/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseTest.java b/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseTest.java new file mode 100644 index 00000000..00bfbab8 --- /dev/null +++ b/src/test/java/xiresellers/client/model/InvoiceDetailsv61ResponseTest.java @@ -0,0 +1,201 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.InvoiceDetailsv61ResponseBillToInfo; +import xiresellers.client.model.InvoiceDetailsv61ResponseFxRateInfo; +import xiresellers.client.model.InvoiceDetailsv61ResponseLinesInner; +import xiresellers.client.model.InvoiceDetailsv61ResponsePaymentTermsInfo; +import xiresellers.client.model.InvoiceDetailsv61ResponseShipToInfo; +import xiresellers.client.model.InvoiceDetailsv61ResponseSummary; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InvoiceDetailsv61Response + */ +public class InvoiceDetailsv61ResponseTest { + private final InvoiceDetailsv61Response model = new InvoiceDetailsv61Response(); + + /** + * Model tests for InvoiceDetailsv61Response + */ + @Test + public void testInvoiceDetailsv61Response() { + // TODO: test InvoiceDetailsv61Response + } + + /** + * Test the property 'invoiceNumber' + */ + @Test + public void invoiceNumberTest() { + // TODO: test invoiceNumber + } + + /** + * Test the property 'invoiceStatus' + */ + @Test + public void invoiceStatusTest() { + // TODO: test invoiceStatus + } + + /** + * Test the property 'invoiceDate' + */ + @Test + public void invoiceDateTest() { + // TODO: test invoiceDate + } + + /** + * Test the property 'customerOrderNumber' + */ + @Test + public void customerOrderNumberTest() { + // TODO: test customerOrderNumber + } + + /** + * Test the property 'endCustomerOrderNumber' + */ + @Test + public void endCustomerOrderNumberTest() { + // TODO: test endCustomerOrderNumber + } + + /** + * Test the property 'orderDate' + */ + @Test + public void orderDateTest() { + // TODO: test orderDate + } + + /** + * Test the property 'billToID' + */ + @Test + public void billToIDTest() { + // TODO: test billToID + } + + /** + * Test the property 'invoiceType' + */ + @Test + public void invoiceTypeTest() { + // TODO: test invoiceType + } + + /** + * Test the property 'invoiceDueDate' + */ + @Test + public void invoiceDueDateTest() { + // TODO: test invoiceDueDate + } + + /** + * Test the property 'customerCountryCode' + */ + @Test + public void customerCountryCodeTest() { + // TODO: test customerCountryCode + } + + /** + * Test the property 'customerNumber' + */ + @Test + public void customerNumberTest() { + // TODO: test customerNumber + } + + /** + * Test the property 'ingramOrderNumber' + */ + @Test + public void ingramOrderNumberTest() { + // TODO: test ingramOrderNumber + } + + /** + * Test the property 'notes' + */ + @Test + public void notesTest() { + // TODO: test notes + } + + /** + * Test the property 'paymentTermsInfo' + */ + @Test + public void paymentTermsInfoTest() { + // TODO: test paymentTermsInfo + } + + /** + * Test the property 'billToInfo' + */ + @Test + public void billToInfoTest() { + // TODO: test billToInfo + } + + /** + * Test the property 'shipToInfo' + */ + @Test + public void shipToInfoTest() { + // TODO: test shipToInfo + } + + /** + * Test the property 'lines' + */ + @Test + public void linesTest() { + // TODO: test lines + } + + /** + * Test the property 'fxRateInfo' + */ + @Test + public void fxRateInfoTest() { + // TODO: test fxRateInfo + } + + /** + * Test the property 'summary' + */ + @Test + public void summaryTest() { + // TODO: test summary + } + +} diff --git a/src/test/java/xiresellers/client/model/InvoiceSearchResponseInvoicesInnerTest.java b/src/test/java/xiresellers/client/model/InvoiceSearchResponseInvoicesInnerTest.java new file mode 100644 index 00000000..eeb2d050 --- /dev/null +++ b/src/test/java/xiresellers/client/model/InvoiceSearchResponseInvoicesInnerTest.java @@ -0,0 +1,128 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InvoiceSearchResponseInvoicesInner + */ +public class InvoiceSearchResponseInvoicesInnerTest { + private final InvoiceSearchResponseInvoicesInner model = new InvoiceSearchResponseInvoicesInner(); + + /** + * Model tests for InvoiceSearchResponseInvoicesInner + */ + @Test + public void testInvoiceSearchResponseInvoicesInner() { + // TODO: test InvoiceSearchResponseInvoicesInner + } + + /** + * Test the property 'paymentTermsDueDate' + */ + @Test + public void paymentTermsDueDateTest() { + // TODO: test paymentTermsDueDate + } + + /** + * Test the property 'erpOrderNumber' + */ + @Test + public void erpOrderNumberTest() { + // TODO: test erpOrderNumber + } + + /** + * Test the property 'invoiceNumber' + */ + @Test + public void invoiceNumberTest() { + // TODO: test invoiceNumber + } + + /** + * Test the property 'invoiceStatus' + */ + @Test + public void invoiceStatusTest() { + // TODO: test invoiceStatus + } + + /** + * Test the property 'invoiceDate' + */ + @Test + public void invoiceDateTest() { + // TODO: test invoiceDate + } + + /** + * Test the property 'invoiceDueDate' + */ + @Test + public void invoiceDueDateTest() { + // TODO: test invoiceDueDate + } + + /** + * Test the property 'invoicedAmountDue' + */ + @Test + public void invoicedAmountDueTest() { + // TODO: test invoicedAmountDue + } + + /** + * Test the property 'customerOrderNumber' + */ + @Test + public void customerOrderNumberTest() { + // TODO: test customerOrderNumber + } + + /** + * Test the property 'orderCreateDate' + */ + @Test + public void orderCreateDateTest() { + // TODO: test orderCreateDate + } + + /** + * Test the property 'endCustomerOrderNumber' + */ + @Test + public void endCustomerOrderNumberTest() { + // TODO: test endCustomerOrderNumber + } + + /** + * Test the property 'invoiceAmountInclTax' + */ + @Test + public void invoiceAmountInclTaxTest() { + // TODO: test invoiceAmountInclTax + } + +} diff --git a/src/test/java/xiresellers/client/model/InvoiceSearchResponseTest.java b/src/test/java/xiresellers/client/model/InvoiceSearchResponseTest.java new file mode 100644 index 00000000..e0986ce1 --- /dev/null +++ b/src/test/java/xiresellers/client/model/InvoiceSearchResponseTest.java @@ -0,0 +1,83 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.InvoiceSearchResponseInvoicesInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for InvoiceSearchResponse + */ +public class InvoiceSearchResponseTest { + private final InvoiceSearchResponse model = new InvoiceSearchResponse(); + + /** + * Model tests for InvoiceSearchResponse + */ + @Test + public void testInvoiceSearchResponse() { + // TODO: test InvoiceSearchResponse + } + + /** + * Test the property 'recordsFound' + */ + @Test + public void recordsFoundTest() { + // TODO: test recordsFound + } + + /** + * Test the property 'pageSize' + */ + @Test + public void pageSizeTest() { + // TODO: test pageSize + } + + /** + * Test the property 'pageNumber' + */ + @Test + public void pageNumberTest() { + // TODO: test pageNumber + } + + /** + * Test the property 'invoices' + */ + @Test + public void invoicesTest() { + // TODO: test invoices + } + + /** + * Test the property 'nextPage' + */ + @Test + public void nextPageTest() { + // TODO: test nextPage + } + +} diff --git a/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItemTest.java b/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItemTest.java new file mode 100644 index 00000000..ba5eaf5f --- /dev/null +++ b/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItemTest.java @@ -0,0 +1,88 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem + */ +public class MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItemTest { + private final MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem model = new MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem(); + + /** + * Model tests for MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem + */ + @Test + public void testMultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem() { + // TODO: test MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem + } + + /** + * Test the property 'index' + */ + @Test + public void indexTest() { + // TODO: test index + } + + /** + * Test the property 'ingrampartnumber' + */ + @Test + public void ingrampartnumberTest() { + // TODO: test ingrampartnumber + } + + /** + * Test the property 'vendorpartnumber' + */ + @Test + public void vendorpartnumberTest() { + // TODO: test vendorpartnumber + } + + /** + * Test the property 'UPC' + */ + @Test + public void UPCTest() { + // TODO: test UPC + } + + /** + * Test the property 'customerpartnumber' + */ + @Test + public void customerpartnumberTest() { + // TODO: test customerpartnumber + } + + /** + * Test the property 'warehouseidlist' + */ + @Test + public void warehouseidlistTest() { + // TODO: test warehouseidlist + } + +} diff --git a/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestTest.java b/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestTest.java new file mode 100644 index 00000000..8c409358 --- /dev/null +++ b/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestTest.java @@ -0,0 +1,73 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestItem; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest + */ +public class MultiSKUPriceAndStockRequestServicerequestPriceandstockrequestTest { + private final MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest model = new MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest(); + + /** + * Model tests for MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest + */ + @Test + public void testMultiSKUPriceAndStockRequestServicerequestPriceandstockrequest() { + // TODO: test MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest + } + + /** + * Test the property 'showwarehouseavailability' + */ + @Test + public void showwarehouseavailabilityTest() { + // TODO: test showwarehouseavailability + } + + /** + * Test the property 'extravailabilityflag' + */ + @Test + public void extravailabilityflagTest() { + // TODO: test extravailabilityflag + } + + /** + * Test the property 'includeallsystems' + */ + @Test + public void includeallsystemsTest() { + // TODO: test includeallsystems + } + + /** + * Test the property 'item' + */ + @Test + public void itemTest() { + // TODO: test item + } + +} diff --git a/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestRequestpreambleTest.java b/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestRequestpreambleTest.java new file mode 100644 index 00000000..a0fedf24 --- /dev/null +++ b/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestRequestpreambleTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for MultiSKUPriceAndStockRequestServicerequestRequestpreamble + */ +public class MultiSKUPriceAndStockRequestServicerequestRequestpreambleTest { + private final MultiSKUPriceAndStockRequestServicerequestRequestpreamble model = new MultiSKUPriceAndStockRequestServicerequestRequestpreamble(); + + /** + * Model tests for MultiSKUPriceAndStockRequestServicerequestRequestpreamble + */ + @Test + public void testMultiSKUPriceAndStockRequestServicerequestRequestpreamble() { + // TODO: test MultiSKUPriceAndStockRequestServicerequestRequestpreamble + } + + /** + * Test the property 'isocountrycode' + */ + @Test + public void isocountrycodeTest() { + // TODO: test isocountrycode + } + + /** + * Test the property 'customernumber' + */ + @Test + public void customernumberTest() { + // TODO: test customernumber + } + +} diff --git a/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestTest.java b/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestTest.java new file mode 100644 index 00000000..30a9c0c8 --- /dev/null +++ b/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockRequestServicerequestTest.java @@ -0,0 +1,58 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.MultiSKUPriceAndStockRequestServicerequestPriceandstockrequest; +import xiresellers.client.model.MultiSKUPriceAndStockRequestServicerequestRequestpreamble; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for MultiSKUPriceAndStockRequestServicerequest + */ +public class MultiSKUPriceAndStockRequestServicerequestTest { + private final MultiSKUPriceAndStockRequestServicerequest model = new MultiSKUPriceAndStockRequestServicerequest(); + + /** + * Model tests for MultiSKUPriceAndStockRequestServicerequest + */ + @Test + public void testMultiSKUPriceAndStockRequestServicerequest() { + // TODO: test MultiSKUPriceAndStockRequestServicerequest + } + + /** + * Test the property 'requestpreamble' + */ + @Test + public void requestpreambleTest() { + // TODO: test requestpreamble + } + + /** + * Test the property 'priceandstockrequest' + */ + @Test + public void priceandstockrequestTest() { + // TODO: test priceandstockrequest + } + +} diff --git a/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockRequestTest.java b/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockRequestTest.java new file mode 100644 index 00000000..f62e5728 --- /dev/null +++ b/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockRequestTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.MultiSKUPriceAndStockRequestServicerequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for MultiSKUPriceAndStockRequest + */ +public class MultiSKUPriceAndStockRequestTest { + private final MultiSKUPriceAndStockRequest model = new MultiSKUPriceAndStockRequest(); + + /** + * Model tests for MultiSKUPriceAndStockRequest + */ + @Test + public void testMultiSKUPriceAndStockRequest() { + // TODO: test MultiSKUPriceAndStockRequest + } + + /** + * Test the property 'servicerequest' + */ + @Test + public void servicerequestTest() { + // TODO: test servicerequest + } + +} diff --git a/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerTest.java b/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerTest.java new file mode 100644 index 00000000..e7e80ba2 --- /dev/null +++ b/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerTest.java @@ -0,0 +1,220 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner + */ +public class MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerTest { + private final MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner model = new MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner(); + + /** + * Model tests for MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner + */ + @Test + public void testMultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner() { + // TODO: test MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner + } + + /** + * Test the property 'itemstatus' + */ + @Test + public void itemstatusTest() { + // TODO: test itemstatus + } + + /** + * Test the property 'statusmessage' + */ + @Test + public void statusmessageTest() { + // TODO: test statusmessage + } + + /** + * Test the property 'ingrampartnumber' + */ + @Test + public void ingrampartnumberTest() { + // TODO: test ingrampartnumber + } + + /** + * Test the property 'vendorpartnumber' + */ + @Test + public void vendorpartnumberTest() { + // TODO: test vendorpartnumber + } + + /** + * Test the property 'globalskuid' + */ + @Test + public void globalskuidTest() { + // TODO: test globalskuid + } + + /** + * Test the property 'customerprice' + */ + @Test + public void customerpriceTest() { + // TODO: test customerprice + } + + /** + * Test the property 'partdescription1' + */ + @Test + public void partdescription1Test() { + // TODO: test partdescription1 + } + + /** + * Test the property 'partdescription2' + */ + @Test + public void partdescription2Test() { + // TODO: test partdescription2 + } + + /** + * Test the property 'vendornumber' + */ + @Test + public void vendornumberTest() { + // TODO: test vendornumber + } + + /** + * Test the property 'vendorname' + */ + @Test + public void vendornameTest() { + // TODO: test vendorname + } + + /** + * Test the property 'cpucode' + */ + @Test + public void cpucodeTest() { + // TODO: test cpucode + } + + /** + * Test the property 'propertyClass' + */ + @Test + public void propertyClassTest() { + // TODO: test propertyClass + } + + /** + * Test the property 'skustatus' + */ + @Test + public void skustatusTest() { + // TODO: test skustatus + } + + /** + * Test the property 'mediacpu' + */ + @Test + public void mediacpuTest() { + // TODO: test mediacpu + } + + /** + * Test the property 'categorysubcategory' + */ + @Test + public void categorysubcategoryTest() { + // TODO: test categorysubcategory + } + + /** + * Test the property 'retailprice' + */ + @Test + public void retailpriceTest() { + // TODO: test retailprice + } + + /** + * Test the property 'newmedia' + */ + @Test + public void newmediaTest() { + // TODO: test newmedia + } + + /** + * Test the property 'enduserrequired' + */ + @Test + public void enduserrequiredTest() { + // TODO: test enduserrequired + } + + /** + * Test the property 'backorderflag' + */ + @Test + public void backorderflagTest() { + // TODO: test backorderflag + } + + /** + * Test the property 'skuauthorized' + */ + @Test + public void skuauthorizedTest() { + // TODO: test skuauthorized + } + + /** + * Test the property 'extendedvendorpartnumber' + */ + @Test + public void extendedvendorpartnumberTest() { + // TODO: test extendedvendorpartnumber + } + + /** + * Test the property 'warehousedetails' + */ + @Test + public void warehousedetailsTest() { + // TODO: test warehousedetails + } + +} diff --git a/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInnerTest.java b/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInnerTest.java new file mode 100644 index 00000000..c452c779 --- /dev/null +++ b/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInnerTest.java @@ -0,0 +1,88 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner + */ +public class MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInnerTest { + private final MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner model = new MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner(); + + /** + * Model tests for MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner + */ + @Test + public void testMultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner() { + // TODO: test MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInnerWarehousedetailsInner + } + + /** + * Test the property 'warehouseid' + */ + @Test + public void warehouseidTest() { + // TODO: test warehouseid + } + + /** + * Test the property 'warehousedescription' + */ + @Test + public void warehousedescriptionTest() { + // TODO: test warehousedescription + } + + /** + * Test the property 'availablequantity' + */ + @Test + public void availablequantityTest() { + // TODO: test availablequantity + } + + /** + * Test the property 'onorderquantity' + */ + @Test + public void onorderquantityTest() { + // TODO: test onorderquantity + } + + /** + * Test the property 'onholdquantity' + */ + @Test + public void onholdquantityTest() { + // TODO: test onholdquantity + } + + /** + * Test the property 'etadate' + */ + @Test + public void etadateTest() { + // TODO: test etadate + } + +} diff --git a/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseTest.java b/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseTest.java new file mode 100644 index 00000000..55cbca2a --- /dev/null +++ b/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseTest.java @@ -0,0 +1,51 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseDetailsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse + */ +public class MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponseTest { + private final MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse model = new MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse(); + + /** + * Model tests for MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse + */ + @Test + public void testMultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse() { + // TODO: test MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse + } + + /** + * Test the property 'details' + */ + @Test + public void detailsTest() { + // TODO: test details + } + +} diff --git a/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponseTest.java b/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponseTest.java new file mode 100644 index 00000000..37a18ff5 --- /dev/null +++ b/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockResponseServiceresponseTest.java @@ -0,0 +1,58 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.MultiSKUPriceAndStockResponseServiceresponsePriceandstockresponse; +import xiresellers.client.model.PriceAndAvailabilityResponseServiceresponseResponsepreamble; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for MultiSKUPriceAndStockResponseServiceresponse + */ +public class MultiSKUPriceAndStockResponseServiceresponseTest { + private final MultiSKUPriceAndStockResponseServiceresponse model = new MultiSKUPriceAndStockResponseServiceresponse(); + + /** + * Model tests for MultiSKUPriceAndStockResponseServiceresponse + */ + @Test + public void testMultiSKUPriceAndStockResponseServiceresponse() { + // TODO: test MultiSKUPriceAndStockResponseServiceresponse + } + + /** + * Test the property 'responsepreamble' + */ + @Test + public void responsepreambleTest() { + // TODO: test responsepreamble + } + + /** + * Test the property 'priceandstockresponse' + */ + @Test + public void priceandstockresponseTest() { + // TODO: test priceandstockresponse + } + +} diff --git a/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockResponseTest.java b/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockResponseTest.java new file mode 100644 index 00000000..3514ca09 --- /dev/null +++ b/src/test/java/xiresellers/client/model/MultiSKUPriceAndStockResponseTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.MultiSKUPriceAndStockResponseServiceresponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for MultiSKUPriceAndStockResponse + */ +public class MultiSKUPriceAndStockResponseTest { + private final MultiSKUPriceAndStockResponse model = new MultiSKUPriceAndStockResponse(); + + /** + * Model tests for MultiSKUPriceAndStockResponse + */ + @Test + public void testMultiSKUPriceAndStockResponse() { + // TODO: test MultiSKUPriceAndStockResponse + } + + /** + * Test the property 'serviceresponse' + */ + @Test + public void serviceresponseTest() { + // TODO: test serviceresponse + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCancelResponseServiceresponseResponsepreambleTest.java b/src/test/java/xiresellers/client/model/OrderCancelResponseServiceresponseResponsepreambleTest.java new file mode 100644 index 00000000..33bb4207 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCancelResponseServiceresponseResponsepreambleTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCancelResponseServiceresponseResponsepreamble + */ +public class OrderCancelResponseServiceresponseResponsepreambleTest { + private final OrderCancelResponseServiceresponseResponsepreamble model = new OrderCancelResponseServiceresponseResponsepreamble(); + + /** + * Model tests for OrderCancelResponseServiceresponseResponsepreamble + */ + @Test + public void testOrderCancelResponseServiceresponseResponsepreamble() { + // TODO: test OrderCancelResponseServiceresponseResponsepreamble + } + + /** + * Test the property 'requestStatus' + */ + @Test + public void requestStatusTest() { + // TODO: test requestStatus + } + + /** + * Test the property 'returnCode' + */ + @Test + public void returnCodeTest() { + // TODO: test returnCode + } + + /** + * Test the property 'returnMessage' + */ + @Test + public void returnMessageTest() { + // TODO: test returnMessage + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCancelResponseServiceresponseTest.java b/src/test/java/xiresellers/client/model/OrderCancelResponseServiceresponseTest.java new file mode 100644 index 00000000..461bc9d6 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCancelResponseServiceresponseTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderCancelResponseServiceresponseResponsepreamble; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCancelResponseServiceresponse + */ +public class OrderCancelResponseServiceresponseTest { + private final OrderCancelResponseServiceresponse model = new OrderCancelResponseServiceresponse(); + + /** + * Model tests for OrderCancelResponseServiceresponse + */ + @Test + public void testOrderCancelResponseServiceresponse() { + // TODO: test OrderCancelResponseServiceresponse + } + + /** + * Test the property 'responsepreamble' + */ + @Test + public void responsepreambleTest() { + // TODO: test responsepreamble + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCancelResponseTest.java b/src/test/java/xiresellers/client/model/OrderCancelResponseTest.java new file mode 100644 index 00000000..791e54de --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCancelResponseTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderCancelResponseServiceresponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCancelResponse + */ +public class OrderCancelResponseTest { + private final OrderCancelResponse model = new OrderCancelResponse(); + + /** + * Model tests for OrderCancelResponse + */ + @Test + public void testOrderCancelResponse() { + // TODO: test OrderCancelResponse + } + + /** + * Test the property 'serviceresponse' + */ + @Test + public void serviceresponseTest() { + // TODO: test serviceresponse + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateRequestAdditionalAttributesInnerTest.java b/src/test/java/xiresellers/client/model/OrderCreateRequestAdditionalAttributesInnerTest.java new file mode 100644 index 00000000..f4d60c5e --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateRequestAdditionalAttributesInnerTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateRequestAdditionalAttributesInner + */ +public class OrderCreateRequestAdditionalAttributesInnerTest { + private final OrderCreateRequestAdditionalAttributesInner model = new OrderCreateRequestAdditionalAttributesInner(); + + /** + * Model tests for OrderCreateRequestAdditionalAttributesInner + */ + @Test + public void testOrderCreateRequestAdditionalAttributesInner() { + // TODO: test OrderCreateRequestAdditionalAttributesInner + } + + /** + * Test the property 'attributeName' + */ + @Test + public void attributeNameTest() { + // TODO: test attributeName + } + + /** + * Test the property 'attributeValue' + */ + @Test + public void attributeValueTest() { + // TODO: test attributeValue + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateRequestEndUserInfoTest.java b/src/test/java/xiresellers/client/model/OrderCreateRequestEndUserInfoTest.java new file mode 100644 index 00000000..36af5c0a --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateRequestEndUserInfoTest.java @@ -0,0 +1,160 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateRequestEndUserInfo + */ +public class OrderCreateRequestEndUserInfoTest { + private final OrderCreateRequestEndUserInfo model = new OrderCreateRequestEndUserInfo(); + + /** + * Model tests for OrderCreateRequestEndUserInfo + */ + @Test + public void testOrderCreateRequestEndUserInfo() { + // TODO: test OrderCreateRequestEndUserInfo + } + + /** + * Test the property 'endUserId' + */ + @Test + public void endUserIdTest() { + // TODO: test endUserId + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'name1' + */ + @Test + public void name1Test() { + // TODO: test name1 + } + + /** + * Test the property 'name2' + */ + @Test + public void name2Test() { + // TODO: test name2 + } + + /** + * Test the property 'addressLine1' + */ + @Test + public void addressLine1Test() { + // TODO: test addressLine1 + } + + /** + * Test the property 'addressLine2' + */ + @Test + public void addressLine2Test() { + // TODO: test addressLine2 + } + + /** + * Test the property 'addressLine3' + */ + @Test + public void addressLine3Test() { + // TODO: test addressLine3 + } + + /** + * Test the property 'addressLine4' + */ + @Test + public void addressLine4Test() { + // TODO: test addressLine4 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalCode' + */ + @Test + public void postalCodeTest() { + // TODO: test postalCode + } + + /** + * Test the property 'countryCode' + */ + @Test + public void countryCodeTest() { + // TODO: test countryCode + } + + /** + * Test the property 'phoneNumber' + */ + @Test + public void phoneNumberTest() { + // TODO: test phoneNumber + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateRequestLinesInnerAdditionalAttributesInnerTest.java b/src/test/java/xiresellers/client/model/OrderCreateRequestLinesInnerAdditionalAttributesInnerTest.java new file mode 100644 index 00000000..01f41bf5 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateRequestLinesInnerAdditionalAttributesInnerTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateRequestLinesInnerAdditionalAttributesInner + */ +public class OrderCreateRequestLinesInnerAdditionalAttributesInnerTest { + private final OrderCreateRequestLinesInnerAdditionalAttributesInner model = new OrderCreateRequestLinesInnerAdditionalAttributesInner(); + + /** + * Model tests for OrderCreateRequestLinesInnerAdditionalAttributesInner + */ + @Test + public void testOrderCreateRequestLinesInnerAdditionalAttributesInner() { + // TODO: test OrderCreateRequestLinesInnerAdditionalAttributesInner + } + + /** + * Test the property 'attributeName' + */ + @Test + public void attributeNameTest() { + // TODO: test attributeName + } + + /** + * Test the property 'attributeValue' + */ + @Test + public void attributeValueTest() { + // TODO: test attributeValue + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateRequestLinesInnerEndUserInfoInnerTest.java b/src/test/java/xiresellers/client/model/OrderCreateRequestLinesInnerEndUserInfoInnerTest.java new file mode 100644 index 00000000..d4237435 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateRequestLinesInnerEndUserInfoInnerTest.java @@ -0,0 +1,169 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateRequestLinesInnerEndUserInfoInner + */ +public class OrderCreateRequestLinesInnerEndUserInfoInnerTest { + private final OrderCreateRequestLinesInnerEndUserInfoInner model = new OrderCreateRequestLinesInnerEndUserInfoInner(); + + /** + * Model tests for OrderCreateRequestLinesInnerEndUserInfoInner + */ + @Test + public void testOrderCreateRequestLinesInnerEndUserInfoInner() { + // TODO: test OrderCreateRequestLinesInnerEndUserInfoInner + } + + /** + * Test the property 'endUserType' + */ + @Test + public void endUserTypeTest() { + // TODO: test endUserType + } + + /** + * Test the property 'endUserId' + */ + @Test + public void endUserIdTest() { + // TODO: test endUserId + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'name1' + */ + @Test + public void name1Test() { + // TODO: test name1 + } + + /** + * Test the property 'name2' + */ + @Test + public void name2Test() { + // TODO: test name2 + } + + /** + * Test the property 'addressLine1' + */ + @Test + public void addressLine1Test() { + // TODO: test addressLine1 + } + + /** + * Test the property 'addressLine2' + */ + @Test + public void addressLine2Test() { + // TODO: test addressLine2 + } + + /** + * Test the property 'addressLine3' + */ + @Test + public void addressLine3Test() { + // TODO: test addressLine3 + } + + /** + * Test the property 'addressLine4' + */ + @Test + public void addressLine4Test() { + // TODO: test addressLine4 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalCode' + */ + @Test + public void postalCodeTest() { + // TODO: test postalCode + } + + /** + * Test the property 'countryCode' + */ + @Test + public void countryCodeTest() { + // TODO: test countryCode + } + + /** + * Test the property 'phoneNumber' + */ + @Test + public void phoneNumberTest() { + // TODO: test phoneNumber + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateRequestLinesInnerTest.java b/src/test/java/xiresellers/client/model/OrderCreateRequestLinesInnerTest.java new file mode 100644 index 00000000..243bf4c1 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateRequestLinesInnerTest.java @@ -0,0 +1,126 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderCreateRequestLinesInnerAdditionalAttributesInner; +import xiresellers.client.model.OrderCreateRequestLinesInnerEndUserInfoInner; +import xiresellers.client.model.OrderCreateRequestLinesInnerWarrantyInfoInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateRequestLinesInner + */ +public class OrderCreateRequestLinesInnerTest { + private final OrderCreateRequestLinesInner model = new OrderCreateRequestLinesInner(); + + /** + * Model tests for OrderCreateRequestLinesInner + */ + @Test + public void testOrderCreateRequestLinesInner() { + // TODO: test OrderCreateRequestLinesInner + } + + /** + * Test the property 'customerLineNumber' + */ + @Test + public void customerLineNumberTest() { + // TODO: test customerLineNumber + } + + /** + * Test the property 'ingramPartNumber' + */ + @Test + public void ingramPartNumberTest() { + // TODO: test ingramPartNumber + } + + /** + * Test the property 'quantity' + */ + @Test + public void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'specialBidNumber' + */ + @Test + public void specialBidNumberTest() { + // TODO: test specialBidNumber + } + + /** + * Test the property 'notes' + */ + @Test + public void notesTest() { + // TODO: test notes + } + + /** + * Test the property 'unitPrice' + */ + @Test + public void unitPriceTest() { + // TODO: test unitPrice + } + + /** + * Test the property 'endUserPrice' + */ + @Test + public void endUserPriceTest() { + // TODO: test endUserPrice + } + + /** + * Test the property 'additionalAttributes' + */ + @Test + public void additionalAttributesTest() { + // TODO: test additionalAttributes + } + + /** + * Test the property 'warrantyInfo' + */ + @Test + public void warrantyInfoTest() { + // TODO: test warrantyInfo + } + + /** + * Test the property 'endUserInfo' + */ + @Test + public void endUserInfoTest() { + // TODO: test endUserInfo + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInnerTest.java b/src/test/java/xiresellers/client/model/OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInnerTest.java new file mode 100644 index 00000000..c303e3e3 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInnerTest.java @@ -0,0 +1,73 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner + */ +public class OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInnerTest { + private final OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner model = new OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner(); + + /** + * Model tests for OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner + */ + @Test + public void testOrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner() { + // TODO: test OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner + } + + /** + * Test the property 'dateofPurchase' + */ + @Test + public void dateofPurchaseTest() { + // TODO: test dateofPurchase + } + + /** + * Test the property 'shipDate' + */ + @Test + public void shipDateTest() { + // TODO: test shipDate + } + + /** + * Test the property 'primarySerialNumber' + */ + @Test + public void primarySerialNumberTest() { + // TODO: test primarySerialNumber + } + + /** + * Test the property 'secondarySerialNumber' + */ + @Test + public void secondarySerialNumberTest() { + // TODO: test secondarySerialNumber + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateRequestLinesInnerWarrantyInfoInnerTest.java b/src/test/java/xiresellers/client/model/OrderCreateRequestLinesInnerWarrantyInfoInnerTest.java new file mode 100644 index 00000000..ba4a1ca8 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateRequestLinesInnerWarrantyInfoInnerTest.java @@ -0,0 +1,75 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateRequestLinesInnerWarrantyInfoInner + */ +public class OrderCreateRequestLinesInnerWarrantyInfoInnerTest { + private final OrderCreateRequestLinesInnerWarrantyInfoInner model = new OrderCreateRequestLinesInnerWarrantyInfoInner(); + + /** + * Model tests for OrderCreateRequestLinesInnerWarrantyInfoInner + */ + @Test + public void testOrderCreateRequestLinesInnerWarrantyInfoInner() { + // TODO: test OrderCreateRequestLinesInnerWarrantyInfoInner + } + + /** + * Test the property 'directLineLink' + */ + @Test + public void directLineLinkTest() { + // TODO: test directLineLink + } + + /** + * Test the property 'warrantyLineLink' + */ + @Test + public void warrantyLineLinkTest() { + // TODO: test warrantyLineLink + } + + /** + * Test the property 'hardwareLineLink' + */ + @Test + public void hardwareLineLinkTest() { + // TODO: test hardwareLineLink + } + + /** + * Test the property 'serialInfo' + */ + @Test + public void serialInfoTest() { + // TODO: test serialInfo + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInnerTest.java b/src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInnerTest.java new file mode 100644 index 00000000..f7ca9ced --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInnerTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner + */ +public class OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInnerTest { + private final OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner model = new OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner(); + + /** + * Model tests for OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner + */ + @Test + public void testOrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner() { + // TODO: test OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner + } + + /** + * Test the property 'attributename' + */ + @Test + public void attributenameTest() { + // TODO: test attributename + } + + /** + * Test the property 'attributevalue' + */ + @Test + public void attributevalueTest() { + // TODO: test attributevalue + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduserTest.java b/src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduserTest.java new file mode 100644 index 00000000..ad6fd6df --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduserTest.java @@ -0,0 +1,136 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser + */ +public class OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduserTest { + private final OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser model = new OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser(); + + /** + * Model tests for OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser + */ + @Test + public void testOrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser() { + // TODO: test OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'addressline1' + */ + @Test + public void addressline1Test() { + // TODO: test addressline1 + } + + /** + * Test the property 'addressline2' + */ + @Test + public void addressline2Test() { + // TODO: test addressline2 + } + + /** + * Test the property 'addressline3' + */ + @Test + public void addressline3Test() { + // TODO: test addressline3 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalcode' + */ + @Test + public void postalcodeTest() { + // TODO: test postalcode + } + + /** + * Test the property 'countrycode' + */ + @Test + public void countrycodeTest() { + // TODO: test countrycode + } + + /** + * Test the property 'phonenumber' + */ + @Test + public void phonenumberTest() { + // TODO: test phonenumber + } + + /** + * Test the property 'extensionnumber' + */ + @Test + public void extensionnumberTest() { + // TODO: test extensionnumber + } + + /** + * Test the property 'faxnumber' + */ + @Test + public void faxnumberTest() { + // TODO: test faxnumber + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInnerTest.java b/src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInnerTest.java new file mode 100644 index 00000000..6449c055 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInnerTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner + */ +public class OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInnerTest { + private final OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner model = new OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner(); + + /** + * Model tests for OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner + */ + @Test + public void testOrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner() { + // TODO: test OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner + } + + /** + * Test the property 'attributename' + */ + @Test + public void attributenameTest() { + // TODO: test attributename + } + + /** + * Test the property 'attributevalue' + */ + @Test + public void attributevalueTest() { + // TODO: test attributevalue + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerTest.java b/src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerTest.java new file mode 100644 index 00000000..fc606ae1 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerTest.java @@ -0,0 +1,132 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerEnduser; +import xiresellers.client.model.OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerProductextendedspecsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner + */ +public class OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInnerTest { + private final OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner model = new OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner(); + + /** + * Model tests for OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner + */ + @Test + public void testOrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner() { + // TODO: test OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner + } + + /** + * Test the property 'linetype' + */ + @Test + public void linetypeTest() { + // TODO: test linetype + } + + /** + * Test the property 'linenumber' + */ + @Test + public void linenumberTest() { + // TODO: test linenumber + } + + /** + * Test the property 'ingrampartnumber' + */ + @Test + public void ingrampartnumberTest() { + // TODO: test ingrampartnumber + } + + /** + * Test the property 'quantity' + */ + @Test + public void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'vendorpartnumber' + */ + @Test + public void vendorpartnumberTest() { + // TODO: test vendorpartnumber + } + + /** + * Test the property 'customerpartnumber' + */ + @Test + public void customerpartnumberTest() { + // TODO: test customerpartnumber + } + + /** + * Test the property 'upCCode' + */ + @Test + public void upCCodeTest() { + // TODO: test upCCode + } + + /** + * Test the property 'warehouseid' + */ + @Test + public void warehouseidTest() { + // TODO: test warehouseid + } + + /** + * Test the property 'unitprice' + */ + @Test + public void unitpriceTest() { + // TODO: test unitprice + } + + /** + * Test the property 'enduser' + */ + @Test + public void enduserTest() { + // TODO: test enduser + } + + /** + * Test the property 'productextendedspecs' + */ + @Test + public void productextendedspecsTest() { + // TODO: test productextendedspecs + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddressTest.java b/src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddressTest.java new file mode 100644 index 00000000..0b8d9866 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddressTest.java @@ -0,0 +1,104 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress + */ +public class OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddressTest { + private final OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress model = new OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress(); + + /** + * Model tests for OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress + */ + @Test + public void testOrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress() { + // TODO: test OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress + } + + /** + * Test the property 'attention' + */ + @Test + public void attentionTest() { + // TODO: test attention + } + + /** + * Test the property 'addressline1' + */ + @Test + public void addressline1Test() { + // TODO: test addressline1 + } + + /** + * Test the property 'addressline2' + */ + @Test + public void addressline2Test() { + // TODO: test addressline2 + } + + /** + * Test the property 'addressline3' + */ + @Test + public void addressline3Test() { + // TODO: test addressline3 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalcode' + */ + @Test + public void postalcodeTest() { + // TODO: test postalcode + } + + /** + * Test the property 'countrycode' + */ + @Test + public void countrycodeTest() { + // TODO: test countrycode + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsTest.java b/src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsTest.java new file mode 100644 index 00000000..c43bc429 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestOrdercreatedetailsTest.java @@ -0,0 +1,133 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderCreateRequestOrdercreaterequestOrdercreatedetailsExtendedspecsInner; +import xiresellers.client.model.OrderCreateRequestOrdercreaterequestOrdercreatedetailsLinesInner; +import xiresellers.client.model.OrderCreateRequestOrdercreaterequestOrdercreatedetailsShiptoaddress; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateRequestOrdercreaterequestOrdercreatedetails + */ +public class OrderCreateRequestOrdercreaterequestOrdercreatedetailsTest { + private final OrderCreateRequestOrdercreaterequestOrdercreatedetails model = new OrderCreateRequestOrdercreaterequestOrdercreatedetails(); + + /** + * Model tests for OrderCreateRequestOrdercreaterequestOrdercreatedetails + */ + @Test + public void testOrderCreateRequestOrdercreaterequestOrdercreatedetails() { + // TODO: test OrderCreateRequestOrdercreaterequestOrdercreatedetails + } + + /** + * Test the property 'customerponumber' + */ + @Test + public void customerponumberTest() { + // TODO: test customerponumber + } + + /** + * Test the property 'ordertype' + */ + @Test + public void ordertypeTest() { + // TODO: test ordertype + } + + /** + * Test the property 'enduserordernumber' + */ + @Test + public void enduserordernumberTest() { + // TODO: test enduserordernumber + } + + /** + * Test the property 'billtosuffix' + */ + @Test + public void billtosuffixTest() { + // TODO: test billtosuffix + } + + /** + * Test the property 'shiptosuffix' + */ + @Test + public void shiptosuffixTest() { + // TODO: test shiptosuffix + } + + /** + * Test the property 'shiptoaddress' + */ + @Test + public void shiptoaddressTest() { + // TODO: test shiptoaddress + } + + /** + * Test the property 'carriercode' + */ + @Test + public void carriercodeTest() { + // TODO: test carriercode + } + + /** + * Test the property 'thirdpartyfreightaccountnumber' + */ + @Test + public void thirdpartyfreightaccountnumberTest() { + // TODO: test thirdpartyfreightaccountnumber + } + + /** + * Test the property 'specialbidnumber' + */ + @Test + public void specialbidnumberTest() { + // TODO: test specialbidnumber + } + + /** + * Test the property 'lines' + */ + @Test + public void linesTest() { + // TODO: test lines + } + + /** + * Test the property 'extendedspecs' + */ + @Test + public void extendedspecsTest() { + // TODO: test extendedspecs + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestRequestpreambleTest.java b/src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestRequestpreambleTest.java new file mode 100644 index 00000000..d3c100ed --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestRequestpreambleTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateRequestOrdercreaterequestRequestpreamble + */ +public class OrderCreateRequestOrdercreaterequestRequestpreambleTest { + private final OrderCreateRequestOrdercreaterequestRequestpreamble model = new OrderCreateRequestOrdercreaterequestRequestpreamble(); + + /** + * Model tests for OrderCreateRequestOrdercreaterequestRequestpreamble + */ + @Test + public void testOrderCreateRequestOrdercreaterequestRequestpreamble() { + // TODO: test OrderCreateRequestOrdercreaterequestRequestpreamble + } + + /** + * Test the property 'isocountrycode' + */ + @Test + public void isocountrycodeTest() { + // TODO: test isocountrycode + } + + /** + * Test the property 'customernumber' + */ + @Test + public void customernumberTest() { + // TODO: test customernumber + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestTest.java b/src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestTest.java new file mode 100644 index 00000000..d41075ba --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateRequestOrdercreaterequestTest.java @@ -0,0 +1,58 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderCreateRequestOrdercreaterequestOrdercreatedetails; +import xiresellers.client.model.OrderCreateRequestOrdercreaterequestRequestpreamble; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateRequestOrdercreaterequest + */ +public class OrderCreateRequestOrdercreaterequestTest { + private final OrderCreateRequestOrdercreaterequest model = new OrderCreateRequestOrdercreaterequest(); + + /** + * Model tests for OrderCreateRequestOrdercreaterequest + */ + @Test + public void testOrderCreateRequestOrdercreaterequest() { + // TODO: test OrderCreateRequestOrdercreaterequest + } + + /** + * Test the property 'requestpreamble' + */ + @Test + public void requestpreambleTest() { + // TODO: test requestpreamble + } + + /** + * Test the property 'ordercreatedetails' + */ + @Test + public void ordercreatedetailsTest() { + // TODO: test ordercreatedetails + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateRequestResellerInfoTest.java b/src/test/java/xiresellers/client/model/OrderCreateRequestResellerInfoTest.java new file mode 100644 index 00000000..4a3cd0be --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateRequestResellerInfoTest.java @@ -0,0 +1,136 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateRequestResellerInfo + */ +public class OrderCreateRequestResellerInfoTest { + private final OrderCreateRequestResellerInfo model = new OrderCreateRequestResellerInfo(); + + /** + * Model tests for OrderCreateRequestResellerInfo + */ + @Test + public void testOrderCreateRequestResellerInfo() { + // TODO: test OrderCreateRequestResellerInfo + } + + /** + * Test the property 'resellerId' + */ + @Test + public void resellerIdTest() { + // TODO: test resellerId + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'addressLine1' + */ + @Test + public void addressLine1Test() { + // TODO: test addressLine1 + } + + /** + * Test the property 'addressLine2' + */ + @Test + public void addressLine2Test() { + // TODO: test addressLine2 + } + + /** + * Test the property 'addressLine3' + */ + @Test + public void addressLine3Test() { + // TODO: test addressLine3 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalCode' + */ + @Test + public void postalCodeTest() { + // TODO: test postalCode + } + + /** + * Test the property 'countryCode' + */ + @Test + public void countryCodeTest() { + // TODO: test countryCode + } + + /** + * Test the property 'phoneNumber' + */ + @Test + public void phoneNumberTest() { + // TODO: test phoneNumber + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateRequestShipToInfoTest.java b/src/test/java/xiresellers/client/model/OrderCreateRequestShipToInfoTest.java new file mode 100644 index 00000000..5640812b --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateRequestShipToInfoTest.java @@ -0,0 +1,160 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateRequestShipToInfo + */ +public class OrderCreateRequestShipToInfoTest { + private final OrderCreateRequestShipToInfo model = new OrderCreateRequestShipToInfo(); + + /** + * Model tests for OrderCreateRequestShipToInfo + */ + @Test + public void testOrderCreateRequestShipToInfo() { + // TODO: test OrderCreateRequestShipToInfo + } + + /** + * Test the property 'addressId' + */ + @Test + public void addressIdTest() { + // TODO: test addressId + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'name1' + */ + @Test + public void name1Test() { + // TODO: test name1 + } + + /** + * Test the property 'name2' + */ + @Test + public void name2Test() { + // TODO: test name2 + } + + /** + * Test the property 'addressLine1' + */ + @Test + public void addressLine1Test() { + // TODO: test addressLine1 + } + + /** + * Test the property 'addressLine2' + */ + @Test + public void addressLine2Test() { + // TODO: test addressLine2 + } + + /** + * Test the property 'addressLine3' + */ + @Test + public void addressLine3Test() { + // TODO: test addressLine3 + } + + /** + * Test the property 'addressLine4' + */ + @Test + public void addressLine4Test() { + // TODO: test addressLine4 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalCode' + */ + @Test + public void postalCodeTest() { + // TODO: test postalCode + } + + /** + * Test the property 'countryCode' + */ + @Test + public void countryCodeTest() { + // TODO: test countryCode + } + + /** + * Test the property 'phoneNumber' + */ + @Test + public void phoneNumberTest() { + // TODO: test phoneNumber + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateRequestShipmentDetailsTest.java b/src/test/java/xiresellers/client/model/OrderCreateRequestShipmentDetailsTest.java new file mode 100644 index 00000000..b5012586 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateRequestShipmentDetailsTest.java @@ -0,0 +1,89 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateRequestShipmentDetails + */ +public class OrderCreateRequestShipmentDetailsTest { + private final OrderCreateRequestShipmentDetails model = new OrderCreateRequestShipmentDetails(); + + /** + * Model tests for OrderCreateRequestShipmentDetails + */ + @Test + public void testOrderCreateRequestShipmentDetails() { + // TODO: test OrderCreateRequestShipmentDetails + } + + /** + * Test the property 'carrierCode' + */ + @Test + public void carrierCodeTest() { + // TODO: test carrierCode + } + + /** + * Test the property 'freightAccountNumber' + */ + @Test + public void freightAccountNumberTest() { + // TODO: test freightAccountNumber + } + + /** + * Test the property 'shipComplete' + */ + @Test + public void shipCompleteTest() { + // TODO: test shipComplete + } + + /** + * Test the property 'requestedDeliveryDate' + */ + @Test + public void requestedDeliveryDateTest() { + // TODO: test requestedDeliveryDate + } + + /** + * Test the property 'signatureRequired' + */ + @Test + public void signatureRequiredTest() { + // TODO: test signatureRequired + } + + /** + * Test the property 'shippingInstructions' + */ + @Test + public void shippingInstructionsTest() { + // TODO: test shippingInstructions + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateRequestTest.java b/src/test/java/xiresellers/client/model/OrderCreateRequestTest.java new file mode 100644 index 00000000..4d36a51b --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateRequestTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderCreateRequestOrdercreaterequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateRequest + */ +public class OrderCreateRequestTest { + private final OrderCreateRequest model = new OrderCreateRequest(); + + /** + * Model tests for OrderCreateRequest + */ + @Test + public void testOrderCreateRequest() { + // TODO: test OrderCreateRequest + } + + /** + * Test the property 'ordercreaterequest' + */ + @Test + public void ordercreaterequestTest() { + // TODO: test ordercreaterequest + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateRequestVmfTest.java b/src/test/java/xiresellers/client/model/OrderCreateRequestVmfTest.java new file mode 100644 index 00000000..05afd65a --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateRequestVmfTest.java @@ -0,0 +1,48 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateRequestVmf + */ +public class OrderCreateRequestVmfTest { + private final OrderCreateRequestVmf model = new OrderCreateRequestVmf(); + + /** + * Model tests for OrderCreateRequestVmf + */ + @Test + public void testOrderCreateRequestVmf() { + // TODO: test OrderCreateRequestVmf + } + + /** + * Test the property 'vendAuthNumber' + */ + @Test + public void vendAuthNumberTest() { + // TODO: test vendAuthNumber + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateResponseEndUserInfoTest.java b/src/test/java/xiresellers/client/model/OrderCreateResponseEndUserInfoTest.java new file mode 100644 index 00000000..a3d3307e --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateResponseEndUserInfoTest.java @@ -0,0 +1,160 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateResponseEndUserInfo + */ +public class OrderCreateResponseEndUserInfoTest { + private final OrderCreateResponseEndUserInfo model = new OrderCreateResponseEndUserInfo(); + + /** + * Model tests for OrderCreateResponseEndUserInfo + */ + @Test + public void testOrderCreateResponseEndUserInfo() { + // TODO: test OrderCreateResponseEndUserInfo + } + + /** + * Test the property 'endUserId' + */ + @Test + public void endUserIdTest() { + // TODO: test endUserId + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'name1' + */ + @Test + public void name1Test() { + // TODO: test name1 + } + + /** + * Test the property 'name2' + */ + @Test + public void name2Test() { + // TODO: test name2 + } + + /** + * Test the property 'addressLine1' + */ + @Test + public void addressLine1Test() { + // TODO: test addressLine1 + } + + /** + * Test the property 'addressLine2' + */ + @Test + public void addressLine2Test() { + // TODO: test addressLine2 + } + + /** + * Test the property 'addressLine3' + */ + @Test + public void addressLine3Test() { + // TODO: test addressLine3 + } + + /** + * Test the property 'addressLine4' + */ + @Test + public void addressLine4Test() { + // TODO: test addressLine4 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalCode' + */ + @Test + public void postalCodeTest() { + // TODO: test postalCode + } + + /** + * Test the property 'countryCode' + */ + @Test + public void countryCodeTest() { + // TODO: test countryCode + } + + /** + * Test the property 'phoneNumber' + */ + @Test + public void phoneNumberTest() { + // TODO: test phoneNumber + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerAdditionalAttributesInnerTest.java b/src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerAdditionalAttributesInnerTest.java new file mode 100644 index 00000000..baccac2c --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerAdditionalAttributesInnerTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateResponseOrdersInnerAdditionalAttributesInner + */ +public class OrderCreateResponseOrdersInnerAdditionalAttributesInnerTest { + private final OrderCreateResponseOrdersInnerAdditionalAttributesInner model = new OrderCreateResponseOrdersInnerAdditionalAttributesInner(); + + /** + * Model tests for OrderCreateResponseOrdersInnerAdditionalAttributesInner + */ + @Test + public void testOrderCreateResponseOrdersInnerAdditionalAttributesInner() { + // TODO: test OrderCreateResponseOrdersInnerAdditionalAttributesInner + } + + /** + * Test the property 'attributeName' + */ + @Test + public void attributeNameTest() { + // TODO: test attributeName + } + + /** + * Test the property 'attributeValue' + */ + @Test + public void attributeValueTest() { + // TODO: test attributeValue + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInnerTest.java b/src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInnerTest.java new file mode 100644 index 00000000..e8452ed1 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInnerTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner + */ +public class OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInnerTest { + private final OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner model = new OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner(); + + /** + * Model tests for OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner + */ + @Test + public void testOrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner() { + // TODO: test OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner + } + + /** + * Test the property 'attributeName' + */ + @Test + public void attributeNameTest() { + // TODO: test attributeName + } + + /** + * Test the property 'attributeValue' + */ + @Test + public void attributeValueTest() { + // TODO: test attributeValue + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInnerTest.java b/src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInnerTest.java new file mode 100644 index 00000000..33d9964f --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInnerTest.java @@ -0,0 +1,96 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner + */ +public class OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInnerTest { + private final OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner model = new OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner(); + + /** + * Model tests for OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner + */ + @Test + public void testOrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner() { + // TODO: test OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner + } + + /** + * Test the property 'carrierCode' + */ + @Test + public void carrierCodeTest() { + // TODO: test carrierCode + } + + /** + * Test the property 'carrierName' + */ + @Test + public void carrierNameTest() { + // TODO: test carrierName + } + + /** + * Test the property 'shipFromWarehouseId' + */ + @Test + public void shipFromWarehouseIdTest() { + // TODO: test shipFromWarehouseId + } + + /** + * Test the property 'shipFromLocation' + */ + @Test + public void shipFromLocationTest() { + // TODO: test shipFromLocation + } + + /** + * Test the property 'freightAccountNumber' + */ + @Test + public void freightAccountNumberTest() { + // TODO: test freightAccountNumber + } + + /** + * Test the property 'signatureRequired' + */ + @Test + public void signatureRequiredTest() { + // TODO: test signatureRequired + } + + /** + * Test the property 'shippingInstructions' + */ + @Test + public void shippingInstructionsTest() { + // TODO: test shippingInstructions + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinesInnerTest.java b/src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinesInnerTest.java new file mode 100644 index 00000000..f09fc6a0 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinesInnerTest.java @@ -0,0 +1,165 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner; +import xiresellers.client.model.OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateResponseOrdersInnerLinesInner + */ +public class OrderCreateResponseOrdersInnerLinesInnerTest { + private final OrderCreateResponseOrdersInnerLinesInner model = new OrderCreateResponseOrdersInnerLinesInner(); + + /** + * Model tests for OrderCreateResponseOrdersInnerLinesInner + */ + @Test + public void testOrderCreateResponseOrdersInnerLinesInner() { + // TODO: test OrderCreateResponseOrdersInnerLinesInner + } + + /** + * Test the property 'subOrderNumber' + */ + @Test + public void subOrderNumberTest() { + // TODO: test subOrderNumber + } + + /** + * Test the property 'ingramLineNumber' + */ + @Test + public void ingramLineNumberTest() { + // TODO: test ingramLineNumber + } + + /** + * Test the property 'customerLineNumber' + */ + @Test + public void customerLineNumberTest() { + // TODO: test customerLineNumber + } + + /** + * Test the property 'lineStatus' + */ + @Test + public void lineStatusTest() { + // TODO: test lineStatus + } + + /** + * Test the property 'ingramPartNumber' + */ + @Test + public void ingramPartNumberTest() { + // TODO: test ingramPartNumber + } + + /** + * Test the property 'vendorPartNumber' + */ + @Test + public void vendorPartNumberTest() { + // TODO: test vendorPartNumber + } + + /** + * Test the property 'unitPrice' + */ + @Test + public void unitPriceTest() { + // TODO: test unitPrice + } + + /** + * Test the property 'extendedUnitPrice' + */ + @Test + public void extendedUnitPriceTest() { + // TODO: test extendedUnitPrice + } + + /** + * Test the property 'quantityOrdered' + */ + @Test + public void quantityOrderedTest() { + // TODO: test quantityOrdered + } + + /** + * Test the property 'quantityConfirmed' + */ + @Test + public void quantityConfirmedTest() { + // TODO: test quantityConfirmed + } + + /** + * Test the property 'quantityBackOrdered' + */ + @Test + public void quantityBackOrderedTest() { + // TODO: test quantityBackOrdered + } + + /** + * Test the property 'specialBidNumber' + */ + @Test + public void specialBidNumberTest() { + // TODO: test specialBidNumber + } + + /** + * Test the property 'notes' + */ + @Test + public void notesTest() { + // TODO: test notes + } + + /** + * Test the property 'shipmentDetails' + */ + @Test + public void shipmentDetailsTest() { + // TODO: test shipmentDetails + } + + /** + * Test the property 'additionalAttributes' + */ + @Test + public void additionalAttributesTest() { + // TODO: test additionalAttributes + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinksInnerTest.java b/src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinksInnerTest.java new file mode 100644 index 00000000..c3aa0f6a --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerLinksInnerTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateResponseOrdersInnerLinksInner + */ +public class OrderCreateResponseOrdersInnerLinksInnerTest { + private final OrderCreateResponseOrdersInnerLinksInner model = new OrderCreateResponseOrdersInnerLinksInner(); + + /** + * Model tests for OrderCreateResponseOrdersInnerLinksInner + */ + @Test + public void testOrderCreateResponseOrdersInnerLinksInner() { + // TODO: test OrderCreateResponseOrdersInnerLinksInner + } + + /** + * Test the property 'topic' + */ + @Test + public void topicTest() { + // TODO: test topic + } + + /** + * Test the property 'href' + */ + @Test + public void hrefTest() { + // TODO: test href + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerMiscellaneousChargesInnerTest.java b/src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerMiscellaneousChargesInnerTest.java new file mode 100644 index 00000000..e788f8f8 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerMiscellaneousChargesInnerTest.java @@ -0,0 +1,73 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateResponseOrdersInnerMiscellaneousChargesInner + */ +public class OrderCreateResponseOrdersInnerMiscellaneousChargesInnerTest { + private final OrderCreateResponseOrdersInnerMiscellaneousChargesInner model = new OrderCreateResponseOrdersInnerMiscellaneousChargesInner(); + + /** + * Model tests for OrderCreateResponseOrdersInnerMiscellaneousChargesInner + */ + @Test + public void testOrderCreateResponseOrdersInnerMiscellaneousChargesInner() { + // TODO: test OrderCreateResponseOrdersInnerMiscellaneousChargesInner + } + + /** + * Test the property 'subOrderNumber' + */ + @Test + public void subOrderNumberTest() { + // TODO: test subOrderNumber + } + + /** + * Test the property 'chargeLineReference' + */ + @Test + public void chargeLineReferenceTest() { + // TODO: test chargeLineReference + } + + /** + * Test the property 'chargeDescription' + */ + @Test + public void chargeDescriptionTest() { + // TODO: test chargeDescription + } + + /** + * Test the property 'chargeAmount' + */ + @Test + public void chargeAmountTest() { + // TODO: test chargeAmount + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerRejectedLineItemsInnerTest.java b/src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerRejectedLineItemsInnerTest.java new file mode 100644 index 00000000..13de992b --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerRejectedLineItemsInnerTest.java @@ -0,0 +1,88 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateResponseOrdersInnerRejectedLineItemsInner + */ +public class OrderCreateResponseOrdersInnerRejectedLineItemsInnerTest { + private final OrderCreateResponseOrdersInnerRejectedLineItemsInner model = new OrderCreateResponseOrdersInnerRejectedLineItemsInner(); + + /** + * Model tests for OrderCreateResponseOrdersInnerRejectedLineItemsInner + */ + @Test + public void testOrderCreateResponseOrdersInnerRejectedLineItemsInner() { + // TODO: test OrderCreateResponseOrdersInnerRejectedLineItemsInner + } + + /** + * Test the property 'customerLinenumber' + */ + @Test + public void customerLinenumberTest() { + // TODO: test customerLinenumber + } + + /** + * Test the property 'ingramPartNumber' + */ + @Test + public void ingramPartNumberTest() { + // TODO: test ingramPartNumber + } + + /** + * Test the property 'vendorPartNumber' + */ + @Test + public void vendorPartNumberTest() { + // TODO: test vendorPartNumber + } + + /** + * Test the property 'quantityOrdered' + */ + @Test + public void quantityOrderedTest() { + // TODO: test quantityOrdered + } + + /** + * Test the property 'rejectCode' + */ + @Test + public void rejectCodeTest() { + // TODO: test rejectCode + } + + /** + * Test the property 'rejectReason' + */ + @Test + public void rejectReasonTest() { + // TODO: test rejectReason + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerTest.java b/src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerTest.java new file mode 100644 index 00000000..6f236b74 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateResponseOrdersInnerTest.java @@ -0,0 +1,176 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderCreateResponseOrdersInnerAdditionalAttributesInner; +import xiresellers.client.model.OrderCreateResponseOrdersInnerLinesInner; +import xiresellers.client.model.OrderCreateResponseOrdersInnerLinksInner; +import xiresellers.client.model.OrderCreateResponseOrdersInnerMiscellaneousChargesInner; +import xiresellers.client.model.OrderCreateResponseOrdersInnerRejectedLineItemsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateResponseOrdersInner + */ +public class OrderCreateResponseOrdersInnerTest { + private final OrderCreateResponseOrdersInner model = new OrderCreateResponseOrdersInner(); + + /** + * Model tests for OrderCreateResponseOrdersInner + */ + @Test + public void testOrderCreateResponseOrdersInner() { + // TODO: test OrderCreateResponseOrdersInner + } + + /** + * Test the property 'numberOfLinesWithSuccess' + */ + @Test + public void numberOfLinesWithSuccessTest() { + // TODO: test numberOfLinesWithSuccess + } + + /** + * Test the property 'numberOfLinesWithError' + */ + @Test + public void numberOfLinesWithErrorTest() { + // TODO: test numberOfLinesWithError + } + + /** + * Test the property 'numberOfLinesWithWarning' + */ + @Test + public void numberOfLinesWithWarningTest() { + // TODO: test numberOfLinesWithWarning + } + + /** + * Test the property 'ingramOrderNumber' + */ + @Test + public void ingramOrderNumberTest() { + // TODO: test ingramOrderNumber + } + + /** + * Test the property 'ingramOrderDate' + */ + @Test + public void ingramOrderDateTest() { + // TODO: test ingramOrderDate + } + + /** + * Test the property 'notes' + */ + @Test + public void notesTest() { + // TODO: test notes + } + + /** + * Test the property 'orderType' + */ + @Test + public void orderTypeTest() { + // TODO: test orderType + } + + /** + * Test the property 'orderTotal' + */ + @Test + public void orderTotalTest() { + // TODO: test orderTotal + } + + /** + * Test the property 'freightCharges' + */ + @Test + public void freightChargesTest() { + // TODO: test freightCharges + } + + /** + * Test the property 'totalTax' + */ + @Test + public void totalTaxTest() { + // TODO: test totalTax + } + + /** + * Test the property 'currencyCode' + */ + @Test + public void currencyCodeTest() { + // TODO: test currencyCode + } + + /** + * Test the property 'lines' + */ + @Test + public void linesTest() { + // TODO: test lines + } + + /** + * Test the property 'miscellaneousCharges' + */ + @Test + public void miscellaneousChargesTest() { + // TODO: test miscellaneousCharges + } + + /** + * Test the property 'links' + */ + @Test + public void linksTest() { + // TODO: test links + } + + /** + * Test the property 'rejectedLineItems' + */ + @Test + public void rejectedLineItemsTest() { + // TODO: test rejectedLineItems + } + + /** + * Test the property 'additionalAttributes' + */ + @Test + public void additionalAttributesTest() { + // TODO: test additionalAttributes + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInnerTest.java b/src/test/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInnerTest.java new file mode 100644 index 00000000..fd1b6084 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInnerTest.java @@ -0,0 +1,161 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner + */ +public class OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInnerTest { + private final OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner model = new OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner(); + + /** + * Model tests for OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner + */ + @Test + public void testOrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner() { + // TODO: test OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner + } + + /** + * Test the property 'linetype' + */ + @Test + public void linetypeTest() { + // TODO: test linetype + } + + /** + * Test the property 'globallinenumber' + */ + @Test + public void globallinenumberTest() { + // TODO: test globallinenumber + } + + /** + * Test the property 'partnumber' + */ + @Test + public void partnumberTest() { + // TODO: test partnumber + } + + /** + * Test the property 'globalskuid' + */ + @Test + public void globalskuidTest() { + // TODO: test globalskuid + } + + /** + * Test the property 'linenumber' + */ + @Test + public void linenumberTest() { + // TODO: test linenumber + } + + /** + * Test the property 'carriercode' + */ + @Test + public void carriercodeTest() { + // TODO: test carriercode + } + + /** + * Test the property 'carrierdescription' + */ + @Test + public void carrierdescriptionTest() { + // TODO: test carrierdescription + } + + /** + * Test the property 'requestedunitprice' + */ + @Test + public void requestedunitpriceTest() { + // TODO: test requestedunitprice + } + + /** + * Test the property 'requestedquantity' + */ + @Test + public void requestedquantityTest() { + // TODO: test requestedquantity + } + + /** + * Test the property 'confirmedquantity' + */ + @Test + public void confirmedquantityTest() { + // TODO: test confirmedquantity + } + + /** + * Test the property 'backorderedquantity' + */ + @Test + public void backorderedquantityTest() { + // TODO: test backorderedquantity + } + + /** + * Test the property 'unitproductprice' + */ + @Test + public void unitproductpriceTest() { + // TODO: test unitproductprice + } + + /** + * Test the property 'netamount' + */ + @Test + public void netamountTest() { + // TODO: test netamount + } + + /** + * Test the property 'warehouseid' + */ + @Test + public void warehouseidTest() { + // TODO: test warehouseid + } + + /** + * Test the property 'ordersuffix' + */ + @Test + public void ordersuffixTest() { + // TODO: test ordersuffix + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdercreateresponseInnerTest.java b/src/test/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdercreateresponseInnerTest.java new file mode 100644 index 00000000..9f6be32f --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdercreateresponseInnerTest.java @@ -0,0 +1,132 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderCreateResponseServiceresponseOrdercreateresponseInnerLinesInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateResponseServiceresponseOrdercreateresponseInner + */ +public class OrderCreateResponseServiceresponseOrdercreateresponseInnerTest { + private final OrderCreateResponseServiceresponseOrdercreateresponseInner model = new OrderCreateResponseServiceresponseOrdercreateresponseInner(); + + /** + * Model tests for OrderCreateResponseServiceresponseOrdercreateresponseInner + */ + @Test + public void testOrderCreateResponseServiceresponseOrdercreateresponseInner() { + // TODO: test OrderCreateResponseServiceresponseOrdercreateresponseInner + } + + /** + * Test the property 'numberoflineswithsuccess' + */ + @Test + public void numberoflineswithsuccessTest() { + // TODO: test numberoflineswithsuccess + } + + /** + * Test the property 'numberoflineswitherror' + */ + @Test + public void numberoflineswitherrorTest() { + // TODO: test numberoflineswitherror + } + + /** + * Test the property 'numberoflineswithwarning' + */ + @Test + public void numberoflineswithwarningTest() { + // TODO: test numberoflineswithwarning + } + + /** + * Test the property 'globalorderid' + */ + @Test + public void globalorderidTest() { + // TODO: test globalorderid + } + + /** + * Test the property 'ordertype' + */ + @Test + public void ordertypeTest() { + // TODO: test ordertype + } + + /** + * Test the property 'ordertimestamp' + */ + @Test + public void ordertimestampTest() { + // TODO: test ordertimestamp + } + + /** + * Test the property 'invoicingsystemorderid' + */ + @Test + public void invoicingsystemorderidTest() { + // TODO: test invoicingsystemorderid + } + + /** + * Test the property 'taxamount' + */ + @Test + public void taxamountTest() { + // TODO: test taxamount + } + + /** + * Test the property 'freightamount' + */ + @Test + public void freightamountTest() { + // TODO: test freightamount + } + + /** + * Test the property 'orderamount' + */ + @Test + public void orderamountTest() { + // TODO: test orderamount + } + + /** + * Test the property 'lines' + */ + @Test + public void linesTest() { + // TODO: test lines + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdersummaryShiptoaddressTest.java b/src/test/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdersummaryShiptoaddressTest.java new file mode 100644 index 00000000..f5591e18 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdersummaryShiptoaddressTest.java @@ -0,0 +1,112 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateResponseServiceresponseOrdersummaryShiptoaddress + */ +public class OrderCreateResponseServiceresponseOrdersummaryShiptoaddressTest { + private final OrderCreateResponseServiceresponseOrdersummaryShiptoaddress model = new OrderCreateResponseServiceresponseOrdersummaryShiptoaddress(); + + /** + * Model tests for OrderCreateResponseServiceresponseOrdersummaryShiptoaddress + */ + @Test + public void testOrderCreateResponseServiceresponseOrdersummaryShiptoaddress() { + // TODO: test OrderCreateResponseServiceresponseOrdersummaryShiptoaddress + } + + /** + * Test the property 'attention' + */ + @Test + public void attentionTest() { + // TODO: test attention + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'addressline1' + */ + @Test + public void addressline1Test() { + // TODO: test addressline1 + } + + /** + * Test the property 'addressline2' + */ + @Test + public void addressline2Test() { + // TODO: test addressline2 + } + + /** + * Test the property 'addressline3' + */ + @Test + public void addressline3Test() { + // TODO: test addressline3 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalcode' + */ + @Test + public void postalcodeTest() { + // TODO: test postalcode + } + + /** + * Test the property 'countrycode' + */ + @Test + public void countrycodeTest() { + // TODO: test countrycode + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdersummaryTest.java b/src/test/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdersummaryTest.java new file mode 100644 index 00000000..b174456e --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateResponseServiceresponseOrdersummaryTest.java @@ -0,0 +1,73 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderCreateResponseServiceresponseOrdersummaryShiptoaddress; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateResponseServiceresponseOrdersummary + */ +public class OrderCreateResponseServiceresponseOrdersummaryTest { + private final OrderCreateResponseServiceresponseOrdersummary model = new OrderCreateResponseServiceresponseOrdersummary(); + + /** + * Model tests for OrderCreateResponseServiceresponseOrdersummary + */ + @Test + public void testOrderCreateResponseServiceresponseOrdersummary() { + // TODO: test OrderCreateResponseServiceresponseOrdersummary + } + + /** + * Test the property 'customerponumber' + */ + @Test + public void customerponumberTest() { + // TODO: test customerponumber + } + + /** + * Test the property 'totalorderamount' + */ + @Test + public void totalorderamountTest() { + // TODO: test totalorderamount + } + + /** + * Test the property 'totalordercreated' + */ + @Test + public void totalordercreatedTest() { + // TODO: test totalordercreated + } + + /** + * Test the property 'shiptoaddress' + */ + @Test + public void shiptoaddressTest() { + // TODO: test shiptoaddress + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateResponseServiceresponseTest.java b/src/test/java/xiresellers/client/model/OrderCreateResponseServiceresponseTest.java new file mode 100644 index 00000000..de817eea --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateResponseServiceresponseTest.java @@ -0,0 +1,69 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.InvoiceDetailResponseServiceresponseResponsepreamble; +import xiresellers.client.model.OrderCreateResponseServiceresponseOrdercreateresponseInner; +import xiresellers.client.model.OrderCreateResponseServiceresponseOrdersummary; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateResponseServiceresponse + */ +public class OrderCreateResponseServiceresponseTest { + private final OrderCreateResponseServiceresponse model = new OrderCreateResponseServiceresponse(); + + /** + * Model tests for OrderCreateResponseServiceresponse + */ + @Test + public void testOrderCreateResponseServiceresponse() { + // TODO: test OrderCreateResponseServiceresponse + } + + /** + * Test the property 'responsepreamble' + */ + @Test + public void responsepreambleTest() { + // TODO: test responsepreamble + } + + /** + * Test the property 'ordersummary' + */ + @Test + public void ordersummaryTest() { + // TODO: test ordersummary + } + + /** + * Test the property 'ordercreateresponse' + */ + @Test + public void ordercreateresponseTest() { + // TODO: test ordercreateresponse + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateResponseShipToInfoTest.java b/src/test/java/xiresellers/client/model/OrderCreateResponseShipToInfoTest.java new file mode 100644 index 00000000..b93370d3 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateResponseShipToInfoTest.java @@ -0,0 +1,160 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateResponseShipToInfo + */ +public class OrderCreateResponseShipToInfoTest { + private final OrderCreateResponseShipToInfo model = new OrderCreateResponseShipToInfo(); + + /** + * Model tests for OrderCreateResponseShipToInfo + */ + @Test + public void testOrderCreateResponseShipToInfo() { + // TODO: test OrderCreateResponseShipToInfo + } + + /** + * Test the property 'addressId' + */ + @Test + public void addressIdTest() { + // TODO: test addressId + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'name1' + */ + @Test + public void name1Test() { + // TODO: test name1 + } + + /** + * Test the property 'name2' + */ + @Test + public void name2Test() { + // TODO: test name2 + } + + /** + * Test the property 'addressLine1' + */ + @Test + public void addressLine1Test() { + // TODO: test addressLine1 + } + + /** + * Test the property 'addressLine2' + */ + @Test + public void addressLine2Test() { + // TODO: test addressLine2 + } + + /** + * Test the property 'addressLine3' + */ + @Test + public void addressLine3Test() { + // TODO: test addressLine3 + } + + /** + * Test the property 'addressLine4' + */ + @Test + public void addressLine4Test() { + // TODO: test addressLine4 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalCode' + */ + @Test + public void postalCodeTest() { + // TODO: test postalCode + } + + /** + * Test the property 'countryCode' + */ + @Test + public void countryCodeTest() { + // TODO: test countryCode + } + + /** + * Test the property 'phoneNumber' + */ + @Test + public void phoneNumberTest() { + // TODO: test phoneNumber + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderCreateResponseTest.java b/src/test/java/xiresellers/client/model/OrderCreateResponseTest.java new file mode 100644 index 00000000..d5edaee8 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderCreateResponseTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderCreateResponseServiceresponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderCreateResponse + */ +public class OrderCreateResponseTest { + private final OrderCreateResponse model = new OrderCreateResponse(); + + /** + * Model tests for OrderCreateResponse + */ + @Test + public void testOrderCreateResponse() { + // TODO: test OrderCreateResponse + } + + /** + * Test the property 'serviceresponse' + */ + @Test + public void serviceresponseTest() { + // TODO: test serviceresponse + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDeleteRequestServicerequestOrderDeleteRequestDetailsTest.java b/src/test/java/xiresellers/client/model/OrderDeleteRequestServicerequestOrderDeleteRequestDetailsTest.java new file mode 100644 index 00000000..2345696f --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDeleteRequestServicerequestOrderDeleteRequestDetailsTest.java @@ -0,0 +1,96 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDeleteRequestServicerequestOrderDeleteRequestDetails + */ +public class OrderDeleteRequestServicerequestOrderDeleteRequestDetailsTest { + private final OrderDeleteRequestServicerequestOrderDeleteRequestDetails model = new OrderDeleteRequestServicerequestOrderDeleteRequestDetails(); + + /** + * Model tests for OrderDeleteRequestServicerequestOrderDeleteRequestDetails + */ + @Test + public void testOrderDeleteRequestServicerequestOrderDeleteRequestDetails() { + // TODO: test OrderDeleteRequestServicerequestOrderDeleteRequestDetails + } + + /** + * Test the property 'entryDate' + */ + @Test + public void entryDateTest() { + // TODO: test entryDate + } + + /** + * Test the property 'orderBranch' + */ + @Test + public void orderBranchTest() { + // TODO: test orderBranch + } + + /** + * Test the property 'orderNumber' + */ + @Test + public void orderNumberTest() { + // TODO: test orderNumber + } + + /** + * Test the property 'rejectionCode' + */ + @Test + public void rejectionCodeTest() { + // TODO: test rejectionCode + } + + /** + * Test the property 'distributionNumber' + */ + @Test + public void distributionNumberTest() { + // TODO: test distributionNumber + } + + /** + * Test the property 'shipmentNumber' + */ + @Test + public void shipmentNumberTest() { + // TODO: test shipmentNumber + } + + /** + * Test the property 'operatorID' + */ + @Test + public void operatorIDTest() { + // TODO: test operatorID + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDeleteRequestServicerequestRequestpreambleTest.java b/src/test/java/xiresellers/client/model/OrderDeleteRequestServicerequestRequestpreambleTest.java new file mode 100644 index 00000000..2bba7242 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDeleteRequestServicerequestRequestpreambleTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDeleteRequestServicerequestRequestpreamble + */ +public class OrderDeleteRequestServicerequestRequestpreambleTest { + private final OrderDeleteRequestServicerequestRequestpreamble model = new OrderDeleteRequestServicerequestRequestpreamble(); + + /** + * Model tests for OrderDeleteRequestServicerequestRequestpreamble + */ + @Test + public void testOrderDeleteRequestServicerequestRequestpreamble() { + // TODO: test OrderDeleteRequestServicerequestRequestpreamble + } + + /** + * Test the property 'isocountrycode' + */ + @Test + public void isocountrycodeTest() { + // TODO: test isocountrycode + } + + /** + * Test the property 'customerNumber' + */ + @Test + public void customerNumberTest() { + // TODO: test customerNumber + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDeleteRequestServicerequestTest.java b/src/test/java/xiresellers/client/model/OrderDeleteRequestServicerequestTest.java new file mode 100644 index 00000000..b2a13c00 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDeleteRequestServicerequestTest.java @@ -0,0 +1,58 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderDeleteRequestServicerequestOrderDeleteRequestDetails; +import xiresellers.client.model.OrderDeleteRequestServicerequestRequestpreamble; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDeleteRequestServicerequest + */ +public class OrderDeleteRequestServicerequestTest { + private final OrderDeleteRequestServicerequest model = new OrderDeleteRequestServicerequest(); + + /** + * Model tests for OrderDeleteRequestServicerequest + */ + @Test + public void testOrderDeleteRequestServicerequest() { + // TODO: test OrderDeleteRequestServicerequest + } + + /** + * Test the property 'requestpreamble' + */ + @Test + public void requestpreambleTest() { + // TODO: test requestpreamble + } + + /** + * Test the property 'orderDeleteRequestDetails' + */ + @Test + public void orderDeleteRequestDetailsTest() { + // TODO: test orderDeleteRequestDetails + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDeleteRequestTest.java b/src/test/java/xiresellers/client/model/OrderDeleteRequestTest.java new file mode 100644 index 00000000..d77ffe6b --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDeleteRequestTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderDeleteRequestServicerequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDeleteRequest + */ +public class OrderDeleteRequestTest { + private final OrderDeleteRequest model = new OrderDeleteRequest(); + + /** + * Model tests for OrderDeleteRequest + */ + @Test + public void testOrderDeleteRequest() { + // TODO: test OrderDeleteRequest + } + + /** + * Test the property 'servicerequest' + */ + @Test + public void servicerequestTest() { + // TODO: test servicerequest + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDeleteResponseTest.java b/src/test/java/xiresellers/client/model/OrderDeleteResponseTest.java new file mode 100644 index 00000000..8b2bae97 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDeleteResponseTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderCancelResponseServiceresponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDeleteResponse + */ +public class OrderDeleteResponseTest { + private final OrderDeleteResponse model = new OrderDeleteResponse(); + + /** + * Model tests for OrderDeleteResponse + */ + @Test + public void testOrderDeleteResponse() { + // TODO: test OrderDeleteResponse + } + + /** + * Test the property 'serviceresponse' + */ + @Test + public void serviceresponseTest() { + // TODO: test serviceresponse + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailB2BAdditionalAttributesInnerTest.java b/src/test/java/xiresellers/client/model/OrderDetailB2BAdditionalAttributesInnerTest.java new file mode 100644 index 00000000..93b15b2b --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailB2BAdditionalAttributesInnerTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailB2BAdditionalAttributesInner + */ +public class OrderDetailB2BAdditionalAttributesInnerTest { + private final OrderDetailB2BAdditionalAttributesInner model = new OrderDetailB2BAdditionalAttributesInner(); + + /** + * Model tests for OrderDetailB2BAdditionalAttributesInner + */ + @Test + public void testOrderDetailB2BAdditionalAttributesInner() { + // TODO: test OrderDetailB2BAdditionalAttributesInner + } + + /** + * Test the property 'attributeName' + */ + @Test + public void attributeNameTest() { + // TODO: test attributeName + } + + /** + * Test the property 'attributeValue' + */ + @Test + public void attributeValueTest() { + // TODO: test attributeValue + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailB2BBillToInfoTest.java b/src/test/java/xiresellers/client/model/OrderDetailB2BBillToInfoTest.java new file mode 100644 index 00000000..050f9b3e --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailB2BBillToInfoTest.java @@ -0,0 +1,128 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailB2BBillToInfo + */ +public class OrderDetailB2BBillToInfoTest { + private final OrderDetailB2BBillToInfo model = new OrderDetailB2BBillToInfo(); + + /** + * Model tests for OrderDetailB2BBillToInfo + */ + @Test + public void testOrderDetailB2BBillToInfo() { + // TODO: test OrderDetailB2BBillToInfo + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'addressLine1' + */ + @Test + public void addressLine1Test() { + // TODO: test addressLine1 + } + + /** + * Test the property 'addressLine2' + */ + @Test + public void addressLine2Test() { + // TODO: test addressLine2 + } + + /** + * Test the property 'addressLine3' + */ + @Test + public void addressLine3Test() { + // TODO: test addressLine3 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalCode' + */ + @Test + public void postalCodeTest() { + // TODO: test postalCode + } + + /** + * Test the property 'countryCode' + */ + @Test + public void countryCodeTest() { + // TODO: test countryCode + } + + /** + * Test the property 'phoneNumber' + */ + @Test + public void phoneNumberTest() { + // TODO: test phoneNumber + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailB2BEndUserInfoTest.java b/src/test/java/xiresellers/client/model/OrderDetailB2BEndUserInfoTest.java new file mode 100644 index 00000000..aa509e11 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailB2BEndUserInfoTest.java @@ -0,0 +1,128 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailB2BEndUserInfo + */ +public class OrderDetailB2BEndUserInfoTest { + private final OrderDetailB2BEndUserInfo model = new OrderDetailB2BEndUserInfo(); + + /** + * Model tests for OrderDetailB2BEndUserInfo + */ + @Test + public void testOrderDetailB2BEndUserInfo() { + // TODO: test OrderDetailB2BEndUserInfo + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'addressLine1' + */ + @Test + public void addressLine1Test() { + // TODO: test addressLine1 + } + + /** + * Test the property 'addressLine2' + */ + @Test + public void addressLine2Test() { + // TODO: test addressLine2 + } + + /** + * Test the property 'addressLine3' + */ + @Test + public void addressLine3Test() { + // TODO: test addressLine3 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalCode' + */ + @Test + public void postalCodeTest() { + // TODO: test postalCode + } + + /** + * Test the property 'countryCode' + */ + @Test + public void countryCodeTest() { + // TODO: test countryCode + } + + /** + * Test the property 'phoneNumber' + */ + @Test + public void phoneNumberTest() { + // TODO: test phoneNumber + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerAdditionalAttributesInnerTest.java b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerAdditionalAttributesInnerTest.java new file mode 100644 index 00000000..84a22e3f --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerAdditionalAttributesInnerTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailB2BLinesInnerAdditionalAttributesInner + */ +public class OrderDetailB2BLinesInnerAdditionalAttributesInnerTest { + private final OrderDetailB2BLinesInnerAdditionalAttributesInner model = new OrderDetailB2BLinesInnerAdditionalAttributesInner(); + + /** + * Model tests for OrderDetailB2BLinesInnerAdditionalAttributesInner + */ + @Test + public void testOrderDetailB2BLinesInnerAdditionalAttributesInner() { + // TODO: test OrderDetailB2BLinesInnerAdditionalAttributesInner + } + + /** + * Test the property 'attributeName' + */ + @Test + public void attributeNameTest() { + // TODO: test attributeName + } + + /** + * Test the property 'attributeValue' + */ + @Test + public void attributeValueTest() { + // TODO: test attributeValue + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRangeTest.java b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRangeTest.java new file mode 100644 index 00000000..ce517a4a --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRangeTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange + */ +public class OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRangeTest { + private final OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange model = new OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange(); + + /** + * Model tests for OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange + */ + @Test + public void testOrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange() { + // TODO: test OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange + } + + /** + * Test the property 'startDate' + */ + @Test + public void startDateTest() { + // TODO: test startDate + } + + /** + * Test the property 'endDate' + */ + @Test + public void endDateTest() { + // TODO: test endDate + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryTest.java b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryTest.java new file mode 100644 index 00000000..137a3ac3 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryTest.java @@ -0,0 +1,81 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery + */ +public class OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryTest { + private final OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery model = new OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery(); + + /** + * Model tests for OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery + */ + @Test + public void testOrderDetailB2BLinesInnerEstimatedDatesInnerDelivery() { + // TODO: test OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery + } + + /** + * Test the property 'deliveryDateType' + */ + @Test + public void deliveryDateTypeTest() { + // TODO: test deliveryDateType + } + + /** + * Test the property 'deliveryDateRange' + */ + @Test + public void deliveryDateRangeTest() { + // TODO: test deliveryDateRange + } + + /** + * Test the property 'deliverySource' + */ + @Test + public void deliverySourceTest() { + // TODO: test deliverySource + } + + /** + * Test the property 'deliveryDescription' + */ + @Test + public void deliveryDescriptionTest() { + // TODO: test deliveryDescription + } + + /** + * Test the property 'deliveredDate' + */ + @Test + public void deliveredDateTest() { + // TODO: test deliveredDate + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRangeTest.java b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRangeTest.java new file mode 100644 index 00000000..7427a4f6 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRangeTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange + */ +public class OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRangeTest { + private final OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange model = new OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange(); + + /** + * Model tests for OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange + */ + @Test + public void testOrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange() { + // TODO: test OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange + } + + /** + * Test the property 'startDate' + */ + @Test + public void startDateTest() { + // TODO: test startDate + } + + /** + * Test the property 'endDate' + */ + @Test + public void endDateTest() { + // TODO: test endDate + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerShipTest.java b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerShipTest.java new file mode 100644 index 00000000..09c25bf7 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerShipTest.java @@ -0,0 +1,81 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailB2BLinesInnerEstimatedDatesInnerShip + */ +public class OrderDetailB2BLinesInnerEstimatedDatesInnerShipTest { + private final OrderDetailB2BLinesInnerEstimatedDatesInnerShip model = new OrderDetailB2BLinesInnerEstimatedDatesInnerShip(); + + /** + * Model tests for OrderDetailB2BLinesInnerEstimatedDatesInnerShip + */ + @Test + public void testOrderDetailB2BLinesInnerEstimatedDatesInnerShip() { + // TODO: test OrderDetailB2BLinesInnerEstimatedDatesInnerShip + } + + /** + * Test the property 'shipDateType' + */ + @Test + public void shipDateTypeTest() { + // TODO: test shipDateType + } + + /** + * Test the property 'shipDateRange' + */ + @Test + public void shipDateRangeTest() { + // TODO: test shipDateRange + } + + /** + * Test the property 'shipSource' + */ + @Test + public void shipSourceTest() { + // TODO: test shipSource + } + + /** + * Test the property 'shipDescription' + */ + @Test + public void shipDescriptionTest() { + // TODO: test shipDescription + } + + /** + * Test the property 'shipDate' + */ + @Test + public void shipDateTest() { + // TODO: test shipDate + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerTest.java b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerTest.java new file mode 100644 index 00000000..8f8ef1db --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerEstimatedDatesInnerTest.java @@ -0,0 +1,58 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery; +import xiresellers.client.model.OrderDetailB2BLinesInnerEstimatedDatesInnerShip; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailB2BLinesInnerEstimatedDatesInner + */ +public class OrderDetailB2BLinesInnerEstimatedDatesInnerTest { + private final OrderDetailB2BLinesInnerEstimatedDatesInner model = new OrderDetailB2BLinesInnerEstimatedDatesInner(); + + /** + * Model tests for OrderDetailB2BLinesInnerEstimatedDatesInner + */ + @Test + public void testOrderDetailB2BLinesInnerEstimatedDatesInner() { + // TODO: test OrderDetailB2BLinesInnerEstimatedDatesInner + } + + /** + * Test the property 'ship' + */ + @Test + public void shipTest() { + // TODO: test ship + } + + /** + * Test the property 'delivery' + */ + @Test + public void deliveryTest() { + // TODO: test delivery + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerLinksInnerTest.java b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerLinksInnerTest.java new file mode 100644 index 00000000..56534045 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerLinksInnerTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailB2BLinesInnerLinksInner + */ +public class OrderDetailB2BLinesInnerLinksInnerTest { + private final OrderDetailB2BLinesInnerLinksInner model = new OrderDetailB2BLinesInnerLinksInner(); + + /** + * Model tests for OrderDetailB2BLinesInnerLinksInner + */ + @Test + public void testOrderDetailB2BLinesInnerLinksInner() { + // TODO: test OrderDetailB2BLinesInnerLinksInner + } + + /** + * Test the property 'topic' + */ + @Test + public void topicTest() { + // TODO: test topic + } + + /** + * Test the property 'href' + */ + @Test + public void hrefTest() { + // TODO: test href + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerMultipleShipmentsInnerTest.java b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerMultipleShipmentsInnerTest.java new file mode 100644 index 00000000..e3ca7b04 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerMultipleShipmentsInnerTest.java @@ -0,0 +1,113 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailB2BLinesInnerMultipleShipmentsInner + */ +public class OrderDetailB2BLinesInnerMultipleShipmentsInnerTest { + private final OrderDetailB2BLinesInnerMultipleShipmentsInner model = new OrderDetailB2BLinesInnerMultipleShipmentsInner(); + + /** + * Model tests for OrderDetailB2BLinesInnerMultipleShipmentsInner + */ + @Test + public void testOrderDetailB2BLinesInnerMultipleShipmentsInner() { + // TODO: test OrderDetailB2BLinesInnerMultipleShipmentsInner + } + + /** + * Test the property 'lineNumber' + */ + @Test + public void lineNumberTest() { + // TODO: test lineNumber + } + + /** + * Test the property 'requestedQuantity' + */ + @Test + public void requestedQuantityTest() { + // TODO: test requestedQuantity + } + + /** + * Test the property 'confirmedQuantity' + */ + @Test + public void confirmedQuantityTest() { + // TODO: test confirmedQuantity + } + + /** + * Test the property 'dataType' + */ + @Test + public void dataTypeTest() { + // TODO: test dataType + } + + /** + * Test the property 'dateRange' + */ + @Test + public void dateRangeTest() { + // TODO: test dateRange + } + + /** + * Test the property 'source' + */ + @Test + public void sourceTest() { + // TODO: test source + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'date' + */ + @Test + public void dateTest() { + // TODO: test date + } + + /** + * Test the property 'deliveryDate' + */ + @Test + public void deliveryDateTest() { + // TODO: test deliveryDate + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerScheduleLinesInnerTest.java b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerScheduleLinesInnerTest.java new file mode 100644 index 00000000..ed98d7b3 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerScheduleLinesInnerTest.java @@ -0,0 +1,80 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailB2BLinesInnerScheduleLinesInner + */ +public class OrderDetailB2BLinesInnerScheduleLinesInnerTest { + private final OrderDetailB2BLinesInnerScheduleLinesInner model = new OrderDetailB2BLinesInnerScheduleLinesInner(); + + /** + * Model tests for OrderDetailB2BLinesInnerScheduleLinesInner + */ + @Test + public void testOrderDetailB2BLinesInnerScheduleLinesInner() { + // TODO: test OrderDetailB2BLinesInnerScheduleLinesInner + } + + /** + * Test the property 'lineNumber' + */ + @Test + public void lineNumberTest() { + // TODO: test lineNumber + } + + /** + * Test the property 'scheduleLineDate' + */ + @Test + public void scheduleLineDateTest() { + // TODO: test scheduleLineDate + } + + /** + * Test the property 'requestedQuantity' + */ + @Test + public void requestedQuantityTest() { + // TODO: test requestedQuantity + } + + /** + * Test the property 'confirmedQuantity' + */ + @Test + public void confirmedQuantityTest() { + // TODO: test confirmedQuantity + } + + /** + * Test the property 'goodsIssueDate' + */ + @Test + public void goodsIssueDateTest() { + // TODO: test goodsIssueDate + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoContractInfoTest.java b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoContractInfoTest.java new file mode 100644 index 00000000..6a60ea5c --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoContractInfoTest.java @@ -0,0 +1,88 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailB2BLinesInnerServiceContractInfoContractInfo + */ +public class OrderDetailB2BLinesInnerServiceContractInfoContractInfoTest { + private final OrderDetailB2BLinesInnerServiceContractInfoContractInfo model = new OrderDetailB2BLinesInnerServiceContractInfoContractInfo(); + + /** + * Model tests for OrderDetailB2BLinesInnerServiceContractInfoContractInfo + */ + @Test + public void testOrderDetailB2BLinesInnerServiceContractInfoContractInfo() { + // TODO: test OrderDetailB2BLinesInnerServiceContractInfoContractInfo + } + + /** + * Test the property 'contractDescription' + */ + @Test + public void contractDescriptionTest() { + // TODO: test contractDescription + } + + /** + * Test the property 'contractNumber' + */ + @Test + public void contractNumberTest() { + // TODO: test contractNumber + } + + /** + * Test the property 'contractStatus' + */ + @Test + public void contractStatusTest() { + // TODO: test contractStatus + } + + /** + * Test the property 'contractStartDate' + */ + @Test + public void contractStartDateTest() { + // TODO: test contractStartDate + } + + /** + * Test the property 'contractEndDate' + */ + @Test + public void contractEndDateTest() { + // TODO: test contractEndDate + } + + /** + * Test the property 'contractDuration' + */ + @Test + public void contractDurationTest() { + // TODO: test contractDuration + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoLicenseInfoTest.java b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoLicenseInfoTest.java new file mode 100644 index 00000000..fb10433e --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoLicenseInfoTest.java @@ -0,0 +1,83 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo + */ +public class OrderDetailB2BLinesInnerServiceContractInfoLicenseInfoTest { + private final OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo model = new OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo(); + + /** + * Model tests for OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo + */ + @Test + public void testOrderDetailB2BLinesInnerServiceContractInfoLicenseInfo() { + // TODO: test OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo + } + + /** + * Test the property 'licenseNumber' + */ + @Test + public void licenseNumberTest() { + // TODO: test licenseNumber + } + + /** + * Test the property 'licenseStartDate' + */ + @Test + public void licenseStartDateTest() { + // TODO: test licenseStartDate + } + + /** + * Test the property 'licenseEndDate' + */ + @Test + public void licenseEndDateTest() { + // TODO: test licenseEndDate + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'quantity' + */ + @Test + public void quantityTest() { + // TODO: test quantity + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoSubscriptionsTest.java b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoSubscriptionsTest.java new file mode 100644 index 00000000..64905eed --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoSubscriptionsTest.java @@ -0,0 +1,88 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailB2BLinesInnerServiceContractInfoSubscriptions + */ +public class OrderDetailB2BLinesInnerServiceContractInfoSubscriptionsTest { + private final OrderDetailB2BLinesInnerServiceContractInfoSubscriptions model = new OrderDetailB2BLinesInnerServiceContractInfoSubscriptions(); + + /** + * Model tests for OrderDetailB2BLinesInnerServiceContractInfoSubscriptions + */ + @Test + public void testOrderDetailB2BLinesInnerServiceContractInfoSubscriptions() { + // TODO: test OrderDetailB2BLinesInnerServiceContractInfoSubscriptions + } + + /** + * Test the property 'subscriptionId' + */ + @Test + public void subscriptionIdTest() { + // TODO: test subscriptionId + } + + /** + * Test the property 'subscriptionTerm' + */ + @Test + public void subscriptionTermTest() { + // TODO: test subscriptionTerm + } + + /** + * Test the property 'renewalTerm' + */ + @Test + public void renewalTermTest() { + // TODO: test renewalTerm + } + + /** + * Test the property 'billingModel' + */ + @Test + public void billingModelTest() { + // TODO: test billingModel + } + + /** + * Test the property 'subcriptionStartDate' + */ + @Test + public void subcriptionStartDateTest() { + // TODO: test subcriptionStartDate + } + + /** + * Test the property 'subcriptionEndDate' + */ + @Test + public void subcriptionEndDateTest() { + // TODO: test subcriptionEndDate + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoTest.java b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoTest.java new file mode 100644 index 00000000..d99ef6aa --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerServiceContractInfoTest.java @@ -0,0 +1,67 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderDetailB2BLinesInnerServiceContractInfoContractInfo; +import xiresellers.client.model.OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo; +import xiresellers.client.model.OrderDetailB2BLinesInnerServiceContractInfoSubscriptions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailB2BLinesInnerServiceContractInfo + */ +public class OrderDetailB2BLinesInnerServiceContractInfoTest { + private final OrderDetailB2BLinesInnerServiceContractInfo model = new OrderDetailB2BLinesInnerServiceContractInfo(); + + /** + * Model tests for OrderDetailB2BLinesInnerServiceContractInfo + */ + @Test + public void testOrderDetailB2BLinesInnerServiceContractInfo() { + // TODO: test OrderDetailB2BLinesInnerServiceContractInfo + } + + /** + * Test the property 'contractInfo' + */ + @Test + public void contractInfoTest() { + // TODO: test contractInfo + } + + /** + * Test the property 'subscriptions' + */ + @Test + public void subscriptionsTest() { + // TODO: test subscriptions + } + + /** + * Test the property 'licenseInfo' + */ + @Test + public void licenseInfoTest() { + // TODO: test licenseInfo + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTest.java b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTest.java new file mode 100644 index 00000000..bf8f6fae --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTest.java @@ -0,0 +1,108 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import xiresellers.client.model.OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner + */ +public class OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTest { + private final OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner model = new OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner(); + + /** + * Model tests for OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner + */ + @Test + public void testOrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner() { + // TODO: test OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner + } + + /** + * Test the property 'carrierCode' + */ + @Test + public void carrierCodeTest() { + // TODO: test carrierCode + } + + /** + * Test the property 'carrierName' + */ + @Test + public void carrierNameTest() { + // TODO: test carrierName + } + + /** + * Test the property 'quantity' + */ + @Test + public void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'shippedDate' + */ + @Test + public void shippedDateTest() { + // TODO: test shippedDate + } + + /** + * Test the property 'estimatedDeliveryDate' + */ + @Test + public void estimatedDeliveryDateTest() { + // TODO: test estimatedDeliveryDate + } + + /** + * Test the property 'deliveredDate' + */ + @Test + public void deliveredDateTest() { + // TODO: test deliveredDate + } + + /** + * Test the property 'carrierPickupDate' + */ + @Test + public void carrierPickupDateTest() { + // TODO: test carrierPickupDate + } + + /** + * Test the property 'trackingDetails' + */ + @Test + public void trackingDetailsTest() { + // TODO: test trackingDetails + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInnerTest.java b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInnerTest.java new file mode 100644 index 00000000..21bd1126 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInnerTest.java @@ -0,0 +1,48 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner + */ +public class OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInnerTest { + private final OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner model = new OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner(); + + /** + * Model tests for OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner + */ + @Test + public void testOrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner() { + // TODO: test OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner + } + + /** + * Test the property 'serialNumber' + */ + @Test + public void serialNumberTest() { + // TODO: test serialNumber + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerTest.java b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerTest.java new file mode 100644 index 00000000..2df386dc --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerTest.java @@ -0,0 +1,92 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import xiresellers.client.model.OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner + */ +public class OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerTest { + private final OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner model = new OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner(); + + /** + * Model tests for OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner + */ + @Test + public void testOrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner() { + // TODO: test OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner + } + + /** + * Test the property 'trackingNumber' + */ + @Test + public void trackingNumberTest() { + // TODO: test trackingNumber + } + + /** + * Test the property 'trackingUrl' + */ + @Test + public void trackingUrlTest() { + // TODO: test trackingUrl + } + + /** + * Test the property 'packageWeight' + */ + @Test + public void packageWeightTest() { + // TODO: test packageWeight + } + + /** + * Test the property 'cartonNumber' + */ + @Test + public void cartonNumberTest() { + // TODO: test cartonNumber + } + + /** + * Test the property 'quantityInBox' + */ + @Test + public void quantityInBoxTest() { + // TODO: test quantityInBox + } + + /** + * Test the property 'serialNumbers' + */ + @Test + public void serialNumbersTest() { + // TODO: test serialNumbers + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerTest.java b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerTest.java new file mode 100644 index 00000000..a24f7e98 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerShipmentDetailsInnerTest.java @@ -0,0 +1,108 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import xiresellers.client.model.OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailB2BLinesInnerShipmentDetailsInner + */ +public class OrderDetailB2BLinesInnerShipmentDetailsInnerTest { + private final OrderDetailB2BLinesInnerShipmentDetailsInner model = new OrderDetailB2BLinesInnerShipmentDetailsInner(); + + /** + * Model tests for OrderDetailB2BLinesInnerShipmentDetailsInner + */ + @Test + public void testOrderDetailB2BLinesInnerShipmentDetailsInner() { + // TODO: test OrderDetailB2BLinesInnerShipmentDetailsInner + } + + /** + * Test the property 'quantity' + */ + @Test + public void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'deliveryNumber' + */ + @Test + public void deliveryNumberTest() { + // TODO: test deliveryNumber + } + + /** + * Test the property 'estimatedShipDate' + */ + @Test + public void estimatedShipDateTest() { + // TODO: test estimatedShipDate + } + + /** + * Test the property 'shipFromWarehouseId' + */ + @Test + public void shipFromWarehouseIdTest() { + // TODO: test shipFromWarehouseId + } + + /** + * Test the property 'shipFromLocation' + */ + @Test + public void shipFromLocationTest() { + // TODO: test shipFromLocation + } + + /** + * Test the property 'invoiceNumber' + */ + @Test + public void invoiceNumberTest() { + // TODO: test invoiceNumber + } + + /** + * Test the property 'invoiceDate' + */ + @Test + public void invoiceDateTest() { + // TODO: test invoiceDate + } + + /** + * Test the property 'carrierDetails' + */ + @Test + public void carrierDetailsTest() { + // TODO: test carrierDetails + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerTest.java b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerTest.java new file mode 100644 index 00000000..4fadb790 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailB2BLinesInnerTest.java @@ -0,0 +1,290 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import xiresellers.client.model.OrderDetailB2BLinesInnerAdditionalAttributesInner; +import xiresellers.client.model.OrderDetailB2BLinesInnerEstimatedDatesInner; +import xiresellers.client.model.OrderDetailB2BLinesInnerLinksInner; +import xiresellers.client.model.OrderDetailB2BLinesInnerMultipleShipmentsInner; +import xiresellers.client.model.OrderDetailB2BLinesInnerScheduleLinesInner; +import xiresellers.client.model.OrderDetailB2BLinesInnerServiceContractInfo; +import xiresellers.client.model.OrderDetailB2BLinesInnerShipmentDetailsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailB2BLinesInner + */ +public class OrderDetailB2BLinesInnerTest { + private final OrderDetailB2BLinesInner model = new OrderDetailB2BLinesInner(); + + /** + * Model tests for OrderDetailB2BLinesInner + */ + @Test + public void testOrderDetailB2BLinesInner() { + // TODO: test OrderDetailB2BLinesInner + } + + /** + * Test the property 'subOrderNumber' + */ + @Test + public void subOrderNumberTest() { + // TODO: test subOrderNumber + } + + /** + * Test the property 'ingramOrderLineNumber' + */ + @Test + public void ingramOrderLineNumberTest() { + // TODO: test ingramOrderLineNumber + } + + /** + * Test the property 'vendorSalesOrderLineNumber' + */ + @Test + public void vendorSalesOrderLineNumberTest() { + // TODO: test vendorSalesOrderLineNumber + } + + /** + * Test the property 'customerLineNumber' + */ + @Test + public void customerLineNumberTest() { + // TODO: test customerLineNumber + } + + /** + * Test the property 'lineStatus' + */ + @Test + public void lineStatusTest() { + // TODO: test lineStatus + } + + /** + * Test the property 'ingramPartNumber' + */ + @Test + public void ingramPartNumberTest() { + // TODO: test ingramPartNumber + } + + /** + * Test the property 'vendorPartNumber' + */ + @Test + public void vendorPartNumberTest() { + // TODO: test vendorPartNumber + } + + /** + * Test the property 'vendorName' + */ + @Test + public void vendorNameTest() { + // TODO: test vendorName + } + + /** + * Test the property 'partDescription' + */ + @Test + public void partDescriptionTest() { + // TODO: test partDescription + } + + /** + * Test the property 'unitWeight' + */ + @Test + public void unitWeightTest() { + // TODO: test unitWeight + } + + /** + * Test the property 'weightUom' + */ + @Test + public void weightUomTest() { + // TODO: test weightUom + } + + /** + * Test the property 'unitPrice' + */ + @Test + public void unitPriceTest() { + // TODO: test unitPrice + } + + /** + * Test the property 'upcCode' + */ + @Test + public void upcCodeTest() { + // TODO: test upcCode + } + + /** + * Test the property 'extendedPrice' + */ + @Test + public void extendedPriceTest() { + // TODO: test extendedPrice + } + + /** + * Test the property 'taxAmount' + */ + @Test + public void taxAmountTest() { + // TODO: test taxAmount + } + + /** + * Test the property 'currencyCode' + */ + @Test + public void currencyCodeTest() { + // TODO: test currencyCode + } + + /** + * Test the property 'quantityOrdered' + */ + @Test + public void quantityOrderedTest() { + // TODO: test quantityOrdered + } + + /** + * Test the property 'quantityConfirmed' + */ + @Test + public void quantityConfirmedTest() { + // TODO: test quantityConfirmed + } + + /** + * Test the property 'quantityBackOrdered' + */ + @Test + public void quantityBackOrderedTest() { + // TODO: test quantityBackOrdered + } + + /** + * Test the property 'specialBidNumber' + */ + @Test + public void specialBidNumberTest() { + // TODO: test specialBidNumber + } + + /** + * Test the property 'requestedDeliverydate' + */ + @Test + public void requestedDeliverydateTest() { + // TODO: test requestedDeliverydate + } + + /** + * Test the property 'promisedDeliveryDate' + */ + @Test + public void promisedDeliveryDateTest() { + // TODO: test promisedDeliveryDate + } + + /** + * Test the property 'lineNotes' + */ + @Test + public void lineNotesTest() { + // TODO: test lineNotes + } + + /** + * Test the property 'shipmentDetails' + */ + @Test + public void shipmentDetailsTest() { + // TODO: test shipmentDetails + } + + /** + * Test the property 'serviceContractInfo' + */ + @Test + public void serviceContractInfoTest() { + // TODO: test serviceContractInfo + } + + /** + * Test the property 'additionalAttributes' + */ + @Test + public void additionalAttributesTest() { + // TODO: test additionalAttributes + } + + /** + * Test the property 'links' + */ + @Test + public void linksTest() { + // TODO: test links + } + + /** + * Test the property 'estimatedDates' + */ + @Test + public void estimatedDatesTest() { + // TODO: test estimatedDates + } + + /** + * Test the property 'scheduleLines' + */ + @Test + public void scheduleLinesTest() { + // TODO: test scheduleLines + } + + /** + * Test the property 'multipleShipments' + */ + @Test + public void multipleShipmentsTest() { + // TODO: test multipleShipments + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailB2BMiscellaneousChargesInnerTest.java b/src/test/java/xiresellers/client/model/OrderDetailB2BMiscellaneousChargesInnerTest.java new file mode 100644 index 00000000..4dfd0692 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailB2BMiscellaneousChargesInnerTest.java @@ -0,0 +1,72 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailB2BMiscellaneousChargesInner + */ +public class OrderDetailB2BMiscellaneousChargesInnerTest { + private final OrderDetailB2BMiscellaneousChargesInner model = new OrderDetailB2BMiscellaneousChargesInner(); + + /** + * Model tests for OrderDetailB2BMiscellaneousChargesInner + */ + @Test + public void testOrderDetailB2BMiscellaneousChargesInner() { + // TODO: test OrderDetailB2BMiscellaneousChargesInner + } + + /** + * Test the property 'subOrderNumber' + */ + @Test + public void subOrderNumberTest() { + // TODO: test subOrderNumber + } + + /** + * Test the property 'chargeLineReference' + */ + @Test + public void chargeLineReferenceTest() { + // TODO: test chargeLineReference + } + + /** + * Test the property 'chargeDescription' + */ + @Test + public void chargeDescriptionTest() { + // TODO: test chargeDescription + } + + /** + * Test the property 'chargeAmount' + */ + @Test + public void chargeAmountTest() { + // TODO: test chargeAmount + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailB2BShipToInfoTest.java b/src/test/java/xiresellers/client/model/OrderDetailB2BShipToInfoTest.java new file mode 100644 index 00000000..bf9cafbc --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailB2BShipToInfoTest.java @@ -0,0 +1,128 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailB2BShipToInfo + */ +public class OrderDetailB2BShipToInfoTest { + private final OrderDetailB2BShipToInfo model = new OrderDetailB2BShipToInfo(); + + /** + * Model tests for OrderDetailB2BShipToInfo + */ + @Test + public void testOrderDetailB2BShipToInfo() { + // TODO: test OrderDetailB2BShipToInfo + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'addressLine1' + */ + @Test + public void addressLine1Test() { + // TODO: test addressLine1 + } + + /** + * Test the property 'addressLine2' + */ + @Test + public void addressLine2Test() { + // TODO: test addressLine2 + } + + /** + * Test the property 'addressLine3' + */ + @Test + public void addressLine3Test() { + // TODO: test addressLine3 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalCode' + */ + @Test + public void postalCodeTest() { + // TODO: test postalCode + } + + /** + * Test the property 'countryCode' + */ + @Test + public void countryCodeTest() { + // TODO: test countryCode + } + + /** + * Test the property 'phoneNumber' + */ + @Test + public void phoneNumberTest() { + // TODO: test phoneNumber + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailB2BTest.java b/src/test/java/xiresellers/client/model/OrderDetailB2BTest.java new file mode 100644 index 00000000..6bec9200 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailB2BTest.java @@ -0,0 +1,234 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import xiresellers.client.model.OrderDetailB2BAdditionalAttributesInner; +import xiresellers.client.model.OrderDetailB2BBillToInfo; +import xiresellers.client.model.OrderDetailB2BEndUserInfo; +import xiresellers.client.model.OrderDetailB2BLinesInner; +import xiresellers.client.model.OrderDetailB2BMiscellaneousChargesInner; +import xiresellers.client.model.OrderDetailB2BShipToInfo; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailB2B + */ +public class OrderDetailB2BTest { + private final OrderDetailB2B model = new OrderDetailB2B(); + + /** + * Model tests for OrderDetailB2B + */ + @Test + public void testOrderDetailB2B() { + // TODO: test OrderDetailB2B + } + + /** + * Test the property 'ingramOrderNumber' + */ + @Test + public void ingramOrderNumberTest() { + // TODO: test ingramOrderNumber + } + + /** + * Test the property 'ingramOrderDate' + */ + @Test + public void ingramOrderDateTest() { + // TODO: test ingramOrderDate + } + + /** + * Test the property 'orderType' + */ + @Test + public void orderTypeTest() { + // TODO: test orderType + } + + /** + * Test the property 'customerOrderNumber' + */ + @Test + public void customerOrderNumberTest() { + // TODO: test customerOrderNumber + } + + /** + * Test the property 'endCustomerOrderNumber' + */ + @Test + public void endCustomerOrderNumberTest() { + // TODO: test endCustomerOrderNumber + } + + /** + * Test the property 'webOrderId' + */ + @Test + public void webOrderIdTest() { + // TODO: test webOrderId + } + + /** + * Test the property 'vendorSalesOrderNumber' + */ + @Test + public void vendorSalesOrderNumberTest() { + // TODO: test vendorSalesOrderNumber + } + + /** + * Test the property 'ingramPurchaseOrderNumber' + */ + @Test + public void ingramPurchaseOrderNumberTest() { + // TODO: test ingramPurchaseOrderNumber + } + + /** + * Test the property 'orderStatus' + */ + @Test + public void orderStatusTest() { + // TODO: test orderStatus + } + + /** + * Test the property 'orderTotal' + */ + @Test + public void orderTotalTest() { + // TODO: test orderTotal + } + + /** + * Test the property 'orderSubTotal' + */ + @Test + public void orderSubTotalTest() { + // TODO: test orderSubTotal + } + + /** + * Test the property 'freightCharges' + */ + @Test + public void freightChargesTest() { + // TODO: test freightCharges + } + + /** + * Test the property 'currencyCode' + */ + @Test + public void currencyCodeTest() { + // TODO: test currencyCode + } + + /** + * Test the property 'totalWeight' + */ + @Test + public void totalWeightTest() { + // TODO: test totalWeight + } + + /** + * Test the property 'totalTax' + */ + @Test + public void totalTaxTest() { + // TODO: test totalTax + } + + /** + * Test the property 'paymentTerms' + */ + @Test + public void paymentTermsTest() { + // TODO: test paymentTerms + } + + /** + * Test the property 'notes' + */ + @Test + public void notesTest() { + // TODO: test notes + } + + /** + * Test the property 'billToInfo' + */ + @Test + public void billToInfoTest() { + // TODO: test billToInfo + } + + /** + * Test the property 'shipToInfo' + */ + @Test + public void shipToInfoTest() { + // TODO: test shipToInfo + } + + /** + * Test the property 'endUserInfo' + */ + @Test + public void endUserInfoTest() { + // TODO: test endUserInfo + } + + /** + * Test the property 'lines' + */ + @Test + public void linesTest() { + // TODO: test lines + } + + /** + * Test the property 'miscellaneousCharges' + */ + @Test + public void miscellaneousChargesTest() { + // TODO: test miscellaneousCharges + } + + /** + * Test the property 'additionalAttributes' + */ + @Test + public void additionalAttributesTest() { + // TODO: test additionalAttributes + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailRequestServicerequestOrderdetailrequestTest.java b/src/test/java/xiresellers/client/model/OrderDetailRequestServicerequestOrderdetailrequestTest.java new file mode 100644 index 00000000..3e72706c --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailRequestServicerequestOrderdetailrequestTest.java @@ -0,0 +1,72 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailRequestServicerequestOrderdetailrequest + */ +public class OrderDetailRequestServicerequestOrderdetailrequestTest { + private final OrderDetailRequestServicerequestOrderdetailrequest model = new OrderDetailRequestServicerequestOrderdetailrequest(); + + /** + * Model tests for OrderDetailRequestServicerequestOrderdetailrequest + */ + @Test + public void testOrderDetailRequestServicerequestOrderdetailrequest() { + // TODO: test OrderDetailRequestServicerequestOrderdetailrequest + } + + /** + * Test the property 'ordernumber' + */ + @Test + public void ordernumberTest() { + // TODO: test ordernumber + } + + /** + * Test the property 'customerponumber' + */ + @Test + public void customerponumberTest() { + // TODO: test customerponumber + } + + /** + * Test the property 'orderdate' + */ + @Test + public void orderdateTest() { + // TODO: test orderdate + } + + /** + * Test the property 'systemid' + */ + @Test + public void systemidTest() { + // TODO: test systemid + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailRequestServicerequestTest.java b/src/test/java/xiresellers/client/model/OrderDetailRequestServicerequestTest.java new file mode 100644 index 00000000..c9fe43ab --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailRequestServicerequestTest.java @@ -0,0 +1,58 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.InvoiceDetailRequestServicerequestRequestpreamble; +import xiresellers.client.model.OrderDetailRequestServicerequestOrderdetailrequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailRequestServicerequest + */ +public class OrderDetailRequestServicerequestTest { + private final OrderDetailRequestServicerequest model = new OrderDetailRequestServicerequest(); + + /** + * Model tests for OrderDetailRequestServicerequest + */ + @Test + public void testOrderDetailRequestServicerequest() { + // TODO: test OrderDetailRequestServicerequest + } + + /** + * Test the property 'requestpreamble' + */ + @Test + public void requestpreambleTest() { + // TODO: test requestpreamble + } + + /** + * Test the property 'orderdetailrequest' + */ + @Test + public void orderdetailrequestTest() { + // TODO: test orderdetailrequest + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailRequestTest.java b/src/test/java/xiresellers/client/model/OrderDetailRequestTest.java new file mode 100644 index 00000000..12e3e9f2 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailRequestTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderDetailRequestServicerequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailRequest + */ +public class OrderDetailRequestTest { + private final OrderDetailRequest model = new OrderDetailRequest(); + + /** + * Model tests for OrderDetailRequest + */ + @Test + public void testOrderDetailRequest() { + // TODO: test OrderDetailRequest + } + + /** + * Test the property 'servicerequest' + */ + @Test + public void servicerequestTest() { + // TODO: test servicerequest + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailResponseBillToInfoTest.java b/src/test/java/xiresellers/client/model/OrderDetailResponseBillToInfoTest.java new file mode 100644 index 00000000..23f99a1d --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailResponseBillToInfoTest.java @@ -0,0 +1,144 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailResponseBillToInfo + */ +public class OrderDetailResponseBillToInfoTest { + private final OrderDetailResponseBillToInfo model = new OrderDetailResponseBillToInfo(); + + /** + * Model tests for OrderDetailResponseBillToInfo + */ + @Test + public void testOrderDetailResponseBillToInfo() { + // TODO: test OrderDetailResponseBillToInfo + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'name1' + */ + @Test + public void name1Test() { + // TODO: test name1 + } + + /** + * Test the property 'name2' + */ + @Test + public void name2Test() { + // TODO: test name2 + } + + /** + * Test the property 'addressLine1' + */ + @Test + public void addressLine1Test() { + // TODO: test addressLine1 + } + + /** + * Test the property 'addressLine2' + */ + @Test + public void addressLine2Test() { + // TODO: test addressLine2 + } + + /** + * Test the property 'addressLine3' + */ + @Test + public void addressLine3Test() { + // TODO: test addressLine3 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalCode' + */ + @Test + public void postalCodeTest() { + // TODO: test postalCode + } + + /** + * Test the property 'countryCode' + */ + @Test + public void countryCodeTest() { + // TODO: test countryCode + } + + /** + * Test the property 'phoneNumber' + */ + @Test + public void phoneNumberTest() { + // TODO: test phoneNumber + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailResponseEndUserInfoTest.java b/src/test/java/xiresellers/client/model/OrderDetailResponseEndUserInfoTest.java new file mode 100644 index 00000000..096a50ff --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailResponseEndUserInfoTest.java @@ -0,0 +1,144 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailResponseEndUserInfo + */ +public class OrderDetailResponseEndUserInfoTest { + private final OrderDetailResponseEndUserInfo model = new OrderDetailResponseEndUserInfo(); + + /** + * Model tests for OrderDetailResponseEndUserInfo + */ + @Test + public void testOrderDetailResponseEndUserInfo() { + // TODO: test OrderDetailResponseEndUserInfo + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'name1' + */ + @Test + public void name1Test() { + // TODO: test name1 + } + + /** + * Test the property 'name2' + */ + @Test + public void name2Test() { + // TODO: test name2 + } + + /** + * Test the property 'addressLine1' + */ + @Test + public void addressLine1Test() { + // TODO: test addressLine1 + } + + /** + * Test the property 'addressLine2' + */ + @Test + public void addressLine2Test() { + // TODO: test addressLine2 + } + + /** + * Test the property 'addressLine3' + */ + @Test + public void addressLine3Test() { + // TODO: test addressLine3 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalCode' + */ + @Test + public void postalCodeTest() { + // TODO: test postalCode + } + + /** + * Test the property 'countryCode' + */ + @Test + public void countryCodeTest() { + // TODO: test countryCode + } + + /** + * Test the property 'phoneNumber' + */ + @Test + public void phoneNumberTest() { + // TODO: test phoneNumber + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerAdditionalAttributesInnerTest.java b/src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerAdditionalAttributesInnerTest.java new file mode 100644 index 00000000..149915e2 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerAdditionalAttributesInnerTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailResponseLinesInnerAdditionalAttributesInner + */ +public class OrderDetailResponseLinesInnerAdditionalAttributesInnerTest { + private final OrderDetailResponseLinesInnerAdditionalAttributesInner model = new OrderDetailResponseLinesInnerAdditionalAttributesInner(); + + /** + * Model tests for OrderDetailResponseLinesInnerAdditionalAttributesInner + */ + @Test + public void testOrderDetailResponseLinesInnerAdditionalAttributesInner() { + // TODO: test OrderDetailResponseLinesInnerAdditionalAttributesInner + } + + /** + * Test the property 'attributeName' + */ + @Test + public void attributeNameTest() { + // TODO: test attributeName + } + + /** + * Test the property 'attributeValue' + */ + @Test + public void attributeValueTest() { + // TODO: test attributeValue + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerLinksInnerTest.java b/src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerLinksInnerTest.java new file mode 100644 index 00000000..4b7f6eda --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerLinksInnerTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailResponseLinesInnerLinksInner + */ +public class OrderDetailResponseLinesInnerLinksInnerTest { + private final OrderDetailResponseLinesInnerLinksInner model = new OrderDetailResponseLinesInnerLinksInner(); + + /** + * Model tests for OrderDetailResponseLinesInnerLinksInner + */ + @Test + public void testOrderDetailResponseLinesInnerLinksInner() { + // TODO: test OrderDetailResponseLinesInnerLinksInner + } + + /** + * Test the property 'topic' + */ + @Test + public void topicTest() { + // TODO: test topic + } + + /** + * Test the property 'href' + */ + @Test + public void hrefTest() { + // TODO: test href + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTest.java b/src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTest.java new file mode 100644 index 00000000..2051a6a4 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTest.java @@ -0,0 +1,67 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails + */ +public class OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTest { + private final OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails model = new OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails(); + + /** + * Model tests for OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails + */ + @Test + public void testOrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails() { + // TODO: test OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails + } + + /** + * Test the property 'carrierCode' + */ + @Test + public void carrierCodeTest() { + // TODO: test carrierCode + } + + /** + * Test the property 'carrierName' + */ + @Test + public void carrierNameTest() { + // TODO: test carrierName + } + + /** + * Test the property 'trackingDetails' + */ + @Test + public void trackingDetailsTest() { + // TODO: test trackingDetails + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInnerTest.java b/src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInnerTest.java new file mode 100644 index 00000000..c1f7901c --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInnerTest.java @@ -0,0 +1,48 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner + */ +public class OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInnerTest { + private final OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner model = new OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner(); + + /** + * Model tests for OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner + */ + @Test + public void testOrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner() { + // TODO: test OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner + } + + /** + * Test the property 'serialNumber' + */ + @Test + public void serialNumberTest() { + // TODO: test serialNumber + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerTest.java b/src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerTest.java new file mode 100644 index 00000000..6a7f3e6f --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerTest.java @@ -0,0 +1,91 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerSerialNumbersInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner + */ +public class OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInnerTest { + private final OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner model = new OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner(); + + /** + * Model tests for OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner + */ + @Test + public void testOrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner() { + // TODO: test OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetailsTrackingDetailsInner + } + + /** + * Test the property 'trackingNumber' + */ + @Test + public void trackingNumberTest() { + // TODO: test trackingNumber + } + + /** + * Test the property 'trackingUrl' + */ + @Test + public void trackingUrlTest() { + // TODO: test trackingUrl + } + + /** + * Test the property 'packageWeight' + */ + @Test + public void packageWeightTest() { + // TODO: test packageWeight + } + + /** + * Test the property 'cartonNumber' + */ + @Test + public void cartonNumberTest() { + // TODO: test cartonNumber + } + + /** + * Test the property 'quantityInBox' + */ + @Test + public void quantityInBoxTest() { + // TODO: test quantityInBox + } + + /** + * Test the property 'serialNumbers' + */ + @Test + public void serialNumbersTest() { + // TODO: test serialNumbers + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerTest.java b/src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerTest.java new file mode 100644 index 00000000..ea7f8d70 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerShipmentDetailsInnerTest.java @@ -0,0 +1,122 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.Arrays; +import xiresellers.client.model.OrderDetailResponseLinesInnerShipmentDetailsInnerCarrierDetails; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailResponseLinesInnerShipmentDetailsInner + */ +public class OrderDetailResponseLinesInnerShipmentDetailsInnerTest { + private final OrderDetailResponseLinesInnerShipmentDetailsInner model = new OrderDetailResponseLinesInnerShipmentDetailsInner(); + + /** + * Model tests for OrderDetailResponseLinesInnerShipmentDetailsInner + */ + @Test + public void testOrderDetailResponseLinesInnerShipmentDetailsInner() { + // TODO: test OrderDetailResponseLinesInnerShipmentDetailsInner + } + + /** + * Test the property 'quantity' + */ + @Test + public void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'estimatedShipDate' + */ + @Test + public void estimatedShipDateTest() { + // TODO: test estimatedShipDate + } + + /** + * Test the property 'shippedDate' + */ + @Test + public void shippedDateTest() { + // TODO: test shippedDate + } + + /** + * Test the property 'estimatedDeliveryDate' + */ + @Test + public void estimatedDeliveryDateTest() { + // TODO: test estimatedDeliveryDate + } + + /** + * Test the property 'deliveredDate' + */ + @Test + public void deliveredDateTest() { + // TODO: test deliveredDate + } + + /** + * Test the property 'shipFromWarehouseId' + */ + @Test + public void shipFromWarehouseIdTest() { + // TODO: test shipFromWarehouseId + } + + /** + * Test the property 'shipFromLocation' + */ + @Test + public void shipFromLocationTest() { + // TODO: test shipFromLocation + } + + /** + * Test the property 'invoiceNumber' + */ + @Test + public void invoiceNumberTest() { + // TODO: test invoiceNumber + } + + /** + * Test the property 'invoiceDate' + */ + @Test + public void invoiceDateTest() { + // TODO: test invoiceDate + } + + /** + * Test the property 'carrierDetails' + */ + @Test + public void carrierDetailsTest() { + // TODO: test carrierDetails + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerTest.java b/src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerTest.java new file mode 100644 index 00000000..a229f4e4 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailResponseLinesInnerTest.java @@ -0,0 +1,255 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderDetailResponseLinesInnerAdditionalAttributesInner; +import xiresellers.client.model.OrderDetailResponseLinesInnerLinksInner; +import xiresellers.client.model.OrderDetailResponseLinesInnerShipmentDetailsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailResponseLinesInner + */ +public class OrderDetailResponseLinesInnerTest { + private final OrderDetailResponseLinesInner model = new OrderDetailResponseLinesInner(); + + /** + * Model tests for OrderDetailResponseLinesInner + */ + @Test + public void testOrderDetailResponseLinesInner() { + // TODO: test OrderDetailResponseLinesInner + } + + /** + * Test the property 'subOrderNumber' + */ + @Test + public void subOrderNumberTest() { + // TODO: test subOrderNumber + } + + /** + * Test the property 'ingramOrderLineNumber' + */ + @Test + public void ingramOrderLineNumberTest() { + // TODO: test ingramOrderLineNumber + } + + /** + * Test the property 'vendorSalesOrderLineNumber' + */ + @Test + public void vendorSalesOrderLineNumberTest() { + // TODO: test vendorSalesOrderLineNumber + } + + /** + * Test the property 'customerLinenumber' + */ + @Test + public void customerLinenumberTest() { + // TODO: test customerLinenumber + } + + /** + * Test the property 'lineStatus' + */ + @Test + public void lineStatusTest() { + // TODO: test lineStatus + } + + /** + * Test the property 'ingramPartNumber' + */ + @Test + public void ingramPartNumberTest() { + // TODO: test ingramPartNumber + } + + /** + * Test the property 'vendorPartNumber' + */ + @Test + public void vendorPartNumberTest() { + // TODO: test vendorPartNumber + } + + /** + * Test the property 'vendorName' + */ + @Test + public void vendorNameTest() { + // TODO: test vendorName + } + + /** + * Test the property 'partDescription' + */ + @Test + public void partDescriptionTest() { + // TODO: test partDescription + } + + /** + * Test the property 'unitWeight' + */ + @Test + public void unitWeightTest() { + // TODO: test unitWeight + } + + /** + * Test the property 'weightUom' + */ + @Test + public void weightUomTest() { + // TODO: test weightUom + } + + /** + * Test the property 'unitPrice' + */ + @Test + public void unitPriceTest() { + // TODO: test unitPrice + } + + /** + * Test the property 'upcCode' + */ + @Test + public void upcCodeTest() { + // TODO: test upcCode + } + + /** + * Test the property 'extendedPrice' + */ + @Test + public void extendedPriceTest() { + // TODO: test extendedPrice + } + + /** + * Test the property 'taxAmount' + */ + @Test + public void taxAmountTest() { + // TODO: test taxAmount + } + + /** + * Test the property 'currencyCode' + */ + @Test + public void currencyCodeTest() { + // TODO: test currencyCode + } + + /** + * Test the property 'quantityOrdered' + */ + @Test + public void quantityOrderedTest() { + // TODO: test quantityOrdered + } + + /** + * Test the property 'quantityConfirmed' + */ + @Test + public void quantityConfirmedTest() { + // TODO: test quantityConfirmed + } + + /** + * Test the property 'quantityBackOrdered' + */ + @Test + public void quantityBackOrderedTest() { + // TODO: test quantityBackOrdered + } + + /** + * Test the property 'specialBidNumber' + */ + @Test + public void specialBidNumberTest() { + // TODO: test specialBidNumber + } + + /** + * Test the property 'requestedDeliveryDate' + */ + @Test + public void requestedDeliveryDateTest() { + // TODO: test requestedDeliveryDate + } + + /** + * Test the property 'promisedDeliveryDate' + */ + @Test + public void promisedDeliveryDateTest() { + // TODO: test promisedDeliveryDate + } + + /** + * Test the property 'lineNotes' + */ + @Test + public void lineNotesTest() { + // TODO: test lineNotes + } + + /** + * Test the property 'shipmentDetails' + */ + @Test + public void shipmentDetailsTest() { + // TODO: test shipmentDetails + } + + /** + * Test the property 'additionalAttributes' + */ + @Test + public void additionalAttributesTest() { + // TODO: test additionalAttributes + } + + /** + * Test the property 'links' + */ + @Test + public void linksTest() { + // TODO: test links + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailResponseMiscellaneousChargesInnerTest.java b/src/test/java/xiresellers/client/model/OrderDetailResponseMiscellaneousChargesInnerTest.java new file mode 100644 index 00000000..8ae70104 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailResponseMiscellaneousChargesInnerTest.java @@ -0,0 +1,72 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailResponseMiscellaneousChargesInner + */ +public class OrderDetailResponseMiscellaneousChargesInnerTest { + private final OrderDetailResponseMiscellaneousChargesInner model = new OrderDetailResponseMiscellaneousChargesInner(); + + /** + * Model tests for OrderDetailResponseMiscellaneousChargesInner + */ + @Test + public void testOrderDetailResponseMiscellaneousChargesInner() { + // TODO: test OrderDetailResponseMiscellaneousChargesInner + } + + /** + * Test the property 'subOrderNumber' + */ + @Test + public void subOrderNumberTest() { + // TODO: test subOrderNumber + } + + /** + * Test the property 'chargeLineReference' + */ + @Test + public void chargeLineReferenceTest() { + // TODO: test chargeLineReference + } + + /** + * Test the property 'chargeDescription' + */ + @Test + public void chargeDescriptionTest() { + // TODO: test chargeDescription + } + + /** + * Test the property 'chargeAmount' + */ + @Test + public void chargeAmountTest() { + // TODO: test chargeAmount + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddressTest.java b/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddressTest.java new file mode 100644 index 00000000..58ad6586 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddressTest.java @@ -0,0 +1,120 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress + */ +public class OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddressTest { + private final OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress model = new OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress(); + + /** + * Model tests for OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress + */ + @Test + public void testOrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress() { + // TODO: test OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress + } + + /** + * Test the property 'suffix' + */ + @Test + public void suffixTest() { + // TODO: test suffix + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'attention' + */ + @Test + public void attentionTest() { + // TODO: test attention + } + + /** + * Test the property 'addressline1' + */ + @Test + public void addressline1Test() { + // TODO: test addressline1 + } + + /** + * Test the property 'addressline2' + */ + @Test + public void addressline2Test() { + // TODO: test addressline2 + } + + /** + * Test the property 'addressline3' + */ + @Test + public void addressline3Test() { + // TODO: test addressline3 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalcode' + */ + @Test + public void postalcodeTest() { + // TODO: test postalcode + } + + /** + * Test the property 'countrycode' + */ + @Test + public void countrycodeTest() { + // TODO: test countrycode + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInnerTest.java b/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInnerTest.java new file mode 100644 index 00000000..2940c058 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInnerTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner + */ +public class OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInnerTest { + private final OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner model = new OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner(); + + /** + * Model tests for OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner + */ + @Test + public void testOrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner() { + // TODO: test OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner + } + + /** + * Test the property 'commenttext1' + */ + @Test + public void commenttext1Test() { + // TODO: test commenttext1 + } + + /** + * Test the property 'commenttext2' + */ + @Test + public void commenttext2Test() { + // TODO: test commenttext2 + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfoTest.java b/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfoTest.java new file mode 100644 index 00000000..b20b2d1b --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfoTest.java @@ -0,0 +1,48 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo + */ +public class OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfoTest { + private final OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo model = new OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo(); + + /** + * Model tests for OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo + */ + @Test + public void testOrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo() { + // TODO: test OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo + } + + /** + * Test the property 'enduserid' + */ + @Test + public void enduseridTest() { + // TODO: test enduserid + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInnerTest.java b/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInnerTest.java new file mode 100644 index 00000000..da9a9aeb --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInnerTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner + */ +public class OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInnerTest { + private final OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner model = new OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner(); + + /** + * Model tests for OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner + */ + @Test + public void testOrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner() { + // TODO: test OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner + } + + /** + * Test the property 'attributename' + */ + @Test + public void attributenameTest() { + // TODO: test attributename + } + + /** + * Test the property 'attributevalue' + */ + @Test + public void attributevalueTest() { + // TODO: test attributevalue + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInnerTest.java b/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInnerTest.java new file mode 100644 index 00000000..ae59a77c --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInnerTest.java @@ -0,0 +1,48 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner + */ +public class OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInnerTest { + private final OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner model = new OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner(); + + /** + * Model tests for OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner + */ + @Test + public void testOrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner() { + // TODO: test OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner + } + + /** + * Test the property 'serialnumber' + */ + @Test + public void serialnumberTest() { + // TODO: test serialnumber + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetailsTest.java b/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetailsTest.java new file mode 100644 index 00000000..ddd33c8e --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetailsTest.java @@ -0,0 +1,72 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails + */ +public class OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetailsTest { + private final OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails model = new OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails(); + + /** + * Model tests for OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails + */ + @Test + public void testOrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails() { + // TODO: test OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails + } + + /** + * Test the property 'trackingnumber' + */ + @Test + public void trackingnumberTest() { + // TODO: test trackingnumber + } + + /** + * Test the property 'packageweight' + */ + @Test + public void packageweightTest() { + // TODO: test packageweight + } + + /** + * Test the property 'cartonnumber' + */ + @Test + public void cartonnumberTest() { + // TODO: test cartonnumber + } + + /** + * Test the property 'quantityinbox' + */ + @Test + public void quantityinboxTest() { + // TODO: test quantityinbox + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerTest.java b/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerTest.java new file mode 100644 index 00000000..ce8bb334 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerTest.java @@ -0,0 +1,170 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerPackagedetails; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner + */ +public class OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInnerTest { + private final OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner model = new OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner(); + + /** + * Model tests for OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner + */ + @Test + public void testOrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner() { + // TODO: test OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner + } + + /** + * Test the property 'quantity' + */ + @Test + public void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'shipmentdate' + */ + @Test + public void shipmentdateTest() { + // TODO: test shipmentdate + } + + /** + * Test the property 'shipfromwarehouseid' + */ + @Test + public void shipfromwarehouseidTest() { + // TODO: test shipfromwarehouseid + } + + /** + * Test the property 'warehousename' + */ + @Test + public void warehousenameTest() { + // TODO: test warehousename + } + + /** + * Test the property 'invoicenumber' + */ + @Test + public void invoicenumberTest() { + // TODO: test invoicenumber + } + + /** + * Test the property 'invoicedate' + */ + @Test + public void invoicedateTest() { + // TODO: test invoicedate + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'statusdescription' + */ + @Test + public void statusdescriptionTest() { + // TODO: test statusdescription + } + + /** + * Test the property 'shippeddate' + */ + @Test + public void shippeddateTest() { + // TODO: test shippeddate + } + + /** + * Test the property 'holdreasoncodedescription' + */ + @Test + public void holdreasoncodedescriptionTest() { + // TODO: test holdreasoncodedescription + } + + /** + * Test the property 'ponumber' + */ + @Test + public void ponumberTest() { + // TODO: test ponumber + } + + /** + * Test the property 'carriertype' + */ + @Test + public void carriertypeTest() { + // TODO: test carriertype + } + + /** + * Test the property 'carriercode' + */ + @Test + public void carriercodeTest() { + // TODO: test carriercode + } + + /** + * Test the property 'carriername' + */ + @Test + public void carriernameTest() { + // TODO: test carriername + } + + /** + * Test the property 'pronumber' + */ + @Test + public void pronumberTest() { + // TODO: test pronumber + } + + /** + * Test the property 'packagedetails' + */ + @Test + public void packagedetailsTest() { + // TODO: test packagedetails + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerTest.java b/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerTest.java new file mode 100644 index 00000000..c734ca41 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerTest.java @@ -0,0 +1,230 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner; +import xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerSerialnumberdetailsInner; +import xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerShipmentdetailsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailResponseServiceresponseOrderdetailresponseLinesInner + */ +public class OrderDetailResponseServiceresponseOrderdetailresponseLinesInnerTest { + private final OrderDetailResponseServiceresponseOrderdetailresponseLinesInner model = new OrderDetailResponseServiceresponseOrderdetailresponseLinesInner(); + + /** + * Model tests for OrderDetailResponseServiceresponseOrderdetailresponseLinesInner + */ + @Test + public void testOrderDetailResponseServiceresponseOrderdetailresponseLinesInner() { + // TODO: test OrderDetailResponseServiceresponseOrderdetailresponseLinesInner + } + + /** + * Test the property 'linenumber' + */ + @Test + public void linenumberTest() { + // TODO: test linenumber + } + + /** + * Test the property 'globallinenumber' + */ + @Test + public void globallinenumberTest() { + // TODO: test globallinenumber + } + + /** + * Test the property 'ordersuffix' + */ + @Test + public void ordersuffixTest() { + // TODO: test ordersuffix + } + + /** + * Test the property 'erpordernumber' + */ + @Test + public void erpordernumberTest() { + // TODO: test erpordernumber + } + + /** + * Test the property 'linestatus' + */ + @Test + public void linestatusTest() { + // TODO: test linestatus + } + + /** + * Test the property 'partnumber' + */ + @Test + public void partnumberTest() { + // TODO: test partnumber + } + + /** + * Test the property 'manufacturerpartnumber' + */ + @Test + public void manufacturerpartnumberTest() { + // TODO: test manufacturerpartnumber + } + + /** + * Test the property 'vendorname' + */ + @Test + public void vendornameTest() { + // TODO: test vendorname + } + + /** + * Test the property 'vendorcode' + */ + @Test + public void vendorcodeTest() { + // TODO: test vendorcode + } + + /** + * Test the property 'partdescription1' + */ + @Test + public void partdescription1Test() { + // TODO: test partdescription1 + } + + /** + * Test the property 'partdescription2' + */ + @Test + public void partdescription2Test() { + // TODO: test partdescription2 + } + + /** + * Test the property 'unitweight' + */ + @Test + public void unitweightTest() { + // TODO: test unitweight + } + + /** + * Test the property 'unitprice' + */ + @Test + public void unitpriceTest() { + // TODO: test unitprice + } + + /** + * Test the property 'extendedprice' + */ + @Test + public void extendedpriceTest() { + // TODO: test extendedprice + } + + /** + * Test the property 'taxamount' + */ + @Test + public void taxamountTest() { + // TODO: test taxamount + } + + /** + * Test the property 'requestedquantity' + */ + @Test + public void requestedquantityTest() { + // TODO: test requestedquantity + } + + /** + * Test the property 'confirmedquantity' + */ + @Test + public void confirmedquantityTest() { + // TODO: test confirmedquantity + } + + /** + * Test the property 'backorderquantity' + */ + @Test + public void backorderquantityTest() { + // TODO: test backorderquantity + } + + /** + * Test the property 'serialnumberdetails' + */ + @Test + public void serialnumberdetailsTest() { + // TODO: test serialnumberdetails + } + + /** + * Test the property 'trackingnumber' + */ + @Test + public void trackingnumberTest() { + // TODO: test trackingnumber + } + + /** + * Test the property 'shipmentdetails' + */ + @Test + public void shipmentdetailsTest() { + // TODO: test shipmentdetails + } + + /** + * Test the property 'productextendedspecs' + */ + @Test + public void productextendedspecsTest() { + // TODO: test productextendedspecs + } + + /** + * Test the property 'backorderetadate' + */ + @Test + public void backorderetadateTest() { + // TODO: test backorderetadate + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInnerTest.java b/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInnerTest.java new file mode 100644 index 00000000..934ac048 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInnerTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner + */ +public class OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInnerTest { + private final OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner model = new OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner(); + + /** + * Model tests for OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner + */ + @Test + public void testOrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner() { + // TODO: test OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'chargeamount' + */ + @Test + public void chargeamountTest() { + // TODO: test chargeamount + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddressTest.java b/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddressTest.java new file mode 100644 index 00000000..fac56207 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddressTest.java @@ -0,0 +1,120 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress + */ +public class OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddressTest { + private final OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress model = new OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress(); + + /** + * Model tests for OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress + */ + @Test + public void testOrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress() { + // TODO: test OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress + } + + /** + * Test the property 'suffix' + */ + @Test + public void suffixTest() { + // TODO: test suffix + } + + /** + * Test the property 'attention' + */ + @Test + public void attentionTest() { + // TODO: test attention + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'addressline1' + */ + @Test + public void addressline1Test() { + // TODO: test addressline1 + } + + /** + * Test the property 'addressline2' + */ + @Test + public void addressline2Test() { + // TODO: test addressline2 + } + + /** + * Test the property 'addressline3' + */ + @Test + public void addressline3Test() { + // TODO: test addressline3 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalcode' + */ + @Test + public void postalcodeTest() { + // TODO: test postalcode + } + + /** + * Test the property 'countrycode' + */ + @Test + public void countrycodeTest() { + // TODO: test countrycode + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseTest.java b/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseTest.java new file mode 100644 index 00000000..16393808 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseOrderdetailresponseTest.java @@ -0,0 +1,210 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseBilltoaddress; +import xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseCommentlinesInner; +import xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseEnduserinfo; +import xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseExtendedspecsInner; +import xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseLinesInner; +import xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseMiscfeelineInner; +import xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponseShiptoaddress; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailResponseServiceresponseOrderdetailresponse + */ +public class OrderDetailResponseServiceresponseOrderdetailresponseTest { + private final OrderDetailResponseServiceresponseOrderdetailresponse model = new OrderDetailResponseServiceresponseOrderdetailresponse(); + + /** + * Model tests for OrderDetailResponseServiceresponseOrderdetailresponse + */ + @Test + public void testOrderDetailResponseServiceresponseOrderdetailresponse() { + // TODO: test OrderDetailResponseServiceresponseOrderdetailresponse + } + + /** + * Test the property 'ordernumber' + */ + @Test + public void ordernumberTest() { + // TODO: test ordernumber + } + + /** + * Test the property 'ordertype' + */ + @Test + public void ordertypeTest() { + // TODO: test ordertype + } + + /** + * Test the property 'customerordernumber' + */ + @Test + public void customerordernumberTest() { + // TODO: test customerordernumber + } + + /** + * Test the property 'enduserponumber' + */ + @Test + public void enduserponumberTest() { + // TODO: test enduserponumber + } + + /** + * Test the property 'orderstatus' + */ + @Test + public void orderstatusTest() { + // TODO: test orderstatus + } + + /** + * Test the property 'entrytimestamp' + */ + @Test + public void entrytimestampTest() { + // TODO: test entrytimestamp + } + + /** + * Test the property 'entrymethoddescription' + */ + @Test + public void entrymethoddescriptionTest() { + // TODO: test entrymethoddescription + } + + /** + * Test the property 'ordertotalvalue' + */ + @Test + public void ordertotalvalueTest() { + // TODO: test ordertotalvalue + } + + /** + * Test the property 'ordersubtotal' + */ + @Test + public void ordersubtotalTest() { + // TODO: test ordersubtotal + } + + /** + * Test the property 'freightamount' + */ + @Test + public void freightamountTest() { + // TODO: test freightamount + } + + /** + * Test the property 'currencycode' + */ + @Test + public void currencycodeTest() { + // TODO: test currencycode + } + + /** + * Test the property 'totalweight' + */ + @Test + public void totalweightTest() { + // TODO: test totalweight + } + + /** + * Test the property 'totaltax' + */ + @Test + public void totaltaxTest() { + // TODO: test totaltax + } + + /** + * Test the property 'billtoaddress' + */ + @Test + public void billtoaddressTest() { + // TODO: test billtoaddress + } + + /** + * Test the property 'shiptoaddress' + */ + @Test + public void shiptoaddressTest() { + // TODO: test shiptoaddress + } + + /** + * Test the property 'enduserinfo' + */ + @Test + public void enduserinfoTest() { + // TODO: test enduserinfo + } + + /** + * Test the property 'lines' + */ + @Test + public void linesTest() { + // TODO: test lines + } + + /** + * Test the property 'commentlines' + */ + @Test + public void commentlinesTest() { + // TODO: test commentlines + } + + /** + * Test the property 'miscfeeline' + */ + @Test + public void miscfeelineTest() { + // TODO: test miscfeeline + } + + /** + * Test the property 'extendedspecs' + */ + @Test + public void extendedspecsTest() { + // TODO: test extendedspecs + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseTest.java b/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseTest.java new file mode 100644 index 00000000..dcce975c --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailResponseServiceresponseTest.java @@ -0,0 +1,58 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.InvoiceDetailResponseServiceresponseResponsepreamble; +import xiresellers.client.model.OrderDetailResponseServiceresponseOrderdetailresponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailResponseServiceresponse + */ +public class OrderDetailResponseServiceresponseTest { + private final OrderDetailResponseServiceresponse model = new OrderDetailResponseServiceresponse(); + + /** + * Model tests for OrderDetailResponseServiceresponse + */ + @Test + public void testOrderDetailResponseServiceresponse() { + // TODO: test OrderDetailResponseServiceresponse + } + + /** + * Test the property 'responsepreamble' + */ + @Test + public void responsepreambleTest() { + // TODO: test responsepreamble + } + + /** + * Test the property 'orderdetailresponse' + */ + @Test + public void orderdetailresponseTest() { + // TODO: test orderdetailresponse + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailResponseShipToInfoTest.java b/src/test/java/xiresellers/client/model/OrderDetailResponseShipToInfoTest.java new file mode 100644 index 00000000..acd1cc0b --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailResponseShipToInfoTest.java @@ -0,0 +1,144 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailResponseShipToInfo + */ +public class OrderDetailResponseShipToInfoTest { + private final OrderDetailResponseShipToInfo model = new OrderDetailResponseShipToInfo(); + + /** + * Model tests for OrderDetailResponseShipToInfo + */ + @Test + public void testOrderDetailResponseShipToInfo() { + // TODO: test OrderDetailResponseShipToInfo + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'name1' + */ + @Test + public void name1Test() { + // TODO: test name1 + } + + /** + * Test the property 'name2' + */ + @Test + public void name2Test() { + // TODO: test name2 + } + + /** + * Test the property 'addressLine1' + */ + @Test + public void addressLine1Test() { + // TODO: test addressLine1 + } + + /** + * Test the property 'addressLine2' + */ + @Test + public void addressLine2Test() { + // TODO: test addressLine2 + } + + /** + * Test the property 'addressLine3' + */ + @Test + public void addressLine3Test() { + // TODO: test addressLine3 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalCode' + */ + @Test + public void postalCodeTest() { + // TODO: test postalCode + } + + /** + * Test the property 'countryCode' + */ + @Test + public void countryCodeTest() { + // TODO: test countryCode + } + + /** + * Test the property 'phoneNumber' + */ + @Test + public void phoneNumberTest() { + // TODO: test phoneNumber + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderDetailResponseTest.java b/src/test/java/xiresellers/client/model/OrderDetailResponseTest.java new file mode 100644 index 00000000..3f64eaba --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderDetailResponseTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderDetailResponseServiceresponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderDetailResponse + */ +public class OrderDetailResponseTest { + private final OrderDetailResponse model = new OrderDetailResponse(); + + /** + * Model tests for OrderDetailResponse + */ + @Test + public void testOrderDetailResponse() { + // TODO: test OrderDetailResponse + } + + /** + * Test the property 'serviceresponse' + */ + @Test + public void serviceresponseTest() { + // TODO: test serviceresponse + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderModifyRequestAdditionalAttributesInnerTest.java b/src/test/java/xiresellers/client/model/OrderModifyRequestAdditionalAttributesInnerTest.java new file mode 100644 index 00000000..0bd6ff7d --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderModifyRequestAdditionalAttributesInnerTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderModifyRequestAdditionalAttributesInner + */ +public class OrderModifyRequestAdditionalAttributesInnerTest { + private final OrderModifyRequestAdditionalAttributesInner model = new OrderModifyRequestAdditionalAttributesInner(); + + /** + * Model tests for OrderModifyRequestAdditionalAttributesInner + */ + @Test + public void testOrderModifyRequestAdditionalAttributesInner() { + // TODO: test OrderModifyRequestAdditionalAttributesInner + } + + /** + * Test the property 'attributeName' + */ + @Test + public void attributeNameTest() { + // TODO: test attributeName + } + + /** + * Test the property 'attributeValue' + */ + @Test + public void attributeValueTest() { + // TODO: test attributeValue + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderModifyRequestLinesInnerTest.java b/src/test/java/xiresellers/client/model/OrderModifyRequestLinesInnerTest.java new file mode 100644 index 00000000..32b770f5 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderModifyRequestLinesInnerTest.java @@ -0,0 +1,88 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderModifyRequestLinesInner + */ +public class OrderModifyRequestLinesInnerTest { + private final OrderModifyRequestLinesInner model = new OrderModifyRequestLinesInner(); + + /** + * Model tests for OrderModifyRequestLinesInner + */ + @Test + public void testOrderModifyRequestLinesInner() { + // TODO: test OrderModifyRequestLinesInner + } + + /** + * Test the property 'ingramPartNumber' + */ + @Test + public void ingramPartNumberTest() { + // TODO: test ingramPartNumber + } + + /** + * Test the property 'ingramLineNumber' + */ + @Test + public void ingramLineNumberTest() { + // TODO: test ingramLineNumber + } + + /** + * Test the property 'customerLineNumber' + */ + @Test + public void customerLineNumberTest() { + // TODO: test customerLineNumber + } + + /** + * Test the property 'addUpdateDeleteLine' + */ + @Test + public void addUpdateDeleteLineTest() { + // TODO: test addUpdateDeleteLine + } + + /** + * Test the property 'quantity' + */ + @Test + public void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'notes' + */ + @Test + public void notesTest() { + // TODO: test notes + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestHeaderdataTest.java b/src/test/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestHeaderdataTest.java new file mode 100644 index 00000000..dcd75f52 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestHeaderdataTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata + */ +public class OrderModifyRequestServicerequestOrdermodifyrequestHeaderdataTest { + private final OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata model = new OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata(); + + /** + * Model tests for OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata + */ + @Test + public void testOrderModifyRequestServicerequestOrdermodifyrequestHeaderdata() { + // TODO: test OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata + } + + /** + * Test the property 'actioncode' + */ + @Test + public void actioncodeTest() { + // TODO: test actioncode + } + + /** + * Test the property 'shipviacode' + */ + @Test + public void shipviacodeTest() { + // TODO: test shipviacode + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestLinedataInnerTest.java b/src/test/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestLinedataInnerTest.java new file mode 100644 index 00000000..abc0d0fb --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestLinedataInnerTest.java @@ -0,0 +1,96 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner + */ +public class OrderModifyRequestServicerequestOrdermodifyrequestLinedataInnerTest { + private final OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner model = new OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner(); + + /** + * Model tests for OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner + */ + @Test + public void testOrderModifyRequestServicerequestOrdermodifyrequestLinedataInner() { + // TODO: test OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner + } + + /** + * Test the property 'addlineorupdateline' + */ + @Test + public void addlineorupdatelineTest() { + // TODO: test addlineorupdateline + } + + /** + * Test the property 'linenumber' + */ + @Test + public void linenumberTest() { + // TODO: test linenumber + } + + /** + * Test the property 'customerlinenumber' + */ + @Test + public void customerlinenumberTest() { + // TODO: test customerlinenumber + } + + /** + * Test the property 'ingrampartnumber' + */ + @Test + public void ingrampartnumberTest() { + // TODO: test ingrampartnumber + } + + /** + * Test the property 'quantityordered' + */ + @Test + public void quantityorderedTest() { + // TODO: test quantityordered + } + + /** + * Test the property 'customerpartnumber' + */ + @Test + public void customerpartnumberTest() { + // TODO: test customerpartnumber + } + + /** + * Test the property 'linetype' + */ + @Test + public void linetypeTest() { + // TODO: test linetype + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestShiptoTest.java b/src/test/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestShiptoTest.java new file mode 100644 index 00000000..3961985c --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestShiptoTest.java @@ -0,0 +1,96 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderModifyRequestServicerequestOrdermodifyrequestShipto + */ +public class OrderModifyRequestServicerequestOrdermodifyrequestShiptoTest { + private final OrderModifyRequestServicerequestOrdermodifyrequestShipto model = new OrderModifyRequestServicerequestOrdermodifyrequestShipto(); + + /** + * Model tests for OrderModifyRequestServicerequestOrdermodifyrequestShipto + */ + @Test + public void testOrderModifyRequestServicerequestOrdermodifyrequestShipto() { + // TODO: test OrderModifyRequestServicerequestOrdermodifyrequestShipto + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'addressline' + */ + @Test + public void addresslineTest() { + // TODO: test addressline + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalcode' + */ + @Test + public void postalcodeTest() { + // TODO: test postalcode + } + + /** + * Test the property 'countrycode' + */ + @Test + public void countrycodeTest() { + // TODO: test countrycode + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestTest.java b/src/test/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestTest.java new file mode 100644 index 00000000..3a5517ef --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderModifyRequestServicerequestOrdermodifyrequestTest.java @@ -0,0 +1,109 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderModifyRequestServicerequestOrdermodifyrequestHeaderdata; +import xiresellers.client.model.OrderModifyRequestServicerequestOrdermodifyrequestLinedataInner; +import xiresellers.client.model.OrderModifyRequestServicerequestOrdermodifyrequestShipto; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderModifyRequestServicerequestOrdermodifyrequest + */ +public class OrderModifyRequestServicerequestOrdermodifyrequestTest { + private final OrderModifyRequestServicerequestOrdermodifyrequest model = new OrderModifyRequestServicerequestOrdermodifyrequest(); + + /** + * Model tests for OrderModifyRequestServicerequestOrdermodifyrequest + */ + @Test + public void testOrderModifyRequestServicerequestOrdermodifyrequest() { + // TODO: test OrderModifyRequestServicerequestOrdermodifyrequest + } + + /** + * Test the property 'ingramorderbranch' + */ + @Test + public void ingramorderbranchTest() { + // TODO: test ingramorderbranch + } + + /** + * Test the property 'ingramordernumber' + */ + @Test + public void ingramordernumberTest() { + // TODO: test ingramordernumber + } + + /** + * Test the property 'ingramorderdist' + */ + @Test + public void ingramorderdistTest() { + // TODO: test ingramorderdist + } + + /** + * Test the property 'ingramordership' + */ + @Test + public void ingramordershipTest() { + // TODO: test ingramordership + } + + /** + * Test the property 'customerponumber' + */ + @Test + public void customerponumberTest() { + // TODO: test customerponumber + } + + /** + * Test the property 'shipto' + */ + @Test + public void shiptoTest() { + // TODO: test shipto + } + + /** + * Test the property 'headerdata' + */ + @Test + public void headerdataTest() { + // TODO: test headerdata + } + + /** + * Test the property 'linedata' + */ + @Test + public void linedataTest() { + // TODO: test linedata + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderModifyRequestServicerequestRequestpreambleTest.java b/src/test/java/xiresellers/client/model/OrderModifyRequestServicerequestRequestpreambleTest.java new file mode 100644 index 00000000..d02f01ed --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderModifyRequestServicerequestRequestpreambleTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderModifyRequestServicerequestRequestpreamble + */ +public class OrderModifyRequestServicerequestRequestpreambleTest { + private final OrderModifyRequestServicerequestRequestpreamble model = new OrderModifyRequestServicerequestRequestpreamble(); + + /** + * Model tests for OrderModifyRequestServicerequestRequestpreamble + */ + @Test + public void testOrderModifyRequestServicerequestRequestpreamble() { + // TODO: test OrderModifyRequestServicerequestRequestpreamble + } + + /** + * Test the property 'isocountrycode' + */ + @Test + public void isocountrycodeTest() { + // TODO: test isocountrycode + } + + /** + * Test the property 'customernumber' + */ + @Test + public void customernumberTest() { + // TODO: test customernumber + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderModifyRequestServicerequestTest.java b/src/test/java/xiresellers/client/model/OrderModifyRequestServicerequestTest.java new file mode 100644 index 00000000..c77f43ae --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderModifyRequestServicerequestTest.java @@ -0,0 +1,58 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderModifyRequestServicerequestOrdermodifyrequest; +import xiresellers.client.model.OrderModifyRequestServicerequestRequestpreamble; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderModifyRequestServicerequest + */ +public class OrderModifyRequestServicerequestTest { + private final OrderModifyRequestServicerequest model = new OrderModifyRequestServicerequest(); + + /** + * Model tests for OrderModifyRequestServicerequest + */ + @Test + public void testOrderModifyRequestServicerequest() { + // TODO: test OrderModifyRequestServicerequest + } + + /** + * Test the property 'requestpreamble' + */ + @Test + public void requestpreambleTest() { + // TODO: test requestpreamble + } + + /** + * Test the property 'ordermodifyrequest' + */ + @Test + public void ordermodifyrequestTest() { + // TODO: test ordermodifyrequest + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderModifyRequestShipToInfoTest.java b/src/test/java/xiresellers/client/model/OrderModifyRequestShipToInfoTest.java new file mode 100644 index 00000000..40dcdfab --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderModifyRequestShipToInfoTest.java @@ -0,0 +1,152 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderModifyRequestShipToInfo + */ +public class OrderModifyRequestShipToInfoTest { + private final OrderModifyRequestShipToInfo model = new OrderModifyRequestShipToInfo(); + + /** + * Model tests for OrderModifyRequestShipToInfo + */ + @Test + public void testOrderModifyRequestShipToInfo() { + // TODO: test OrderModifyRequestShipToInfo + } + + /** + * Test the property 'addressId' + */ + @Test + public void addressIdTest() { + // TODO: test addressId + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'name1' + */ + @Test + public void name1Test() { + // TODO: test name1 + } + + /** + * Test the property 'name2' + */ + @Test + public void name2Test() { + // TODO: test name2 + } + + /** + * Test the property 'addressLine1' + */ + @Test + public void addressLine1Test() { + // TODO: test addressLine1 + } + + /** + * Test the property 'addressLine2' + */ + @Test + public void addressLine2Test() { + // TODO: test addressLine2 + } + + /** + * Test the property 'addressLine3' + */ + @Test + public void addressLine3Test() { + // TODO: test addressLine3 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalCode' + */ + @Test + public void postalCodeTest() { + // TODO: test postalCode + } + + /** + * Test the property 'countryCode' + */ + @Test + public void countryCodeTest() { + // TODO: test countryCode + } + + /** + * Test the property 'phoneNumber' + */ + @Test + public void phoneNumberTest() { + // TODO: test phoneNumber + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderModifyRequestTest.java b/src/test/java/xiresellers/client/model/OrderModifyRequestTest.java new file mode 100644 index 00000000..4e47e88c --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderModifyRequestTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderModifyRequestServicerequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderModifyRequest + */ +public class OrderModifyRequestTest { + private final OrderModifyRequest model = new OrderModifyRequest(); + + /** + * Model tests for OrderModifyRequest + */ + @Test + public void testOrderModifyRequest() { + // TODO: test OrderModifyRequest + } + + /** + * Test the property 'servicerequest' + */ + @Test + public void servicerequestTest() { + // TODO: test servicerequest + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderModifyResponseLinesInnerAdditionalAttributesInnerTest.java b/src/test/java/xiresellers/client/model/OrderModifyResponseLinesInnerAdditionalAttributesInnerTest.java new file mode 100644 index 00000000..8dce92bb --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderModifyResponseLinesInnerAdditionalAttributesInnerTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderModifyResponseLinesInnerAdditionalAttributesInner + */ +public class OrderModifyResponseLinesInnerAdditionalAttributesInnerTest { + private final OrderModifyResponseLinesInnerAdditionalAttributesInner model = new OrderModifyResponseLinesInnerAdditionalAttributesInner(); + + /** + * Model tests for OrderModifyResponseLinesInnerAdditionalAttributesInner + */ + @Test + public void testOrderModifyResponseLinesInnerAdditionalAttributesInner() { + // TODO: test OrderModifyResponseLinesInnerAdditionalAttributesInner + } + + /** + * Test the property 'attributeName' + */ + @Test + public void attributeNameTest() { + // TODO: test attributeName + } + + /** + * Test the property 'attributeValue' + */ + @Test + public void attributeValueTest() { + // TODO: test attributeValue + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderModifyResponseLinesInnerShipmentDetailsTest.java b/src/test/java/xiresellers/client/model/OrderModifyResponseLinesInnerShipmentDetailsTest.java new file mode 100644 index 00000000..d11a79b4 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderModifyResponseLinesInnerShipmentDetailsTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderModifyResponseLinesInnerShipmentDetails + */ +public class OrderModifyResponseLinesInnerShipmentDetailsTest { + private final OrderModifyResponseLinesInnerShipmentDetails model = new OrderModifyResponseLinesInnerShipmentDetails(); + + /** + * Model tests for OrderModifyResponseLinesInnerShipmentDetails + */ + @Test + public void testOrderModifyResponseLinesInnerShipmentDetails() { + // TODO: test OrderModifyResponseLinesInnerShipmentDetails + } + + /** + * Test the property 'carrierCode' + */ + @Test + public void carrierCodeTest() { + // TODO: test carrierCode + } + + /** + * Test the property 'carrierName' + */ + @Test + public void carrierNameTest() { + // TODO: test carrierName + } + + /** + * Test the property 'freightAccountNumber' + */ + @Test + public void freightAccountNumberTest() { + // TODO: test freightAccountNumber + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderModifyResponseLinesInnerTest.java b/src/test/java/xiresellers/client/model/OrderModifyResponseLinesInnerTest.java new file mode 100644 index 00000000..4835720c --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderModifyResponseLinesInnerTest.java @@ -0,0 +1,132 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderModifyResponseLinesInnerAdditionalAttributesInner; +import xiresellers.client.model.OrderModifyResponseLinesInnerShipmentDetails; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderModifyResponseLinesInner + */ +public class OrderModifyResponseLinesInnerTest { + private final OrderModifyResponseLinesInner model = new OrderModifyResponseLinesInner(); + + /** + * Model tests for OrderModifyResponseLinesInner + */ + @Test + public void testOrderModifyResponseLinesInner() { + // TODO: test OrderModifyResponseLinesInner + } + + /** + * Test the property 'subOrderNumber' + */ + @Test + public void subOrderNumberTest() { + // TODO: test subOrderNumber + } + + /** + * Test the property 'ingramLineNumber' + */ + @Test + public void ingramLineNumberTest() { + // TODO: test ingramLineNumber + } + + /** + * Test the property 'customerLineNumber' + */ + @Test + public void customerLineNumberTest() { + // TODO: test customerLineNumber + } + + /** + * Test the property 'ingramPartNumber' + */ + @Test + public void ingramPartNumberTest() { + // TODO: test ingramPartNumber + } + + /** + * Test the property 'vendorPartNumber' + */ + @Test + public void vendorPartNumberTest() { + // TODO: test vendorPartNumber + } + + /** + * Test the property 'quantityOrdered' + */ + @Test + public void quantityOrderedTest() { + // TODO: test quantityOrdered + } + + /** + * Test the property 'quantityConfirmed' + */ + @Test + public void quantityConfirmedTest() { + // TODO: test quantityConfirmed + } + + /** + * Test the property 'quantityBackOrdered' + */ + @Test + public void quantityBackOrderedTest() { + // TODO: test quantityBackOrdered + } + + /** + * Test the property 'shipmentDetails' + */ + @Test + public void shipmentDetailsTest() { + // TODO: test shipmentDetails + } + + /** + * Test the property 'additionalAttributes' + */ + @Test + public void additionalAttributesTest() { + // TODO: test additionalAttributes + } + + /** + * Test the property 'notes' + */ + @Test + public void notesTest() { + // TODO: test notes + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderModifyResponseRejectedLineItemsInnerTest.java b/src/test/java/xiresellers/client/model/OrderModifyResponseRejectedLineItemsInnerTest.java new file mode 100644 index 00000000..4d7792c1 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderModifyResponseRejectedLineItemsInnerTest.java @@ -0,0 +1,96 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderModifyResponseRejectedLineItemsInner + */ +public class OrderModifyResponseRejectedLineItemsInnerTest { + private final OrderModifyResponseRejectedLineItemsInner model = new OrderModifyResponseRejectedLineItemsInner(); + + /** + * Model tests for OrderModifyResponseRejectedLineItemsInner + */ + @Test + public void testOrderModifyResponseRejectedLineItemsInner() { + // TODO: test OrderModifyResponseRejectedLineItemsInner + } + + /** + * Test the property 'ingramLineNumber' + */ + @Test + public void ingramLineNumberTest() { + // TODO: test ingramLineNumber + } + + /** + * Test the property 'customerLineNumber' + */ + @Test + public void customerLineNumberTest() { + // TODO: test customerLineNumber + } + + /** + * Test the property 'ingramPartNumber' + */ + @Test + public void ingramPartNumberTest() { + // TODO: test ingramPartNumber + } + + /** + * Test the property 'vendorPartNumber' + */ + @Test + public void vendorPartNumberTest() { + // TODO: test vendorPartNumber + } + + /** + * Test the property 'quantityOrdered' + */ + @Test + public void quantityOrderedTest() { + // TODO: test quantityOrdered + } + + /** + * Test the property 'rejectCode' + */ + @Test + public void rejectCodeTest() { + // TODO: test rejectCode + } + + /** + * Test the property 'rejectReason' + */ + @Test + public void rejectReasonTest() { + // TODO: test rejectReason + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderModifyResponseServiceresponseOrdermodifyresponseTest.java b/src/test/java/xiresellers/client/model/OrderModifyResponseServiceresponseOrdermodifyresponseTest.java new file mode 100644 index 00000000..adba9901 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderModifyResponseServiceresponseOrdermodifyresponseTest.java @@ -0,0 +1,80 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderModifyResponseServiceresponseOrdermodifyresponse + */ +public class OrderModifyResponseServiceresponseOrdermodifyresponseTest { + private final OrderModifyResponseServiceresponseOrdermodifyresponse model = new OrderModifyResponseServiceresponseOrdermodifyresponse(); + + /** + * Model tests for OrderModifyResponseServiceresponseOrdermodifyresponse + */ + @Test + public void testOrderModifyResponseServiceresponseOrdermodifyresponse() { + // TODO: test OrderModifyResponseServiceresponseOrdermodifyresponse + } + + /** + * Test the property 'responseflag' + */ + @Test + public void responseflagTest() { + // TODO: test responseflag + } + + /** + * Test the property 'errortype' + */ + @Test + public void errortypeTest() { + // TODO: test errortype + } + + /** + * Test the property 'acktriggered' + */ + @Test + public void acktriggeredTest() { + // TODO: test acktriggered + } + + /** + * Test the property 'warncode' + */ + @Test + public void warncodeTest() { + // TODO: test warncode + } + + /** + * Test the property 'headerresponse' + */ + @Test + public void headerresponseTest() { + // TODO: test headerresponse + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderModifyResponseServiceresponseResponsepreambleTest.java b/src/test/java/xiresellers/client/model/OrderModifyResponseServiceresponseResponsepreambleTest.java new file mode 100644 index 00000000..8728f797 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderModifyResponseServiceresponseResponsepreambleTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderModifyResponseServiceresponseResponsepreamble + */ +public class OrderModifyResponseServiceresponseResponsepreambleTest { + private final OrderModifyResponseServiceresponseResponsepreamble model = new OrderModifyResponseServiceresponseResponsepreamble(); + + /** + * Model tests for OrderModifyResponseServiceresponseResponsepreamble + */ + @Test + public void testOrderModifyResponseServiceresponseResponsepreamble() { + // TODO: test OrderModifyResponseServiceresponseResponsepreamble + } + + /** + * Test the property 'responsestatus' + */ + @Test + public void responsestatusTest() { + // TODO: test responsestatus + } + + /** + * Test the property 'responsemessage' + */ + @Test + public void responsemessageTest() { + // TODO: test responsemessage + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderModifyResponseServiceresponseTest.java b/src/test/java/xiresellers/client/model/OrderModifyResponseServiceresponseTest.java new file mode 100644 index 00000000..e0e50cfa --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderModifyResponseServiceresponseTest.java @@ -0,0 +1,58 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderModifyResponseServiceresponseOrdermodifyresponse; +import xiresellers.client.model.OrderModifyResponseServiceresponseResponsepreamble; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderModifyResponseServiceresponse + */ +public class OrderModifyResponseServiceresponseTest { + private final OrderModifyResponseServiceresponse model = new OrderModifyResponseServiceresponse(); + + /** + * Model tests for OrderModifyResponseServiceresponse + */ + @Test + public void testOrderModifyResponseServiceresponse() { + // TODO: test OrderModifyResponseServiceresponse + } + + /** + * Test the property 'responsepreamble' + */ + @Test + public void responsepreambleTest() { + // TODO: test responsepreamble + } + + /** + * Test the property 'ordermodifyresponse' + */ + @Test + public void ordermodifyresponseTest() { + // TODO: test ordermodifyresponse + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderModifyResponseShipToInfoTest.java b/src/test/java/xiresellers/client/model/OrderModifyResponseShipToInfoTest.java new file mode 100644 index 00000000..1dd30fd8 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderModifyResponseShipToInfoTest.java @@ -0,0 +1,136 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderModifyResponseShipToInfo + */ +public class OrderModifyResponseShipToInfoTest { + private final OrderModifyResponseShipToInfo model = new OrderModifyResponseShipToInfo(); + + /** + * Model tests for OrderModifyResponseShipToInfo + */ + @Test + public void testOrderModifyResponseShipToInfo() { + // TODO: test OrderModifyResponseShipToInfo + } + + /** + * Test the property 'addressId' + */ + @Test + public void addressIdTest() { + // TODO: test addressId + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'addressLine1' + */ + @Test + public void addressLine1Test() { + // TODO: test addressLine1 + } + + /** + * Test the property 'addressLine2' + */ + @Test + public void addressLine2Test() { + // TODO: test addressLine2 + } + + /** + * Test the property 'addressLine3' + */ + @Test + public void addressLine3Test() { + // TODO: test addressLine3 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalCode' + */ + @Test + public void postalCodeTest() { + // TODO: test postalCode + } + + /** + * Test the property 'countryCode' + */ + @Test + public void countryCodeTest() { + // TODO: test countryCode + } + + /** + * Test the property 'phoneNumber' + */ + @Test + public void phoneNumberTest() { + // TODO: test phoneNumber + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderModifyResponseTest.java b/src/test/java/xiresellers/client/model/OrderModifyResponseTest.java new file mode 100644 index 00000000..5f922c13 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderModifyResponseTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderModifyResponseServiceresponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderModifyResponse + */ +public class OrderModifyResponseTest { + private final OrderModifyResponse model = new OrderModifyResponse(); + + /** + * Model tests for OrderModifyResponse + */ + @Test + public void testOrderModifyResponse() { + // TODO: test OrderModifyResponse + } + + /** + * Test the property 'serviceresponse' + */ + @Test + public void serviceresponseTest() { + // TODO: test serviceresponse + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumberTest.java b/src/test/java/xiresellers/client/model/OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumberTest.java new file mode 100644 index 00000000..a6eef157 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumberTest.java @@ -0,0 +1,48 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber + */ +public class OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumberTest { + private final OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber model = new OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber(); + + /** + * Model tests for OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber + */ + @Test + public void testOrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber() { + // TODO: test OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber + } + + /** + * Test the property 'customerOrderNumber' + */ + @Test + public void customerOrderNumberTest() { + // TODO: test customerOrderNumber + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderSearchRequestServicerequestOrderLookupRequestOrderNumberTest.java b/src/test/java/xiresellers/client/model/OrderSearchRequestServicerequestOrderLookupRequestOrderNumberTest.java new file mode 100644 index 00000000..5b02f896 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderSearchRequestServicerequestOrderLookupRequestOrderNumberTest.java @@ -0,0 +1,80 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderSearchRequestServicerequestOrderLookupRequestOrderNumber + */ +public class OrderSearchRequestServicerequestOrderLookupRequestOrderNumberTest { + private final OrderSearchRequestServicerequestOrderLookupRequestOrderNumber model = new OrderSearchRequestServicerequestOrderLookupRequestOrderNumber(); + + /** + * Model tests for OrderSearchRequestServicerequestOrderLookupRequestOrderNumber + */ + @Test + public void testOrderSearchRequestServicerequestOrderLookupRequestOrderNumber() { + // TODO: test OrderSearchRequestServicerequestOrderLookupRequestOrderNumber + } + + /** + * Test the property 'entryDate' + */ + @Test + public void entryDateTest() { + // TODO: test entryDate + } + + /** + * Test the property 'orderBranch' + */ + @Test + public void orderBranchTest() { + // TODO: test orderBranch + } + + /** + * Test the property 'orderNumber' + */ + @Test + public void orderNumberTest() { + // TODO: test orderNumber + } + + /** + * Test the property 'distributionNumber' + */ + @Test + public void distributionNumberTest() { + // TODO: test distributionNumber + } + + /** + * Test the property 'shipmentNumber' + */ + @Test + public void shipmentNumberTest() { + // TODO: test shipmentNumber + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderSearchRequestServicerequestOrderLookupRequestTest.java b/src/test/java/xiresellers/client/model/OrderSearchRequestServicerequestOrderLookupRequestTest.java new file mode 100644 index 00000000..53b6c86b --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderSearchRequestServicerequestOrderLookupRequestTest.java @@ -0,0 +1,58 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderSearchRequestServicerequestOrderLookupRequestCustomerOrderNumber; +import xiresellers.client.model.OrderSearchRequestServicerequestOrderLookupRequestOrderNumber; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderSearchRequestServicerequestOrderLookupRequest + */ +public class OrderSearchRequestServicerequestOrderLookupRequestTest { + private final OrderSearchRequestServicerequestOrderLookupRequest model = new OrderSearchRequestServicerequestOrderLookupRequest(); + + /** + * Model tests for OrderSearchRequestServicerequestOrderLookupRequest + */ + @Test + public void testOrderSearchRequestServicerequestOrderLookupRequest() { + // TODO: test OrderSearchRequestServicerequestOrderLookupRequest + } + + /** + * Test the property 'orderNumber' + */ + @Test + public void orderNumberTest() { + // TODO: test orderNumber + } + + /** + * Test the property 'customerOrderNumber' + */ + @Test + public void customerOrderNumberTest() { + // TODO: test customerOrderNumber + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderSearchRequestServicerequestRequestpreambleTest.java b/src/test/java/xiresellers/client/model/OrderSearchRequestServicerequestRequestpreambleTest.java new file mode 100644 index 00000000..4c893d82 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderSearchRequestServicerequestRequestpreambleTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderSearchRequestServicerequestRequestpreamble + */ +public class OrderSearchRequestServicerequestRequestpreambleTest { + private final OrderSearchRequestServicerequestRequestpreamble model = new OrderSearchRequestServicerequestRequestpreamble(); + + /** + * Model tests for OrderSearchRequestServicerequestRequestpreamble + */ + @Test + public void testOrderSearchRequestServicerequestRequestpreamble() { + // TODO: test OrderSearchRequestServicerequestRequestpreamble + } + + /** + * Test the property 'isoCountryCode' + */ + @Test + public void isoCountryCodeTest() { + // TODO: test isoCountryCode + } + + /** + * Test the property 'customerNumber' + */ + @Test + public void customerNumberTest() { + // TODO: test customerNumber + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderSearchRequestServicerequestTest.java b/src/test/java/xiresellers/client/model/OrderSearchRequestServicerequestTest.java new file mode 100644 index 00000000..7b6ef269 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderSearchRequestServicerequestTest.java @@ -0,0 +1,58 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderSearchRequestServicerequestOrderLookupRequest; +import xiresellers.client.model.OrderSearchRequestServicerequestRequestpreamble; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderSearchRequestServicerequest + */ +public class OrderSearchRequestServicerequestTest { + private final OrderSearchRequestServicerequest model = new OrderSearchRequestServicerequest(); + + /** + * Model tests for OrderSearchRequestServicerequest + */ + @Test + public void testOrderSearchRequestServicerequest() { + // TODO: test OrderSearchRequestServicerequest + } + + /** + * Test the property 'requestpreamble' + */ + @Test + public void requestpreambleTest() { + // TODO: test requestpreamble + } + + /** + * Test the property 'orderLookupRequest' + */ + @Test + public void orderLookupRequestTest() { + // TODO: test orderLookupRequest + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderSearchRequestTest.java b/src/test/java/xiresellers/client/model/OrderSearchRequestTest.java new file mode 100644 index 00000000..e9a65827 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderSearchRequestTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderSearchRequestServicerequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderSearchRequest + */ +public class OrderSearchRequestTest { + private final OrderSearchRequest model = new OrderSearchRequest(); + + /** + * Model tests for OrderSearchRequest + */ + @Test + public void testOrderSearchRequest() { + // TODO: test OrderSearchRequest + } + + /** + * Test the property 'servicerequest' + */ + @Test + public void servicerequestTest() { + // TODO: test servicerequest + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderSearchResponseOrdersInnerLinksTest.java b/src/test/java/xiresellers/client/model/OrderSearchResponseOrdersInnerLinksTest.java new file mode 100644 index 00000000..603f3141 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderSearchResponseOrdersInnerLinksTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderSearchResponseOrdersInnerLinks + */ +public class OrderSearchResponseOrdersInnerLinksTest { + private final OrderSearchResponseOrdersInnerLinks model = new OrderSearchResponseOrdersInnerLinks(); + + /** + * Model tests for OrderSearchResponseOrdersInnerLinks + */ + @Test + public void testOrderSearchResponseOrdersInnerLinks() { + // TODO: test OrderSearchResponseOrdersInnerLinks + } + + /** + * Test the property 'topic' + */ + @Test + public void topicTest() { + // TODO: test topic + } + + /** + * Test the property 'href' + */ + @Test + public void hrefTest() { + // TODO: test href + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderSearchResponseOrdersInnerSubOrdersInnerLinksInnerTest.java b/src/test/java/xiresellers/client/model/OrderSearchResponseOrdersInnerSubOrdersInnerLinksInnerTest.java new file mode 100644 index 00000000..5e223ad4 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderSearchResponseOrdersInnerSubOrdersInnerLinksInnerTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner + */ +public class OrderSearchResponseOrdersInnerSubOrdersInnerLinksInnerTest { + private final OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner model = new OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner(); + + /** + * Model tests for OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner + */ + @Test + public void testOrderSearchResponseOrdersInnerSubOrdersInnerLinksInner() { + // TODO: test OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner + } + + /** + * Test the property 'topic' + */ + @Test + public void topicTest() { + // TODO: test topic + } + + /** + * Test the property 'href' + */ + @Test + public void hrefTest() { + // TODO: test href + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderSearchResponseOrdersInnerSubOrdersInnerTest.java b/src/test/java/xiresellers/client/model/OrderSearchResponseOrdersInnerSubOrdersInnerTest.java new file mode 100644 index 00000000..d5eaa734 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderSearchResponseOrdersInnerSubOrdersInnerTest.java @@ -0,0 +1,76 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderSearchResponseOrdersInnerSubOrdersInner + */ +public class OrderSearchResponseOrdersInnerSubOrdersInnerTest { + private final OrderSearchResponseOrdersInnerSubOrdersInner model = new OrderSearchResponseOrdersInnerSubOrdersInner(); + + /** + * Model tests for OrderSearchResponseOrdersInnerSubOrdersInner + */ + @Test + public void testOrderSearchResponseOrdersInnerSubOrdersInner() { + // TODO: test OrderSearchResponseOrdersInnerSubOrdersInner + } + + /** + * Test the property 'subOrderNumber' + */ + @Test + public void subOrderNumberTest() { + // TODO: test subOrderNumber + } + + /** + * Test the property 'subOrderTotal' + */ + @Test + public void subOrderTotalTest() { + // TODO: test subOrderTotal + } + + /** + * Test the property 'subOrderStatus' + */ + @Test + public void subOrderStatusTest() { + // TODO: test subOrderStatus + } + + /** + * Test the property 'links' + */ + @Test + public void linksTest() { + // TODO: test links + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderSearchResponseOrdersInnerTest.java b/src/test/java/xiresellers/client/model/OrderSearchResponseOrdersInnerTest.java new file mode 100644 index 00000000..6d032379 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderSearchResponseOrdersInnerTest.java @@ -0,0 +1,125 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderSearchResponseOrdersInnerLinks; +import xiresellers.client.model.OrderSearchResponseOrdersInnerSubOrdersInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderSearchResponseOrdersInner + */ +public class OrderSearchResponseOrdersInnerTest { + private final OrderSearchResponseOrdersInner model = new OrderSearchResponseOrdersInner(); + + /** + * Model tests for OrderSearchResponseOrdersInner + */ + @Test + public void testOrderSearchResponseOrdersInner() { + // TODO: test OrderSearchResponseOrdersInner + } + + /** + * Test the property 'ingramOrderNumber' + */ + @Test + public void ingramOrderNumberTest() { + // TODO: test ingramOrderNumber + } + + /** + * Test the property 'ingramOrderDate' + */ + @Test + public void ingramOrderDateTest() { + // TODO: test ingramOrderDate + } + + /** + * Test the property 'customerOrderNumber' + */ + @Test + public void customerOrderNumberTest() { + // TODO: test customerOrderNumber + } + + /** + * Test the property 'vendorSalesOrderNumber' + */ + @Test + public void vendorSalesOrderNumberTest() { + // TODO: test vendorSalesOrderNumber + } + + /** + * Test the property 'vendorName' + */ + @Test + public void vendorNameTest() { + // TODO: test vendorName + } + + /** + * Test the property 'endUserCompanyName' + */ + @Test + public void endUserCompanyNameTest() { + // TODO: test endUserCompanyName + } + + /** + * Test the property 'orderTotal' + */ + @Test + public void orderTotalTest() { + // TODO: test orderTotal + } + + /** + * Test the property 'orderStatus' + */ + @Test + public void orderStatusTest() { + // TODO: test orderStatus + } + + /** + * Test the property 'subOrders' + */ + @Test + public void subOrdersTest() { + // TODO: test subOrders + } + + /** + * Test the property 'links' + */ + @Test + public void linksTest() { + // TODO: test links + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinksTest.java b/src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinksTest.java new file mode 100644 index 00000000..22cadebe --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinksTest.java @@ -0,0 +1,65 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks + */ +public class OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinksTest { + private final OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks model = new OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks(); + + /** + * Model tests for OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks + */ + @Test + public void testOrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks() { + // TODO: test OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks + } + + /** + * Test the property 'topic' + */ + @Test + public void topicTest() { + // TODO: test topic + } + + /** + * Test the property 'href' + */ + @Test + public void hrefTest() { + // TODO: test href + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInnerTest.java b/src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInnerTest.java new file mode 100644 index 00000000..6a888691 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInnerTest.java @@ -0,0 +1,65 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner + */ +public class OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInnerTest { + private final OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner model = new OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner(); + + /** + * Model tests for OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner + */ + @Test + public void testOrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner() { + // TODO: test OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner + } + + /** + * Test the property 'topic' + */ + @Test + public void topicTest() { + // TODO: test topic + } + + /** + * Test the property 'href' + */ + @Test + public void hrefTest() { + // TODO: test href + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerTest.java b/src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerTest.java new file mode 100644 index 00000000..5bff1d34 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerTest.java @@ -0,0 +1,91 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerLinksInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner + */ +public class OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInnerTest { + private final OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner model = new OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner(); + + /** + * Model tests for OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner + */ + @Test + public void testOrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner() { + // TODO: test OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner + } + + /** + * Test the property 'subordernumber' + */ + @Test + public void subordernumberTest() { + // TODO: test subordernumber + } + + /** + * Test the property 'statuscode' + */ + @Test + public void statuscodeTest() { + // TODO: test statuscode + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'holdreasoncode' + */ + @Test + public void holdreasoncodeTest() { + // TODO: test holdreasoncode + } + + /** + * Test the property 'holdreason' + */ + @Test + public void holdreasonTest() { + // TODO: test holdreason + } + + /** + * Test the property 'links' + */ + @Test + public void linksTest() { + // TODO: test links + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerTest.java b/src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerTest.java new file mode 100644 index 00000000..b0b619d9 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerTest.java @@ -0,0 +1,84 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerLinks; +import xiresellers.client.model.OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerSubordersInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner + */ +public class OrderSearchResponseServiceResponseOrdersearchresponseOrdersInnerTest { + private final OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner model = new OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner(); + + /** + * Model tests for OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner + */ + @Test + public void testOrderSearchResponseServiceResponseOrdersearchresponseOrdersInner() { + // TODO: test OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner + } + + /** + * Test the property 'ordernumber' + */ + @Test + public void ordernumberTest() { + // TODO: test ordernumber + } + + /** + * Test the property 'entrytimestamp' + */ + @Test + public void entrytimestampTest() { + // TODO: test entrytimestamp + } + + /** + * Test the property 'customerordernumber' + */ + @Test + public void customerordernumberTest() { + // TODO: test customerordernumber + } + + /** + * Test the property 'suborders' + */ + @Test + public void subordersTest() { + // TODO: test suborders + } + + /** + * Test the property 'links' + */ + @Test + public void linksTest() { + // TODO: test links + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseTest.java b/src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseTest.java new file mode 100644 index 00000000..88dfc065 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseOrdersearchresponseTest.java @@ -0,0 +1,75 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderSearchResponseServiceResponseOrdersearchresponseOrdersInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderSearchResponseServiceResponseOrdersearchresponse + */ +public class OrderSearchResponseServiceResponseOrdersearchresponseTest { + private final OrderSearchResponseServiceResponseOrdersearchresponse model = new OrderSearchResponseServiceResponseOrdersearchresponse(); + + /** + * Model tests for OrderSearchResponseServiceResponseOrdersearchresponse + */ + @Test + public void testOrderSearchResponseServiceResponseOrdersearchresponse() { + // TODO: test OrderSearchResponseServiceResponseOrdersearchresponse + } + + /** + * Test the property 'ordersfound' + */ + @Test + public void ordersfoundTest() { + // TODO: test ordersfound + } + + /** + * Test the property 'pagesize' + */ + @Test + public void pagesizeTest() { + // TODO: test pagesize + } + + /** + * Test the property 'pagenumber' + */ + @Test + public void pagenumberTest() { + // TODO: test pagenumber + } + + /** + * Test the property 'orders' + */ + @Test + public void ordersTest() { + // TODO: test orders + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseResponsepreambleTest.java b/src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseResponsepreambleTest.java new file mode 100644 index 00000000..76b2a9d2 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseResponsepreambleTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderSearchResponseServiceResponseResponsepreamble + */ +public class OrderSearchResponseServiceResponseResponsepreambleTest { + private final OrderSearchResponseServiceResponseResponsepreamble model = new OrderSearchResponseServiceResponseResponsepreamble(); + + /** + * Model tests for OrderSearchResponseServiceResponseResponsepreamble + */ + @Test + public void testOrderSearchResponseServiceResponseResponsepreamble() { + // TODO: test OrderSearchResponseServiceResponseResponsepreamble + } + + /** + * Test the property 'requeststatus' + */ + @Test + public void requeststatusTest() { + // TODO: test requeststatus + } + + /** + * Test the property 'returnmessage' + */ + @Test + public void returnmessageTest() { + // TODO: test returnmessage + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseTest.java b/src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseTest.java new file mode 100644 index 00000000..1c5dd90a --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderSearchResponseServiceResponseTest.java @@ -0,0 +1,58 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderSearchResponseServiceResponseOrdersearchresponse; +import xiresellers.client.model.OrderSearchResponseServiceResponseResponsepreamble; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderSearchResponseServiceResponse + */ +public class OrderSearchResponseServiceResponseTest { + private final OrderSearchResponseServiceResponse model = new OrderSearchResponseServiceResponse(); + + /** + * Model tests for OrderSearchResponseServiceResponse + */ + @Test + public void testOrderSearchResponseServiceResponse() { + // TODO: test OrderSearchResponseServiceResponse + } + + /** + * Test the property 'responsepreamble' + */ + @Test + public void responsepreambleTest() { + // TODO: test responsepreamble + } + + /** + * Test the property 'ordersearchresponse' + */ + @Test + public void ordersearchresponseTest() { + // TODO: test ordersearchresponse + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderSearchResponseTest.java b/src/test/java/xiresellers/client/model/OrderSearchResponseTest.java new file mode 100644 index 00000000..a7bb0592 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderSearchResponseTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.OrderSearchResponseServiceResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderSearchResponse + */ +public class OrderSearchResponseTest { + private final OrderSearchResponse model = new OrderSearchResponse(); + + /** + * Model tests for OrderSearchResponse + */ + @Test + public void testOrderSearchResponse() { + // TODO: test OrderSearchResponse + } + + /** + * Test the property 'serviceResponse' + */ + @Test + public void serviceResponseTest() { + // TODO: test serviceResponse + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInnerTest.java b/src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInnerTest.java new file mode 100644 index 00000000..cdb63102 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInnerTest.java @@ -0,0 +1,48 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner + */ +public class OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInnerTest { + private final OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner model = new OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner(); + + /** + * Model tests for OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner + */ + @Test + public void testOrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner() { + // TODO: test OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner + } + + /** + * Test the property 'serialNumber' + */ + @Test + public void serialNumberTest() { + // TODO: test serialNumber + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInnerTest.java b/src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInnerTest.java new file mode 100644 index 00000000..81d93253 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInnerTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner + */ +public class OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInnerTest { + private final OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner model = new OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner(); + + /** + * Model tests for OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner + */ + @Test + public void testOrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner() { + // TODO: test OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner + } + + /** + * Test the property 'cartonNumber' + */ + @Test + public void cartonNumberTest() { + // TODO: test cartonNumber + } + + /** + * Test the property 'quantityInbox' + */ + @Test + public void quantityInboxTest() { + // TODO: test quantityInbox + } + + /** + * Test the property 'trackingNumber' + */ + @Test + public void trackingNumberTest() { + // TODO: test trackingNumber + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerTest.java b/src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerTest.java new file mode 100644 index 00000000..8d89121a --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerTest.java @@ -0,0 +1,91 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner + */ +public class OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerTest { + private final OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner model = new OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner(); + + /** + * Model tests for OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner + */ + @Test + public void testOrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner() { + // TODO: test OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner + } + + /** + * Test the property 'shipmentDate' + */ + @Test + public void shipmentDateTest() { + // TODO: test shipmentDate + } + + /** + * Test the property 'shipFromWarehouseId' + */ + @Test + public void shipFromWarehouseIdTest() { + // TODO: test shipFromWarehouseId + } + + /** + * Test the property 'warehouseName' + */ + @Test + public void warehouseNameTest() { + // TODO: test warehouseName + } + + /** + * Test the property 'carrierCode' + */ + @Test + public void carrierCodeTest() { + // TODO: test carrierCode + } + + /** + * Test the property 'carrierName' + */ + @Test + public void carrierNameTest() { + // TODO: test carrierName + } + + /** + * Test the property 'packageDetails' + */ + @Test + public void packageDetailsTest() { + // TODO: test packageDetails + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerTest.java b/src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerTest.java new file mode 100644 index 00000000..bddc1bd5 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinesInnerTest.java @@ -0,0 +1,124 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner; +import xiresellers.client.model.OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderStatusAsyncNotificationRequestResourceInnerLinesInner + */ +public class OrderStatusAsyncNotificationRequestResourceInnerLinesInnerTest { + private final OrderStatusAsyncNotificationRequestResourceInnerLinesInner model = new OrderStatusAsyncNotificationRequestResourceInnerLinesInner(); + + /** + * Model tests for OrderStatusAsyncNotificationRequestResourceInnerLinesInner + */ + @Test + public void testOrderStatusAsyncNotificationRequestResourceInnerLinesInner() { + // TODO: test OrderStatusAsyncNotificationRequestResourceInnerLinesInner + } + + /** + * Test the property 'lineNumber' + */ + @Test + public void lineNumberTest() { + // TODO: test lineNumber + } + + /** + * Test the property 'subOrderNumber' + */ + @Test + public void subOrderNumberTest() { + // TODO: test subOrderNumber + } + + /** + * Test the property 'lineStatus' + */ + @Test + public void lineStatusTest() { + // TODO: test lineStatus + } + + /** + * Test the property 'ingramPartNumber' + */ + @Test + public void ingramPartNumberTest() { + // TODO: test ingramPartNumber + } + + /** + * Test the property 'vendorPartNumber' + */ + @Test + public void vendorPartNumberTest() { + // TODO: test vendorPartNumber + } + + /** + * Test the property 'requestedQuantity' + */ + @Test + public void requestedQuantityTest() { + // TODO: test requestedQuantity + } + + /** + * Test the property 'shippedQuantity' + */ + @Test + public void shippedQuantityTest() { + // TODO: test shippedQuantity + } + + /** + * Test the property 'backorderedQuantity' + */ + @Test + public void backorderedQuantityTest() { + // TODO: test backorderedQuantity + } + + /** + * Test the property 'shipmentDetails' + */ + @Test + public void shipmentDetailsTest() { + // TODO: test shipmentDetails + } + + /** + * Test the property 'serialNumberDetails' + */ + @Test + public void serialNumberDetailsTest() { + // TODO: test serialNumberDetails + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinksInnerTest.java b/src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinksInnerTest.java new file mode 100644 index 00000000..588d88a6 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerLinksInnerTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderStatusAsyncNotificationRequestResourceInnerLinksInner + */ +public class OrderStatusAsyncNotificationRequestResourceInnerLinksInnerTest { + private final OrderStatusAsyncNotificationRequestResourceInnerLinksInner model = new OrderStatusAsyncNotificationRequestResourceInnerLinksInner(); + + /** + * Model tests for OrderStatusAsyncNotificationRequestResourceInnerLinksInner + */ + @Test + public void testOrderStatusAsyncNotificationRequestResourceInnerLinksInner() { + // TODO: test OrderStatusAsyncNotificationRequestResourceInnerLinksInner + } + + /** + * Test the property 'topic' + */ + @Test + public void topicTest() { + // TODO: test topic + } + + /** + * Test the property 'href' + */ + @Test + public void hrefTest() { + // TODO: test href + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerTest.java b/src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerTest.java new file mode 100644 index 00000000..bd113fe0 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestResourceInnerTest.java @@ -0,0 +1,92 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderStatusAsyncNotificationRequestResourceInnerLinesInner; +import xiresellers.client.model.OrderStatusAsyncNotificationRequestResourceInnerLinksInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderStatusAsyncNotificationRequestResourceInner + */ +public class OrderStatusAsyncNotificationRequestResourceInnerTest { + private final OrderStatusAsyncNotificationRequestResourceInner model = new OrderStatusAsyncNotificationRequestResourceInner(); + + /** + * Model tests for OrderStatusAsyncNotificationRequestResourceInner + */ + @Test + public void testOrderStatusAsyncNotificationRequestResourceInner() { + // TODO: test OrderStatusAsyncNotificationRequestResourceInner + } + + /** + * Test the property 'eventType' + */ + @Test + public void eventTypeTest() { + // TODO: test eventType + } + + /** + * Test the property 'orderNumber' + */ + @Test + public void orderNumberTest() { + // TODO: test orderNumber + } + + /** + * Test the property 'customerOrderNumber' + */ + @Test + public void customerOrderNumberTest() { + // TODO: test customerOrderNumber + } + + /** + * Test the property 'orderEntryTimeStamp' + */ + @Test + public void orderEntryTimeStampTest() { + // TODO: test orderEntryTimeStamp + } + + /** + * Test the property 'lines' + */ + @Test + public void linesTest() { + // TODO: test lines + } + + /** + * Test the property 'links' + */ + @Test + public void linksTest() { + // TODO: test links + } + +} diff --git a/src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestTest.java b/src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestTest.java new file mode 100644 index 00000000..86bb2c93 --- /dev/null +++ b/src/test/java/xiresellers/client/model/OrderStatusAsyncNotificationRequestTest.java @@ -0,0 +1,83 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.OrderStatusAsyncNotificationRequestResourceInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrderStatusAsyncNotificationRequest + */ +public class OrderStatusAsyncNotificationRequestTest { + private final OrderStatusAsyncNotificationRequest model = new OrderStatusAsyncNotificationRequest(); + + /** + * Model tests for OrderStatusAsyncNotificationRequest + */ + @Test + public void testOrderStatusAsyncNotificationRequest() { + // TODO: test OrderStatusAsyncNotificationRequest + } + + /** + * Test the property 'topic' + */ + @Test + public void topicTest() { + // TODO: test topic + } + + /** + * Test the property 'event' + */ + @Test + public void eventTest() { + // TODO: test event + } + + /** + * Test the property 'eventTimeStamp' + */ + @Test + public void eventTimeStampTest() { + // TODO: test eventTimeStamp + } + + /** + * Test the property 'eventId' + */ + @Test + public void eventIdTest() { + // TODO: test eventId + } + + /** + * Test the property 'resource' + */ + @Test + public void resourceTest() { + // TODO: test resource + } + +} diff --git a/src/test/java/xiresellers/client/model/PostQuoteToOrderV6400ResponseFieldsInnerTest.java b/src/test/java/xiresellers/client/model/PostQuoteToOrderV6400ResponseFieldsInnerTest.java new file mode 100644 index 00000000..dcce9140 --- /dev/null +++ b/src/test/java/xiresellers/client/model/PostQuoteToOrderV6400ResponseFieldsInnerTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PostQuoteToOrderV6400ResponseFieldsInner + */ +public class PostQuoteToOrderV6400ResponseFieldsInnerTest { + private final PostQuoteToOrderV6400ResponseFieldsInner model = new PostQuoteToOrderV6400ResponseFieldsInner(); + + /** + * Model tests for PostQuoteToOrderV6400ResponseFieldsInner + */ + @Test + public void testPostQuoteToOrderV6400ResponseFieldsInner() { + // TODO: test PostQuoteToOrderV6400ResponseFieldsInner + } + + /** + * Test the property 'field' + */ + @Test + public void fieldTest() { + // TODO: test field + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + + /** + * Test the property 'value' + */ + @Test + public void valueTest() { + // TODO: test value + } + +} diff --git a/src/test/java/xiresellers/client/model/PostQuoteToOrderV6400ResponseTest.java b/src/test/java/xiresellers/client/model/PostQuoteToOrderV6400ResponseTest.java new file mode 100644 index 00000000..090e5921 --- /dev/null +++ b/src/test/java/xiresellers/client/model/PostQuoteToOrderV6400ResponseTest.java @@ -0,0 +1,75 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.PostQuoteToOrderV6400ResponseFieldsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PostQuoteToOrderV6400Response + */ +public class PostQuoteToOrderV6400ResponseTest { + private final PostQuoteToOrderV6400Response model = new PostQuoteToOrderV6400Response(); + + /** + * Model tests for PostQuoteToOrderV6400Response + */ + @Test + public void testPostQuoteToOrderV6400Response() { + // TODO: test PostQuoteToOrderV6400Response + } + + /** + * Test the property 'traceid' + */ + @Test + public void traceidTest() { + // TODO: test traceid + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + + /** + * Test the property 'fields' + */ + @Test + public void fieldsTest() { + // TODO: test fields + } + +} diff --git a/src/test/java/xiresellers/client/model/PostRenewalssearch400ResponseTest.java b/src/test/java/xiresellers/client/model/PostRenewalssearch400ResponseTest.java new file mode 100644 index 00000000..14d48a7d --- /dev/null +++ b/src/test/java/xiresellers/client/model/PostRenewalssearch400ResponseTest.java @@ -0,0 +1,67 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.GetResellerV6ValidateQuote400ResponseFieldsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PostRenewalssearch400Response + */ +public class PostRenewalssearch400ResponseTest { + private final PostRenewalssearch400Response model = new PostRenewalssearch400Response(); + + /** + * Model tests for PostRenewalssearch400Response + */ + @Test + public void testPostRenewalssearch400Response() { + // TODO: test PostRenewalssearch400Response + } + + /** + * Test the property 'traceid' + */ + @Test + public void traceidTest() { + // TODO: test traceid + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'fields' + */ + @Test + public void fieldsTest() { + // TODO: test fields + } + +} diff --git a/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestAdditionalAttributesInnerTest.java b/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestAdditionalAttributesInnerTest.java new file mode 100644 index 00000000..5444f33b --- /dev/null +++ b/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestAdditionalAttributesInnerTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PriceAndAvailabilityRequestAdditionalAttributesInner + */ +public class PriceAndAvailabilityRequestAdditionalAttributesInnerTest { + private final PriceAndAvailabilityRequestAdditionalAttributesInner model = new PriceAndAvailabilityRequestAdditionalAttributesInner(); + + /** + * Model tests for PriceAndAvailabilityRequestAdditionalAttributesInner + */ + @Test + public void testPriceAndAvailabilityRequestAdditionalAttributesInner() { + // TODO: test PriceAndAvailabilityRequestAdditionalAttributesInner + } + + /** + * Test the property 'attributeName' + */ + @Test + public void attributeNameTest() { + // TODO: test attributeName + } + + /** + * Test the property 'attributeValue' + */ + @Test + public void attributeValueTest() { + // TODO: test attributeValue + } + +} diff --git a/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestAvailabilityByWarehouseInnerTest.java b/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestAvailabilityByWarehouseInnerTest.java new file mode 100644 index 00000000..a707ae42 --- /dev/null +++ b/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestAvailabilityByWarehouseInnerTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PriceAndAvailabilityRequestAvailabilityByWarehouseInner + */ +public class PriceAndAvailabilityRequestAvailabilityByWarehouseInnerTest { + private final PriceAndAvailabilityRequestAvailabilityByWarehouseInner model = new PriceAndAvailabilityRequestAvailabilityByWarehouseInner(); + + /** + * Model tests for PriceAndAvailabilityRequestAvailabilityByWarehouseInner + */ + @Test + public void testPriceAndAvailabilityRequestAvailabilityByWarehouseInner() { + // TODO: test PriceAndAvailabilityRequestAvailabilityByWarehouseInner + } + + /** + * Test the property 'availabilityByWarehouseId' + */ + @Test + public void availabilityByWarehouseIdTest() { + // TODO: test availabilityByWarehouseId + } + + /** + * Test the property 'availabilityForAllLocation' + */ + @Test + public void availabilityForAllLocationTest() { + // TODO: test availabilityForAllLocation + } + +} diff --git a/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInnerTest.java b/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInnerTest.java new file mode 100644 index 00000000..2ae7e211 --- /dev/null +++ b/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInnerTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner + */ +public class PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInnerTest { + private final PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner model = new PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner(); + + /** + * Model tests for PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner + */ + @Test + public void testPriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner() { + // TODO: test PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner + } + + /** + * Test the property 'attributeName' + */ + @Test + public void attributeNameTest() { + // TODO: test attributeName + } + + /** + * Test the property 'attributeValue' + */ + @Test + public void attributeValueTest() { + // TODO: test attributeValue + } + +} diff --git a/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestProductsInnerTest.java b/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestProductsInnerTest.java new file mode 100644 index 00000000..83d2cb13 --- /dev/null +++ b/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestProductsInnerTest.java @@ -0,0 +1,91 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PriceAndAvailabilityRequestProductsInner + */ +public class PriceAndAvailabilityRequestProductsInnerTest { + private final PriceAndAvailabilityRequestProductsInner model = new PriceAndAvailabilityRequestProductsInner(); + + /** + * Model tests for PriceAndAvailabilityRequestProductsInner + */ + @Test + public void testPriceAndAvailabilityRequestProductsInner() { + // TODO: test PriceAndAvailabilityRequestProductsInner + } + + /** + * Test the property 'ingramPartNumber' + */ + @Test + public void ingramPartNumberTest() { + // TODO: test ingramPartNumber + } + + /** + * Test the property 'vendorPartNumber' + */ + @Test + public void vendorPartNumberTest() { + // TODO: test vendorPartNumber + } + + /** + * Test the property 'customerPartNumber' + */ + @Test + public void customerPartNumberTest() { + // TODO: test customerPartNumber + } + + /** + * Test the property 'upc' + */ + @Test + public void upcTest() { + // TODO: test upc + } + + /** + * Test the property 'quantityRequested' + */ + @Test + public void quantityRequestedTest() { + // TODO: test quantityRequested + } + + /** + * Test the property 'additionalAttributes' + */ + @Test + public void additionalAttributesTest() { + // TODO: test additionalAttributes + } + +} diff --git a/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInnerTest.java b/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInnerTest.java new file mode 100644 index 00000000..c10ab5bf --- /dev/null +++ b/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInnerTest.java @@ -0,0 +1,139 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner + */ +public class PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInnerTest { + private final PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner model = new PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner(); + + /** + * Model tests for PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner + */ + @Test + public void testPriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner() { + // TODO: test PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner + } + + /** + * Test the property 'index' + */ + @Test + public void indexTest() { + // TODO: test index + } + + /** + * Test the property 'ingrampartnumber' + */ + @Test + public void ingrampartnumberTest() { + // TODO: test ingrampartnumber + } + + /** + * Test the property 'vendorpartnumber' + */ + @Test + public void vendorpartnumberTest() { + // TODO: test vendorpartnumber + } + + /** + * Test the property 'upc' + */ + @Test + public void upcTest() { + // TODO: test upc + } + + /** + * Test the property 'customerpartnumber' + */ + @Test + public void customerpartnumberTest() { + // TODO: test customerpartnumber + } + + /** + * Test the property 'warehouseidlist' + */ + @Test + public void warehouseidlistTest() { + // TODO: test warehouseidlist + } + + /** + * Test the property 'extendedvendorpartnumber' + */ + @Test + public void extendedvendorpartnumberTest() { + // TODO: test extendedvendorpartnumber + } + + /** + * Test the property 'quantity' + */ + @Test + public void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'enduserid' + */ + @Test + public void enduseridTest() { + // TODO: test enduserid + } + + /** + * Test the property 'govtprogramtype' + */ + @Test + public void govtprogramtypeTest() { + // TODO: test govtprogramtype + } + + /** + * Test the property 'govtendusertype' + */ + @Test + public void govtendusertypeTest() { + // TODO: test govtendusertype + } + + /** + * Test the property 'specialbidnumber' + */ + @Test + public void specialbidnumberTest() { + // TODO: test specialbidnumber + } + +} diff --git a/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestPriceandstockrequestTest.java b/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestPriceandstockrequestTest.java new file mode 100644 index 00000000..10c82172 --- /dev/null +++ b/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestPriceandstockrequestTest.java @@ -0,0 +1,75 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.PriceAndAvailabilityRequestServicerequestPriceandstockrequestItemInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PriceAndAvailabilityRequestServicerequestPriceandstockrequest + */ +public class PriceAndAvailabilityRequestServicerequestPriceandstockrequestTest { + private final PriceAndAvailabilityRequestServicerequestPriceandstockrequest model = new PriceAndAvailabilityRequestServicerequestPriceandstockrequest(); + + /** + * Model tests for PriceAndAvailabilityRequestServicerequestPriceandstockrequest + */ + @Test + public void testPriceAndAvailabilityRequestServicerequestPriceandstockrequest() { + // TODO: test PriceAndAvailabilityRequestServicerequestPriceandstockrequest + } + + /** + * Test the property 'showwarehouseavailability' + */ + @Test + public void showwarehouseavailabilityTest() { + // TODO: test showwarehouseavailability + } + + /** + * Test the property 'extravailabilityflag' + */ + @Test + public void extravailabilityflagTest() { + // TODO: test extravailabilityflag + } + + /** + * Test the property 'includeallsystems' + */ + @Test + public void includeallsystemsTest() { + // TODO: test includeallsystems + } + + /** + * Test the property 'item' + */ + @Test + public void itemTest() { + // TODO: test item + } + +} diff --git a/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestRequestpreambleTest.java b/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestRequestpreambleTest.java new file mode 100644 index 00000000..674bb2b3 --- /dev/null +++ b/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestRequestpreambleTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PriceAndAvailabilityRequestServicerequestRequestpreamble + */ +public class PriceAndAvailabilityRequestServicerequestRequestpreambleTest { + private final PriceAndAvailabilityRequestServicerequestRequestpreamble model = new PriceAndAvailabilityRequestServicerequestRequestpreamble(); + + /** + * Model tests for PriceAndAvailabilityRequestServicerequestRequestpreamble + */ + @Test + public void testPriceAndAvailabilityRequestServicerequestRequestpreamble() { + // TODO: test PriceAndAvailabilityRequestServicerequestRequestpreamble + } + + /** + * Test the property 'isocountrycode' + */ + @Test + public void isocountrycodeTest() { + // TODO: test isocountrycode + } + + /** + * Test the property 'customernumber' + */ + @Test + public void customernumberTest() { + // TODO: test customernumber + } + +} diff --git a/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestTest.java b/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestTest.java new file mode 100644 index 00000000..94a8fa5d --- /dev/null +++ b/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestServicerequestTest.java @@ -0,0 +1,58 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.PriceAndAvailabilityRequestServicerequestPriceandstockrequest; +import xiresellers.client.model.PriceAndAvailabilityRequestServicerequestRequestpreamble; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PriceAndAvailabilityRequestServicerequest + */ +public class PriceAndAvailabilityRequestServicerequestTest { + private final PriceAndAvailabilityRequestServicerequest model = new PriceAndAvailabilityRequestServicerequest(); + + /** + * Model tests for PriceAndAvailabilityRequestServicerequest + */ + @Test + public void testPriceAndAvailabilityRequestServicerequest() { + // TODO: test PriceAndAvailabilityRequestServicerequest + } + + /** + * Test the property 'requestpreamble' + */ + @Test + public void requestpreambleTest() { + // TODO: test requestpreamble + } + + /** + * Test the property 'priceandstockrequest' + */ + @Test + public void priceandstockrequestTest() { + // TODO: test priceandstockrequest + } + +} diff --git a/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestTest.java b/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestTest.java new file mode 100644 index 00000000..3d9761c3 --- /dev/null +++ b/src/test/java/xiresellers/client/model/PriceAndAvailabilityRequestTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.PriceAndAvailabilityRequestServicerequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PriceAndAvailabilityRequest + */ +public class PriceAndAvailabilityRequestTest { + private final PriceAndAvailabilityRequest model = new PriceAndAvailabilityRequest(); + + /** + * Model tests for PriceAndAvailabilityRequest + */ + @Test + public void testPriceAndAvailabilityRequest() { + // TODO: test PriceAndAvailabilityRequest + } + + /** + * Test the property 'servicerequest' + */ + @Test + public void servicerequestTest() { + // TODO: test servicerequest + } + +} diff --git a/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInnerTest.java b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInnerTest.java new file mode 100644 index 00000000..7e8a6c79 --- /dev/null +++ b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInnerTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner + */ +public class PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInnerTest { + private final PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner model = new PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner(); + + /** + * Model tests for PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner + */ + @Test + public void testPriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner() { + // TODO: test PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner + } + + /** + * Test the property 'quantity' + */ + @Test + public void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'etaDate' + */ + @Test + public void etaDateTest() { + // TODO: test etaDate + } + +} diff --git a/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerTest.java b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerTest.java new file mode 100644 index 00000000..01cef776 --- /dev/null +++ b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerTest.java @@ -0,0 +1,91 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner + */ +public class PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerTest { + private final PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner model = new PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner(); + + /** + * Model tests for PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner + */ + @Test + public void testPriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner() { + // TODO: test PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner + } + + /** + * Test the property 'location' + */ + @Test + public void locationTest() { + // TODO: test location + } + + /** + * Test the property 'warehouseId' + */ + @Test + public void warehouseIdTest() { + // TODO: test warehouseId + } + + /** + * Test the property 'quantityAvailable' + */ + @Test + public void quantityAvailableTest() { + // TODO: test quantityAvailable + } + + /** + * Test the property 'quantityBackordered' + */ + @Test + public void quantityBackorderedTest() { + // TODO: test quantityBackordered + } + + /** + * Test the property 'quantityBackorderedEta' + */ + @Test + public void quantityBackorderedEtaTest() { + // TODO: test quantityBackorderedEta + } + + /** + * Test the property 'backOrderInfo' + */ + @Test + public void backOrderInfoTest() { + // TODO: test backOrderInfo + } + +} diff --git a/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerAvailabilityTest.java b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerAvailabilityTest.java new file mode 100644 index 00000000..8d146bec --- /dev/null +++ b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerAvailabilityTest.java @@ -0,0 +1,67 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PriceAndAvailabilityResponseInnerAvailability + */ +public class PriceAndAvailabilityResponseInnerAvailabilityTest { + private final PriceAndAvailabilityResponseInnerAvailability model = new PriceAndAvailabilityResponseInnerAvailability(); + + /** + * Model tests for PriceAndAvailabilityResponseInnerAvailability + */ + @Test + public void testPriceAndAvailabilityResponseInnerAvailability() { + // TODO: test PriceAndAvailabilityResponseInnerAvailability + } + + /** + * Test the property 'available' + */ + @Test + public void availableTest() { + // TODO: test available + } + + /** + * Test the property 'totalAvailability' + */ + @Test + public void totalAvailabilityTest() { + // TODO: test totalAvailability + } + + /** + * Test the property 'availabilityByWarehouse' + */ + @Test + public void availabilityByWarehouseTest() { + // TODO: test availabilityByWarehouse + } + +} diff --git a/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInnerTest.java b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInnerTest.java new file mode 100644 index 00000000..be2da35b --- /dev/null +++ b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInnerTest.java @@ -0,0 +1,81 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner + */ +public class PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInnerTest { + private final PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner model = new PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner(); + + /** + * Model tests for PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner + */ + @Test + public void testPriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner() { + // TODO: test PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner + } + + /** + * Test the property 'conditionType' + */ + @Test + public void conditionTypeTest() { + // TODO: test conditionType + } + + /** + * Test the property 'currencyCode' + */ + @Test + public void currencyCodeTest() { + // TODO: test currencyCode + } + + /** + * Test the property 'currencyType' + */ + @Test + public void currencyTypeTest() { + // TODO: test currencyType + } + + /** + * Test the property 'quantity' + */ + @Test + public void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + +} diff --git a/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInnerTest.java b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInnerTest.java new file mode 100644 index 00000000..c65142ab --- /dev/null +++ b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInnerTest.java @@ -0,0 +1,114 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner + */ +public class PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInnerTest { + private final PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner model = new PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner(); + + /** + * Model tests for PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner + */ + @Test + public void testPriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner() { + // TODO: test PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner + } + + /** + * Test the property 'discountType' + */ + @Test + public void discountTypeTest() { + // TODO: test discountType + } + + /** + * Test the property 'specialBidNumer' + */ + @Test + public void specialBidNumerTest() { + // TODO: test specialBidNumer + } + + /** + * Test the property 'specialPricingDiscount' + */ + @Test + public void specialPricingDiscountTest() { + // TODO: test specialPricingDiscount + } + + /** + * Test the property 'specialPricingEffectiveDate' + */ + @Test + public void specialPricingEffectiveDateTest() { + // TODO: test specialPricingEffectiveDate + } + + /** + * Test the property 'specialPricingExpirationDate' + */ + @Test + public void specialPricingExpirationDateTest() { + // TODO: test specialPricingExpirationDate + } + + /** + * Test the property 'specialPricingAvailableQuantity' + */ + @Test + public void specialPricingAvailableQuantityTest() { + // TODO: test specialPricingAvailableQuantity + } + + /** + * Test the property 'specialPricingMinQuantity' + */ + @Test + public void specialPricingMinQuantityTest() { + // TODO: test specialPricingMinQuantity + } + + /** + * Test the property 'governmentDiscountType' + */ + @Test + public void governmentDiscountTypeTest() { + // TODO: test governmentDiscountType + } + + /** + * Test the property 'governmentDiscountedCustomerPrice' + */ + @Test + public void governmentDiscountedCustomerPriceTest() { + // TODO: test governmentDiscountedCustomerPrice + } + +} diff --git a/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerDiscountsInnerTest.java b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerDiscountsInnerTest.java new file mode 100644 index 00000000..68e5f2df --- /dev/null +++ b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerDiscountsInnerTest.java @@ -0,0 +1,60 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner; +import xiresellers.client.model.PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PriceAndAvailabilityResponseInnerDiscountsInner + */ +public class PriceAndAvailabilityResponseInnerDiscountsInnerTest { + private final PriceAndAvailabilityResponseInnerDiscountsInner model = new PriceAndAvailabilityResponseInnerDiscountsInner(); + + /** + * Model tests for PriceAndAvailabilityResponseInnerDiscountsInner + */ + @Test + public void testPriceAndAvailabilityResponseInnerDiscountsInner() { + // TODO: test PriceAndAvailabilityResponseInnerDiscountsInner + } + + /** + * Test the property 'specialPricing' + */ + @Test + public void specialPricingTest() { + // TODO: test specialPricing + } + + /** + * Test the property 'quantityDiscounts' + */ + @Test + public void quantityDiscountsTest() { + // TODO: test quantityDiscounts + } + +} diff --git a/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerPricingTest.java b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerPricingTest.java new file mode 100644 index 00000000..304e1ffc --- /dev/null +++ b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerPricingTest.java @@ -0,0 +1,89 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PriceAndAvailabilityResponseInnerPricing + */ +public class PriceAndAvailabilityResponseInnerPricingTest { + private final PriceAndAvailabilityResponseInnerPricing model = new PriceAndAvailabilityResponseInnerPricing(); + + /** + * Model tests for PriceAndAvailabilityResponseInnerPricing + */ + @Test + public void testPriceAndAvailabilityResponseInnerPricing() { + // TODO: test PriceAndAvailabilityResponseInnerPricing + } + + /** + * Test the property 'currencyCode' + */ + @Test + public void currencyCodeTest() { + // TODO: test currencyCode + } + + /** + * Test the property 'retailPrice' + */ + @Test + public void retailPriceTest() { + // TODO: test retailPrice + } + + /** + * Test the property 'mapPrice' + */ + @Test + public void mapPriceTest() { + // TODO: test mapPrice + } + + /** + * Test the property 'customerPrice' + */ + @Test + public void customerPriceTest() { + // TODO: test customerPrice + } + + /** + * Test the property 'specialBidPricingAvailable' + */ + @Test + public void specialBidPricingAvailableTest() { + // TODO: test specialBidPricingAvailable + } + + /** + * Test the property 'webDiscountsAvailable' + */ + @Test + public void webDiscountsAvailableTest() { + // TODO: test webDiscountsAvailable + } + +} diff --git a/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerReserveInventoryDetailsInnerTest.java b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerReserveInventoryDetailsInnerTest.java new file mode 100644 index 00000000..af85616e --- /dev/null +++ b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerReserveInventoryDetailsInnerTest.java @@ -0,0 +1,72 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner + */ +public class PriceAndAvailabilityResponseInnerReserveInventoryDetailsInnerTest { + private final PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner model = new PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner(); + + /** + * Model tests for PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner + */ + @Test + public void testPriceAndAvailabilityResponseInnerReserveInventoryDetailsInner() { + // TODO: test PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner + } + + /** + * Test the property 'quantityReserved' + */ + @Test + public void quantityReservedTest() { + // TODO: test quantityReserved + } + + /** + * Test the property 'quantityAvailable' + */ + @Test + public void quantityAvailableTest() { + // TODO: test quantityAvailable + } + + /** + * Test the property 'effectivedate' + */ + @Test + public void effectivedateTest() { + // TODO: test effectivedate + } + + /** + * Test the property 'expirydate' + */ + @Test + public void expirydateTest() { + // TODO: test expirydate + } + +} diff --git a/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerServiceFeesInnerTest.java b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerServiceFeesInnerTest.java new file mode 100644 index 00000000..82ea17cf --- /dev/null +++ b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerServiceFeesInnerTest.java @@ -0,0 +1,81 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PriceAndAvailabilityResponseInnerServiceFeesInner + */ +public class PriceAndAvailabilityResponseInnerServiceFeesInnerTest { + private final PriceAndAvailabilityResponseInnerServiceFeesInner model = new PriceAndAvailabilityResponseInnerServiceFeesInner(); + + /** + * Model tests for PriceAndAvailabilityResponseInnerServiceFeesInner + */ + @Test + public void testPriceAndAvailabilityResponseInnerServiceFeesInner() { + // TODO: test PriceAndAvailabilityResponseInnerServiceFeesInner + } + + /** + * Test the property 'conditionType' + */ + @Test + public void conditionTypeTest() { + // TODO: test conditionType + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'amount' + */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** + * Test the property 'endDate' + */ + @Test + public void endDateTest() { + // TODO: test endDate + } + + /** + * Test the property 'currencyCode' + */ + @Test + public void currencyCodeTest() { + // TODO: test currencyCode + } + +} diff --git a/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerTest.java b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerTest.java new file mode 100644 index 00000000..a34545da --- /dev/null +++ b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseInnerTest.java @@ -0,0 +1,263 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.PriceAndAvailabilityResponseInnerAvailability; +import xiresellers.client.model.PriceAndAvailabilityResponseInnerDiscountsInner; +import xiresellers.client.model.PriceAndAvailabilityResponseInnerPricing; +import xiresellers.client.model.PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner; +import xiresellers.client.model.PriceAndAvailabilityResponseInnerServiceFeesInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PriceAndAvailabilityResponseInner + */ +public class PriceAndAvailabilityResponseInnerTest { + private final PriceAndAvailabilityResponseInner model = new PriceAndAvailabilityResponseInner(); + + /** + * Model tests for PriceAndAvailabilityResponseInner + */ + @Test + public void testPriceAndAvailabilityResponseInner() { + // TODO: test PriceAndAvailabilityResponseInner + } + + /** + * Test the property 'productStatusCode' + */ + @Test + public void productStatusCodeTest() { + // TODO: test productStatusCode + } + + /** + * Test the property 'productStatusMessage' + */ + @Test + public void productStatusMessageTest() { + // TODO: test productStatusMessage + } + + /** + * Test the property 'ingramPartNumber' + */ + @Test + public void ingramPartNumberTest() { + // TODO: test ingramPartNumber + } + + /** + * Test the property 'vendorPartNumber' + */ + @Test + public void vendorPartNumberTest() { + // TODO: test vendorPartNumber + } + + /** + * Test the property 'extendedVendorPartNumber' + */ + @Test + public void extendedVendorPartNumberTest() { + // TODO: test extendedVendorPartNumber + } + + /** + * Test the property 'customerPartNumber' + */ + @Test + public void customerPartNumberTest() { + // TODO: test customerPartNumber + } + + /** + * Test the property 'upc' + */ + @Test + public void upcTest() { + // TODO: test upc + } + + /** + * Test the property 'partNumberType' + */ + @Test + public void partNumberTypeTest() { + // TODO: test partNumberType + } + + /** + * Test the property 'vendorNumber' + */ + @Test + public void vendorNumberTest() { + // TODO: test vendorNumber + } + + /** + * Test the property 'vendorName' + */ + @Test + public void vendorNameTest() { + // TODO: test vendorName + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'productClass' + */ + @Test + public void productClassTest() { + // TODO: test productClass + } + + /** + * Test the property 'uom' + */ + @Test + public void uomTest() { + // TODO: test uom + } + + /** + * Test the property 'productStatus' + */ + @Test + public void productStatusTest() { + // TODO: test productStatus + } + + /** + * Test the property 'acceptBackOrder' + */ + @Test + public void acceptBackOrderTest() { + // TODO: test acceptBackOrder + } + + /** + * Test the property 'productAuthorized' + */ + @Test + public void productAuthorizedTest() { + // TODO: test productAuthorized + } + + /** + * Test the property 'returnableProduct' + */ + @Test + public void returnableProductTest() { + // TODO: test returnableProduct + } + + /** + * Test the property 'endUserInfoRequired' + */ + @Test + public void endUserInfoRequiredTest() { + // TODO: test endUserInfoRequired + } + + /** + * Test the property 'govtSpecialPriceAvailable' + */ + @Test + public void govtSpecialPriceAvailableTest() { + // TODO: test govtSpecialPriceAvailable + } + + /** + * Test the property 'govtProgramType' + */ + @Test + public void govtProgramTypeTest() { + // TODO: test govtProgramType + } + + /** + * Test the property 'govtEndUserType' + */ + @Test + public void govtEndUserTypeTest() { + // TODO: test govtEndUserType + } + + /** + * Test the property 'availability' + */ + @Test + public void availabilityTest() { + // TODO: test availability + } + + /** + * Test the property 'reserveInventoryDetails' + */ + @Test + public void reserveInventoryDetailsTest() { + // TODO: test reserveInventoryDetails + } + + /** + * Test the property 'pricing' + */ + @Test + public void pricingTest() { + // TODO: test pricing + } + + /** + * Test the property 'discounts' + */ + @Test + public void discountsTest() { + // TODO: test discounts + } + + /** + * Test the property 'bundlePartIndicator' + */ + @Test + public void bundlePartIndicatorTest() { + // TODO: test bundlePartIndicator + } + + /** + * Test the property 'serviceFees' + */ + @Test + public void serviceFeesTest() { + // TODO: test serviceFees + } + +} diff --git a/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInnerTest.java b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInnerTest.java new file mode 100644 index 00000000..8853e1b7 --- /dev/null +++ b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInnerTest.java @@ -0,0 +1,220 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.WarehouseListType; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner + */ +public class PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInnerTest { + private final PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner model = new PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner(); + + /** + * Model tests for PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner + */ + @Test + public void testPriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner() { + // TODO: test PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner + } + + /** + * Test the property 'itemstatus' + */ + @Test + public void itemstatusTest() { + // TODO: test itemstatus + } + + /** + * Test the property 'statusmessage' + */ + @Test + public void statusmessageTest() { + // TODO: test statusmessage + } + + /** + * Test the property 'ingrampartnumber' + */ + @Test + public void ingrampartnumberTest() { + // TODO: test ingrampartnumber + } + + /** + * Test the property 'vendorpartnumber' + */ + @Test + public void vendorpartnumberTest() { + // TODO: test vendorpartnumber + } + + /** + * Test the property 'globalskuid' + */ + @Test + public void globalskuidTest() { + // TODO: test globalskuid + } + + /** + * Test the property 'customerprice' + */ + @Test + public void customerpriceTest() { + // TODO: test customerprice + } + + /** + * Test the property 'partdescription1' + */ + @Test + public void partdescription1Test() { + // TODO: test partdescription1 + } + + /** + * Test the property 'partdescription2' + */ + @Test + public void partdescription2Test() { + // TODO: test partdescription2 + } + + /** + * Test the property 'vendornumber' + */ + @Test + public void vendornumberTest() { + // TODO: test vendornumber + } + + /** + * Test the property 'vendorname' + */ + @Test + public void vendornameTest() { + // TODO: test vendorname + } + + /** + * Test the property 'cpucode' + */ + @Test + public void cpucodeTest() { + // TODO: test cpucode + } + + /** + * Test the property 'propertyClass' + */ + @Test + public void propertyClassTest() { + // TODO: test propertyClass + } + + /** + * Test the property 'skustatus' + */ + @Test + public void skustatusTest() { + // TODO: test skustatus + } + + /** + * Test the property 'mediacpu' + */ + @Test + public void mediacpuTest() { + // TODO: test mediacpu + } + + /** + * Test the property 'categorysubcategory' + */ + @Test + public void categorysubcategoryTest() { + // TODO: test categorysubcategory + } + + /** + * Test the property 'retailprice' + */ + @Test + public void retailpriceTest() { + // TODO: test retailprice + } + + /** + * Test the property 'newmedia' + */ + @Test + public void newmediaTest() { + // TODO: test newmedia + } + + /** + * Test the property 'enduserrequired' + */ + @Test + public void enduserrequiredTest() { + // TODO: test enduserrequired + } + + /** + * Test the property 'backorderflag' + */ + @Test + public void backorderflagTest() { + // TODO: test backorderflag + } + + /** + * Test the property 'skuauthorized' + */ + @Test + public void skuauthorizedTest() { + // TODO: test skuauthorized + } + + /** + * Test the property 'extendedvendorpartnumber' + */ + @Test + public void extendedvendorpartnumberTest() { + // TODO: test extendedvendorpartnumber + } + + /** + * Test the property 'warehousedetails' + */ + @Test + public void warehousedetailsTest() { + // TODO: test warehousedetails + } + +} diff --git a/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponsePriceandstockresponseTest.java b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponsePriceandstockresponseTest.java new file mode 100644 index 00000000..cc3b87ae --- /dev/null +++ b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponsePriceandstockresponseTest.java @@ -0,0 +1,51 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.PriceAndAvailabilityResponseServiceresponsePriceandstockresponseDetailsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PriceAndAvailabilityResponseServiceresponsePriceandstockresponse + */ +public class PriceAndAvailabilityResponseServiceresponsePriceandstockresponseTest { + private final PriceAndAvailabilityResponseServiceresponsePriceandstockresponse model = new PriceAndAvailabilityResponseServiceresponsePriceandstockresponse(); + + /** + * Model tests for PriceAndAvailabilityResponseServiceresponsePriceandstockresponse + */ + @Test + public void testPriceAndAvailabilityResponseServiceresponsePriceandstockresponse() { + // TODO: test PriceAndAvailabilityResponseServiceresponsePriceandstockresponse + } + + /** + * Test the property 'details' + */ + @Test + public void detailsTest() { + // TODO: test details + } + +} diff --git a/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponseResponsepreambleTest.java b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponseResponsepreambleTest.java new file mode 100644 index 00000000..7ec6a7b0 --- /dev/null +++ b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponseResponsepreambleTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PriceAndAvailabilityResponseServiceresponseResponsepreamble + */ +public class PriceAndAvailabilityResponseServiceresponseResponsepreambleTest { + private final PriceAndAvailabilityResponseServiceresponseResponsepreamble model = new PriceAndAvailabilityResponseServiceresponseResponsepreamble(); + + /** + * Model tests for PriceAndAvailabilityResponseServiceresponseResponsepreamble + */ + @Test + public void testPriceAndAvailabilityResponseServiceresponseResponsepreamble() { + // TODO: test PriceAndAvailabilityResponseServiceresponseResponsepreamble + } + + /** + * Test the property 'responsestatus' + */ + @Test + public void responsestatusTest() { + // TODO: test responsestatus + } + + /** + * Test the property 'responsemessage' + */ + @Test + public void responsemessageTest() { + // TODO: test responsemessage + } + + /** + * Test the property 'statuscode' + */ + @Test + public void statuscodeTest() { + // TODO: test statuscode + } + +} diff --git a/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponseTest.java b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponseTest.java new file mode 100644 index 00000000..7d9c8fa8 --- /dev/null +++ b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseServiceresponseTest.java @@ -0,0 +1,58 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.PriceAndAvailabilityResponseServiceresponsePriceandstockresponse; +import xiresellers.client.model.PriceAndAvailabilityResponseServiceresponseResponsepreamble; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PriceAndAvailabilityResponseServiceresponse + */ +public class PriceAndAvailabilityResponseServiceresponseTest { + private final PriceAndAvailabilityResponseServiceresponse model = new PriceAndAvailabilityResponseServiceresponse(); + + /** + * Model tests for PriceAndAvailabilityResponseServiceresponse + */ + @Test + public void testPriceAndAvailabilityResponseServiceresponse() { + // TODO: test PriceAndAvailabilityResponseServiceresponse + } + + /** + * Test the property 'responsepreamble' + */ + @Test + public void responsepreambleTest() { + // TODO: test responsepreamble + } + + /** + * Test the property 'priceandstockresponse' + */ + @Test + public void priceandstockresponseTest() { + // TODO: test priceandstockresponse + } + +} diff --git a/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseTest.java b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseTest.java new file mode 100644 index 00000000..44d389a9 --- /dev/null +++ b/src/test/java/xiresellers/client/model/PriceAndAvailabilityResponseTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.PriceAndAvailabilityResponseServiceresponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PriceAndAvailabilityResponse + */ +public class PriceAndAvailabilityResponseTest { + private final PriceAndAvailabilityResponse model = new PriceAndAvailabilityResponse(); + + /** + * Model tests for PriceAndAvailabilityResponse + */ + @Test + public void testPriceAndAvailabilityResponse() { + // TODO: test PriceAndAvailabilityResponse + } + + /** + * Test the property 'serviceresponse' + */ + @Test + public void serviceresponseTest() { + // TODO: test serviceresponse + } + +} diff --git a/src/test/java/xiresellers/client/model/ProductDetailResponseAdditionalInformationProductWeightInnerTest.java b/src/test/java/xiresellers/client/model/ProductDetailResponseAdditionalInformationProductWeightInnerTest.java new file mode 100644 index 00000000..99452b1c --- /dev/null +++ b/src/test/java/xiresellers/client/model/ProductDetailResponseAdditionalInformationProductWeightInnerTest.java @@ -0,0 +1,65 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ProductDetailResponseAdditionalInformationProductWeightInner + */ +public class ProductDetailResponseAdditionalInformationProductWeightInnerTest { + private final ProductDetailResponseAdditionalInformationProductWeightInner model = new ProductDetailResponseAdditionalInformationProductWeightInner(); + + /** + * Model tests for ProductDetailResponseAdditionalInformationProductWeightInner + */ + @Test + public void testProductDetailResponseAdditionalInformationProductWeightInner() { + // TODO: test ProductDetailResponseAdditionalInformationProductWeightInner + } + + /** + * Test the property 'plantId' + */ + @Test + public void plantIdTest() { + // TODO: test plantId + } + + /** + * Test the property 'weight' + */ + @Test + public void weightTest() { + // TODO: test weight + } + + /** + * Test the property 'weightUnit' + */ + @Test + public void weightUnitTest() { + // TODO: test weightUnit + } + +} diff --git a/src/test/java/xiresellers/client/model/ProductDetailResponseAdditionalInformationTest.java b/src/test/java/xiresellers/client/model/ProductDetailResponseAdditionalInformationTest.java new file mode 100644 index 00000000..55b58f41 --- /dev/null +++ b/src/test/java/xiresellers/client/model/ProductDetailResponseAdditionalInformationTest.java @@ -0,0 +1,99 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ProductDetailResponseAdditionalInformationProductWeightInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ProductDetailResponseAdditionalInformation + */ +public class ProductDetailResponseAdditionalInformationTest { + private final ProductDetailResponseAdditionalInformation model = new ProductDetailResponseAdditionalInformation(); + + /** + * Model tests for ProductDetailResponseAdditionalInformation + */ + @Test + public void testProductDetailResponseAdditionalInformation() { + // TODO: test ProductDetailResponseAdditionalInformation + } + + /** + * Test the property 'productWeight' + */ + @Test + public void productWeightTest() { + // TODO: test productWeight + } + + /** + * Test the property 'isBulkFreight' + */ + @Test + public void isBulkFreightTest() { + // TODO: test isBulkFreight + } + + /** + * Test the property 'height' + */ + @Test + public void heightTest() { + // TODO: test height + } + + /** + * Test the property 'width' + */ + @Test + public void widthTest() { + // TODO: test width + } + + /** + * Test the property 'length' + */ + @Test + public void lengthTest() { + // TODO: test length + } + + /** + * Test the property 'netWeight' + */ + @Test + public void netWeightTest() { + // TODO: test netWeight + } + + /** + * Test the property 'dimensionUnit' + */ + @Test + public void dimensionUnitTest() { + // TODO: test dimensionUnit + } + +} diff --git a/src/test/java/xiresellers/client/model/ProductDetailResponseCiscoFieldsInnerTest.java b/src/test/java/xiresellers/client/model/ProductDetailResponseCiscoFieldsInnerTest.java new file mode 100644 index 00000000..5879fb3f --- /dev/null +++ b/src/test/java/xiresellers/client/model/ProductDetailResponseCiscoFieldsInnerTest.java @@ -0,0 +1,96 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ProductDetailResponseCiscoFieldsInner + */ +public class ProductDetailResponseCiscoFieldsInnerTest { + private final ProductDetailResponseCiscoFieldsInner model = new ProductDetailResponseCiscoFieldsInner(); + + /** + * Model tests for ProductDetailResponseCiscoFieldsInner + */ + @Test + public void testProductDetailResponseCiscoFieldsInner() { + // TODO: test ProductDetailResponseCiscoFieldsInner + } + + /** + * Test the property 'productSubGroup' + */ + @Test + public void productSubGroupTest() { + // TODO: test productSubGroup + } + + /** + * Test the property 'serviceProgramName' + */ + @Test + public void serviceProgramNameTest() { + // TODO: test serviceProgramName + } + + /** + * Test the property 'itemCatalogCategory' + */ + @Test + public void itemCatalogCategoryTest() { + // TODO: test itemCatalogCategory + } + + /** + * Test the property 'configurationIndicator' + */ + @Test + public void configurationIndicatorTest() { + // TODO: test configurationIndicator + } + + /** + * Test the property 'internalBusinessEntity' + */ + @Test + public void internalBusinessEntityTest() { + // TODO: test internalBusinessEntity + } + + /** + * Test the property 'itemType' + */ + @Test + public void itemTypeTest() { + // TODO: test itemType + } + + /** + * Test the property 'globalListPrice' + */ + @Test + public void globalListPriceTest() { + // TODO: test globalListPrice + } + +} diff --git a/src/test/java/xiresellers/client/model/ProductDetailResponseIndicatorsInnerTest.java b/src/test/java/xiresellers/client/model/ProductDetailResponseIndicatorsInnerTest.java new file mode 100644 index 00000000..4f2f4741 --- /dev/null +++ b/src/test/java/xiresellers/client/model/ProductDetailResponseIndicatorsInnerTest.java @@ -0,0 +1,288 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ProductDetailResponseIndicatorsInner + */ +public class ProductDetailResponseIndicatorsInnerTest { + private final ProductDetailResponseIndicatorsInner model = new ProductDetailResponseIndicatorsInner(); + + /** + * Model tests for ProductDetailResponseIndicatorsInner + */ + @Test + public void testProductDetailResponseIndicatorsInner() { + // TODO: test ProductDetailResponseIndicatorsInner + } + + /** + * Test the property 'hasWarranty' + */ + @Test + public void hasWarrantyTest() { + // TODO: test hasWarranty + } + + /** + * Test the property 'isNewProduct' + */ + @Test + public void isNewProductTest() { + // TODO: test isNewProduct + } + + /** + * Test the property 'hasReturnLimits' + */ + @Test + public void hasReturnLimitsTest() { + // TODO: test hasReturnLimits + } + + /** + * Test the property 'isBackOrderAllowed' + */ + @Test + public void isBackOrderAllowedTest() { + // TODO: test isBackOrderAllowed + } + + /** + * Test the property 'isShippedFromPartner' + */ + @Test + public void isShippedFromPartnerTest() { + // TODO: test isShippedFromPartner + } + + /** + * Test the property 'isReplacementProduct' + */ + @Test + public void isReplacementProductTest() { + // TODO: test isReplacementProduct + } + + /** + * Test the property 'isDirectship' + */ + @Test + public void isDirectshipTest() { + // TODO: test isDirectship + } + + /** + * Test the property 'isDownloadable' + */ + @Test + public void isDownloadableTest() { + // TODO: test isDownloadable + } + + /** + * Test the property 'isDigitalType' + */ + @Test + public void isDigitalTypeTest() { + // TODO: test isDigitalType + } + + /** + * Test the property 'skuType' + */ + @Test + public void skuTypeTest() { + // TODO: test skuType + } + + /** + * Test the property 'hasStdSpecialPrice' + */ + @Test + public void hasStdSpecialPriceTest() { + // TODO: test hasStdSpecialPrice + } + + /** + * Test the property 'hasAcopSpecialPrice' + */ + @Test + public void hasAcopSpecialPriceTest() { + // TODO: test hasAcopSpecialPrice + } + + /** + * Test the property 'hasAcopQuantityBreak' + */ + @Test + public void hasAcopQuantityBreakTest() { + // TODO: test hasAcopQuantityBreak + } + + /** + * Test the property 'hasStdWebDiscount' + */ + @Test + public void hasStdWebDiscountTest() { + // TODO: test hasStdWebDiscount + } + + /** + * Test the property 'hasSpecialBid' + */ + @Test + public void hasSpecialBidTest() { + // TODO: test hasSpecialBid + } + + /** + * Test the property 'isExportableToCountry' + */ + @Test + public void isExportableToCountryTest() { + // TODO: test isExportableToCountry + } + + /** + * Test the property 'isDiscontinuedProduct' + */ + @Test + public void isDiscontinuedProductTest() { + // TODO: test isDiscontinuedProduct + } + + /** + * Test the property 'isRefurbishedProduct' + */ + @Test + public void isRefurbishedProductTest() { + // TODO: test isRefurbishedProduct + } + + /** + * Test the property 'isReturnableProduct' + */ + @Test + public void isReturnableProductTest() { + // TODO: test isReturnableProduct + } + + /** + * Test the property 'isIngramShip' + */ + @Test + public void isIngramShipTest() { + // TODO: test isIngramShip + } + + /** + * Test the property 'isEnduserRequired' + */ + @Test + public void isEnduserRequiredTest() { + // TODO: test isEnduserRequired + } + + /** + * Test the property 'isHeavyWeight' + */ + @Test + public void isHeavyWeightTest() { + // TODO: test isHeavyWeight + } + + /** + * Test the property 'hasLtl' + */ + @Test + public void hasLtlTest() { + // TODO: test hasLtl + } + + /** + * Test the property 'isClearanceProduct' + */ + @Test + public void isClearanceProductTest() { + // TODO: test isClearanceProduct + } + + /** + * Test the property 'hasBundle' + */ + @Test + public void hasBundleTest() { + // TODO: test hasBundle + } + + /** + * Test the property 'isOversizeProduct' + */ + @Test + public void isOversizeProductTest() { + // TODO: test isOversizeProduct + } + + /** + * Test the property 'isPreorderProduct' + */ + @Test + public void isPreorderProductTest() { + // TODO: test isPreorderProduct + } + + /** + * Test the property 'isLicenseProduct' + */ + @Test + public void isLicenseProductTest() { + // TODO: test isLicenseProduct + } + + /** + * Test the property 'isDirectshipOrderable' + */ + @Test + public void isDirectshipOrderableTest() { + // TODO: test isDirectshipOrderable + } + + /** + * Test the property 'isServiceSku' + */ + @Test + public void isServiceSkuTest() { + // TODO: test isServiceSku + } + + /** + * Test the property 'isConfigurable' + */ + @Test + public void isConfigurableTest() { + // TODO: test isConfigurable + } + +} diff --git a/src/test/java/xiresellers/client/model/ProductDetailResponseTechnicalSpecificationsInnerTest.java b/src/test/java/xiresellers/client/model/ProductDetailResponseTechnicalSpecificationsInnerTest.java new file mode 100644 index 00000000..9a5500cc --- /dev/null +++ b/src/test/java/xiresellers/client/model/ProductDetailResponseTechnicalSpecificationsInnerTest.java @@ -0,0 +1,72 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ProductDetailResponseTechnicalSpecificationsInner + */ +public class ProductDetailResponseTechnicalSpecificationsInnerTest { + private final ProductDetailResponseTechnicalSpecificationsInner model = new ProductDetailResponseTechnicalSpecificationsInner(); + + /** + * Model tests for ProductDetailResponseTechnicalSpecificationsInner + */ + @Test + public void testProductDetailResponseTechnicalSpecificationsInner() { + // TODO: test ProductDetailResponseTechnicalSpecificationsInner + } + + /** + * Test the property 'headername' + */ + @Test + public void headernameTest() { + // TODO: test headername + } + + /** + * Test the property 'attributevalue' + */ + @Test + public void attributevalueTest() { + // TODO: test attributevalue + } + + /** + * Test the property 'attributedisplay' + */ + @Test + public void attributedisplayTest() { + // TODO: test attributedisplay + } + + /** + * Test the property 'attributename' + */ + @Test + public void attributenameTest() { + // TODO: test attributename + } + +} diff --git a/src/test/java/xiresellers/client/model/ProductDetailResponseTest.java b/src/test/java/xiresellers/client/model/ProductDetailResponseTest.java new file mode 100644 index 00000000..78810b40 --- /dev/null +++ b/src/test/java/xiresellers/client/model/ProductDetailResponseTest.java @@ -0,0 +1,190 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ProductDetailResponseAdditionalInformation; +import xiresellers.client.model.ProductDetailResponseCiscoFieldsInner; +import xiresellers.client.model.ProductDetailResponseIndicatorsInner; +import xiresellers.client.model.ProductDetailResponseTechnicalSpecificationsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ProductDetailResponse + */ +public class ProductDetailResponseTest { + private final ProductDetailResponse model = new ProductDetailResponse(); + + /** + * Model tests for ProductDetailResponse + */ + @Test + public void testProductDetailResponse() { + // TODO: test ProductDetailResponse + } + + /** + * Test the property 'ingramPartNumber' + */ + @Test + public void ingramPartNumberTest() { + // TODO: test ingramPartNumber + } + + /** + * Test the property 'vendorPartNumber' + */ + @Test + public void vendorPartNumberTest() { + // TODO: test vendorPartNumber + } + + /** + * Test the property 'productAuthorized' + */ + @Test + public void productAuthorizedTest() { + // TODO: test productAuthorized + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'productDetailDescription' + */ + @Test + public void productDetailDescriptionTest() { + // TODO: test productDetailDescription + } + + /** + * Test the property 'upc' + */ + @Test + public void upcTest() { + // TODO: test upc + } + + /** + * Test the property 'productCategory' + */ + @Test + public void productCategoryTest() { + // TODO: test productCategory + } + + /** + * Test the property 'productSubcategory' + */ + @Test + public void productSubcategoryTest() { + // TODO: test productSubcategory + } + + /** + * Test the property 'vendorName' + */ + @Test + public void vendorNameTest() { + // TODO: test vendorName + } + + /** + * Test the property 'vendorNumber' + */ + @Test + public void vendorNumberTest() { + // TODO: test vendorNumber + } + + /** + * Test the property 'productStatusCode' + */ + @Test + public void productStatusCodeTest() { + // TODO: test productStatusCode + } + + /** + * Test the property 'productClass' + */ + @Test + public void productClassTest() { + // TODO: test productClass + } + + /** + * Test the property 'customerPartNumber' + */ + @Test + public void customerPartNumberTest() { + // TODO: test customerPartNumber + } + + /** + * Test the property 'indicators' + */ + @Test + public void indicatorsTest() { + // TODO: test indicators + } + + /** + * Test the property 'ciscoFields' + */ + @Test + public void ciscoFieldsTest() { + // TODO: test ciscoFields + } + + /** + * Test the property 'technicalSpecifications' + */ + @Test + public void technicalSpecificationsTest() { + // TODO: test technicalSpecifications + } + + /** + * Test the property 'warrantyInformation' + */ + @Test + public void warrantyInformationTest() { + // TODO: test warrantyInformation + } + + /** + * Test the property 'additionalInformation' + */ + @Test + public void additionalInformationTest() { + // TODO: test additionalInformation + } + +} diff --git a/src/test/java/xiresellers/client/model/ProductLineTypeSerialnumberdetailsInnerTest.java b/src/test/java/xiresellers/client/model/ProductLineTypeSerialnumberdetailsInnerTest.java new file mode 100644 index 00000000..3ef9d52a --- /dev/null +++ b/src/test/java/xiresellers/client/model/ProductLineTypeSerialnumberdetailsInnerTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ProductLineTypeSerialnumberdetailsInner + */ +public class ProductLineTypeSerialnumberdetailsInnerTest { + private final ProductLineTypeSerialnumberdetailsInner model = new ProductLineTypeSerialnumberdetailsInner(); + + /** + * Model tests for ProductLineTypeSerialnumberdetailsInner + */ + @Test + public void testProductLineTypeSerialnumberdetailsInner() { + // TODO: test ProductLineTypeSerialnumberdetailsInner + } + + /** + * Test the property 'serialnumber' + */ + @Test + public void serialnumberTest() { + // TODO: test serialnumber + } + + /** + * Test the property 'deliverynumber' + */ + @Test + public void deliverynumberTest() { + // TODO: test deliverynumber + } + +} diff --git a/src/test/java/xiresellers/client/model/ProductLineTypeTest.java b/src/test/java/xiresellers/client/model/ProductLineTypeTest.java new file mode 100644 index 00000000..ab876026 --- /dev/null +++ b/src/test/java/xiresellers/client/model/ProductLineTypeTest.java @@ -0,0 +1,206 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.InvoiceDetailResponseServiceresponseInvoicedetailresponseExtendedspecsInner; +import xiresellers.client.model.ProductLineTypeSerialnumberdetailsInner; +import xiresellers.client.model.ProductLineTypeTrackingnumberdetailsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ProductLineType + */ +public class ProductLineTypeTest { + private final ProductLineType model = new ProductLineType(); + + /** + * Model tests for ProductLineType + */ + @Test + public void testProductLineType() { + // TODO: test ProductLineType + } + + /** + * Test the property 'linenumber' + */ + @Test + public void linenumberTest() { + // TODO: test linenumber + } + + /** + * Test the property 'linetype' + */ + @Test + public void linetypeTest() { + // TODO: test linetype + } + + /** + * Test the property 'partnumber' + */ + @Test + public void partnumberTest() { + // TODO: test partnumber + } + + /** + * Test the property 'vendorpartnumber' + */ + @Test + public void vendorpartnumberTest() { + // TODO: test vendorpartnumber + } + + /** + * Test the property 'partdescription' + */ + @Test + public void partdescriptionTest() { + // TODO: test partdescription + } + + /** + * Test the property 'shipfrombranch' + */ + @Test + public void shipfrombranchTest() { + // TODO: test shipfrombranch + } + + /** + * Test the property 'shippedquantity' + */ + @Test + public void shippedquantityTest() { + // TODO: test shippedquantity + } + + /** + * Test the property 'orderedquantity' + */ + @Test + public void orderedquantityTest() { + // TODO: test orderedquantity + } + + /** + * Test the property 'marginpercent' + */ + @Test + public void marginpercentTest() { + // TODO: test marginpercent + } + + /** + * Test the property 'backorderquantity' + */ + @Test + public void backorderquantityTest() { + // TODO: test backorderquantity + } + + /** + * Test the property 'backorderetadate' + */ + @Test + public void backorderetadateTest() { + // TODO: test backorderetadate + } + + /** + * Test the property 'extendedprice' + */ + @Test + public void extendedpriceTest() { + // TODO: test extendedprice + } + + /** + * Test the property 'specialbidnumber' + */ + @Test + public void specialbidnumberTest() { + // TODO: test specialbidnumber + } + + /** + * Test the property 'ordersuffix' + */ + @Test + public void ordersuffixTest() { + // TODO: test ordersuffix + } + + /** + * Test the property 'isacopapplied' + */ + @Test + public void isacopappliedTest() { + // TODO: test isacopapplied + } + + /** + * Test the property 'unitprice' + */ + @Test + public void unitpriceTest() { + // TODO: test unitprice + } + + /** + * Test the property 'unitofmeasure' + */ + @Test + public void unitofmeasureTest() { + // TODO: test unitofmeasure + } + + /** + * Test the property 'serialnumberdetails' + */ + @Test + public void serialnumberdetailsTest() { + // TODO: test serialnumberdetails + } + + /** + * Test the property 'trackingnumberdetails' + */ + @Test + public void trackingnumberdetailsTest() { + // TODO: test trackingnumberdetails + } + + /** + * Test the property 'productextendedspecs' + */ + @Test + public void productextendedspecsTest() { + // TODO: test productextendedspecs + } + +} diff --git a/src/test/java/xiresellers/client/model/ProductLineTypeTrackingnumberdetailsInnerTest.java b/src/test/java/xiresellers/client/model/ProductLineTypeTrackingnumberdetailsInnerTest.java new file mode 100644 index 00000000..903956da --- /dev/null +++ b/src/test/java/xiresellers/client/model/ProductLineTypeTrackingnumberdetailsInnerTest.java @@ -0,0 +1,48 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ProductLineTypeTrackingnumberdetailsInner + */ +public class ProductLineTypeTrackingnumberdetailsInnerTest { + private final ProductLineTypeTrackingnumberdetailsInner model = new ProductLineTypeTrackingnumberdetailsInner(); + + /** + * Model tests for ProductLineTypeTrackingnumberdetailsInner + */ + @Test + public void testProductLineTypeTrackingnumberdetailsInner() { + // TODO: test ProductLineTypeTrackingnumberdetailsInner + } + + /** + * Test the property 'trackingnumber' + */ + @Test + public void trackingnumberTest() { + // TODO: test trackingnumber + } + +} diff --git a/src/test/java/xiresellers/client/model/ProductSearchRequestServicerequestProductsearchrequestSearchcriteriaTest.java b/src/test/java/xiresellers/client/model/ProductSearchRequestServicerequestProductsearchrequestSearchcriteriaTest.java new file mode 100644 index 00000000..1059c3af --- /dev/null +++ b/src/test/java/xiresellers/client/model/ProductSearchRequestServicerequestProductsearchrequestSearchcriteriaTest.java @@ -0,0 +1,80 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ProductSearchRequestServicerequestProductsearchrequestSearchcriteria + */ +public class ProductSearchRequestServicerequestProductsearchrequestSearchcriteriaTest { + private final ProductSearchRequestServicerequestProductsearchrequestSearchcriteria model = new ProductSearchRequestServicerequestProductsearchrequestSearchcriteria(); + + /** + * Model tests for ProductSearchRequestServicerequestProductsearchrequestSearchcriteria + */ + @Test + public void testProductSearchRequestServicerequestProductsearchrequestSearchcriteria() { + // TODO: test ProductSearchRequestServicerequestProductsearchrequestSearchcriteria + } + + /** + * Test the property 'vendor' + */ + @Test + public void vendorTest() { + // TODO: test vendor + } + + /** + * Test the property 'vendorpartnumber' + */ + @Test + public void vendorpartnumberTest() { + // TODO: test vendorpartnumber + } + + /** + * Test the property 'partdescription' + */ + @Test + public void partdescriptionTest() { + // TODO: test partdescription + } + + /** + * Test the property 'UPC' + */ + @Test + public void UPCTest() { + // TODO: test UPC + } + + /** + * Test the property 'customerpartnumber' + */ + @Test + public void customerpartnumberTest() { + // TODO: test customerpartnumber + } + +} diff --git a/src/test/java/xiresellers/client/model/ProductSearchRequestServicerequestProductsearchrequestTest.java b/src/test/java/xiresellers/client/model/ProductSearchRequestServicerequestProductsearchrequestTest.java new file mode 100644 index 00000000..0a6b17f6 --- /dev/null +++ b/src/test/java/xiresellers/client/model/ProductSearchRequestServicerequestProductsearchrequestTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.ProductSearchRequestServicerequestProductsearchrequestSearchcriteria; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ProductSearchRequestServicerequestProductsearchrequest + */ +public class ProductSearchRequestServicerequestProductsearchrequestTest { + private final ProductSearchRequestServicerequestProductsearchrequest model = new ProductSearchRequestServicerequestProductsearchrequest(); + + /** + * Model tests for ProductSearchRequestServicerequestProductsearchrequest + */ + @Test + public void testProductSearchRequestServicerequestProductsearchrequest() { + // TODO: test ProductSearchRequestServicerequestProductsearchrequest + } + + /** + * Test the property 'searchcriteria' + */ + @Test + public void searchcriteriaTest() { + // TODO: test searchcriteria + } + +} diff --git a/src/test/java/xiresellers/client/model/ProductSearchRequestServicerequestRequestpreambleTest.java b/src/test/java/xiresellers/client/model/ProductSearchRequestServicerequestRequestpreambleTest.java new file mode 100644 index 00000000..5dd78b6b --- /dev/null +++ b/src/test/java/xiresellers/client/model/ProductSearchRequestServicerequestRequestpreambleTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ProductSearchRequestServicerequestRequestpreamble + */ +public class ProductSearchRequestServicerequestRequestpreambleTest { + private final ProductSearchRequestServicerequestRequestpreamble model = new ProductSearchRequestServicerequestRequestpreamble(); + + /** + * Model tests for ProductSearchRequestServicerequestRequestpreamble + */ + @Test + public void testProductSearchRequestServicerequestRequestpreamble() { + // TODO: test ProductSearchRequestServicerequestRequestpreamble + } + + /** + * Test the property 'isocountrycode' + */ + @Test + public void isocountrycodeTest() { + // TODO: test isocountrycode + } + + /** + * Test the property 'customernumber' + */ + @Test + public void customernumberTest() { + // TODO: test customernumber + } + + /** + * Test the property 'vendornumber' + */ + @Test + public void vendornumberTest() { + // TODO: test vendornumber + } + +} diff --git a/src/test/java/xiresellers/client/model/ProductSearchRequestServicerequestTest.java b/src/test/java/xiresellers/client/model/ProductSearchRequestServicerequestTest.java new file mode 100644 index 00000000..14ea378d --- /dev/null +++ b/src/test/java/xiresellers/client/model/ProductSearchRequestServicerequestTest.java @@ -0,0 +1,58 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.ProductSearchRequestServicerequestProductsearchrequest; +import xiresellers.client.model.ProductSearchRequestServicerequestRequestpreamble; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ProductSearchRequestServicerequest + */ +public class ProductSearchRequestServicerequestTest { + private final ProductSearchRequestServicerequest model = new ProductSearchRequestServicerequest(); + + /** + * Model tests for ProductSearchRequestServicerequest + */ + @Test + public void testProductSearchRequestServicerequest() { + // TODO: test ProductSearchRequestServicerequest + } + + /** + * Test the property 'requestpreamble' + */ + @Test + public void requestpreambleTest() { + // TODO: test requestpreamble + } + + /** + * Test the property 'productsearchrequest' + */ + @Test + public void productsearchrequestTest() { + // TODO: test productsearchrequest + } + +} diff --git a/src/test/java/xiresellers/client/model/ProductSearchRequestTest.java b/src/test/java/xiresellers/client/model/ProductSearchRequestTest.java new file mode 100644 index 00000000..32df20e7 --- /dev/null +++ b/src/test/java/xiresellers/client/model/ProductSearchRequestTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.ProductSearchRequestServicerequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ProductSearchRequest + */ +public class ProductSearchRequestTest { + private final ProductSearchRequest model = new ProductSearchRequest(); + + /** + * Model tests for ProductSearchRequest + */ + @Test + public void testProductSearchRequest() { + // TODO: test ProductSearchRequest + } + + /** + * Test the property 'servicerequest' + */ + @Test + public void servicerequestTest() { + // TODO: test servicerequest + } + +} diff --git a/src/test/java/xiresellers/client/model/ProductSearchResponseCatalogInnerLinksInnerTest.java b/src/test/java/xiresellers/client/model/ProductSearchResponseCatalogInnerLinksInnerTest.java new file mode 100644 index 00000000..8550d757 --- /dev/null +++ b/src/test/java/xiresellers/client/model/ProductSearchResponseCatalogInnerLinksInnerTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ProductSearchResponseCatalogInnerLinksInner + */ +public class ProductSearchResponseCatalogInnerLinksInnerTest { + private final ProductSearchResponseCatalogInnerLinksInner model = new ProductSearchResponseCatalogInnerLinksInner(); + + /** + * Model tests for ProductSearchResponseCatalogInnerLinksInner + */ + @Test + public void testProductSearchResponseCatalogInnerLinksInner() { + // TODO: test ProductSearchResponseCatalogInnerLinksInner + } + + /** + * Test the property 'topic' + */ + @Test + public void topicTest() { + // TODO: test topic + } + + /** + * Test the property 'href' + */ + @Test + public void hrefTest() { + // TODO: test href + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/xiresellers/client/model/ProductSearchResponseCatalogInnerTest.java b/src/test/java/xiresellers/client/model/ProductSearchResponseCatalogInnerTest.java new file mode 100644 index 00000000..cc5d2699 --- /dev/null +++ b/src/test/java/xiresellers/client/model/ProductSearchResponseCatalogInnerTest.java @@ -0,0 +1,195 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ProductSearchResponseCatalogInnerLinksInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ProductSearchResponseCatalogInner + */ +public class ProductSearchResponseCatalogInnerTest { + private final ProductSearchResponseCatalogInner model = new ProductSearchResponseCatalogInner(); + + /** + * Model tests for ProductSearchResponseCatalogInner + */ + @Test + public void testProductSearchResponseCatalogInner() { + // TODO: test ProductSearchResponseCatalogInner + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'category' + */ + @Test + public void categoryTest() { + // TODO: test category + } + + /** + * Test the property 'subCategory' + */ + @Test + public void subCategoryTest() { + // TODO: test subCategory + } + + /** + * Test the property 'productType' + */ + @Test + public void productTypeTest() { + // TODO: test productType + } + + /** + * Test the property 'ingramPartNumber' + */ + @Test + public void ingramPartNumberTest() { + // TODO: test ingramPartNumber + } + + /** + * Test the property 'vendorPartNumber' + */ + @Test + public void vendorPartNumberTest() { + // TODO: test vendorPartNumber + } + + /** + * Test the property 'upcCode' + */ + @Test + public void upcCodeTest() { + // TODO: test upcCode + } + + /** + * Test the property 'vendorName' + */ + @Test + public void vendorNameTest() { + // TODO: test vendorName + } + + /** + * Test the property 'endUserRequired' + */ + @Test + public void endUserRequiredTest() { + // TODO: test endUserRequired + } + + /** + * Test the property 'hasDiscounts' + */ + @Test + public void hasDiscountsTest() { + // TODO: test hasDiscounts + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'discontinued' + */ + @Test + public void discontinuedTest() { + // TODO: test discontinued + } + + /** + * Test the property 'newProduct' + */ + @Test + public void newProductTest() { + // TODO: test newProduct + } + + /** + * Test the property 'directShip' + */ + @Test + public void directShipTest() { + // TODO: test directShip + } + + /** + * Test the property 'hasWarranty' + */ + @Test + public void hasWarrantyTest() { + // TODO: test hasWarranty + } + + /** + * Test the property 'links' + */ + @Test + public void linksTest() { + // TODO: test links + } + + /** + * Test the property 'extraDescription' + */ + @Test + public void extraDescriptionTest() { + // TODO: test extraDescription + } + + /** + * Test the property 'replacementSku' + */ + @Test + public void replacementSkuTest() { + // TODO: test replacementSku + } + + /** + * Test the property 'authorizedToPurchase' + */ + @Test + public void authorizedToPurchaseTest() { + // TODO: test authorizedToPurchase + } + +} diff --git a/src/test/java/xiresellers/client/model/ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInnerTest.java b/src/test/java/xiresellers/client/model/ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInnerTest.java new file mode 100644 index 00000000..45e4a7df --- /dev/null +++ b/src/test/java/xiresellers/client/model/ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInnerTest.java @@ -0,0 +1,88 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner + */ +public class ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInnerTest { + private final ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner model = new ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner(); + + /** + * Model tests for ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner + */ + @Test + public void testProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner() { + // TODO: test ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner + } + + /** + * Test the property 'ingrampartnumber' + */ + @Test + public void ingrampartnumberTest() { + // TODO: test ingrampartnumber + } + + /** + * Test the property 'manufacturerpartnumber' + */ + @Test + public void manufacturerpartnumberTest() { + // TODO: test manufacturerpartnumber + } + + /** + * Test the property 'upccode' + */ + @Test + public void upccodeTest() { + // TODO: test upccode + } + + /** + * Test the property 'productdescription' + */ + @Test + public void productdescriptionTest() { + // TODO: test productdescription + } + + /** + * Test the property 'currency' + */ + @Test + public void currencyTest() { + // TODO: test currency + } + + /** + * Test the property 'haswarranty' + */ + @Test + public void haswarrantyTest() { + // TODO: test haswarranty + } + +} diff --git a/src/test/java/xiresellers/client/model/ProductSearchResponseServiceresponseProductsearchresponseInnerTest.java b/src/test/java/xiresellers/client/model/ProductSearchResponseServiceresponseProductsearchresponseInnerTest.java new file mode 100644 index 00000000..5edee25c --- /dev/null +++ b/src/test/java/xiresellers/client/model/ProductSearchResponseServiceresponseProductsearchresponseInnerTest.java @@ -0,0 +1,59 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ProductSearchResponseServiceresponseProductsearchresponseInnerPartnumbersInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ProductSearchResponseServiceresponseProductsearchresponseInner + */ +public class ProductSearchResponseServiceresponseProductsearchresponseInnerTest { + private final ProductSearchResponseServiceresponseProductsearchresponseInner model = new ProductSearchResponseServiceresponseProductsearchresponseInner(); + + /** + * Model tests for ProductSearchResponseServiceresponseProductsearchresponseInner + */ + @Test + public void testProductSearchResponseServiceresponseProductsearchresponseInner() { + // TODO: test ProductSearchResponseServiceresponseProductsearchresponseInner + } + + /** + * Test the property 'responseflag' + */ + @Test + public void responseflagTest() { + // TODO: test responseflag + } + + /** + * Test the property 'partnumbers' + */ + @Test + public void partnumbersTest() { + // TODO: test partnumbers + } + +} diff --git a/src/test/java/xiresellers/client/model/ProductSearchResponseServiceresponseResponsepreambleTest.java b/src/test/java/xiresellers/client/model/ProductSearchResponseServiceresponseResponsepreambleTest.java new file mode 100644 index 00000000..ca031c5a --- /dev/null +++ b/src/test/java/xiresellers/client/model/ProductSearchResponseServiceresponseResponsepreambleTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ProductSearchResponseServiceresponseResponsepreamble + */ +public class ProductSearchResponseServiceresponseResponsepreambleTest { + private final ProductSearchResponseServiceresponseResponsepreamble model = new ProductSearchResponseServiceresponseResponsepreamble(); + + /** + * Model tests for ProductSearchResponseServiceresponseResponsepreamble + */ + @Test + public void testProductSearchResponseServiceresponseResponsepreamble() { + // TODO: test ProductSearchResponseServiceresponseResponsepreamble + } + + /** + * Test the property 'requeststatus' + */ + @Test + public void requeststatusTest() { + // TODO: test requeststatus + } + + /** + * Test the property 'returncode' + */ + @Test + public void returncodeTest() { + // TODO: test returncode + } + + /** + * Test the property 'returnmessage' + */ + @Test + public void returnmessageTest() { + // TODO: test returnmessage + } + +} diff --git a/src/test/java/xiresellers/client/model/ProductSearchResponseServiceresponseTest.java b/src/test/java/xiresellers/client/model/ProductSearchResponseServiceresponseTest.java new file mode 100644 index 00000000..89a7d8be --- /dev/null +++ b/src/test/java/xiresellers/client/model/ProductSearchResponseServiceresponseTest.java @@ -0,0 +1,60 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ProductSearchResponseServiceresponseProductsearchresponseInner; +import xiresellers.client.model.ProductSearchResponseServiceresponseResponsepreamble; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ProductSearchResponseServiceresponse + */ +public class ProductSearchResponseServiceresponseTest { + private final ProductSearchResponseServiceresponse model = new ProductSearchResponseServiceresponse(); + + /** + * Model tests for ProductSearchResponseServiceresponse + */ + @Test + public void testProductSearchResponseServiceresponse() { + // TODO: test ProductSearchResponseServiceresponse + } + + /** + * Test the property 'responsepreamble' + */ + @Test + public void responsepreambleTest() { + // TODO: test responsepreamble + } + + /** + * Test the property 'productsearchresponse' + */ + @Test + public void productsearchresponseTest() { + // TODO: test productsearchresponse + } + +} diff --git a/src/test/java/xiresellers/client/model/ProductSearchResponseTest.java b/src/test/java/xiresellers/client/model/ProductSearchResponseTest.java new file mode 100644 index 00000000..077e0681 --- /dev/null +++ b/src/test/java/xiresellers/client/model/ProductSearchResponseTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.ProductSearchResponseServiceresponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ProductSearchResponse + */ +public class ProductSearchResponseTest { + private final ProductSearchResponse model = new ProductSearchResponse(); + + /** + * Model tests for ProductSearchResponse + */ + @Test + public void testProductSearchResponse() { + // TODO: test ProductSearchResponse + } + + /** + * Test the property 'serviceresponse' + */ + @Test + public void serviceresponseTest() { + // TODO: test serviceresponse + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseResponsePreambleTest.java b/src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseResponsePreambleTest.java new file mode 100644 index 00000000..29a74e9a --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseResponsePreambleTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteDetailsQuoteDetailResponseResponsePreamble + */ +public class QuoteDetailsQuoteDetailResponseResponsePreambleTest { + private final QuoteDetailsQuoteDetailResponseResponsePreamble model = new QuoteDetailsQuoteDetailResponseResponsePreamble(); + + /** + * Model tests for QuoteDetailsQuoteDetailResponseResponsePreamble + */ + @Test + public void testQuoteDetailsQuoteDetailResponseResponsePreamble() { + // TODO: test QuoteDetailsQuoteDetailResponseResponsePreamble + } + + /** + * Test the property 'responseStatus' + */ + @Test + public void responseStatusTest() { + // TODO: test responseStatus + } + + /** + * Test the property 'statusCode' + */ + @Test + public void statusCodeTest() { + // TODO: test statusCode + } + + /** + * Test the property 'responseMessage' + */ + @Test + public void responseMessageTest() { + // TODO: test responseMessage + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfoTest.java b/src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfoTest.java new file mode 100644 index 00000000..b6ad4a39 --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfoTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo + */ +public class QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfoTest { + private final QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo model = new QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo(); + + /** + * Model tests for QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo + */ + @Test + public void testQuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo() { + // TODO: test QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo + } + + /** + * Test the property 'accountName' + */ + @Test + public void accountNameTest() { + // TODO: test accountName + } + + /** + * Test the property 'bcn' + */ + @Test + public void bcnTest() { + // TODO: test bcn + } + + /** + * Test the property 'phone' + */ + @Test + public void phoneTest() { + // TODO: test phone + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfoTest.java b/src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfoTest.java new file mode 100644 index 00000000..87228867 --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfoTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo + */ +public class QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfoTest { + private final QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo model = new QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo(); + + /** + * Model tests for QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo + */ + @Test + public void testQuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo() { + // TODO: test QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo + } + + /** + * Test the property 'contactEmail' + */ + @Test + public void contactEmailTest() { + // TODO: test contactEmail + } + + /** + * Test the property 'contactName' + */ + @Test + public void contactNameTest() { + // TODO: test contactName + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUserTest.java b/src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUserTest.java new file mode 100644 index 00000000..319cde44 --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUserTest.java @@ -0,0 +1,128 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser + */ +public class QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUserTest { + private final QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser model = new QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser(); + + /** + * Model tests for QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser + */ + @Test + public void testQuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser() { + // TODO: test QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser + } + + /** + * Test the property 'endUserName' + */ + @Test + public void endUserNameTest() { + // TODO: test endUserName + } + + /** + * Test the property 'endUserAddress' + */ + @Test + public void endUserAddressTest() { + // TODO: test endUserAddress + } + + /** + * Test the property 'endUserAddress2' + */ + @Test + public void endUserAddress2Test() { + // TODO: test endUserAddress2 + } + + /** + * Test the property 'endUserAddress3' + */ + @Test + public void endUserAddress3Test() { + // TODO: test endUserAddress3 + } + + /** + * Test the property 'endUserCity' + */ + @Test + public void endUserCityTest() { + // TODO: test endUserCity + } + + /** + * Test the property 'endUserState' + */ + @Test + public void endUserStateTest() { + // TODO: test endUserState + } + + /** + * Test the property 'endUserEmail' + */ + @Test + public void endUserEmailTest() { + // TODO: test endUserEmail + } + + /** + * Test the property 'endUserPhone' + */ + @Test + public void endUserPhoneTest() { + // TODO: test endUserPhone + } + + /** + * Test the property 'endUserZipCode' + */ + @Test + public void endUserZipCodeTest() { + // TODO: test endUserZipCode + } + + /** + * Test the property 'endUserContactName' + */ + @Test + public void endUserContactNameTest() { + // TODO: test endUserContactName + } + + /** + * Test the property 'endUserMarketSegment' + */ + @Test + public void endUserMarketSegmentTest() { + // TODO: test endUserMarketSegment + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseTest.java b/src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseTest.java new file mode 100644 index 00000000..ba1f0267 --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseTest.java @@ -0,0 +1,229 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.Arrays; +import xiresellers.client.model.QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo; +import xiresellers.client.model.QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo; +import xiresellers.client.model.QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser; +import xiresellers.client.model.QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse + */ +public class QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseTest { + private final QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse model = new QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse(); + + /** + * Model tests for QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse + */ + @Test + public void testQuoteDetailsQuoteDetailResponseRetrieveQuoteResponse() { + // TODO: test QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse + } + + /** + * Test the property 'quoteGuid' + */ + @Test + public void quoteGuidTest() { + // TODO: test quoteGuid + } + + /** + * Test the property 'quoteName' + */ + @Test + public void quoteNameTest() { + // TODO: test quoteName + } + + /** + * Test the property 'quoteNumber' + */ + @Test + public void quoteNumberTest() { + // TODO: test quoteNumber + } + + /** + * Test the property 'quoteExpiryDate' + */ + @Test + public void quoteExpiryDateTest() { + // TODO: test quoteExpiryDate + } + + /** + * Test the property 'revisionNumber' + */ + @Test + public void revisionNumberTest() { + // TODO: test revisionNumber + } + + /** + * Test the property 'introPreamble' + */ + @Test + public void introPreambleTest() { + // TODO: test introPreamble + } + + /** + * Test the property 'purchaseInstructions' + */ + @Test + public void purchaseInstructionsTest() { + // TODO: test purchaseInstructions + } + + /** + * Test the property 'legalTerms' + */ + @Test + public void legalTermsTest() { + // TODO: test legalTerms + } + + /** + * Test the property 'currencyCode' + */ + @Test + public void currencyCodeTest() { + // TODO: test currencyCode + } + + /** + * Test the property 'priceDeviationId' + */ + @Test + public void priceDeviationIdTest() { + // TODO: test priceDeviationId + } + + /** + * Test the property 'priceDeviationStartDate' + */ + @Test + public void priceDeviationStartDateTest() { + // TODO: test priceDeviationStartDate + } + + /** + * Test the property 'priceDeviationExpiryDate' + */ + @Test + public void priceDeviationExpiryDateTest() { + // TODO: test priceDeviationExpiryDate + } + + /** + * Test the property 'customerNeed' + */ + @Test + public void customerNeedTest() { + // TODO: test customerNeed + } + + /** + * Test the property 'solutionProposed' + */ + @Test + public void solutionProposedTest() { + // TODO: test solutionProposed + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'created' + */ + @Test + public void createdTest() { + // TODO: test created + } + + /** + * Test the property 'modified' + */ + @Test + public void modifiedTest() { + // TODO: test modified + } + + /** + * Test the property 'leasingCalculations' + */ + @Test + public void leasingCalculationsTest() { + // TODO: test leasingCalculations + } + + /** + * Test the property 'leasingInstructions' + */ + @Test + public void leasingInstructionsTest() { + // TODO: test leasingInstructions + } + + /** + * Test the property 'accountInfo' + */ + @Test + public void accountInfoTest() { + // TODO: test accountInfo + } + + /** + * Test the property 'contactInfo' + */ + @Test + public void contactInfoTest() { + // TODO: test contactInfo + } + + /** + * Test the property 'vendorAttributes' + */ + @Test + public void vendorAttributesTest() { + // TODO: test vendorAttributes + } + + /** + * Test the property 'endUser' + */ + @Test + public void endUserTest() { + // TODO: test endUser + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributesTest.java b/src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributesTest.java new file mode 100644 index 00000000..4c9e27da --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributesTest.java @@ -0,0 +1,72 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes + */ +public class QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributesTest { + private final QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes model = new QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes(); + + /** + * Model tests for QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes + */ + @Test + public void testQuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes() { + // TODO: test QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes + } + + /** + * Test the property 'estimateId' + */ + @Test + public void estimateIdTest() { + // TODO: test estimateId + } + + /** + * Test the property 'dealId' + */ + @Test + public void dealIdTest() { + // TODO: test dealId + } + + /** + * Test the property 'vendorName' + */ + @Test + public void vendorNameTest() { + // TODO: test vendorName + } + + /** + * Test the property 'vendorSettingMessage' + */ + @Test + public void vendorSettingMessageTest() { + // TODO: test vendorSettingMessage + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseTest.java b/src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseTest.java new file mode 100644 index 00000000..38d441e7 --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteDetailsQuoteDetailResponseTest.java @@ -0,0 +1,101 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.QuoteDetailsQuoteDetailResponseResponsePreamble; +import xiresellers.client.model.QuoteDetailsQuoteDetailResponseRetrieveQuoteResponse; +import xiresellers.client.model.QuoteProductList; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteDetailsQuoteDetailResponse + */ +public class QuoteDetailsQuoteDetailResponseTest { + private final QuoteDetailsQuoteDetailResponse model = new QuoteDetailsQuoteDetailResponse(); + + /** + * Model tests for QuoteDetailsQuoteDetailResponse + */ + @Test + public void testQuoteDetailsQuoteDetailResponse() { + // TODO: test QuoteDetailsQuoteDetailResponse + } + + /** + * Test the property 'responsePreamble' + */ + @Test + public void responsePreambleTest() { + // TODO: test responsePreamble + } + + /** + * Test the property 'retrieveQuoteResponse' + */ + @Test + public void retrieveQuoteResponseTest() { + // TODO: test retrieveQuoteResponse + } + + /** + * Test the property 'quoteProductList' + */ + @Test + public void quoteProductListTest() { + // TODO: test quoteProductList + } + + /** + * Test the property 'totalQuoteProductCount' + */ + @Test + public void totalQuoteProductCountTest() { + // TODO: test totalQuoteProductCount + } + + /** + * Test the property 'totalExtendedMsrp' + */ + @Test + public void totalExtendedMsrpTest() { + // TODO: test totalExtendedMsrp + } + + /** + * Test the property 'totalQuantity' + */ + @Test + public void totalQuantityTest() { + // TODO: test totalQuantity + } + + /** + * Test the property 'totalExtendedQuotePrice' + */ + @Test + public void totalExtendedQuotePriceTest() { + // TODO: test totalExtendedQuotePrice + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteDetailsRequestQuoteProductsRequestRequestpreambleTest.java b/src/test/java/xiresellers/client/model/QuoteDetailsRequestQuoteProductsRequestRequestpreambleTest.java new file mode 100644 index 00000000..11bec68e --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteDetailsRequestQuoteProductsRequestRequestpreambleTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteDetailsRequestQuoteProductsRequestRequestpreamble + */ +public class QuoteDetailsRequestQuoteProductsRequestRequestpreambleTest { + private final QuoteDetailsRequestQuoteProductsRequestRequestpreamble model = new QuoteDetailsRequestQuoteProductsRequestRequestpreamble(); + + /** + * Model tests for QuoteDetailsRequestQuoteProductsRequestRequestpreamble + */ + @Test + public void testQuoteDetailsRequestQuoteProductsRequestRequestpreamble() { + // TODO: test QuoteDetailsRequestQuoteProductsRequestRequestpreamble + } + + /** + * Test the property 'customerNumber' + */ + @Test + public void customerNumberTest() { + // TODO: test customerNumber + } + + /** + * Test the property 'isoCountryCode' + */ + @Test + public void isoCountryCodeTest() { + // TODO: test isoCountryCode + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequestTest.java b/src/test/java/xiresellers/client/model/QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequestTest.java new file mode 100644 index 00000000..da652fc4 --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequestTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest + */ +public class QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequestTest { + private final QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest model = new QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest(); + + /** + * Model tests for QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest + */ + @Test + public void testQuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest() { + // TODO: test QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest + } + + /** + * Test the property 'quoteNumber' + */ + @Test + public void quoteNumberTest() { + // TODO: test quoteNumber + } + + /** + * Test the property 'thirdPartySource' + */ + @Test + public void thirdPartySourceTest() { + // TODO: test thirdPartySource + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteDetailsRequestQuoteProductsRequestTest.java b/src/test/java/xiresellers/client/model/QuoteDetailsRequestQuoteProductsRequestTest.java new file mode 100644 index 00000000..1ddde13b --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteDetailsRequestQuoteProductsRequestTest.java @@ -0,0 +1,58 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.QuoteDetailsRequestQuoteProductsRequestRequestpreamble; +import xiresellers.client.model.QuoteDetailsRequestQuoteProductsRequestRetrieveQuoteProductsRequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteDetailsRequestQuoteProductsRequest + */ +public class QuoteDetailsRequestQuoteProductsRequestTest { + private final QuoteDetailsRequestQuoteProductsRequest model = new QuoteDetailsRequestQuoteProductsRequest(); + + /** + * Model tests for QuoteDetailsRequestQuoteProductsRequest + */ + @Test + public void testQuoteDetailsRequestQuoteProductsRequest() { + // TODO: test QuoteDetailsRequestQuoteProductsRequest + } + + /** + * Test the property 'requestpreamble' + */ + @Test + public void requestpreambleTest() { + // TODO: test requestpreamble + } + + /** + * Test the property 'retrieveQuoteProductsRequest' + */ + @Test + public void retrieveQuoteProductsRequestTest() { + // TODO: test retrieveQuoteProductsRequest + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteDetailsRequestTest.java b/src/test/java/xiresellers/client/model/QuoteDetailsRequestTest.java new file mode 100644 index 00000000..019e9aa9 --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteDetailsRequestTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.QuoteDetailsRequestQuoteProductsRequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteDetailsRequest + */ +public class QuoteDetailsRequestTest { + private final QuoteDetailsRequest model = new QuoteDetailsRequest(); + + /** + * Model tests for QuoteDetailsRequest + */ + @Test + public void testQuoteDetailsRequest() { + // TODO: test QuoteDetailsRequest + } + + /** + * Test the property 'quoteProductsRequest' + */ + @Test + public void quoteProductsRequestTest() { + // TODO: test quoteProductsRequest + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteDetailsResponseAdditionalAttributesInnerTest.java b/src/test/java/xiresellers/client/model/QuoteDetailsResponseAdditionalAttributesInnerTest.java new file mode 100644 index 00000000..07a499e7 --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteDetailsResponseAdditionalAttributesInnerTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteDetailsResponseAdditionalAttributesInner + */ +public class QuoteDetailsResponseAdditionalAttributesInnerTest { + private final QuoteDetailsResponseAdditionalAttributesInner model = new QuoteDetailsResponseAdditionalAttributesInner(); + + /** + * Model tests for QuoteDetailsResponseAdditionalAttributesInner + */ + @Test + public void testQuoteDetailsResponseAdditionalAttributesInner() { + // TODO: test QuoteDetailsResponseAdditionalAttributesInner + } + + /** + * Test the property 'attributeName' + */ + @Test + public void attributeNameTest() { + // TODO: test attributeName + } + + /** + * Test the property 'attributeValue' + */ + @Test + public void attributeValueTest() { + // TODO: test attributeValue + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteDetailsResponseEndUserInfoTest.java b/src/test/java/xiresellers/client/model/QuoteDetailsResponseEndUserInfoTest.java new file mode 100644 index 00000000..192bfecf --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteDetailsResponseEndUserInfoTest.java @@ -0,0 +1,128 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteDetailsResponseEndUserInfo + */ +public class QuoteDetailsResponseEndUserInfoTest { + private final QuoteDetailsResponseEndUserInfo model = new QuoteDetailsResponseEndUserInfo(); + + /** + * Model tests for QuoteDetailsResponseEndUserInfo + */ + @Test + public void testQuoteDetailsResponseEndUserInfo() { + // TODO: test QuoteDetailsResponseEndUserInfo + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'addressLine1' + */ + @Test + public void addressLine1Test() { + // TODO: test addressLine1 + } + + /** + * Test the property 'addressLine2' + */ + @Test + public void addressLine2Test() { + // TODO: test addressLine2 + } + + /** + * Test the property 'addressLine3' + */ + @Test + public void addressLine3Test() { + // TODO: test addressLine3 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'phoneNumber' + */ + @Test + public void phoneNumberTest() { + // TODO: test phoneNumber + } + + /** + * Test the property 'postalCode' + */ + @Test + public void postalCodeTest() { + // TODO: test postalCode + } + + /** + * Test the property 'marketSegment' + */ + @Test + public void marketSegmentTest() { + // TODO: test marketSegment + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteDetailsResponseProductsInnerPriceTest.java b/src/test/java/xiresellers/client/model/QuoteDetailsResponseProductsInnerPriceTest.java new file mode 100644 index 00000000..5b02ab2d --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteDetailsResponseProductsInnerPriceTest.java @@ -0,0 +1,81 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteDetailsResponseProductsInnerPrice + */ +public class QuoteDetailsResponseProductsInnerPriceTest { + private final QuoteDetailsResponseProductsInnerPrice model = new QuoteDetailsResponseProductsInnerPrice(); + + /** + * Model tests for QuoteDetailsResponseProductsInnerPrice + */ + @Test + public void testQuoteDetailsResponseProductsInnerPrice() { + // TODO: test QuoteDetailsResponseProductsInnerPrice + } + + /** + * Test the property 'quotePrice' + */ + @Test + public void quotePriceTest() { + // TODO: test quotePrice + } + + /** + * Test the property 'msrp' + */ + @Test + public void msrpTest() { + // TODO: test msrp + } + + /** + * Test the property 'extendedMsrp' + */ + @Test + public void extendedMsrpTest() { + // TODO: test extendedMsrp + } + + /** + * Test the property 'extendedQuotePrice' + */ + @Test + public void extendedQuotePriceTest() { + // TODO: test extendedQuotePrice + } + + /** + * Test the property 'discountOffList' + */ + @Test + public void discountOffListTest() { + // TODO: test discountOffList + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteDetailsResponseProductsInnerTest.java b/src/test/java/xiresellers/client/model/QuoteDetailsResponseProductsInnerTest.java new file mode 100644 index 00000000..b1ea3a3f --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteDetailsResponseProductsInnerTest.java @@ -0,0 +1,177 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.QuoteDetailsResponseProductsInnerPrice; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteDetailsResponseProductsInner + */ +public class QuoteDetailsResponseProductsInnerTest { + private final QuoteDetailsResponseProductsInner model = new QuoteDetailsResponseProductsInner(); + + /** + * Model tests for QuoteDetailsResponseProductsInner + */ + @Test + public void testQuoteDetailsResponseProductsInner() { + // TODO: test QuoteDetailsResponseProductsInner + } + + /** + * Test the property 'quoteProductGuid' + */ + @Test + public void quoteProductGuidTest() { + // TODO: test quoteProductGuid + } + + /** + * Test the property 'lineNumber' + */ + @Test + public void lineNumberTest() { + // TODO: test lineNumber + } + + /** + * Test the property 'quantity' + */ + @Test + public void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'notes' + */ + @Test + public void notesTest() { + // TODO: test notes + } + + /** + * Test the property 'EAN' + */ + @Test + public void EANTest() { + // TODO: test EAN + } + + /** + * Test the property 'coO' + */ + @Test + public void coOTest() { + // TODO: test coO + } + + /** + * Test the property 'ingramPartNumber' + */ + @Test + public void ingramPartNumberTest() { + // TODO: test ingramPartNumber + } + + /** + * Test the property 'vendorPartNumber' + */ + @Test + public void vendorPartNumberTest() { + // TODO: test vendorPartNumber + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'weight' + */ + @Test + public void weightTest() { + // TODO: test weight + } + + /** + * Test the property 'weightUom' + */ + @Test + public void weightUomTest() { + // TODO: test weightUom + } + + /** + * Test the property 'isSuggestionProduct' + */ + @Test + public void isSuggestionProductTest() { + // TODO: test isSuggestionProduct + } + + /** + * Test the property 'vpnCategory' + */ + @Test + public void vpnCategoryTest() { + // TODO: test vpnCategory + } + + /** + * Test the property 'quoteProductsSupplierPartAuxiliaryId' + */ + @Test + public void quoteProductsSupplierPartAuxiliaryIdTest() { + // TODO: test quoteProductsSupplierPartAuxiliaryId + } + + /** + * Test the property 'vendorName' + */ + @Test + public void vendorNameTest() { + // TODO: test vendorName + } + + /** + * Test the property 'terms' + */ + @Test + public void termsTest() { + // TODO: test terms + } + + /** + * Test the property 'price' + */ + @Test + public void priceTest() { + // TODO: test price + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponseTest.java b/src/test/java/xiresellers/client/model/QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponseTest.java new file mode 100644 index 00000000..efb66f3c --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponseTest.java @@ -0,0 +1,271 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseAccountInfo; +import xiresellers.client.model.QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseContactInfo; +import xiresellers.client.model.QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseEndUser; +import xiresellers.client.model.QuoteDetailsQuoteDetailResponseRetrieveQuoteResponseVendorAttributes; +import xiresellers.client.model.QuoteProductList; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse + */ +public class QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponseTest { + private final QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse model = new QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse(); + + /** + * Model tests for QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse + */ + @Test + public void testQuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse() { + // TODO: test QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse + } + + /** + * Test the property 'quoteGuid' + */ + @Test + public void quoteGuidTest() { + // TODO: test quoteGuid + } + + /** + * Test the property 'quoteName' + */ + @Test + public void quoteNameTest() { + // TODO: test quoteName + } + + /** + * Test the property 'quoteNumber' + */ + @Test + public void quoteNumberTest() { + // TODO: test quoteNumber + } + + /** + * Test the property 'quoteExpiryDate' + */ + @Test + public void quoteExpiryDateTest() { + // TODO: test quoteExpiryDate + } + + /** + * Test the property 'revisionNumber' + */ + @Test + public void revisionNumberTest() { + // TODO: test revisionNumber + } + + /** + * Test the property 'introPreamble' + */ + @Test + public void introPreambleTest() { + // TODO: test introPreamble + } + + /** + * Test the property 'purchaseInstructions' + */ + @Test + public void purchaseInstructionsTest() { + // TODO: test purchaseInstructions + } + + /** + * Test the property 'legalTerms' + */ + @Test + public void legalTermsTest() { + // TODO: test legalTerms + } + + /** + * Test the property 'currencyCode' + */ + @Test + public void currencyCodeTest() { + // TODO: test currencyCode + } + + /** + * Test the property 'priceDeviationId' + */ + @Test + public void priceDeviationIdTest() { + // TODO: test priceDeviationId + } + + /** + * Test the property 'priceDeviationStartDate' + */ + @Test + public void priceDeviationStartDateTest() { + // TODO: test priceDeviationStartDate + } + + /** + * Test the property 'priceDeviationExpiryDate' + */ + @Test + public void priceDeviationExpiryDateTest() { + // TODO: test priceDeviationExpiryDate + } + + /** + * Test the property 'customerNeed' + */ + @Test + public void customerNeedTest() { + // TODO: test customerNeed + } + + /** + * Test the property 'solutionProposed' + */ + @Test + public void solutionProposedTest() { + // TODO: test solutionProposed + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'created' + */ + @Test + public void createdTest() { + // TODO: test created + } + + /** + * Test the property 'modified' + */ + @Test + public void modifiedTest() { + // TODO: test modified + } + + /** + * Test the property 'leasingCalculations' + */ + @Test + public void leasingCalculationsTest() { + // TODO: test leasingCalculations + } + + /** + * Test the property 'leasingInstructions' + */ + @Test + public void leasingInstructionsTest() { + // TODO: test leasingInstructions + } + + /** + * Test the property 'accountInfo' + */ + @Test + public void accountInfoTest() { + // TODO: test accountInfo + } + + /** + * Test the property 'contactInfo' + */ + @Test + public void contactInfoTest() { + // TODO: test contactInfo + } + + /** + * Test the property 'vendorAttributes' + */ + @Test + public void vendorAttributesTest() { + // TODO: test vendorAttributes + } + + /** + * Test the property 'endUser' + */ + @Test + public void endUserTest() { + // TODO: test endUser + } + + /** + * Test the property 'quoteProductList' + */ + @Test + public void quoteProductListTest() { + // TODO: test quoteProductList + } + + /** + * Test the property 'totalQuoteProductCount' + */ + @Test + public void totalQuoteProductCountTest() { + // TODO: test totalQuoteProductCount + } + + /** + * Test the property 'totalExtendedMsrp' + */ + @Test + public void totalExtendedMsrpTest() { + // TODO: test totalExtendedMsrp + } + + /** + * Test the property 'totalQuantity' + */ + @Test + public void totalQuantityTest() { + // TODO: test totalQuantity + } + + /** + * Test the property 'totalExtendedQuotePrice' + */ + @Test + public void totalExtendedQuotePriceTest() { + // TODO: test totalExtendedQuotePrice + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteDetailsResponseQuoteDetailResponseTest.java b/src/test/java/xiresellers/client/model/QuoteDetailsResponseQuoteDetailResponseTest.java new file mode 100644 index 00000000..ab4b484d --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteDetailsResponseQuoteDetailResponseTest.java @@ -0,0 +1,58 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.QuoteDetailsQuoteDetailResponseResponsePreamble; +import xiresellers.client.model.QuoteDetailsResponseQuoteDetailResponseRetrieveQuoteResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteDetailsResponseQuoteDetailResponse + */ +public class QuoteDetailsResponseQuoteDetailResponseTest { + private final QuoteDetailsResponseQuoteDetailResponse model = new QuoteDetailsResponseQuoteDetailResponse(); + + /** + * Model tests for QuoteDetailsResponseQuoteDetailResponse + */ + @Test + public void testQuoteDetailsResponseQuoteDetailResponse() { + // TODO: test QuoteDetailsResponseQuoteDetailResponse + } + + /** + * Test the property 'responsePreamble' + */ + @Test + public void responsePreambleTest() { + // TODO: test responsePreamble + } + + /** + * Test the property 'retrieveQuoteResponse' + */ + @Test + public void retrieveQuoteResponseTest() { + // TODO: test retrieveQuoteResponse + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteDetailsResponseResellerInfoTest.java b/src/test/java/xiresellers/client/model/QuoteDetailsResponseResellerInfoTest.java new file mode 100644 index 00000000..23a15509 --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteDetailsResponseResellerInfoTest.java @@ -0,0 +1,80 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteDetailsResponseResellerInfo + */ +public class QuoteDetailsResponseResellerInfoTest { + private final QuoteDetailsResponseResellerInfo model = new QuoteDetailsResponseResellerInfo(); + + /** + * Model tests for QuoteDetailsResponseResellerInfo + */ + @Test + public void testQuoteDetailsResponseResellerInfo() { + // TODO: test QuoteDetailsResponseResellerInfo + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'phoneNumber' + */ + @Test + public void phoneNumberTest() { + // TODO: test phoneNumber + } + + /** + * Test the property 'customerNumber' + */ + @Test + public void customerNumberTest() { + // TODO: test customerNumber + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteDetailsResponseTest.java b/src/test/java/xiresellers/client/model/QuoteDetailsResponseTest.java new file mode 100644 index 00000000..aab8aceb --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteDetailsResponseTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.QuoteDetailsResponseQuoteDetailResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteDetailsResponse + */ +public class QuoteDetailsResponseTest { + private final QuoteDetailsResponse model = new QuoteDetailsResponse(); + + /** + * Model tests for QuoteDetailsResponse + */ + @Test + public void testQuoteDetailsResponse() { + // TODO: test QuoteDetailsResponse + } + + /** + * Test the property 'quoteDetailResponse' + */ + @Test + public void quoteDetailResponseTest() { + // TODO: test quoteDetailResponse + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteDetailsTest.java b/src/test/java/xiresellers/client/model/QuoteDetailsTest.java new file mode 100644 index 00000000..f5ac1241 --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteDetailsTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.QuoteDetailsQuoteDetailResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteDetails + */ +public class QuoteDetailsTest { + private final QuoteDetails model = new QuoteDetails(); + + /** + * Model tests for QuoteDetails + */ + @Test + public void testQuoteDetails() { + // TODO: test QuoteDetails + } + + /** + * Test the property 'quoteDetailResponse' + */ + @Test + public void quoteDetailResponseTest() { + // TODO: test quoteDetailResponse + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteListRequestQuoteSearchRequestRequestPreambleTest.java b/src/test/java/xiresellers/client/model/QuoteListRequestQuoteSearchRequestRequestPreambleTest.java new file mode 100644 index 00000000..15176dc9 --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteListRequestQuoteSearchRequestRequestPreambleTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteListRequestQuoteSearchRequestRequestPreamble + */ +public class QuoteListRequestQuoteSearchRequestRequestPreambleTest { + private final QuoteListRequestQuoteSearchRequestRequestPreamble model = new QuoteListRequestQuoteSearchRequestRequestPreamble(); + + /** + * Model tests for QuoteListRequestQuoteSearchRequestRequestPreamble + */ + @Test + public void testQuoteListRequestQuoteSearchRequestRequestPreamble() { + // TODO: test QuoteListRequestQuoteSearchRequestRequestPreamble + } + + /** + * Test the property 'customerNumber' + */ + @Test + public void customerNumberTest() { + // TODO: test customerNumber + } + + /** + * Test the property 'customerContact' + */ + @Test + public void customerContactTest() { + // TODO: test customerContact + } + + /** + * Test the property 'isoCountryCode' + */ + @Test + public void isoCountryCodeTest() { + // TODO: test isoCountryCode + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteListRequestQuoteSearchRequestRetrieveQuoteRequestTest.java b/src/test/java/xiresellers/client/model/QuoteListRequestQuoteSearchRequestRetrieveQuoteRequestTest.java new file mode 100644 index 00000000..1e04dfb6 --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteListRequestQuoteSearchRequestRetrieveQuoteRequestTest.java @@ -0,0 +1,121 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest + */ +public class QuoteListRequestQuoteSearchRequestRetrieveQuoteRequestTest { + private final QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest model = new QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest(); + + /** + * Model tests for QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest + */ + @Test + public void testQuoteListRequestQuoteSearchRequestRetrieveQuoteRequest() { + // TODO: test QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest + } + + /** + * Test the property 'quoteNumber' + */ + @Test + public void quoteNumberTest() { + // TODO: test quoteNumber + } + + /** + * Test the property 'bidNumber' + */ + @Test + public void bidNumberTest() { + // TODO: test bidNumber + } + + /** + * Test the property 'endUserName' + */ + @Test + public void endUserNameTest() { + // TODO: test endUserName + } + + /** + * Test the property 'fromDate' + */ + @Test + public void fromDateTest() { + // TODO: test fromDate + } + + /** + * Test the property 'toDate' + */ + @Test + public void toDateTest() { + // TODO: test toDate + } + + /** + * Test the property 'pageIndex' + */ + @Test + public void pageIndexTest() { + // TODO: test pageIndex + } + + /** + * Test the property 'recordsPerPage' + */ + @Test + public void recordsPerPageTest() { + // TODO: test recordsPerPage + } + + /** + * Test the property 'sorting' + */ + @Test + public void sortingTest() { + // TODO: test sorting + } + + /** + * Test the property 'sortingColumnName' + */ + @Test + public void sortingColumnNameTest() { + // TODO: test sortingColumnName + } + + /** + * Test the property 'thirdPartySource' + */ + @Test + public void thirdPartySourceTest() { + // TODO: test thirdPartySource + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteListRequestQuoteSearchRequestTest.java b/src/test/java/xiresellers/client/model/QuoteListRequestQuoteSearchRequestTest.java new file mode 100644 index 00000000..8ed50392 --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteListRequestQuoteSearchRequestTest.java @@ -0,0 +1,58 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.QuoteListRequestQuoteSearchRequestRequestPreamble; +import xiresellers.client.model.QuoteListRequestQuoteSearchRequestRetrieveQuoteRequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteListRequestQuoteSearchRequest + */ +public class QuoteListRequestQuoteSearchRequestTest { + private final QuoteListRequestQuoteSearchRequest model = new QuoteListRequestQuoteSearchRequest(); + + /** + * Model tests for QuoteListRequestQuoteSearchRequest + */ + @Test + public void testQuoteListRequestQuoteSearchRequest() { + // TODO: test QuoteListRequestQuoteSearchRequest + } + + /** + * Test the property 'requestPreamble' + */ + @Test + public void requestPreambleTest() { + // TODO: test requestPreamble + } + + /** + * Test the property 'retrieveQuoteRequest' + */ + @Test + public void retrieveQuoteRequestTest() { + // TODO: test retrieveQuoteRequest + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteListRequestTest.java b/src/test/java/xiresellers/client/model/QuoteListRequestTest.java new file mode 100644 index 00000000..49ad9814 --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteListRequestTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.QuoteListRequestQuoteSearchRequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteListRequest + */ +public class QuoteListRequestTest { + private final QuoteListRequest model = new QuoteListRequest(); + + /** + * Model tests for QuoteListRequest + */ + @Test + public void testQuoteListRequest() { + // TODO: test QuoteListRequest + } + + /** + * Test the property 'quoteSearchRequest' + */ + @Test + public void quoteSearchRequestTest() { + // TODO: test quoteSearchRequest + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteListResponseQuoteSearchResponseQuoteListInnerTest.java b/src/test/java/xiresellers/client/model/QuoteListResponseQuoteSearchResponseQuoteListInnerTest.java new file mode 100644 index 00000000..18cfe3d6 --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteListResponseQuoteSearchResponseQuoteListInnerTest.java @@ -0,0 +1,121 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteListResponseQuoteSearchResponseQuoteListInner + */ +public class QuoteListResponseQuoteSearchResponseQuoteListInnerTest { + private final QuoteListResponseQuoteSearchResponseQuoteListInner model = new QuoteListResponseQuoteSearchResponseQuoteListInner(); + + /** + * Model tests for QuoteListResponseQuoteSearchResponseQuoteListInner + */ + @Test + public void testQuoteListResponseQuoteSearchResponseQuoteListInner() { + // TODO: test QuoteListResponseQuoteSearchResponseQuoteListInner + } + + /** + * Test the property 'quoteName' + */ + @Test + public void quoteNameTest() { + // TODO: test quoteName + } + + /** + * Test the property 'quoteNumber' + */ + @Test + public void quoteNumberTest() { + // TODO: test quoteNumber + } + + /** + * Test the property 'revisionNumber' + */ + @Test + public void revisionNumberTest() { + // TODO: test revisionNumber + } + + /** + * Test the property 'endUserName' + */ + @Test + public void endUserNameTest() { + // TODO: test endUserName + } + + /** + * Test the property 'bidNumber' + */ + @Test + public void bidNumberTest() { + // TODO: test bidNumber + } + + /** + * Test the property 'totalAmount' + */ + @Test + public void totalAmountTest() { + // TODO: test totalAmount + } + + /** + * Test the property 'quoteStatus' + */ + @Test + public void quoteStatusTest() { + // TODO: test quoteStatus + } + + /** + * Test the property 'createdDate' + */ + @Test + public void createdDateTest() { + // TODO: test createdDate + } + + /** + * Test the property 'lastModifiedDate' + */ + @Test + public void lastModifiedDateTest() { + // TODO: test lastModifiedDate + } + + /** + * Test the property 'quoteExpiryDate' + */ + @Test + public void quoteExpiryDateTest() { + // TODO: test quoteExpiryDate + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteListResponseQuoteSearchResponseResponsePreambleTest.java b/src/test/java/xiresellers/client/model/QuoteListResponseQuoteSearchResponseResponsePreambleTest.java new file mode 100644 index 00000000..c097ffd3 --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteListResponseQuoteSearchResponseResponsePreambleTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteListResponseQuoteSearchResponseResponsePreamble + */ +public class QuoteListResponseQuoteSearchResponseResponsePreambleTest { + private final QuoteListResponseQuoteSearchResponseResponsePreamble model = new QuoteListResponseQuoteSearchResponseResponsePreamble(); + + /** + * Model tests for QuoteListResponseQuoteSearchResponseResponsePreamble + */ + @Test + public void testQuoteListResponseQuoteSearchResponseResponsePreamble() { + // TODO: test QuoteListResponseQuoteSearchResponseResponsePreamble + } + + /** + * Test the property 'responseStatus' + */ + @Test + public void responseStatusTest() { + // TODO: test responseStatus + } + + /** + * Test the property 'responseStatusCode' + */ + @Test + public void responseStatusCodeTest() { + // TODO: test responseStatusCode + } + + /** + * Test the property 'responseMessage' + */ + @Test + public void responseMessageTest() { + // TODO: test responseMessage + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteListResponseQuoteSearchResponseTest.java b/src/test/java/xiresellers/client/model/QuoteListResponseQuoteSearchResponseTest.java new file mode 100644 index 00000000..1946f40f --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteListResponseQuoteSearchResponseTest.java @@ -0,0 +1,68 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.QuoteListResponseQuoteSearchResponseQuoteListInner; +import xiresellers.client.model.QuoteListResponseQuoteSearchResponseResponsePreamble; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteListResponseQuoteSearchResponse + */ +public class QuoteListResponseQuoteSearchResponseTest { + private final QuoteListResponseQuoteSearchResponse model = new QuoteListResponseQuoteSearchResponse(); + + /** + * Model tests for QuoteListResponseQuoteSearchResponse + */ + @Test + public void testQuoteListResponseQuoteSearchResponse() { + // TODO: test QuoteListResponseQuoteSearchResponse + } + + /** + * Test the property 'responsePreamble' + */ + @Test + public void responsePreambleTest() { + // TODO: test responsePreamble + } + + /** + * Test the property 'quoteList' + */ + @Test + public void quoteListTest() { + // TODO: test quoteList + } + + /** + * Test the property 'totalCount' + */ + @Test + public void totalCountTest() { + // TODO: test totalCount + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteListResponseTest.java b/src/test/java/xiresellers/client/model/QuoteListResponseTest.java new file mode 100644 index 00000000..ca1d3166 --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteListResponseTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.QuoteListResponseQuoteSearchResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteListResponse + */ +public class QuoteListResponseTest { + private final QuoteListResponse model = new QuoteListResponse(); + + /** + * Model tests for QuoteListResponse + */ + @Test + public void testQuoteListResponse() { + // TODO: test QuoteListResponse + } + + /** + * Test the property 'quoteSearchResponse' + */ + @Test + public void quoteSearchResponseTest() { + // TODO: test quoteSearchResponse + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteProductListPriceTest.java b/src/test/java/xiresellers/client/model/QuoteProductListPriceTest.java new file mode 100644 index 00000000..288ef24f --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteProductListPriceTest.java @@ -0,0 +1,73 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteProductListPrice + */ +public class QuoteProductListPriceTest { + private final QuoteProductListPrice model = new QuoteProductListPrice(); + + /** + * Model tests for QuoteProductListPrice + */ + @Test + public void testQuoteProductListPrice() { + // TODO: test QuoteProductListPrice + } + + /** + * Test the property 'quotePrice' + */ + @Test + public void quotePriceTest() { + // TODO: test quotePrice + } + + /** + * Test the property 'msrp' + */ + @Test + public void msrpTest() { + // TODO: test msrp + } + + /** + * Test the property 'extendedMsrp' + */ + @Test + public void extendedMsrpTest() { + // TODO: test extendedMsrp + } + + /** + * Test the property 'extendedQuotePrice' + */ + @Test + public void extendedQuotePriceTest() { + // TODO: test extendedQuotePrice + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteProductListTest.java b/src/test/java/xiresellers/client/model/QuoteProductListTest.java new file mode 100644 index 00000000..738dbb45 --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteProductListTest.java @@ -0,0 +1,161 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.QuoteProductListPrice; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteProductList + */ +public class QuoteProductListTest { + private final QuoteProductList model = new QuoteProductList(); + + /** + * Model tests for QuoteProductList + */ + @Test + public void testQuoteProductList() { + // TODO: test QuoteProductList + } + + /** + * Test the property 'quoteProductGuid' + */ + @Test + public void quoteProductGuidTest() { + // TODO: test quoteProductGuid + } + + /** + * Test the property 'quantity' + */ + @Test + public void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'comments' + */ + @Test + public void commentsTest() { + // TODO: test comments + } + + /** + * Test the property 'bidStartDate' + */ + @Test + public void bidStartDateTest() { + // TODO: test bidStartDate + } + + /** + * Test the property 'bidExpiryDate' + */ + @Test + public void bidExpiryDateTest() { + // TODO: test bidExpiryDate + } + + /** + * Test the property 'sku' + */ + @Test + public void skuTest() { + // TODO: test sku + } + + /** + * Test the property 'lineNumber' + */ + @Test + public void lineNumberTest() { + // TODO: test lineNumber + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'vendorPartNumber' + */ + @Test + public void vendorPartNumberTest() { + // TODO: test vendorPartNumber + } + + /** + * Test the property 'weight' + */ + @Test + public void weightTest() { + // TODO: test weight + } + + /** + * Test the property 'isSuggestionProduct' + */ + @Test + public void isSuggestionProductTest() { + // TODO: test isSuggestionProduct + } + + /** + * Test the property 'vpnCategory' + */ + @Test + public void vpnCategoryTest() { + // TODO: test vpnCategory + } + + /** + * Test the property 'quoteProductsSupplierPartAuxiliaryId' + */ + @Test + public void quoteProductsSupplierPartAuxiliaryIdTest() { + // TODO: test quoteProductsSupplierPartAuxiliaryId + } + + /** + * Test the property 'quoteProductsVendor' + */ + @Test + public void quoteProductsVendorTest() { + // TODO: test quoteProductsVendor + } + + /** + * Test the property 'price' + */ + @Test + public void priceTest() { + // TODO: test price + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteSearchResponseQuotesInnerTest.java b/src/test/java/xiresellers/client/model/QuoteSearchResponseQuotesInnerTest.java new file mode 100644 index 00000000..fee8cbe0 --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteSearchResponseQuotesInnerTest.java @@ -0,0 +1,137 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteSearchResponseQuotesInner + */ +public class QuoteSearchResponseQuotesInnerTest { + private final QuoteSearchResponseQuotesInner model = new QuoteSearchResponseQuotesInner(); + + /** + * Model tests for QuoteSearchResponseQuotesInner + */ + @Test + public void testQuoteSearchResponseQuotesInner() { + // TODO: test QuoteSearchResponseQuotesInner + } + + /** + * Test the property 'quoteName' + */ + @Test + public void quoteNameTest() { + // TODO: test quoteName + } + + /** + * Test the property 'quoteNumber' + */ + @Test + public void quoteNumberTest() { + // TODO: test quoteNumber + } + + /** + * Test the property 'revision' + */ + @Test + public void revisionTest() { + // TODO: test revision + } + + /** + * Test the property 'endUserContact' + */ + @Test + public void endUserContactTest() { + // TODO: test endUserContact + } + + /** + * Test the property 'specialBidNumber' + */ + @Test + public void specialBidNumberTest() { + // TODO: test specialBidNumber + } + + /** + * Test the property 'quoteTotal' + */ + @Test + public void quoteTotalTest() { + // TODO: test quoteTotal + } + + /** + * Test the property 'quoteStatus' + */ + @Test + public void quoteStatusTest() { + // TODO: test quoteStatus + } + + /** + * Test the property 'ingramQuoteDate' + */ + @Test + public void ingramQuoteDateTest() { + // TODO: test ingramQuoteDate + } + + /** + * Test the property 'lastModifiedDate' + */ + @Test + public void lastModifiedDateTest() { + // TODO: test lastModifiedDate + } + + /** + * Test the property 'ingramQuoteExpiryDate' + */ + @Test + public void ingramQuoteExpiryDateTest() { + // TODO: test ingramQuoteExpiryDate + } + + /** + * Test the property 'vendor' + */ + @Test + public void vendorTest() { + // TODO: test vendor + } + + /** + * Test the property 'createdBy' + */ + @Test + public void createdByTest() { + // TODO: test createdBy + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteSearchResponseTest.java b/src/test/java/xiresellers/client/model/QuoteSearchResponseTest.java new file mode 100644 index 00000000..43f2c69b --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteSearchResponseTest.java @@ -0,0 +1,75 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.QuoteSearchResponseQuotesInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteSearchResponse + */ +public class QuoteSearchResponseTest { + private final QuoteSearchResponse model = new QuoteSearchResponse(); + + /** + * Model tests for QuoteSearchResponse + */ + @Test + public void testQuoteSearchResponse() { + // TODO: test QuoteSearchResponse + } + + /** + * Test the property 'recordsFound' + */ + @Test + public void recordsFoundTest() { + // TODO: test recordsFound + } + + /** + * Test the property 'pageSize' + */ + @Test + public void pageSizeTest() { + // TODO: test pageSize + } + + /** + * Test the property 'pageNumber' + */ + @Test + public void pageNumberTest() { + // TODO: test pageNumber + } + + /** + * Test the property 'quotes' + */ + @Test + public void quotesTest() { + // TODO: test quotes + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteToOrderDetailsDTOAdditionalAttributesInnerTest.java b/src/test/java/xiresellers/client/model/QuoteToOrderDetailsDTOAdditionalAttributesInnerTest.java new file mode 100644 index 00000000..e80da743 --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteToOrderDetailsDTOAdditionalAttributesInnerTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteToOrderDetailsDTOAdditionalAttributesInner + */ +public class QuoteToOrderDetailsDTOAdditionalAttributesInnerTest { + private final QuoteToOrderDetailsDTOAdditionalAttributesInner model = new QuoteToOrderDetailsDTOAdditionalAttributesInner(); + + /** + * Model tests for QuoteToOrderDetailsDTOAdditionalAttributesInner + */ + @Test + public void testQuoteToOrderDetailsDTOAdditionalAttributesInner() { + // TODO: test QuoteToOrderDetailsDTOAdditionalAttributesInner + } + + /** + * Test the property 'attributeName' + */ + @Test + public void attributeNameTest() { + // TODO: test attributeName + } + + /** + * Test the property 'attributeValue' + */ + @Test + public void attributeValueTest() { + // TODO: test attributeValue + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteToOrderDetailsDTOEndUserInfoInnerTest.java b/src/test/java/xiresellers/client/model/QuoteToOrderDetailsDTOEndUserInfoInnerTest.java new file mode 100644 index 00000000..90174a8e --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteToOrderDetailsDTOEndUserInfoInnerTest.java @@ -0,0 +1,128 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteToOrderDetailsDTOEndUserInfoInner + */ +public class QuoteToOrderDetailsDTOEndUserInfoInnerTest { + private final QuoteToOrderDetailsDTOEndUserInfoInner model = new QuoteToOrderDetailsDTOEndUserInfoInner(); + + /** + * Model tests for QuoteToOrderDetailsDTOEndUserInfoInner + */ + @Test + public void testQuoteToOrderDetailsDTOEndUserInfoInner() { + // TODO: test QuoteToOrderDetailsDTOEndUserInfoInner + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'addressLine1' + */ + @Test + public void addressLine1Test() { + // TODO: test addressLine1 + } + + /** + * Test the property 'addressLine2' + */ + @Test + public void addressLine2Test() { + // TODO: test addressLine2 + } + + /** + * Test the property 'addressLine3' + */ + @Test + public void addressLine3Test() { + // TODO: test addressLine3 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalCode' + */ + @Test + public void postalCodeTest() { + // TODO: test postalCode + } + + /** + * Test the property 'countryCode' + */ + @Test + public void countryCodeTest() { + // TODO: test countryCode + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'phoneNumber' + */ + @Test + public void phoneNumberTest() { + // TODO: test phoneNumber + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteToOrderDetailsDTOLinesInnerTest.java b/src/test/java/xiresellers/client/model/QuoteToOrderDetailsDTOLinesInnerTest.java new file mode 100644 index 00000000..a2a69271 --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteToOrderDetailsDTOLinesInnerTest.java @@ -0,0 +1,75 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteToOrderDetailsDTOLinesInner + */ +public class QuoteToOrderDetailsDTOLinesInnerTest { + private final QuoteToOrderDetailsDTOLinesInner model = new QuoteToOrderDetailsDTOLinesInner(); + + /** + * Model tests for QuoteToOrderDetailsDTOLinesInner + */ + @Test + public void testQuoteToOrderDetailsDTOLinesInner() { + // TODO: test QuoteToOrderDetailsDTOLinesInner + } + + /** + * Test the property 'customerLineNumber' + */ + @Test + public void customerLineNumberTest() { + // TODO: test customerLineNumber + } + + /** + * Test the property 'ingramPartNumber' + */ + @Test + public void ingramPartNumberTest() { + // TODO: test ingramPartNumber + } + + /** + * Test the property 'quantity' + */ + @Test + public void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'vmfAdditionalAttributesLines' + */ + @Test + public void vmfAdditionalAttributesLinesTest() { + // TODO: test vmfAdditionalAttributesLines + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteToOrderDetailsDTOShipToInfoInnerTest.java b/src/test/java/xiresellers/client/model/QuoteToOrderDetailsDTOShipToInfoInnerTest.java new file mode 100644 index 00000000..bda41b6f --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteToOrderDetailsDTOShipToInfoInnerTest.java @@ -0,0 +1,129 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteToOrderDetailsDTOShipToInfoInner + */ +public class QuoteToOrderDetailsDTOShipToInfoInnerTest { + private final QuoteToOrderDetailsDTOShipToInfoInner model = new QuoteToOrderDetailsDTOShipToInfoInner(); + + /** + * Model tests for QuoteToOrderDetailsDTOShipToInfoInner + */ + @Test + public void testQuoteToOrderDetailsDTOShipToInfoInner() { + // TODO: test QuoteToOrderDetailsDTOShipToInfoInner + } + + /** + * Test the property 'addressId' + */ + @Test + public void addressIdTest() { + // TODO: test addressId + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'addressLine1' + */ + @Test + public void addressLine1Test() { + // TODO: test addressLine1 + } + + /** + * Test the property 'addressLine2' + */ + @Test + public void addressLine2Test() { + // TODO: test addressLine2 + } + + /** + * Test the property 'addressLine3' + */ + @Test + public void addressLine3Test() { + // TODO: test addressLine3 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalCode' + */ + @Test + public void postalCodeTest() { + // TODO: test postalCode + } + + /** + * Test the property 'countryCode' + */ + @Test + public void countryCodeTest() { + // TODO: test countryCode + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteToOrderDetailsDTOTest.java b/src/test/java/xiresellers/client/model/QuoteToOrderDetailsDTOTest.java new file mode 100644 index 00000000..e44bc4f6 --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteToOrderDetailsDTOTest.java @@ -0,0 +1,120 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import xiresellers.client.model.QuoteToOrderDetailsDTOAdditionalAttributesInner; +import xiresellers.client.model.QuoteToOrderDetailsDTOEndUserInfoInner; +import xiresellers.client.model.QuoteToOrderDetailsDTOLinesInner; +import xiresellers.client.model.QuoteToOrderDetailsDTOShipToInfoInner; +import xiresellers.client.model.QuoteToOrderDetailsDTOVmfadditionalAttributesInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteToOrderDetailsDTO + */ +public class QuoteToOrderDetailsDTOTest { + private final QuoteToOrderDetailsDTO model = new QuoteToOrderDetailsDTO(); + + /** + * Model tests for QuoteToOrderDetailsDTO + */ + @Test + public void testQuoteToOrderDetailsDTO() { + // TODO: test QuoteToOrderDetailsDTO + } + + /** + * Test the property 'quoteNumber' + */ + @Test + public void quoteNumberTest() { + // TODO: test quoteNumber + } + + /** + * Test the property 'customerOrderNumber' + */ + @Test + public void customerOrderNumberTest() { + // TODO: test customerOrderNumber + } + + /** + * Test the property 'enduserOrderNumber' + */ + @Test + public void enduserOrderNumberTest() { + // TODO: test enduserOrderNumber + } + + /** + * Test the property 'billToAddressId' + */ + @Test + public void billToAddressIdTest() { + // TODO: test billToAddressId + } + + /** + * Test the property 'endUserInfo' + */ + @Test + public void endUserInfoTest() { + // TODO: test endUserInfo + } + + /** + * Test the property 'shipToInfo' + */ + @Test + public void shipToInfoTest() { + // TODO: test shipToInfo + } + + /** + * Test the property 'additionalAttributes' + */ + @Test + public void additionalAttributesTest() { + // TODO: test additionalAttributes + } + + /** + * Test the property 'vmfadditionalAttributes' + */ + @Test + public void vmfadditionalAttributesTest() { + // TODO: test vmfadditionalAttributes + } + + /** + * Test the property 'lines' + */ + @Test + public void linesTest() { + // TODO: test lines + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteToOrderDetailsDTOVmfadditionalAttributesInnerTest.java b/src/test/java/xiresellers/client/model/QuoteToOrderDetailsDTOVmfadditionalAttributesInnerTest.java new file mode 100644 index 00000000..f3f5e2c7 --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteToOrderDetailsDTOVmfadditionalAttributesInnerTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteToOrderDetailsDTOVmfadditionalAttributesInner + */ +public class QuoteToOrderDetailsDTOVmfadditionalAttributesInnerTest { + private final QuoteToOrderDetailsDTOVmfadditionalAttributesInner model = new QuoteToOrderDetailsDTOVmfadditionalAttributesInner(); + + /** + * Model tests for QuoteToOrderDetailsDTOVmfadditionalAttributesInner + */ + @Test + public void testQuoteToOrderDetailsDTOVmfadditionalAttributesInner() { + // TODO: test QuoteToOrderDetailsDTOVmfadditionalAttributesInner + } + + /** + * Test the property 'attributeName' + */ + @Test + public void attributeNameTest() { + // TODO: test attributeName + } + + /** + * Test the property 'attributeValue' + */ + @Test + public void attributeValueTest() { + // TODO: test attributeValue + } + + /** + * Test the property 'attributeDescription' + */ + @Test + public void attributeDescriptionTest() { + // TODO: test attributeDescription + } + +} diff --git a/src/test/java/xiresellers/client/model/QuoteToOrderResponseTest.java b/src/test/java/xiresellers/client/model/QuoteToOrderResponseTest.java new file mode 100644 index 00000000..6fc11496 --- /dev/null +++ b/src/test/java/xiresellers/client/model/QuoteToOrderResponseTest.java @@ -0,0 +1,65 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for QuoteToOrderResponse + */ +public class QuoteToOrderResponseTest { + private final QuoteToOrderResponse model = new QuoteToOrderResponse(); + + /** + * Model tests for QuoteToOrderResponse + */ + @Test + public void testQuoteToOrderResponse() { + // TODO: test QuoteToOrderResponse + } + + /** + * Test the property 'quoteNumber' + */ + @Test + public void quoteNumberTest() { + // TODO: test quoteNumber + } + + /** + * Test the property 'confirmationNumber' + */ + @Test + public void confirmationNumberTest() { + // TODO: test confirmationNumber + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + +} diff --git a/src/test/java/xiresellers/client/model/RenewalsDetailsResponseAdditionalAttributesInnerTest.java b/src/test/java/xiresellers/client/model/RenewalsDetailsResponseAdditionalAttributesInnerTest.java new file mode 100644 index 00000000..0fbdbefa --- /dev/null +++ b/src/test/java/xiresellers/client/model/RenewalsDetailsResponseAdditionalAttributesInnerTest.java @@ -0,0 +1,81 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for RenewalsDetailsResponseAdditionalAttributesInner + */ +public class RenewalsDetailsResponseAdditionalAttributesInnerTest { + private final RenewalsDetailsResponseAdditionalAttributesInner model = new RenewalsDetailsResponseAdditionalAttributesInner(); + + /** + * Model tests for RenewalsDetailsResponseAdditionalAttributesInner + */ + @Test + public void testRenewalsDetailsResponseAdditionalAttributesInner() { + // TODO: test RenewalsDetailsResponseAdditionalAttributesInner + } + + /** + * Test the property 'attributeDescription' + */ + @Test + public void attributeDescriptionTest() { + // TODO: test attributeDescription + } + + /** + * Test the property 'attributeValue' + */ + @Test + public void attributeValueTest() { + // TODO: test attributeValue + } + + /** + * Test the property 'startDate' + */ + @Test + public void startDateTest() { + // TODO: test startDate + } + + /** + * Test the property 'expirationDate' + */ + @Test + public void expirationDateTest() { + // TODO: test expirationDate + } + + /** + * Test the property 'isConsolidated' + */ + @Test + public void isConsolidatedTest() { + // TODO: test isConsolidated + } + +} diff --git a/src/test/java/xiresellers/client/model/RenewalsDetailsResponseEndUserInfoInnerTest.java b/src/test/java/xiresellers/client/model/RenewalsDetailsResponseEndUserInfoInnerTest.java new file mode 100644 index 00000000..dc25bd40 --- /dev/null +++ b/src/test/java/xiresellers/client/model/RenewalsDetailsResponseEndUserInfoInnerTest.java @@ -0,0 +1,152 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for RenewalsDetailsResponseEndUserInfoInner + */ +public class RenewalsDetailsResponseEndUserInfoInnerTest { + private final RenewalsDetailsResponseEndUserInfoInner model = new RenewalsDetailsResponseEndUserInfoInner(); + + /** + * Model tests for RenewalsDetailsResponseEndUserInfoInner + */ + @Test + public void testRenewalsDetailsResponseEndUserInfoInner() { + // TODO: test RenewalsDetailsResponseEndUserInfoInner + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'name1' + */ + @Test + public void name1Test() { + // TODO: test name1 + } + + /** + * Test the property 'name2' + */ + @Test + public void name2Test() { + // TODO: test name2 + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'addressLine1' + */ + @Test + public void addressLine1Test() { + // TODO: test addressLine1 + } + + /** + * Test the property 'addressLine2' + */ + @Test + public void addressLine2Test() { + // TODO: test addressLine2 + } + + /** + * Test the property 'addressLine3' + */ + @Test + public void addressLine3Test() { + // TODO: test addressLine3 + } + + /** + * Test the property 'addressLine4' + */ + @Test + public void addressLine4Test() { + // TODO: test addressLine4 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalCode' + */ + @Test + public void postalCodeTest() { + // TODO: test postalCode + } + + /** + * Test the property 'countryCode' + */ + @Test + public void countryCodeTest() { + // TODO: test countryCode + } + + /** + * Test the property 'phoneNumber' + */ + @Test + public void phoneNumberTest() { + // TODO: test phoneNumber + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + +} diff --git a/src/test/java/xiresellers/client/model/RenewalsDetailsResponseProductsInnerTest.java b/src/test/java/xiresellers/client/model/RenewalsDetailsResponseProductsInnerTest.java new file mode 100644 index 00000000..25c8df2f --- /dev/null +++ b/src/test/java/xiresellers/client/model/RenewalsDetailsResponseProductsInnerTest.java @@ -0,0 +1,105 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for RenewalsDetailsResponseProductsInner + */ +public class RenewalsDetailsResponseProductsInnerTest { + private final RenewalsDetailsResponseProductsInner model = new RenewalsDetailsResponseProductsInner(); + + /** + * Model tests for RenewalsDetailsResponseProductsInner + */ + @Test + public void testRenewalsDetailsResponseProductsInner() { + // TODO: test RenewalsDetailsResponseProductsInner + } + + /** + * Test the property 'ingramLineNumber' + */ + @Test + public void ingramLineNumberTest() { + // TODO: test ingramLineNumber + } + + /** + * Test the property 'productDescription' + */ + @Test + public void productDescriptionTest() { + // TODO: test productDescription + } + + /** + * Test the property 'vendorPartNumber' + */ + @Test + public void vendorPartNumberTest() { + // TODO: test vendorPartNumber + } + + /** + * Test the property 'ingramPartNumber' + */ + @Test + public void ingramPartNumberTest() { + // TODO: test ingramPartNumber + } + + /** + * Test the property 'manufacturerPartNumber' + */ + @Test + public void manufacturerPartNumberTest() { + // TODO: test manufacturerPartNumber + } + + /** + * Test the property 'quantity' + */ + @Test + public void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'unitPrice' + */ + @Test + public void unitPriceTest() { + // TODO: test unitPrice + } + + /** + * Test the property 'isConsolidated' + */ + @Test + public void isConsolidatedTest() { + // TODO: test isConsolidated + } + +} diff --git a/src/test/java/xiresellers/client/model/RenewalsDetailsResponseReferenceNumberInnerTest.java b/src/test/java/xiresellers/client/model/RenewalsDetailsResponseReferenceNumberInnerTest.java new file mode 100644 index 00000000..98d78ebe --- /dev/null +++ b/src/test/java/xiresellers/client/model/RenewalsDetailsResponseReferenceNumberInnerTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for RenewalsDetailsResponseReferenceNumberInner + */ +public class RenewalsDetailsResponseReferenceNumberInnerTest { + private final RenewalsDetailsResponseReferenceNumberInner model = new RenewalsDetailsResponseReferenceNumberInner(); + + /** + * Model tests for RenewalsDetailsResponseReferenceNumberInner + */ + @Test + public void testRenewalsDetailsResponseReferenceNumberInner() { + // TODO: test RenewalsDetailsResponseReferenceNumberInner + } + + /** + * Test the property 'notificationId' + */ + @Test + public void notificationIdTest() { + // TODO: test notificationId + } + + /** + * Test the property 'quoteNumber' + */ + @Test + public void quoteNumberTest() { + // TODO: test quoteNumber + } + +} diff --git a/src/test/java/xiresellers/client/model/RenewalsDetailsResponseTest.java b/src/test/java/xiresellers/client/model/RenewalsDetailsResponseTest.java new file mode 100644 index 00000000..812118a8 --- /dev/null +++ b/src/test/java/xiresellers/client/model/RenewalsDetailsResponseTest.java @@ -0,0 +1,168 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.RenewalsDetailsResponseAdditionalAttributesInner; +import xiresellers.client.model.RenewalsDetailsResponseEndUserInfoInner; +import xiresellers.client.model.RenewalsDetailsResponseProductsInner; +import xiresellers.client.model.RenewalsDetailsResponseReferenceNumberInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for RenewalsDetailsResponse + */ +public class RenewalsDetailsResponseTest { + private final RenewalsDetailsResponse model = new RenewalsDetailsResponse(); + + /** + * Model tests for RenewalsDetailsResponse + */ + @Test + public void testRenewalsDetailsResponse() { + // TODO: test RenewalsDetailsResponse + } + + /** + * Test the property 'renewalId' + */ + @Test + public void renewalIdTest() { + // TODO: test renewalId + } + + /** + * Test the property 'ingramOrderNumber' + */ + @Test + public void ingramOrderNumberTest() { + // TODO: test ingramOrderNumber + } + + /** + * Test the property 'ingramOrderDate' + */ + @Test + public void ingramOrderDateTest() { + // TODO: test ingramOrderDate + } + + /** + * Test the property 'expirationDate' + */ + @Test + public void expirationDateTest() { + // TODO: test expirationDate + } + + /** + * Test the property 'ingramPurchaseOrderNumber' + */ + @Test + public void ingramPurchaseOrderNumberTest() { + // TODO: test ingramPurchaseOrderNumber + } + + /** + * Test the property 'customerOrderNumber' + */ + @Test + public void customerOrderNumberTest() { + // TODO: test customerOrderNumber + } + + /** + * Test the property 'endCustomerOrderNumber' + */ + @Test + public void endCustomerOrderNumberTest() { + // TODO: test endCustomerOrderNumber + } + + /** + * Test the property 'renewalValue' + */ + @Test + public void renewalValueTest() { + // TODO: test renewalValue + } + + /** + * Test the property 'endUser' + */ + @Test + public void endUserTest() { + // TODO: test endUser + } + + /** + * Test the property 'vendor' + */ + @Test + public void vendorTest() { + // TODO: test vendor + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'endUserInfo' + */ + @Test + public void endUserInfoTest() { + // TODO: test endUserInfo + } + + /** + * Test the property 'referenceNumber' + */ + @Test + public void referenceNumberTest() { + // TODO: test referenceNumber + } + + /** + * Test the property 'products' + */ + @Test + public void productsTest() { + // TODO: test products + } + + /** + * Test the property 'additionalAttributes' + */ + @Test + public void additionalAttributesTest() { + // TODO: test additionalAttributes + } + +} diff --git a/src/test/java/xiresellers/client/model/RenewalsSearchRequestDataTypeEndDateTest.java b/src/test/java/xiresellers/client/model/RenewalsSearchRequestDataTypeEndDateTest.java new file mode 100644 index 00000000..770474c9 --- /dev/null +++ b/src/test/java/xiresellers/client/model/RenewalsSearchRequestDataTypeEndDateTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for RenewalsSearchRequestDataTypeEndDate + */ +public class RenewalsSearchRequestDataTypeEndDateTest { + private final RenewalsSearchRequestDataTypeEndDate model = new RenewalsSearchRequestDataTypeEndDate(); + + /** + * Model tests for RenewalsSearchRequestDataTypeEndDate + */ + @Test + public void testRenewalsSearchRequestDataTypeEndDate() { + // TODO: test RenewalsSearchRequestDataTypeEndDate + } + + /** + * Test the property 'customStartDate' + */ + @Test + public void customStartDateTest() { + // TODO: test customStartDate + } + + /** + * Test the property 'customEndDate' + */ + @Test + public void customEndDateTest() { + // TODO: test customEndDate + } + +} diff --git a/src/test/java/xiresellers/client/model/RenewalsSearchRequestDataTypeExpirationDateTest.java b/src/test/java/xiresellers/client/model/RenewalsSearchRequestDataTypeExpirationDateTest.java new file mode 100644 index 00000000..658bd313 --- /dev/null +++ b/src/test/java/xiresellers/client/model/RenewalsSearchRequestDataTypeExpirationDateTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for RenewalsSearchRequestDataTypeExpirationDate + */ +public class RenewalsSearchRequestDataTypeExpirationDateTest { + private final RenewalsSearchRequestDataTypeExpirationDate model = new RenewalsSearchRequestDataTypeExpirationDate(); + + /** + * Model tests for RenewalsSearchRequestDataTypeExpirationDate + */ + @Test + public void testRenewalsSearchRequestDataTypeExpirationDate() { + // TODO: test RenewalsSearchRequestDataTypeExpirationDate + } + + /** + * Test the property 'customStartDate' + */ + @Test + public void customStartDateTest() { + // TODO: test customStartDate + } + + /** + * Test the property 'customEndDate' + */ + @Test + public void customEndDateTest() { + // TODO: test customEndDate + } + +} diff --git a/src/test/java/xiresellers/client/model/RenewalsSearchRequestDataTypeInvoiceDateTest.java b/src/test/java/xiresellers/client/model/RenewalsSearchRequestDataTypeInvoiceDateTest.java new file mode 100644 index 00000000..88a75a28 --- /dev/null +++ b/src/test/java/xiresellers/client/model/RenewalsSearchRequestDataTypeInvoiceDateTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for RenewalsSearchRequestDataTypeInvoiceDate + */ +public class RenewalsSearchRequestDataTypeInvoiceDateTest { + private final RenewalsSearchRequestDataTypeInvoiceDate model = new RenewalsSearchRequestDataTypeInvoiceDate(); + + /** + * Model tests for RenewalsSearchRequestDataTypeInvoiceDate + */ + @Test + public void testRenewalsSearchRequestDataTypeInvoiceDate() { + // TODO: test RenewalsSearchRequestDataTypeInvoiceDate + } + + /** + * Test the property 'customStartDate' + */ + @Test + public void customStartDateTest() { + // TODO: test customStartDate + } + + /** + * Test the property 'customEndDate' + */ + @Test + public void customEndDateTest() { + // TODO: test customEndDate + } + +} diff --git a/src/test/java/xiresellers/client/model/RenewalsSearchRequestDataTypeStartDateTest.java b/src/test/java/xiresellers/client/model/RenewalsSearchRequestDataTypeStartDateTest.java new file mode 100644 index 00000000..a8690c5d --- /dev/null +++ b/src/test/java/xiresellers/client/model/RenewalsSearchRequestDataTypeStartDateTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for RenewalsSearchRequestDataTypeStartDate + */ +public class RenewalsSearchRequestDataTypeStartDateTest { + private final RenewalsSearchRequestDataTypeStartDate model = new RenewalsSearchRequestDataTypeStartDate(); + + /** + * Model tests for RenewalsSearchRequestDataTypeStartDate + */ + @Test + public void testRenewalsSearchRequestDataTypeStartDate() { + // TODO: test RenewalsSearchRequestDataTypeStartDate + } + + /** + * Test the property 'customStartDate' + */ + @Test + public void customStartDateTest() { + // TODO: test customStartDate + } + + /** + * Test the property 'customEndDate' + */ + @Test + public void customEndDateTest() { + // TODO: test customEndDate + } + +} diff --git a/src/test/java/xiresellers/client/model/RenewalsSearchRequestDataTypeTest.java b/src/test/java/xiresellers/client/model/RenewalsSearchRequestDataTypeTest.java new file mode 100644 index 00000000..b4d89d8d --- /dev/null +++ b/src/test/java/xiresellers/client/model/RenewalsSearchRequestDataTypeTest.java @@ -0,0 +1,76 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.RenewalsSearchRequestDataTypeEndDate; +import xiresellers.client.model.RenewalsSearchRequestDataTypeExpirationDate; +import xiresellers.client.model.RenewalsSearchRequestDataTypeInvoiceDate; +import xiresellers.client.model.RenewalsSearchRequestDataTypeStartDate; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for RenewalsSearchRequestDataType + */ +public class RenewalsSearchRequestDataTypeTest { + private final RenewalsSearchRequestDataType model = new RenewalsSearchRequestDataType(); + + /** + * Model tests for RenewalsSearchRequestDataType + */ + @Test + public void testRenewalsSearchRequestDataType() { + // TODO: test RenewalsSearchRequestDataType + } + + /** + * Test the property 'startDate' + */ + @Test + public void startDateTest() { + // TODO: test startDate + } + + /** + * Test the property 'endDate' + */ + @Test + public void endDateTest() { + // TODO: test endDate + } + + /** + * Test the property 'invoiceDate' + */ + @Test + public void invoiceDateTest() { + // TODO: test invoiceDate + } + + /** + * Test the property 'expirationDate' + */ + @Test + public void expirationDateTest() { + // TODO: test expirationDate + } + +} diff --git a/src/test/java/xiresellers/client/model/RenewalsSearchRequestStatusOpporutinyStatusTest.java b/src/test/java/xiresellers/client/model/RenewalsSearchRequestStatusOpporutinyStatusTest.java new file mode 100644 index 00000000..456e308c --- /dev/null +++ b/src/test/java/xiresellers/client/model/RenewalsSearchRequestStatusOpporutinyStatusTest.java @@ -0,0 +1,56 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for RenewalsSearchRequestStatusOpporutinyStatus + */ +public class RenewalsSearchRequestStatusOpporutinyStatusTest { + private final RenewalsSearchRequestStatusOpporutinyStatus model = new RenewalsSearchRequestStatusOpporutinyStatus(); + + /** + * Model tests for RenewalsSearchRequestStatusOpporutinyStatus + */ + @Test + public void testRenewalsSearchRequestStatusOpporutinyStatus() { + // TODO: test RenewalsSearchRequestStatusOpporutinyStatus + } + + /** + * Test the property 'value' + */ + @Test + public void valueTest() { + // TODO: test value + } + + /** + * Test the property 'subStatus' + */ + @Test + public void subStatusTest() { + // TODO: test subStatus + } + +} diff --git a/src/test/java/xiresellers/client/model/RenewalsSearchRequestStatusTest.java b/src/test/java/xiresellers/client/model/RenewalsSearchRequestStatusTest.java new file mode 100644 index 00000000..2a721572 --- /dev/null +++ b/src/test/java/xiresellers/client/model/RenewalsSearchRequestStatusTest.java @@ -0,0 +1,49 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.RenewalsSearchRequestStatusOpporutinyStatus; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for RenewalsSearchRequestStatus + */ +public class RenewalsSearchRequestStatusTest { + private final RenewalsSearchRequestStatus model = new RenewalsSearchRequestStatus(); + + /** + * Model tests for RenewalsSearchRequestStatus + */ + @Test + public void testRenewalsSearchRequestStatus() { + // TODO: test RenewalsSearchRequestStatus + } + + /** + * Test the property 'opporutinyStatus' + */ + @Test + public void opporutinyStatusTest() { + // TODO: test opporutinyStatus + } + +} diff --git a/src/test/java/xiresellers/client/model/RenewalsSearchRequestTest.java b/src/test/java/xiresellers/client/model/RenewalsSearchRequestTest.java new file mode 100644 index 00000000..8c5244a1 --- /dev/null +++ b/src/test/java/xiresellers/client/model/RenewalsSearchRequestTest.java @@ -0,0 +1,74 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import xiresellers.client.model.RenewalsSearchRequestDataType; +import xiresellers.client.model.RenewalsSearchRequestStatus; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for RenewalsSearchRequest + */ +public class RenewalsSearchRequestTest { + private final RenewalsSearchRequest model = new RenewalsSearchRequest(); + + /** + * Model tests for RenewalsSearchRequest + */ + @Test + public void testRenewalsSearchRequest() { + // TODO: test RenewalsSearchRequest + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'dataType' + */ + @Test + public void dataTypeTest() { + // TODO: test dataType + } + + /** + * Test the property 'vendor' + */ + @Test + public void vendorTest() { + // TODO: test vendor + } + + /** + * Test the property 'endUser' + */ + @Test + public void endUserTest() { + // TODO: test endUser + } + +} diff --git a/src/test/java/xiresellers/client/model/RenewalsSearchResponseRenewalsInnerLinksInnerTest.java b/src/test/java/xiresellers/client/model/RenewalsSearchResponseRenewalsInnerLinksInnerTest.java new file mode 100644 index 00000000..5f64246d --- /dev/null +++ b/src/test/java/xiresellers/client/model/RenewalsSearchResponseRenewalsInnerLinksInnerTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for RenewalsSearchResponseRenewalsInnerLinksInner + */ +public class RenewalsSearchResponseRenewalsInnerLinksInnerTest { + private final RenewalsSearchResponseRenewalsInnerLinksInner model = new RenewalsSearchResponseRenewalsInnerLinksInner(); + + /** + * Model tests for RenewalsSearchResponseRenewalsInnerLinksInner + */ + @Test + public void testRenewalsSearchResponseRenewalsInnerLinksInner() { + // TODO: test RenewalsSearchResponseRenewalsInnerLinksInner + } + + /** + * Test the property 'topic' + */ + @Test + public void topicTest() { + // TODO: test topic + } + + /** + * Test the property 'href' + */ + @Test + public void hrefTest() { + // TODO: test href + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/xiresellers/client/model/RenewalsSearchResponseRenewalsInnerTest.java b/src/test/java/xiresellers/client/model/RenewalsSearchResponseRenewalsInnerTest.java new file mode 100644 index 00000000..31634364 --- /dev/null +++ b/src/test/java/xiresellers/client/model/RenewalsSearchResponseRenewalsInnerTest.java @@ -0,0 +1,115 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.RenewalsSearchResponseRenewalsInnerLinksInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for RenewalsSearchResponseRenewalsInner + */ +public class RenewalsSearchResponseRenewalsInnerTest { + private final RenewalsSearchResponseRenewalsInner model = new RenewalsSearchResponseRenewalsInner(); + + /** + * Model tests for RenewalsSearchResponseRenewalsInner + */ + @Test + public void testRenewalsSearchResponseRenewalsInner() { + // TODO: test RenewalsSearchResponseRenewalsInner + } + + /** + * Test the property 'renewalId' + */ + @Test + public void renewalIdTest() { + // TODO: test renewalId + } + + /** + * Test the property 'customerOrderNumber' + */ + @Test + public void customerOrderNumberTest() { + // TODO: test customerOrderNumber + } + + /** + * Test the property 'referenceNumber' + */ + @Test + public void referenceNumberTest() { + // TODO: test referenceNumber + } + + /** + * Test the property 'endUser' + */ + @Test + public void endUserTest() { + // TODO: test endUser + } + + /** + * Test the property 'vendor' + */ + @Test + public void vendorTest() { + // TODO: test vendor + } + + /** + * Test the property 'expirationDate' + */ + @Test + public void expirationDateTest() { + // TODO: test expirationDate + } + + /** + * Test the property 'renewalValue' + */ + @Test + public void renewalValueTest() { + // TODO: test renewalValue + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'links' + */ + @Test + public void linksTest() { + // TODO: test links + } + +} diff --git a/src/test/java/xiresellers/client/model/RenewalsSearchResponseTest.java b/src/test/java/xiresellers/client/model/RenewalsSearchResponseTest.java new file mode 100644 index 00000000..700215b0 --- /dev/null +++ b/src/test/java/xiresellers/client/model/RenewalsSearchResponseTest.java @@ -0,0 +1,91 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.RenewalsSearchResponseRenewalsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for RenewalsSearchResponse + */ +public class RenewalsSearchResponseTest { + private final RenewalsSearchResponse model = new RenewalsSearchResponse(); + + /** + * Model tests for RenewalsSearchResponse + */ + @Test + public void testRenewalsSearchResponse() { + // TODO: test RenewalsSearchResponse + } + + /** + * Test the property 'recordsFound' + */ + @Test + public void recordsFoundTest() { + // TODO: test recordsFound + } + + /** + * Test the property 'pageSize' + */ + @Test + public void pageSizeTest() { + // TODO: test pageSize + } + + /** + * Test the property 'pageNumber' + */ + @Test + public void pageNumberTest() { + // TODO: test pageNumber + } + + /** + * Test the property 'renewals' + */ + @Test + public void renewalsTest() { + // TODO: test renewals + } + + /** + * Test the property 'nextPage' + */ + @Test + public void nextPageTest() { + // TODO: test nextPage + } + + /** + * Test the property 'previousPage' + */ + @Test + public void previousPageTest() { + // TODO: test previousPage + } + +} diff --git a/src/test/java/xiresellers/client/model/ReturnsCreateRequestListInnerShipFromInfoInnerTest.java b/src/test/java/xiresellers/client/model/ReturnsCreateRequestListInnerShipFromInfoInnerTest.java new file mode 100644 index 00000000..c023c31a --- /dev/null +++ b/src/test/java/xiresellers/client/model/ReturnsCreateRequestListInnerShipFromInfoInnerTest.java @@ -0,0 +1,128 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ReturnsCreateRequestListInnerShipFromInfoInner + */ +public class ReturnsCreateRequestListInnerShipFromInfoInnerTest { + private final ReturnsCreateRequestListInnerShipFromInfoInner model = new ReturnsCreateRequestListInnerShipFromInfoInner(); + + /** + * Model tests for ReturnsCreateRequestListInnerShipFromInfoInner + */ + @Test + public void testReturnsCreateRequestListInnerShipFromInfoInner() { + // TODO: test ReturnsCreateRequestListInnerShipFromInfoInner + } + + /** + * Test the property 'companyName' + */ + @Test + public void companyNameTest() { + // TODO: test companyName + } + + /** + * Test the property 'contact' + */ + @Test + public void contactTest() { + // TODO: test contact + } + + /** + * Test the property 'addressLine1' + */ + @Test + public void addressLine1Test() { + // TODO: test addressLine1 + } + + /** + * Test the property 'addressLine2' + */ + @Test + public void addressLine2Test() { + // TODO: test addressLine2 + } + + /** + * Test the property 'addressLine3' + */ + @Test + public void addressLine3Test() { + // TODO: test addressLine3 + } + + /** + * Test the property 'city' + */ + @Test + public void cityTest() { + // TODO: test city + } + + /** + * Test the property 'state' + */ + @Test + public void stateTest() { + // TODO: test state + } + + /** + * Test the property 'postalCode' + */ + @Test + public void postalCodeTest() { + // TODO: test postalCode + } + + /** + * Test the property 'countryCode' + */ + @Test + public void countryCodeTest() { + // TODO: test countryCode + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'phoneNumber' + */ + @Test + public void phoneNumberTest() { + // TODO: test phoneNumber + } + +} diff --git a/src/test/java/xiresellers/client/model/ReturnsCreateRequestListInnerTest.java b/src/test/java/xiresellers/client/model/ReturnsCreateRequestListInnerTest.java new file mode 100644 index 00000000..77410421 --- /dev/null +++ b/src/test/java/xiresellers/client/model/ReturnsCreateRequestListInnerTest.java @@ -0,0 +1,156 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ReturnsCreateRequestListInnerShipFromInfoInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ReturnsCreateRequestListInner + */ +public class ReturnsCreateRequestListInnerTest { + private final ReturnsCreateRequestListInner model = new ReturnsCreateRequestListInner(); + + /** + * Model tests for ReturnsCreateRequestListInner + */ + @Test + public void testReturnsCreateRequestListInner() { + // TODO: test ReturnsCreateRequestListInner + } + + /** + * Test the property 'invoiceNumber' + */ + @Test + public void invoiceNumberTest() { + // TODO: test invoiceNumber + } + + /** + * Test the property 'invoiceDate' + */ + @Test + public void invoiceDateTest() { + // TODO: test invoiceDate + } + + /** + * Test the property 'customerOrderNumber' + */ + @Test + public void customerOrderNumberTest() { + // TODO: test customerOrderNumber + } + + /** + * Test the property 'ingramPartNumber' + */ + @Test + public void ingramPartNumberTest() { + // TODO: test ingramPartNumber + } + + /** + * Test the property 'vendorPartNumber' + */ + @Test + public void vendorPartNumberTest() { + // TODO: test vendorPartNumber + } + + /** + * Test the property 'serialNumber' + */ + @Test + public void serialNumberTest() { + // TODO: test serialNumber + } + + /** + * Test the property 'quantity' + */ + @Test + public void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'primaryReason' + */ + @Test + public void primaryReasonTest() { + // TODO: test primaryReason + } + + /** + * Test the property 'secondaryReason' + */ + @Test + public void secondaryReasonTest() { + // TODO: test secondaryReason + } + + /** + * Test the property 'notes' + */ + @Test + public void notesTest() { + // TODO: test notes + } + + /** + * Test the property 'referenceNumber' + */ + @Test + public void referenceNumberTest() { + // TODO: test referenceNumber + } + + /** + * Test the property 'billToAddressId' + */ + @Test + public void billToAddressIdTest() { + // TODO: test billToAddressId + } + + /** + * Test the property 'shipFromInfo' + */ + @Test + public void shipFromInfoTest() { + // TODO: test shipFromInfo + } + + /** + * Test the property 'numberOfBoxes' + */ + @Test + public void numberOfBoxesTest() { + // TODO: test numberOfBoxes + } + +} diff --git a/src/test/java/xiresellers/client/model/ReturnsCreateRequestTest.java b/src/test/java/xiresellers/client/model/ReturnsCreateRequestTest.java new file mode 100644 index 00000000..810e151a --- /dev/null +++ b/src/test/java/xiresellers/client/model/ReturnsCreateRequestTest.java @@ -0,0 +1,51 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ReturnsCreateRequestListInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ReturnsCreateRequest + */ +public class ReturnsCreateRequestTest { + private final ReturnsCreateRequest model = new ReturnsCreateRequest(); + + /** + * Model tests for ReturnsCreateRequest + */ + @Test + public void testReturnsCreateRequest() { + // TODO: test ReturnsCreateRequest + } + + /** + * Test the property '_list' + */ + @Test + public void _listTest() { + // TODO: test _list + } + +} diff --git a/src/test/java/xiresellers/client/model/ReturnsCreateResponseReturnsClaimsInnerTest.java b/src/test/java/xiresellers/client/model/ReturnsCreateResponseReturnsClaimsInnerTest.java new file mode 100644 index 00000000..298e20c8 --- /dev/null +++ b/src/test/java/xiresellers/client/model/ReturnsCreateResponseReturnsClaimsInnerTest.java @@ -0,0 +1,157 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ReturnsSearchResponseReturnsClaimsInnerLinksInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ReturnsCreateResponseReturnsClaimsInner + */ +public class ReturnsCreateResponseReturnsClaimsInnerTest { + private final ReturnsCreateResponseReturnsClaimsInner model = new ReturnsCreateResponseReturnsClaimsInner(); + + /** + * Model tests for ReturnsCreateResponseReturnsClaimsInner + */ + @Test + public void testReturnsCreateResponseReturnsClaimsInner() { + // TODO: test ReturnsCreateResponseReturnsClaimsInner + } + + /** + * Test the property 'rmaClaimId' + */ + @Test + public void rmaClaimIdTest() { + // TODO: test rmaClaimId + } + + /** + * Test the property 'caseRequestNumber' + */ + @Test + public void caseRequestNumberTest() { + // TODO: test caseRequestNumber + } + + /** + * Test the property 'referenceNumber' + */ + @Test + public void referenceNumberTest() { + // TODO: test referenceNumber + } + + /** + * Test the property 'createdOn' + */ + @Test + public void createdOnTest() { + // TODO: test createdOn + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'returnReason' + */ + @Test + public void returnReasonTest() { + // TODO: test returnReason + } + + /** + * Test the property 'ingramPartNumber' + */ + @Test + public void ingramPartNumberTest() { + // TODO: test ingramPartNumber + } + + /** + * Test the property 'vendorPartNumber' + */ + @Test + public void vendorPartNumberTest() { + // TODO: test vendorPartNumber + } + + /** + * Test the property 'quantity' + */ + @Test + public void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'notes' + */ + @Test + public void notesTest() { + // TODO: test notes + } + + /** + * Test the property 'estimatedTotalValue' + */ + @Test + public void estimatedTotalValueTest() { + // TODO: test estimatedTotalValue + } + + /** + * Test the property 'credit' + */ + @Test + public void creditTest() { + // TODO: test credit + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'links' + */ + @Test + public void linksTest() { + // TODO: test links + } + +} diff --git a/src/test/java/xiresellers/client/model/ReturnsCreateResponseTest.java b/src/test/java/xiresellers/client/model/ReturnsCreateResponseTest.java new file mode 100644 index 00000000..449b18b4 --- /dev/null +++ b/src/test/java/xiresellers/client/model/ReturnsCreateResponseTest.java @@ -0,0 +1,51 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ReturnsCreateResponseReturnsClaimsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ReturnsCreateResponse + */ +public class ReturnsCreateResponseTest { + private final ReturnsCreateResponse model = new ReturnsCreateResponse(); + + /** + * Model tests for ReturnsCreateResponse + */ + @Test + public void testReturnsCreateResponse() { + // TODO: test ReturnsCreateResponse + } + + /** + * Test the property 'returnsClaims' + */ + @Test + public void returnsClaimsTest() { + // TODO: test returnsClaims + } + +} diff --git a/src/test/java/xiresellers/client/model/ReturnsDetailsResponseProductsInnerTest.java b/src/test/java/xiresellers/client/model/ReturnsDetailsResponseProductsInnerTest.java new file mode 100644 index 00000000..0043f5fd --- /dev/null +++ b/src/test/java/xiresellers/client/model/ReturnsDetailsResponseProductsInnerTest.java @@ -0,0 +1,162 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ReturnsDetailsResponseProductsInner + */ +public class ReturnsDetailsResponseProductsInnerTest { + private final ReturnsDetailsResponseProductsInner model = new ReturnsDetailsResponseProductsInner(); + + /** + * Model tests for ReturnsDetailsResponseProductsInner + */ + @Test + public void testReturnsDetailsResponseProductsInner() { + // TODO: test ReturnsDetailsResponseProductsInner + } + + /** + * Test the property 'ingramLineNumber' + */ + @Test + public void ingramLineNumberTest() { + // TODO: test ingramLineNumber + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'ingramPartNumber' + */ + @Test + public void ingramPartNumberTest() { + // TODO: test ingramPartNumber + } + + /** + * Test the property 'vendorPartNumber' + */ + @Test + public void vendorPartNumberTest() { + // TODO: test vendorPartNumber + } + + /** + * Test the property 'upc' + */ + @Test + public void upcTest() { + // TODO: test upc + } + + /** + * Test the property 'invoiceDate' + */ + @Test + public void invoiceDateTest() { + // TODO: test invoiceDate + } + + /** + * Test the property 'invoiceNumber' + */ + @Test + public void invoiceNumberTest() { + // TODO: test invoiceNumber + } + + /** + * Test the property 'customerOrderNumber' + */ + @Test + public void customerOrderNumberTest() { + // TODO: test customerOrderNumber + } + + /** + * Test the property 'requestDetails' + */ + @Test + public void requestDetailsTest() { + // TODO: test requestDetails + } + + /** + * Test the property 'quantity' + */ + @Test + public void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'unitPrice' + */ + @Test + public void unitPriceTest() { + // TODO: test unitPrice + } + + /** + * Test the property 'extendedPrice' + */ + @Test + public void extendedPriceTest() { + // TODO: test extendedPrice + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'returnBranch' + */ + @Test + public void returnBranchTest() { + // TODO: test returnBranch + } + + /** + * Test the property 'shipFromBranch' + */ + @Test + public void shipFromBranchTest() { + // TODO: test shipFromBranch + } + +} diff --git a/src/test/java/xiresellers/client/model/ReturnsDetailsResponseTest.java b/src/test/java/xiresellers/client/model/ReturnsDetailsResponseTest.java new file mode 100644 index 00000000..3b1cb3fb --- /dev/null +++ b/src/test/java/xiresellers/client/model/ReturnsDetailsResponseTest.java @@ -0,0 +1,149 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ReturnsDetailsResponseProductsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ReturnsDetailsResponse + */ +public class ReturnsDetailsResponseTest { + private final ReturnsDetailsResponse model = new ReturnsDetailsResponse(); + + /** + * Model tests for ReturnsDetailsResponse + */ + @Test + public void testReturnsDetailsResponse() { + // TODO: test ReturnsDetailsResponse + } + + /** + * Test the property 'typeOfDetails' + */ + @Test + public void typeOfDetailsTest() { + // TODO: test typeOfDetails + } + + /** + * Test the property 'rmaClaimId' + */ + @Test + public void rmaClaimIdTest() { + // TODO: test rmaClaimId + } + + /** + * Test the property 'caseRequestNumber' + */ + @Test + public void caseRequestNumberTest() { + // TODO: test caseRequestNumber + } + + /** + * Test the property 'createdOn' + */ + @Test + public void createdOnTest() { + // TODO: test createdOn + } + + /** + * Test the property 'returnReason' + */ + @Test + public void returnReasonTest() { + // TODO: test returnReason + } + + /** + * Test the property 'referenceNumber' + */ + @Test + public void referenceNumberTest() { + // TODO: test referenceNumber + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'returnWarehouseAddress' + */ + @Test + public void returnWarehouseAddressTest() { + // TODO: test returnWarehouseAddress + } + + /** + * Test the property 'products' + */ + @Test + public void productsTest() { + // TODO: test products + } + + /** + * Test the property 'subTotal' + */ + @Test + public void subTotalTest() { + // TODO: test subTotal + } + + /** + * Test the property 'tax' + */ + @Test + public void taxTest() { + // TODO: test tax + } + + /** + * Test the property 'additionalFees' + */ + @Test + public void additionalFeesTest() { + // TODO: test additionalFees + } + + /** + * Test the property 'estimatedTotal' + */ + @Test + public void estimatedTotalTest() { + // TODO: test estimatedTotal + } + +} diff --git a/src/test/java/xiresellers/client/model/ReturnsSearchResponseReturnsClaimsInnerLinksInnerTest.java b/src/test/java/xiresellers/client/model/ReturnsSearchResponseReturnsClaimsInnerLinksInnerTest.java new file mode 100644 index 00000000..14b60a52 --- /dev/null +++ b/src/test/java/xiresellers/client/model/ReturnsSearchResponseReturnsClaimsInnerLinksInnerTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ReturnsSearchResponseReturnsClaimsInnerLinksInner + */ +public class ReturnsSearchResponseReturnsClaimsInnerLinksInnerTest { + private final ReturnsSearchResponseReturnsClaimsInnerLinksInner model = new ReturnsSearchResponseReturnsClaimsInnerLinksInner(); + + /** + * Model tests for ReturnsSearchResponseReturnsClaimsInnerLinksInner + */ + @Test + public void testReturnsSearchResponseReturnsClaimsInnerLinksInner() { + // TODO: test ReturnsSearchResponseReturnsClaimsInnerLinksInner + } + + /** + * Test the property 'topic' + */ + @Test + public void topicTest() { + // TODO: test topic + } + + /** + * Test the property 'href' + */ + @Test + public void hrefTest() { + // TODO: test href + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + +} diff --git a/src/test/java/xiresellers/client/model/ReturnsSearchResponseReturnsClaimsInnerTest.java b/src/test/java/xiresellers/client/model/ReturnsSearchResponseReturnsClaimsInnerTest.java new file mode 100644 index 00000000..bac37c3c --- /dev/null +++ b/src/test/java/xiresellers/client/model/ReturnsSearchResponseReturnsClaimsInnerTest.java @@ -0,0 +1,133 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ReturnsSearchResponseReturnsClaimsInnerLinksInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ReturnsSearchResponseReturnsClaimsInner + */ +public class ReturnsSearchResponseReturnsClaimsInnerTest { + private final ReturnsSearchResponseReturnsClaimsInner model = new ReturnsSearchResponseReturnsClaimsInner(); + + /** + * Model tests for ReturnsSearchResponseReturnsClaimsInner + */ + @Test + public void testReturnsSearchResponseReturnsClaimsInner() { + // TODO: test ReturnsSearchResponseReturnsClaimsInner + } + + /** + * Test the property 'returnClaimId' + */ + @Test + public void returnClaimIdTest() { + // TODO: test returnClaimId + } + + /** + * Test the property 'caseRequestNumber' + */ + @Test + public void caseRequestNumberTest() { + // TODO: test caseRequestNumber + } + + /** + * Test the property 'createdOn' + */ + @Test + public void createdOnTest() { + // TODO: test createdOn + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'returnReason' + */ + @Test + public void returnReasonTest() { + // TODO: test returnReason + } + + /** + * Test the property 'referenceNumber' + */ + @Test + public void referenceNumberTest() { + // TODO: test referenceNumber + } + + /** + * Test the property 'estimatedTotalValue' + */ + @Test + public void estimatedTotalValueTest() { + // TODO: test estimatedTotalValue + } + + /** + * Test the property 'credit' + */ + @Test + public void creditTest() { + // TODO: test credit + } + + /** + * Test the property 'modifiedOn' + */ + @Test + public void modifiedOnTest() { + // TODO: test modifiedOn + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'links' + */ + @Test + public void linksTest() { + // TODO: test links + } + +} diff --git a/src/test/java/xiresellers/client/model/ReturnsSearchResponseTest.java b/src/test/java/xiresellers/client/model/ReturnsSearchResponseTest.java new file mode 100644 index 00000000..de57b309 --- /dev/null +++ b/src/test/java/xiresellers/client/model/ReturnsSearchResponseTest.java @@ -0,0 +1,91 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ReturnsSearchResponseReturnsClaimsInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ReturnsSearchResponse + */ +public class ReturnsSearchResponseTest { + private final ReturnsSearchResponse model = new ReturnsSearchResponse(); + + /** + * Model tests for ReturnsSearchResponse + */ + @Test + public void testReturnsSearchResponse() { + // TODO: test ReturnsSearchResponse + } + + /** + * Test the property 'recordsFound' + */ + @Test + public void recordsFoundTest() { + // TODO: test recordsFound + } + + /** + * Test the property 'pageSize' + */ + @Test + public void pageSizeTest() { + // TODO: test pageSize + } + + /** + * Test the property 'pageNumber' + */ + @Test + public void pageNumberTest() { + // TODO: test pageNumber + } + + /** + * Test the property 'returnsClaims' + */ + @Test + public void returnsClaimsTest() { + // TODO: test returnsClaims + } + + /** + * Test the property 'nextPage' + */ + @Test + public void nextPageTest() { + // TODO: test nextPage + } + + /** + * Test the property 'previousPage' + */ + @Test + public void previousPageTest() { + // TODO: test previousPage + } + +} diff --git a/src/test/java/xiresellers/client/model/ValidateQuoteResponseLinesInnerTest.java b/src/test/java/xiresellers/client/model/ValidateQuoteResponseLinesInnerTest.java new file mode 100644 index 00000000..6eed3765 --- /dev/null +++ b/src/test/java/xiresellers/client/model/ValidateQuoteResponseLinesInnerTest.java @@ -0,0 +1,75 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ValidateQuoteResponseLinesInner + */ +public class ValidateQuoteResponseLinesInnerTest { + private final ValidateQuoteResponseLinesInner model = new ValidateQuoteResponseLinesInner(); + + /** + * Model tests for ValidateQuoteResponseLinesInner + */ + @Test + public void testValidateQuoteResponseLinesInner() { + // TODO: test ValidateQuoteResponseLinesInner + } + + /** + * Test the property 'customerLineNumber' + */ + @Test + public void customerLineNumberTest() { + // TODO: test customerLineNumber + } + + /** + * Test the property 'ingramPartNumber' + */ + @Test + public void ingramPartNumberTest() { + // TODO: test ingramPartNumber + } + + /** + * Test the property 'quantity' + */ + @Test + public void quantityTest() { + // TODO: test quantity + } + + /** + * Test the property 'vmfAdditionalAttributesLines' + */ + @Test + public void vmfAdditionalAttributesLinesTest() { + // TODO: test vmfAdditionalAttributesLines + } + +} diff --git a/src/test/java/xiresellers/client/model/ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInnerTest.java b/src/test/java/xiresellers/client/model/ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInnerTest.java new file mode 100644 index 00000000..7e23445c --- /dev/null +++ b/src/test/java/xiresellers/client/model/ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInnerTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner + */ +public class ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInnerTest { + private final ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner model = new ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner(); + + /** + * Model tests for ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner + */ + @Test + public void testValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner() { + // TODO: test ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner + } + + /** + * Test the property 'attributeName' + */ + @Test + public void attributeNameTest() { + // TODO: test attributeName + } + + /** + * Test the property 'attributeValue' + */ + @Test + public void attributeValueTest() { + // TODO: test attributeValue + } + + /** + * Test the property 'attributeDescription' + */ + @Test + public void attributeDescriptionTest() { + // TODO: test attributeDescription + } + +} diff --git a/src/test/java/xiresellers/client/model/ValidateQuoteResponseTest.java b/src/test/java/xiresellers/client/model/ValidateQuoteResponseTest.java new file mode 100644 index 00000000..6dc829c6 --- /dev/null +++ b/src/test/java/xiresellers/client/model/ValidateQuoteResponseTest.java @@ -0,0 +1,76 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import xiresellers.client.model.ValidateQuoteResponseLinesInner; +import xiresellers.client.model.ValidateQuoteResponseVmfAdditionalAttributesInner; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ValidateQuoteResponse + */ +public class ValidateQuoteResponseTest { + private final ValidateQuoteResponse model = new ValidateQuoteResponse(); + + /** + * Model tests for ValidateQuoteResponse + */ + @Test + public void testValidateQuoteResponse() { + // TODO: test ValidateQuoteResponse + } + + /** + * Test the property 'quoteNumber' + */ + @Test + public void quoteNumberTest() { + // TODO: test quoteNumber + } + + /** + * Test the property 'vendorName' + */ + @Test + public void vendorNameTest() { + // TODO: test vendorName + } + + /** + * Test the property 'vmfAdditionalAttributes' + */ + @Test + public void vmfAdditionalAttributesTest() { + // TODO: test vmfAdditionalAttributes + } + + /** + * Test the property 'lines' + */ + @Test + public void linesTest() { + // TODO: test lines + } + +} diff --git a/src/test/java/xiresellers/client/model/ValidateQuoteResponseVmfAdditionalAttributesInnerTest.java b/src/test/java/xiresellers/client/model/ValidateQuoteResponseVmfAdditionalAttributesInnerTest.java new file mode 100644 index 00000000..3a0f727b --- /dev/null +++ b/src/test/java/xiresellers/client/model/ValidateQuoteResponseVmfAdditionalAttributesInnerTest.java @@ -0,0 +1,64 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ValidateQuoteResponseVmfAdditionalAttributesInner + */ +public class ValidateQuoteResponseVmfAdditionalAttributesInnerTest { + private final ValidateQuoteResponseVmfAdditionalAttributesInner model = new ValidateQuoteResponseVmfAdditionalAttributesInner(); + + /** + * Model tests for ValidateQuoteResponseVmfAdditionalAttributesInner + */ + @Test + public void testValidateQuoteResponseVmfAdditionalAttributesInner() { + // TODO: test ValidateQuoteResponseVmfAdditionalAttributesInner + } + + /** + * Test the property 'attributeName' + */ + @Test + public void attributeNameTest() { + // TODO: test attributeName + } + + /** + * Test the property 'attributeValue' + */ + @Test + public void attributeValueTest() { + // TODO: test attributeValue + } + + /** + * Test the property 'attributeDescription' + */ + @Test + public void attributeDescriptionTest() { + // TODO: test attributeDescription + } + +} diff --git a/src/test/java/xiresellers/client/model/WarehouseListTypeTest.java b/src/test/java/xiresellers/client/model/WarehouseListTypeTest.java new file mode 100644 index 00000000..d4eedeb4 --- /dev/null +++ b/src/test/java/xiresellers/client/model/WarehouseListTypeTest.java @@ -0,0 +1,88 @@ +/* + * Reseller API + * For Resellers.
    Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers. + * + * The version of the OpenAPI document: 6.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package xiresellers.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for WarehouseListType + */ +public class WarehouseListTypeTest { + private final WarehouseListType model = new WarehouseListType(); + + /** + * Model tests for WarehouseListType + */ + @Test + public void testWarehouseListType() { + // TODO: test WarehouseListType + } + + /** + * Test the property 'warehouseid' + */ + @Test + public void warehouseidTest() { + // TODO: test warehouseid + } + + /** + * Test the property 'warehousedescription' + */ + @Test + public void warehousedescriptionTest() { + // TODO: test warehousedescription + } + + /** + * Test the property 'availablequantity' + */ + @Test + public void availablequantityTest() { + // TODO: test availablequantity + } + + /** + * Test the property 'onorderquantity' + */ + @Test + public void onorderquantityTest() { + // TODO: test onorderquantity + } + + /** + * Test the property 'onholdquantity' + */ + @Test + public void onholdquantityTest() { + // TODO: test onholdquantity + } + + /** + * Test the property 'etadate' + */ + @Test + public void etadateTest() { + // TODO: test etadate + } + +}